Class: Kanocc::LexicalMatch
- Inherits:
-
Object
- Object
- Kanocc::LexicalMatch
- Defined in:
- lib/kanocc/scanner.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#start_pos ⇒ Object
Returns the value of attribute start_pos.
-
#terminals ⇒ Object
Returns the value of attribute terminals.
Instance Method Summary collapse
-
#initialize(terminals, regexps, start_pos, length) ⇒ LexicalMatch
constructor
A new instance of LexicalMatch.
- #regexp(terminal) ⇒ Object
Constructor Details
#initialize(terminals, regexps, start_pos, length) ⇒ LexicalMatch
Returns a new instance of LexicalMatch.
220 221 222 223 224 225 |
# File 'lib/kanocc/scanner.rb', line 220 def initialize(terminals, regexps, start_pos, length) @terminals = terminals @regexps = regexps @start_pos = start_pos @length = length end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
218 219 220 |
# File 'lib/kanocc/scanner.rb', line 218 def length @length end |
#start_pos ⇒ Object
Returns the value of attribute start_pos.
218 219 220 |
# File 'lib/kanocc/scanner.rb', line 218 def start_pos @start_pos end |
#terminals ⇒ Object
Returns the value of attribute terminals.
218 219 220 |
# File 'lib/kanocc/scanner.rb', line 218 def terminals @terminals end |
Instance Method Details
#regexp(terminal) ⇒ Object
227 228 229 |
# File 'lib/kanocc/scanner.rb', line 227 def regexp(terminal) @regexps[terminal] end |