-
-
Notifications
You must be signed in to change notification settings - Fork 205
Literal tokens beginning with @ fail? #411
Description
I am trying to use this library to try to create a Go parser of Turtle. One of the productions of Turtle is a line that literally begins with @prefix (here).
When I try to create a parser that specifies that the "@prefix" token starts the line, it just doesn't work in Participle. I've condensed this issue into a small, runnable snippet here: https://go.dev/play/p/kOQ2_bAA2Re
This snippet builds 2 parsers:
GRAMMAR (broken):
ProgramBroken = WordBroken* .
WordBroken = "@word" <string> ";" .
GRAMMAR (ok):
ProgramOK = WordOK* .
WordOK = "word" <string> ";" .
The one that makes use of the @ symbol does not seem to work, but when the grammar does not use the @ symbol, it works fine.
I apologize if I have missed something obvious in the documentation, but I did scan around for a few hours to try to get past this issue to no avail. Please let me know if any other info helps, and obviously: thank you so much for this library and your time.