|Help on lex and yacc email@example.com (2000-08-13)|
|Date:||13 Aug 2000 19:09:06 -0400|
|Keywords:||lex, yacc, question|
I have encountered two problems:
1. How to deal with error. From the yacc manual, I only have few details about
it. So, where could I find more examples dealing with error.
2. In lex file, I can set some precondition, so I can deal with #include. But,
how to change precondition of lex rules in yacc file?
[Yacc makes good error recovery nearly impossible. See the archives. For
the second question, put a routine in the code section at the end of the
lex file that does a BEGIN WHATEVER. You can call it from the parser as
Return to the
Search the comp.compilers archives again.