Help on lex and yacc

thomaspan2000@aol.com (Thomaspan2000)
13 Aug 2000 19:09:06 -0400

          From comp.compilers

Related articles
Help on lex and yacc thomaspan2000@aol.com (2000-08-13)
| List of all articles for this month |
From: thomaspan2000@aol.com (Thomaspan2000)
Newsgroups: comp.compilers
Date: 13 Aug 2000 19:09:06 -0400
Organization: AOL http://www.aol.com
Keywords: lex, yacc, question

Hi,
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?


Thanks!
[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
needed. -John]





Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.