| Related articles |
|---|
| List Parsing in LALR pplouis@my-deja.com (1999-09-06) |
| Re: List Parsing in LALR news@sleitch.nildram.co.uk (1999-10-14) |
| From: | pplouis@my-deja.com |
| Newsgroups: | comp.compilers |
| Date: | 6 Sep 1999 11:49:59 -0400 |
| Organization: | Deja.com - Share what you know. Learn what you don't. |
| Keywords: | parse, LALR, question, comment |
How to write grammar for lists like this in LALR(1)?
aList -> anItem ;
aList -> aList anItem ;
anItem -> 'boo' 'foo' ;
anItem -> 'bar' 'boo' ;
anItem -> 'bar' ;
Thanks for the help.
PP Louis
[Expand and flatten it, I suppose, or else use a lexical hack to peek ahead
two tokens. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.