Next: , Previous: , Up: Auxiliary Programs   [Contents][Index]


8.6 rege-test

The purpose of this program is debugging parsing a regular expression grammar, dumping a parsed grammar with optional printing its FIRST sets, simplifying the grammar, and dumping assembler programs representing the nonterminal symbols of this grammar.

In this section, the command-line argument REGEX_GRAMMAR_FILE specifies the name of a file containing a regular expression grammar. If that argument is ‘-’, the program reads the regular expression grammar from stdin. See Template Grammar Format for the regular expression grammar format.

Examples further on in this section use the following test regular expression grammar:

cat >simple.rg <<EOF

S: ( [ "a" "b" ] C C . )? [ "b" "c" ] ;
C: . . ;

EOF