lex/yacc question

Jeffrey B. DeLeo thoth!jbd0 at gte.com
Thu Nov 30 17:33:34 AEST 1989


Once you have identified your lexical primitives you should be all
set.  These will be the nonterminals for your grammar; the grammar
being defined in the yacc source file.

Simply put all of the nonterminals in a .y (yacc source file) using
the %token construct, put in some minimal information so yacc will
run, and run yacc with the "-d" option - the y.tab.h file will be
produced. 

The y.tab.h file will only change if you define new nonterminals; now
you can use these values elsewhere while you write your grammar (yacc
rules). 

		...!bunny!thoth!jbd0



More information about the Comp.unix.questions mailing list