Class: Waxeye::WaxeyeParser::InnerParser

Inherits:
Object
  • Object
show all
Defined in:
lib/waxeye.rb

Instance Method Summary collapse

Constructor Details

#initialize(start, eof_check, line_counting, tab_width, automata, input) ⇒ InnerParser

Returns a new instance of InnerParser.



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/waxeye.rb', line 130

def initialize(start, eof_check, line_counting, tab_width, automata, input)
  @start = start
  @eof_check = eof_check
  @line_counting = line_counting
  @tab_width = tab_width
  @automata = automata
  @fa_stack = []
  @cache = {}
  @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
end

Instance Method Details

#parseObject



150
151
152
# File 'lib/waxeye.rb', line 150

def parse()
  eof_check(match_automaton(@start))
end