Re: Efficient construction of LALR Parsing Tables

Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru>
15 Aug 2006 18:54:39 -0400

          From comp.compilers

Related articles
Efficient construction of LALR Parsing Tables yasmina.andreu@gmail.com (Yasmina) (2006-08-14)
Re: Efficient construction of LALR Parsing Tables boldyrev+nospam@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2006-08-15)
Re: Efficient construction of LALR Parsing Tables yasmina.andreu@gmail.com (Yasmina) (2006-08-19)
| List of all articles for this month |

From: Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru>
Newsgroups: comp.compilers
Date: 15 Aug 2006 18:54:39 -0400
Organization: this field is intentionally left blank
References: 06-08-074
Keywords: LALR
Posted-Date: 15 Aug 2006 18:54:39 EDT

On 9567 day of my life yasmina.andreu@gmail.com wrote:
> " Reduction by A -> e is called for on input a if and only if there is
> a kernel item [B -> g · Cd, b] such that C => An for some n, and a is
> in FIRST(ndb). The set of nonterminals A such that C => An can be
> precomputed for each nonterminal C."
>
> "We shift on input a if there is a kernel item [B -> g · Cd, b] where
> C => ax in a derivation in which the last step does not use an
> e-production. The set of such a's can also be precomputed for each C"
>
> I don't know how to precompute the set of nonterminals A and the set of
> terminals a. I think that the only way to precompute this sets is
> derive the grammar, but this isn't efficient.


Hint: the calculation is similar to calculation of FIRST and FOLLOW sets.


--
Ivan Boldyrev


                                                                              .signature is under construction.



Post a followup to this message

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