Re: Can this grammar be modified for lookahead 1 ?

zenger@ira.uka.de (Christoph Zenger)
Fri, 19 Aug 1994 09:17:54 GMT

          From comp.compilers

Related articles
Can this grammar be modified for lookahead of 1 ? rahul@lsil.com (1994-08-15)
Re: Can this grammar be modified for lookahead 1 ? zenger@ira.uka.de (1994-08-19)
| List of all articles for this month |
Newsgroups: comp.compilers
From: zenger@ira.uka.de (Christoph Zenger)
Keywords: parse, yacc
Organization: Compilers Central
References: 94-08-098
Date: Fri, 19 Aug 1994 09:17:54 GMT

Rahul (rahul@lsil.com) writes:
>
> Hi,
>
> I am trying to generate a parser using yacc for the following grammar:
>
> s -> l (1)
> l -> L i F i e (2)
> i -> A | ACA | CA | AC | C (3)
> e -> C (4)


  s -> l (1)
  l -> L i F ie (2)
  i -> A | ACA | CA | AC | C (3)
  ie -> AC | ACAC | CAC | ACC | CC (4)


This is probably not a nice solution, but it should work.


Christoph
--


Post a followup to this message

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