|Parsing starting from any non-terminal firstname.lastname@example.org (Clint Olsen) (2003-04-27)|
|Re: Parsing starting from any non-terminal email@example.com (Matt) (2003-05-06)|
|Re: Parsing starting from any non-terminal firstname.lastname@example.org (Peter Flass) (2003-05-15)|
|From:||Clint Olsen <email@example.com>|
|Date:||27 Apr 2003 02:28:22 -0400|
|Keywords:||parse, yacc, question|
|Posted-Date:||27 Apr 2003 02:28:18 EDT|
One of the irritating things about yacc and friends is the ability to parse
a subset of a language L. So, I've created a parser for the entire
language, but I have another section of code that just needs the expression
evaluation portion. I know this is possible in recursive descent, but what
about LR-style generated parsers?
[You can fake it.
start: WHOLE wholeprogram | EXPR expression ;
Then adjust your lexer to stuff a WHOLE or EXPR token at the beginning
to get the parser started. -John]
Return to the
Search the comp.compilers archives again.