|number LR(1) vs LALR(1) Itemsets for a grammar firstname.lastname@example.org (2003-11-11)|
|Re: number LR(1) vs LALR(1) Itemsets for a grammar email@example.com (Mike Spencer) (2003-11-18)|
|From:||Mike Spencer <firstname.lastname@example.org>|
|Date:||18 Nov 2003 18:53:23 -0500|
|Posted-Date:||18 Nov 2003 18:53:23 EST|
> 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
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.
Return to the
Search the comp.compilers archives again.