LL(1) Grammar for Expressions with Assignment

bergmann@elvis.rowan.edu (Seth Bergmann)
Tue, 27 Jun 1995 14:40:10 GMT

          From comp.compilers

Related articles
LL(1) Grammar for Expressions with Assignment bergmann@elvis.rowan.edu (1995-06-27)
Re: LL(1) Grammar for Expressions with Assignment jos@and.nl (1995-06-30)
Re: LL(1) Grammar for Expressions with Assignment parrt@lonewolf.parr-research.com (1995-07-01)
| List of all articles for this month |

Newsgroups: comp.compilers
From: bergmann@elvis.rowan.edu (Seth Bergmann)
Keywords: parse, LL(1)
Organization: Rowan College of New Jersey
Date: Tue, 27 Jun 1995 14:40:10 GMT
Status: RO

I've been trying to find an LL(1) grammar for the language of
expressions involving addition, subtraction, multiplication, division,
unary minus, unary plus, and assignment (as in C). Included would be
expressions such as:


          (a=3+b) * (c = 3)


but excluded would be things like:


        3+a=4 and 2 = a


The compiler books I've checked all seem to either use lookahead (i.e.
LL(2)) or check for a proper lvalue for the assignment during semantic
analysis. I suspect this language of expressions is not LL(1). Can
anyone point me to a reference on this?


Thanks,


Seth Bergmann
bergmann@rowan.edu
--


Post a followup to this message

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