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.
21 22 23 24 |
# File 'lib/rley/base/base_parser.rb', line 21 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
17 18 19 |
# File 'lib/rley/base/base_parser.rb', line 17 def dotted_items @dotted_items end |
#grammar ⇒ Syntax::Grammar (readonly)
The grammar of the language.
14 15 16 |
# File 'lib/rley/base/base_parser.rb', line 14 def grammar @grammar end |