Re: LL(1) grammar and LL(2) grammar

"Thomas W. Christopher" <tc@charlie.cns.iit.edu>
18 Oct 1998 23:21:49 -0400

          From comp.compilers

Related articles
LL(1) grammar and LL(2) grammar felixmish@usa.net (Felix Mish) (1998-10-17)
Re: LL(1) grammar and LL(2) grammar tc@charlie.cns.iit.edu (Thomas W. Christopher) (1998-10-18)
Re: LL(1) grammar and LL(2) grammar os@cs.tu-berlin.de (Olaf Stoyke) (1998-10-21)
Re: LL(1) grammar and LL(2) grammar mravirala@my-dejanews.com (1998-10-21)
| List of all articles for this month |

From: "Thomas W. Christopher" <tc@charlie.cns.iit.edu>
Newsgroups: comp.compilers
Date: 18 Oct 1998 23:21:49 -0400
Organization: Illinois Institute of Technology
References: 98-10-097
Keywords: LL(1)

Felix Mish requested an LL(1) version of


factor:
                TOK_ID
                | TOK_ID "\(" parameters "\)"
                | TOK_NUM
                | "\(" expression "\)"
                | TOK_NOT factor
                | TOK_ID "\[" expression "\]"


How about?


factor : TOK_NUM
        | "\(" expression "\)"
        | TOK_NOT factor.
        | TOK_ID factor_tail
factor_tail :
        | "\(" parameters "\)"
        | "\[" expression "\]"


--
Thomas W. Christopher -- tc@charlie.cns.iit.edu , tc@toc-press.com
Principal, Tools of Computing LLC. -- http://www.toc-press.com
Associate Prof., Illinois Inst. of Tech. -- http://www.iit.edu/~tc


Post a followup to this message

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