public enum Algorithm extends Enum<Algorithm>
Also, of importance is that when packed parsers are produced, reduces are forced to make the packing smaller. In that sense, a LALR parser can degenerate into a similar packed SLR. The major difference is that LALR can support certain parsers by producing less conflict on the generation phase due to the smaller assumptions of follow sets.
The less restrictive cannonical LR or simply LR parser allows for more context free grammars, but I have not found much use to that so far in pragmatic situations. Implementing this algorithm would not be too hard. It uses no follow up sets at all. Produced parsers are more extensive, errors are detected quicker. However, non packed parsers are too sparse in memory, and when packing occurs the tables degenerate as well. LR parsers can indeed be impractically too large.
TODO: P4-Add LR mode TODO: P5-Add Honalee algorithm
for the creation
of follow ups| Modifier and Type | Method and Description |
|---|---|
static Algorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Algorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Algorithm[] values()
for (Algorithm c : Algorithm.values()) System.out.println(c);
public static Algorithm valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2017. All rights reserved.