Command-line Options |

The usual way to invoke geyacc is as follows:

>     geyacc -o filename1 filename2

Here `filename2` is the grammar file name, which usually ends with '`.y`', and the Eiffel parser class is generated in `filename1`. Thus, the `geyacc -o foo.e foo.y` yields an Eiffel class in `foo.e` describing a parser whose grammar is specified in `foo.y`.

Geyacc supports both traditional single-letter options and mnemonic long option names. Long option names are indicated with `--` instead of `-`. When a long option takes an argument, like `--output-file`, connect the option name and the argument with `=`.

Here is a list of options that can be used with geyacc:

`--doc=format`
  Write the documentation about the grammar to the `output-file` (or to the standard output if not specified) instead of generating the corresponding parser. Use the output `format` specified. Currently supported formats: `html` and `xml`.
`-t` `classname
--tokens=classname`
  Write an extra class named `classname` (in upper-case) containing integer constants for the token type names defined in the grammar. This class is saved in file `classname.e` (in lower-case) unless the option `-k` or `--tokens-file` has been specified. This class is essential if you wish to put the definition of routine `read_token` in a separate class, because `read_token` needs to be able to refer to token type codes. This class also contains the routine `token_name` which is particularly useful to make debugging messages more human-readable.
  [The options `-d classname` and `--defines=classname` are still available for compatibility with previous version of geyacc. These options will be removed in future releases.]
`-k` `filename
--tokens-file=filename`
  Name of the file where the extra class containing integer constants for the token type names will be written. If the `-t` or `--tokens` option has not been specified, then nothing will be written to that file.
`-h
-?
--help`
  Print a summary of the command-line options to geyacc and exit.
`--pragma=[no]line`
  Specify whether the code generated for the semantic actions will contain or not indication about the line number where it originally appeared in the input grammar file.
`-o filename
--output-file=filename`
  Specify the name `filename` for the parser file. If this option is not specified, the parser is generated to the standard ouptut.
`-v` `filename
--verbose=filename`
  Write an extra output file containing verbose descriptions of the parser states and what is done for each type of look-ahead token in that state. This is very useful when debugging your grammar with Eiffel debug instructions spread out in the parser skeleton class. This file also describes all the conflicts, both those resolved by operator precedence and the unresolved ones.
`-V
--version`
  Print the version number of geyacc and exit.
`-x`
  Write each semantic action into a separate routine. The default is to write all semantic actions into the same routine, which can become too large for C back-end compilers to handle.
`--array-size=size`
  Some Eiffel compilers experience difficulties to process big manifest arrays. This option directs geyacc to split manifest arrays with more than `size` elements into several smaller arrays. This option can be disabled by setting `size` to `0`. [default: `200`]
`--rescue-on-abort`
  Write a rescue clause in the action routines to catch abort exceptions. Useful when compiling in void-safe mode.