Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: number LR(1) vs LALR(1) Itemsets for a grammar



Alpana wrote:
> I have implemented a LR(1) parse
> table generator. Which, when executed for a C grammar gave me around
> 2350 LR(1) itemsets. There is no way to check this number except doing
> manually which is again not feasible. Does anybody has LR(1) parser
> generator??

You can try Basil: http://www.lazycplusplus.com/basil

It is an LR(1) parser generator, though by default it will generate
extra states only as needed.  It will generate a default action in a
state for the most common reduction, and it will merge two states if
the set of actions (shifts and reductions) are the same for the two
states and for all transitions.  Option -nda will prevent default
actions and so you should end up with all the LR(1) states.

I'll try it on your C grammar if you like; I too would be interested to
see if our numbers match.

Mike




<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.