class Pegasus::Language::RuleElement
- Pegasus::Language::RuleElement
- Reference
- Object
Overview
An element of a grammar rule. Can be either a token or another rule.
Direct Known Subclasses
- Pegasus::Language::OneOrMoreElement
- Pegasus::Language::OptionalElement
- Pegasus::Language::ZeroOrMoreElement
Defined in:
pegasus/language_def.crConstructors
Instance Method Summary
- #==(other : RuleElement)
-
#base_element
If called in a child class of RuleElement, this strips the child class of its additional data, turning it back into a RuleElement base class.
-
#derives_lambda?
Checks if this element derives lambda.
-
#name : String
The name of the element, as specified in the grammar.
Constructor Detail
Instance Method Detail
def base_element
#
If called in a child class of RuleElement, this strips the child class of its additional data, turning it back into a RuleElement base class.
def derives_lambda?
#
Checks if this element derives lambda. This doesm't check if the production rule it represent can derive lambda; rather, it checks if this element has an operator applied to it that makes it do so, like ? or *