Skip to content

How to use backrefs with stateful lexer? #272

Answered by alecthomas
ssquirrel asked this question in Q&A
Discussion options

You must be logged in to vote

Use \1 in a pushed state to refer to the capture groups from the rule that did the push. There's an example in the tests.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alecthomas
Comment options

@ssquirrel
Comment options

Answer selected by ssquirrel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants