|LEX / YACC - extension of yacc and lex files with additional rules a email@example.com (Roul Oldenburger) (2002-07-31)|
|From:||"Roul Oldenburger" <firstname.lastname@example.org>|
|Date:||31 Jul 2002 01:02:06 -0400|
|Keywords:||lex, yacc, question, comment|
|Posted-Date:||31 Jul 2002 01:01:55 EDT|
Hello, I am new to UNIX and its tools lex and yacc. What I like to do
is having a main yacc file which can be extended with additional
definitions and rules in an add-on yacc file via something like a
"yacc-include". I guess yacc has no preprocessor like a C compiler and
probably therefore cannot do somehing like %include "add_rules.y". The
book I have doesn't mention something of use. Does somebody know if
lex and yacc have the possibility to do this or if there is a
If somebody knows lex and yacc good enough to say - there is
definitely no intern possibility - please let me know too.
Lex / yacc and flex / bison are said to be compatible, but do the
Linux programms probably have the functionality to do this if lex and
yacc do not?
Thankyou very much
[I've never seen a version of lex or yacc with file inclusion, but you
can use cpp or m4 as a separate prepass. It's about two lines in your
Return to the
Search the comp.compilers archives again.