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
This issue focuses a main problem with current Tokay programs:
What if I want to parse something using Parselets / Tokens, and use the result of this parse afterwards?
This program:
print("stage 1 " + repr(x))
x = (Int _ Int expect EOF ast("test"))
print("stage 2 " + repr(x))
executed with input 1 2 prints
stage 1 void
And that's all.
Because the inline sequence inside of the assignment is successfully parsed, and this causes the main block to stop successfully.
There is currently no way to get the problem implemented, except by assigning a parselet to x, but this also does not allow to run the anonymous parselet assigned to x twice:
This issue focuses a main problem with current Tokay programs:
This program:
executed with input
1 2
printsAnd that's all.
Because the inline sequence inside of the assignment is successfully parsed, and this causes the main block to stop successfully.
There is currently no way to get the problem implemented, except by assigning a parselet to
x
, but this also does not allow to run the anonymous parselet assigned tox
twice:results in
which is the wanted behavior of the first program. stage 3 is not executed, because the block successfully stops before.
A solution has to be evaluated to fix this issue, either by different syntax or by different behavior, that is almost backward-compatible.
The text was updated successfully, but these errors were encountered: