Pegasus::Language::Rule
Inherits Pegasus::Language::OptionObject / Reference / Object
A single rule. This can have one or more alternatives, but has the same options (zero or more) applied to them.
Constructors
Instance methods
==(other : Rule)
Sourcealternatives
Sourcecompute_optional_variants
Creates a new rule with the same options, but with alternatives expanded for optional values.
compute_optional_variants
Creates a new rule with the same options, but with alternatives expanded for optional values. Uses a custom block to check if the elements can be empty or not.
derives_lambda?
Checks if this rule has any alternatives that can derive lambda, using a custom block for checking if an element can derive lambda.