Re: Question on %nonassoc-directive in LALR(1) parser generators

"mailings@jmksf.com" <mailings@jmksf.com>
Sat, 27 Sep 2008 11:51:07 +0200

          From comp.compilers

Related articles
Question on %nonassoc-directive in LALR(1) parser generators mailings@jmksf.com (2008-09-26)
Re: Question on %nonassoc-directive in LALR(1) parser generators mailings@jmksf.com (mailings@jmksf.com) (2008-09-27)
Re: Question on %nonassoc-directive in LALR(1) parser generators cfc@shell01.TheWorld.com (Chris F Clark) (2008-09-27)
Re: Question on %nonassoc-directive in LALR(1) parser generators chris.dollin@hp.com (Chris Dollin) (2008-09-29)
| List of all articles for this month |
From: "mailings@jmksf.com" <mailings@jmksf.com>
Newsgroups: comp.compilers
Date: Sat, 27 Sep 2008 11:51:07 +0200
Organization: Compilers Central
References: 08-09-133
Keywords: parse, errors
Posted-Date: 27 Sep 2008 12:26:12 EDT

> [Holub's book had a stupendous number of mistakes. Have you looked at
> the 50 page errata sheet? Google for "holub compiler design", click the
> documentation link for a PDF that is mostly errata. -John]


Hello John,


Yes I took a look at this errata sheet, but there is no comment on this
table.


I also made a mistake on the table myself in my first mail, Holub
defines his resolvement table as


          Associativity of conflict symbol | Perform
          ---------------------------------|--------
          Left-associative | reduce
          Right-associative | shift
          Non-associative | shift


but his generator constructs a reduce when a token is not associative.
Maybe he did some more mistakes that are not discovered yet?


I'm feel a little bit embarrassed on this problem, what is right and
what is wrong. What is now the correct way now? And why do two different
generators handle %nonassoc'ed terminals not the same way as yacc?


Regards,
Jan


Post a followup to this message

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