blob: ad4c1f382bc29f8aa5720a082808afee8d6c3f37 [file] [log] [blame]
make_dparser(1) User Manuals make_dparser(1)
NAME
make_dparser - D Parser Generator
SYNOPSIS
make_dparser [options] grammar
DESCRIPTION
make_dparser is a scannerless GLR parser generator based on the Tomita
algorithm. It is self-hosted and very easy to use. Grammars are written
in a natural style of EBNF and regular expressions and support both
speculative and final actions.
OPTIONS
-l Toggle longest match lexical ambiguity resolution. When ON the
scanner only recognizing the longest matching tokens in a given
state. This provides an easy way to build grammars for languages
which use longest match lexical ambiguity resolution (e.g. ANSI-
C, C++). (OFF by default)
-T Toggle building of a tokenizer for START. When ON, instead of
generating a unique scanner for each state (i.e. a 'scannerless'
parser), generate a single scanner (tokenizer) for the entire
grammar. This provides an easy way to build grammars for lan-
guages which assume a tokenizer (e.g. ANSI C). (OFF by default)
-H -1/0/1
Write header, 0 : no, 1 : yes, -1 : only if not empty.
-t 0/1 Token type, 0 : #define, 1 : enum.
-C Toggle computing whitespace states. If 'whitespace' is defined
in the grammar, then use it as a subparser to consume whites-
pace. (ON by default)
-A Toggle computing states for all non-terminals. Ensures that
there is a unique state for each non-terminal so that a sub-
parsers can be invoked for that non-terminal. (OFF by default)
-i tag Tag for grammar data structures so that multiple sets of tables
can be included in one file/application. (defaults to 'gram')
-b blocks
Number of blocks to which scanner tables are broken up into.
Larger numbers permit more sharing with more overhead. 4 seems
to be optimal for most grammars. (defaults to 4) files.
-p Toggle setting of operator priority from rules. Setting of
operator priorities on operator tokens can increase the size of
the tables but can permit unnecessary parse stacks to be pruned
earlier. (OFF by default)
-r Toggle use of right recursion for EBNF productions. Do not
change this unless you really know what you are doing. (OFF by
default)
-L Toggle writing of line numbers. Used to debug the parsing table
generator itself. (ON by default)
-v Increase verbosity.
-d Increase debugging.
-h Display help.
ENVIRONMENT
All the options are available through environment variables with the
names:
D_MAKE_PARSER_HEADER, D_MAKE_PARSER_TOKEN, D_MAKE_PARSER_GRAMMAR_IDENT,
D_MAKE_PARSER_SCANNER_BLOCKS, D_MAKE_PARSER_SET_PRIORITY,
D_MAKE_PARSER_WRITE_LINE_DIRECTIVES, D_MAKE_PARSER_VERBOSE,
D_MAKE_PARSER_DEBUG.
FEATURES
The features are covered in the documentation. See the README file.
FILES
None.
NO WARRANTIES
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYRIGHT
for more details.
SEE ALSO
flex(1), yacc(1), bison(1)
D Parser Home Page: http://dparser.sourceforge.net/
The BSD General Public License.
AUTHOR
John Plevyak. Use <jplevyak at users.sourceforge.net> to contact.
Unix Mar 2003 make_dparser(1)