LLgen.1 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. .\" $Header$
  2. .TH LLGEN 1
  3. .SH NAME
  4. LLgen, an extended LL(1) parser generator
  5. .SH SYNOPSIS
  6. \fBLLgen\fP
  7. [
  8. \fB\-vVxXfF\fP
  9. ]
  10. file ...
  11. .SH DESCRIPTION
  12. \fILLgen\fP
  13. converts a context-free grammar into a set of
  14. functions which form a recursive descent parser with no backtrack.
  15. The grammar may be ambiguous;
  16. ambiguities can be broken by user specifications.
  17. .PP
  18. \fILLgen\fP
  19. reads each
  20. \fIfile\fP
  21. in sequence.
  22. Together, these files must constitute a context-free grammar.
  23. For each file,
  24. \fILLgen\fP
  25. generates an output file, which must be compiled by the
  26. C-compiler.
  27. In addition, it generates the files
  28. \fILpars.c\fP
  29. and
  30. \fILpars.h.\fP
  31. \fILpars.h\fP
  32. contains the
  33. \fIdefine\fP
  34. statements that associate the
  35. \fILLgen\fP-assigned `token-codes' with user declared `token-names'.
  36. This allows other source files, for instance the source file
  37. containing the lexical analyzer,
  38. to access the token-codes by
  39. using the token-names.
  40. \fILpars.c\fP
  41. contains the error recovery routines and tables. It must also
  42. be compiled by the C-compiler.
  43. .PP
  44. \fILLgen\fP
  45. will only update those output files that differ from their previous
  46. version.
  47. This allows
  48. \fILLgen\fP
  49. to be used with
  50. \fImake\fP
  51. (I) convieniently.
  52. .PP
  53. To obtain a working program, the user must also supply a
  54. lexical analyzer, as well as
  55. \fImain\fP
  56. and
  57. \fILLmessage\fP,
  58. an error reporting routine;
  59. \fILex\fP
  60. (I) is a useful program for creating lexical analysers usable
  61. by
  62. \fILLgen\fP.
  63. .PP
  64. If the
  65. \fB\-v\fP
  66. or the
  67. \fB\-V\fP
  68. flag is given, the file
  69. \fILL.output\fP
  70. is prepared, which contains a description of the conflicts that
  71. were not resolved.
  72. If it is given more than once,
  73. \fILLgen\fP
  74. will be more "verbose".
  75. If it is given three times, a complete description of the
  76. grammar will be supplied.
  77. .PP
  78. If the
  79. \fB\-x\fP
  80. or the
  81. \fB\-X\fP
  82. flag is given,
  83. the sets that are computed are extended with the nonterminal
  84. symbols and these extended sets are also included in the
  85. \fILL.output\fP
  86. file.
  87. .PP
  88. If the
  89. \fB\-f\fP
  90. or the
  91. \fB\-F\fP
  92. flag is given,
  93. \fILLgen\fP generates code, that enables the C-compiler to generate jump-
  94. tables for switches. This option should only be used when a large address
  95. space is available.
  96. .SH FILES
  97. LL.output verbose output file
  98. .br
  99. Lpars.c the error recovery routines
  100. .br
  101. Lpars.h defines for token names
  102. .SH "SEE ALSO"
  103. \fIlex\fP (I)
  104. .br
  105. \fImake\fP (I)
  106. .br
  107. \fILLgen, an Extended LL(1) Parser Generator\fP
  108. by C.J.H. Jacobs.
  109. .SH DIAGNOSTICS
  110. Are intended to be self-explanatory. They are reported
  111. on standard error. A more detailed report is found in the
  112. \fILL.output\fP
  113. file.
  114. .SH BUGS
  115. Because some file names are fixed, at most one
  116. \fILLgen\fP
  117. process can be active in a given directory at
  118. a time.
  119. .SH AUTHOR
  120. Ceriel J. H. Jacobs