Class: Waxeye::WaxeyeParser::InnerParser
- Inherits:
-
Object
- Object
- Waxeye::WaxeyeParser::InnerParser
- Defined in:
- lib/waxeye.rb
Instance Method Summary collapse
-
#initialize(start, eof_check, automata, input) ⇒ InnerParser
constructor
A new instance of InnerParser.
- #parse ⇒ Object
Constructor Details
#initialize(start, eof_check, automata, input) ⇒ InnerParser
Returns a new instance of InnerParser.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/waxeye.rb', line 132 def initialize(start, eof_check, automata, input) @start = start @eof_check = eof_check @automata = automata @input = input @input_len = input.length @input_pos = 0 @line = 1 @column = 0 @last_cr = false @error_pos = 0 @error_line = 1 @error_col = 0 @error_nt = automata[start].type @fa_stack = [] @cache = {} end |
Instance Method Details
#parse ⇒ Object
150 151 152 |
# File 'lib/waxeye.rb', line 150 def parse() eof_check(match_automaton(@start)) end |