delimited-dsl where closing delimiter is also an escape leader #62
-
How to write a delimited-dsl closing delimiter that is the same as an escape leader? suppose for sake of illustration that in the object language to be parsed, strings were delimited by
In Pascal, for instance, the basic syntax of a string is delimited with single quotes. What is the recommended way to handle this? here is a snippet that did not work
Thank you for this nice library. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
A simple fix would be to change the closing delimiter to match |
Beta Was this translation helpful? Give feedback.
A simple fix would be to change the closing delimiter to match
%
but not%%
usingdsl::not_followed_by
: https://lexy.foonathan.net/playground/?id=xaazc4dMo&mode=tree.