Look ahead / peek? #810
-
Hello! I'm working on an SQL parser and would like to improve the approach I've taken to qualifying certain tokens. Specifically, I'd like to have some rules that look-ahead in order to match the current rule (a forward predicate). Is there an approach to doing this in Pest? E.g., something like below, which does not work:
That is to say "SELECT" is a keyword when it is followed by a delimiter, otherwise it might be something else (an identifier in SQL). I want to check for the delimiter while leaving it to be matched by the next rule (most likely Is there a way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
What is not working ? I tried this on the online editor. It should work. |
Beta Was this translation helpful? Give feedback.
What is not working ? I tried this on the online editor.
It should work.