Pegasus::Language::RuleAlternative
Inherits Reference / Object
One of the alternatives of a rule.
Constructors
Instance methods
==(other : RuleAlternative)
Sourcecompute_optional_variants
Computes the variants created by optionals. For example, a? b? has four variants, a b, a, b, <empty>.
compute_optional_variants
Same as compute_optional_variants, but what's optional is now decided by the block.
derives_lambda?
Determines if the rule alternative can be empty, using the block to check whether each element can be empty or not.