[(-1, -1) for j in range(len(_ast.flex_rules[i].groups1))]
)
+ # add group for default rule
+ group_ref_data.append(
+ (len(_ast.flex_rules) * 2, len(_ast.flex_rules) * 2 + 1)
+ )
+
_nfa = _ast.to_nfa(group_ref_data)
# end of buffer expression (do here because only necessary for flex)
[(-1, -1) for j in range(len(_ast.flex_rules[i].groups1))]
)
+ # add group for default rule
+ group_ref_data.append(
+ (len(_ast.flex_rules) * 2, len(_ast.flex_rules) * 2 + 1)
+ )
+
_nfa = _ast.to_nfa(group_ref_data)
# end of buffer expression (do here because only necessary for flex)
# we leave yytext == 0 afterwards, so double commit is OK
# (double commit occurs if user calls the unput function)
global yytext_len
- print('commit', yytext_len)
+ #print('commit', yytext_len)
while yytext_len:
block = yy_buffer_stack[-1].next
while block is None or block.pos >= len(block.text):
del yy_state_buf[:]
# yy_match:
- print('yy_match')
+ #print('yy_match')
while True:
# try to get a character
while block is None or block_pos >= len(block.text):
# character available
yy_state_buf.append(yy_current_state)
yy_c = ord(block.text[block_pos])
- print('yy_c', yy_c)
+ #print('yy_c', yy_c)
while yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state:
yy_current_state = yy_def[yy_current_state];
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
i = yy_state_ptr - len(match)
if i:
match += block.text[block_pos - i:block_pos]
- assert len(match) = yy_state_ptr
+ assert len(match) == yy_state_ptr
# yy_find_action:
# the following variables are used to handle trailing context