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,
alphabetized by short option:
- -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). 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.
[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.]
- -h
-?
--help
- Print a summary of the command-line options to geyacc
and exit.
- -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 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.