Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
make_dparser(1) User Manuals make_dparser(1)

make_dparser ‐ D Parser Generator

make_dparser [ options] grammar

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.

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)
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 languages 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.
Toggle computing whitespace states. If 'whitespace' is defined in the grammar, then use it as a subparser to consume whitespace. (ON by default)
Toggle computing states for all non-terminals. Ensures that there is a unique state for each non-terminal so that a subparsers 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.
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)
Toggle use of right recursion for EBNF productions. Do not change this unless you really know what you are doing. (OFF by default)
Toggle writing of line numbers. Used to debug the parsing table generator itself. (ON by default)
Set the extension of the generated code file. For C++ programs (for example) the extension can be set to .cpp with the option "-Xcpp". ("-Xc" by default)
Increase verbosity.
Replace all actions in the grammar with actions printing productions, 1 : during the speculative parsing process (<-), 2 : when reduction is part of any legal final parse (<=), 3 : both, 4 : remove all actions from the grammar. Print the changed grammar to stdout. Useful for debugging or prototyping new, experimental grammars.
Increase debugging.
Display help.

All the options are available through environment variables with the names:

The features are covered in the documentation. See the README file.


This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYRIGHT for more details.

flex(1), yacc(1), bison(1)
D Parser Home Page:
The BSD General Public License.

John Plevyak. Use <jplevyak at> to contact.
Mar 2003 Unix

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.