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
Conceptual question, I wasn't able to figure this out from reading the docs. Let's say I have some XML-like language where you can have tags with arbitrary alphanumeric text in them, and they have to be symmetric, like this:
some text <foo>some more text</foo> even more text!
The possible tags aren't hardcoded ahead of time, they can be anything so long as the tags balance. So this is invalid:
some text <foo>some more text</bar> even more text!
The parser for the second tag would have to look for the exact string matched by the parser for the first tag (kinda like regex capture groups), but I don't know how to express that in this library.
The text was updated successfully, but these errors were encountered:
Your parser would match an arbitrary start tag (which gives it the tag name), followed by the contents (some more text) followed by an end tag with the same name as the start tag. Since it's all one parser, it knows the start tag.
Conceptual question, I wasn't able to figure this out from reading the docs. Let's say I have some XML-like language where you can have tags with arbitrary alphanumeric text in them, and they have to be symmetric, like this:
The possible tags aren't hardcoded ahead of time, they can be anything so long as the tags balance. So this is invalid:
The parser for the second tag would have to look for the exact string matched by the parser for the first tag (kinda like regex capture groups), but I don't know how to express that in this library.
The text was updated successfully, but these errors were encountered: