You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we don't need to set accepting state in line 2. Lines 6 and 23 call the semantic action set in line 2, and could call the function directly instead of going through backtrack. Lines 12 and 18 ignore accepting state entirely and call other semantic action functions.
I think if we move set_accepting_state calls to the branches it may become easier in the code generator to handle these cases. In that case the code above would look like:
Now in generate_state_arm, we can avoid generating set_accepting_state if we backtrack or call another semantic action function. We also need to use peek instead of next.
The text was updated successfully, but these errors were encountered:
In the Lua lexer I see code like
Here we don't need to set accepting state in line 2. Lines 6 and 23 call the semantic action set in line 2, and could call the function directly instead of going through
backtrack
. Lines 12 and 18 ignore accepting state entirely and call other semantic action functions.I think if we move
set_accepting_state
calls to the branches it may become easier in the code generator to handle these cases. In that case the code above would look like:Now in
generate_state_arm
, we can avoid generatingset_accepting_state
if we backtrack or call another semantic action function. We also need to usepeek
instead ofnext
.The text was updated successfully, but these errors were encountered: