Re: simple ambigous grammar...

llkparsing@aol.com
27 Aug 2000 21:50:38 -0400

          From comp.compilers

Related articles
simple ambigous grammar... abate@zed.students.cs.unibo.it (2000-08-21)
Re: simple ambigous grammar... llkparsing@aol.com (2000-08-27)
Re: simple ambigous grammar... rkrayhawk@aol.com (2000-08-27)
Re: simple ambigous grammar... gvmt@bgl.vsnl.net.in (Venkatesha Murthy G.) (2000-08-27)
| List of all articles for this month |
From: llkparsing@aol.com
Newsgroups: comp.compilers
Date: 27 Aug 2000 21:50:38 -0400
Organization: Deja.com - Before you buy.
References: 00-08-109
Keywords: parse

    abate@zed.students.cs.unibo.it () wrote:
>
> So I've written this simple grammar...
> AL -> AL A | A
> A -> ID = E
> E -> E + T | T
> T -> T . F | F
> F -> ID
>
> But since I've no delimiters between expression,
> and yacc has only one lookahead, this does not work.
> Which is the right grammar to parser my expression ?


I think you probably just forgot to specify ID as a terminal, rather
than a nonterminal.


Post a followup to this message

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