Related articles |
---|
LALR question johnl@ima.UUCP (1986-03-18) |
From: | johnl@ima.UUCP (Compilers mailing list) |
Newsgroups: | mod.compilers |
Date: | 18 Mar 86 15:17:46 GMT |
In-Reply-To: | <151@ima.UUCP> |
I have some questions on LALR grammers.
1) How does one convert a BNF to LALR. (To get rid of
conflicts from Yacc etc. ?)
2) When there are "NO CONFLICTS", is there some way of
making sure the parser generated does what it is supposed to?
3) Are there systematic procedures to do the above ?
4) Is it more efficient to try something and then test
for LALRness?
Thanks in advance.
...hplabs!tektronix!reed!omssw2!omssw1!pathy
[The dragon book addresses this in some detail. What I have always done is
to run my grammar through Yacc and then look at the Yacc listing to find
out what it is that Yacc can't deal with; then adjust the grammar. You
always have to test your parser, since humans are not so good at specifying
things formally that you can be sure that your formal grammar describes the
language that you thought you were describing.
Other thoughts are, as always, invited. -John]
--
John Levine, Javelin Software, Cambridge MA +1 617 494 1400
{ decvax | harvard | think | ihnp4 | cbosgd }!ima!johnl, Levine@YALE.ARPA
The opinions above are solely those of a 12 year old hacker who has broken
into my account, and not those of my employer or any other organization.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.