Handle backtracking via transactional memory-ish constructs? #301
stevefan1999-personal
started this conversation in
Ideas
Replies: 1 comment
-
This sounds like the state feature in Pegasus (C#). There's some discussion of that on #223. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was thinking about adding a set of API for "commit" and "rollback" for the symbol table: it will have a set of "snapshots" and when we kick back our parser to a certain point,. "rollback" action occurs reverting the symbol table to a previously state.
That way, we can properly backtrack without having ghost variables in the temporary symbol table. I'm not certain what this is called but I think there are people implemented things like this before, but the closest thing I can think of is transactional memory.
Beta Was this translation helpful? Give feedback.
All reactions