class

Pegasus::Language::RuleAlternative

Inherits Reference / Object

One of the alternatives of a rule.

Constructors

Instance methods

==(other : RuleAlternative)
Source
compute_optional_variants

Computes the variants created by optionals. For example, a? b? has four variants, a b, a, b, <empty>.

Source
compute_optional_variants

Same as compute_optional_variants, but what's optional is now decided by the block.

Source
derives_lambda?

Determines if this rule alternative can be empty, or derive lambda.

Source
derives_lambda?

Determines if the rule alternative can be empty, using the block to check whether each element can be empty or not.

Source
elements

The elements of the rule.

Source
lambda?

Checks if this specific alternative is the lambda alternative.

Source