Class: Dhaka::CompiledLexer
- Inherits:
-
Object
- Object
- Dhaka::CompiledLexer
- Defined in:
- lib/dhaka/lexer/compiled_lexer.rb
Overview
Abstract base class of all compiled Lexers. It is only used by generated code.
Class Method Summary collapse
-
.action_for_pattern(pattern) ⇒ Object
:nodoc:.
-
.lex(input) ⇒ Object
Returns a LexerRun that tokenizes
input
. -
.start_state ⇒ Object
:nodoc:.
Class Method Details
.action_for_pattern(pattern) ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/dhaka/lexer/compiled_lexer.rb', line 15 def action_for_pattern pattern #:nodoc: specification.items[pattern].action end |
.lex(input) ⇒ Object
Returns a LexerRun that tokenizes input
.
7 8 9 |
# File 'lib/dhaka/lexer/compiled_lexer.rb', line 7 def lex input LexerRun.new(self, input) end |
.start_state ⇒ Object
:nodoc:
11 12 13 |
# File 'lib/dhaka/lexer/compiled_lexer.rb', line 11 def start_state #:nodoc: states[start_state_id] end |