bison.rnh 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .!
  2. .! RUNOFF source file for BISON.HLP
  3. .!
  4. .! This is a RUNOFF input file which will produce a VMS help file
  5. .! for the VMS HELP library.
  6. .!
  7. .! Date of last revision: June 21, 1992
  8. .! Eric Youngdale
  9. .!
  10. .! Modified (1992) from bison-1.19 by
  11. .! Wilfred J. Hansen (wjh+@cmu.edu),
  12. .! Andrew Consortium, Carnegie Mellon University
  13. .!
  14. .literal
  15. .end literal
  16. .no paging
  17. .no flags all
  18. .right margin 70
  19. .left margin 1
  20. .indent -1
  21. 1 BISON
  22. .skip
  23. The BISON command invokes the GNU BISON parser generator.
  24. .skip
  25. .literal
  26. BISON file-spec
  27. .end literal
  28. .skip
  29. .indent -1
  30. 2 Parameters
  31. .skip
  32. file-spec
  33. .skip
  34. Here file-spec is the grammar file name, which usually ends in
  35. .y. The parser file's name is made by replacing the .y
  36. with _tab.c. Thus, the command bison foo.y yields
  37. foo_tab.c.
  38. .skip
  39. .indent -1
  40. 2 Qualifiers
  41. .skip
  42. The following is the list of available qualifiers for BISON:
  43. .literal
  44. /DEBUG
  45. /DEFINES
  46. /FILE_PREFIX=prefix
  47. /FIXED_OUTFILES
  48. /NAME_PREFIX=prefix
  49. /NOLINES
  50. /NOPARSER
  51. /OUTPUT=outfilefile
  52. /RAW
  53. /TOKEN_TABLE
  54. /VERBOSE
  55. /VERSION
  56. /YACC
  57. .end literal
  58. .skip
  59. .indent -1
  60. 2 /DEBUG
  61. .skip
  62. Output a definition of the macro YYDEBUG into the parser file,
  63. so that the debugging facilities are compiled.
  64. .skip
  65. .indent -1
  66. 2 /DEFINES
  67. .skip
  68. Write an extra output file containing macro definitions for the token
  69. type names defined in the grammar and the semantic value type
  70. YYSTYPE, as well as a extern variable declarations.
  71. .skip
  72. If the parser output file is named "name.c" then this file
  73. is named "name.h".
  74. .skip
  75. This output file is essential if you wish to put the definition of
  76. yylex in a separate source file, because yylex needs to
  77. be able to refer to token type codes and the variable
  78. yylval.
  79. .skip
  80. .indent -1
  81. 2 /FILE_PREFIX
  82. .skip
  83. .literal
  84. /FILIE_PREFIX=prefix
  85. .end literal
  86. .skip
  87. Specify a prefix to use for all Bison output file names. The names are
  88. chosen as if the input file were named prefix.c
  89. .skip
  90. .indent -1
  91. 2 /FIXED_OUTFILES
  92. .skip
  93. Equivalent to /OUTPUT=y_tab.c; the parser output file is called
  94. y_tab.c, and the other outputs are called y.output and
  95. y_tab.h. The purpose of this switch is to imitate Yacc's output
  96. file name conventions. The /YACC qualifier is functionally equivalent
  97. to /FIXED_OUTFILES. The following command definition will
  98. work as a substitute for Yacc:
  99. .literal
  100. $YACC:==BISON/FIXED_OUTFILES
  101. .end literal
  102. .skip
  103. .indent -1
  104. 2 /NAME_PREFIX
  105. .skip
  106. .literal
  107. /NAME_PREFIX=prefix
  108. .end literal
  109. .skip
  110. Rename the external symbols used in the parser so that they start with
  111. "prefix" instead of "yy". The precise list of symbols renamed
  112. is yyparse, yylex, yyerror, yylval, yychar and yydebug.
  113. For example, if you use /NAME_PREFIX="c", the names become cparse,
  114. clex, and so on.
  115. .skip
  116. .indent -1
  117. 2 /NOLINES
  118. .skip
  119. Don't put any "#line" preprocessor commands in the parser file.
  120. Ordinarily Bison puts them in the parser file so that the C compiler
  121. and debuggers will associate errors with your source file, the
  122. grammar file. This option causes them to associate errors with the
  123. parser file, treating it an independent source file in its own right.
  124. .skip
  125. .indent -1
  126. 2 /NOPARSER
  127. .skip
  128. Do not generate the parser code into the output; generate only
  129. declarations. The generated name_tab.c file will have only
  130. constant declarations. In addition, a name.act file is
  131. generated containing a switch statement body containing all the
  132. translated actions.
  133. .skip
  134. .indent -1
  135. 2 /OUTPUT
  136. .skip
  137. .literal
  138. /OUTPUT=outfile
  139. .end literal
  140. .skip
  141. Specify the name "outfile" for the parser file.
  142. .skip
  143. .indent -1
  144. 2 /RAW
  145. .skip
  146. When this switch is specified, the .tab.h file defines the tokens to
  147. have the bison token numbers rather than the yacc compatible numbers.
  148. To employ this switch you would have to have your own parser.
  149. .skip
  150. .indent -1
  151. 2 /TOKEN_TABLE
  152. .skip
  153. This switch causes the name_tab.c output to include a list of
  154. token names in order by their token numbers; this is defined in the array
  155. yytname. Also generated are #defines for YYNTOKENS, YYNNTS, YYNRULES,
  156. and YYNSTATES.
  157. .skip
  158. .indent -1
  159. 2 /VERBOSE
  160. .skip
  161. Write an extra output file containing verbose descriptions of the
  162. parser states and what is done for each type of look-ahead token in
  163. that state.
  164. .skip
  165. This file also describes all the conflicts, both those resolved by
  166. operator precedence and the unresolved ones.
  167. .skip
  168. The file's name is made by removing _tab.c or .c from
  169. the parser output file name, and adding .output instead.
  170. .skip
  171. Therefore, if the input file is foo.y, then the parser file is
  172. called foo_tab.c by default. As a consequence, the verbose
  173. output file is called foo.output.
  174. .skip
  175. .indent -1
  176. 2 /VERSION
  177. .skip
  178. Print the version number of Bison.
  179. .skip
  180. .indent -1
  181. 2 /YACC
  182. .skip
  183. See /FIXED_OUTFILES.
  184. .skip
  185. .indent -1