Class: Rley::Base::BaseParser
- Inherits:
-
Object
- Object
- Rley::Base::BaseParser
- Includes:
- GrmItemsBuilder
- Defined in:
- lib/rley/base/base_parser.rb
Overview
Abstract class for Earley parser.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dotted_items ⇒ Object
readonly
The dotted items/rules for the productions of the grammar.
-
#grammar ⇒ Syntax::Grammar
readonly
The grammar of the language.
Instance Method Summary collapse
-
#initialize(aGrammar) ⇒ BaseParser
constructor
Constructor.
Methods included from GrmItemsBuilder
Constructor Details
#initialize(aGrammar) ⇒ BaseParser
Constructor.
23 24 25 26 |
# File 'lib/rley/base/base_parser.rb', line 23 def initialize(aGrammar) @grammar = aGrammar @dotted_items = build_dotted_items(grammar) # Method from mixin end |
Instance Attribute Details
#dotted_items ⇒ Object (readonly)
The dotted items/rules for the productions of the grammar
19 20 21 |
# File 'lib/rley/base/base_parser.rb', line 19 def dotted_items @dotted_items end |
#grammar ⇒ Syntax::Grammar (readonly)
The grammar of the language.
16 17 18 |
# File 'lib/rley/base/base_parser.rb', line 16 def grammar @grammar end |