Closed gaissmai closed 2 years ago
solved, sorry for the line noise, see the +
instead of *
at the Line rule:
File <- Line* EOF
Line <- [^\n]+ EOL
EOL <- '\n' / EOF
EOF <- !.
closing this issue with a working grammar for a line scanner:
File <- Line* EOF
Line <- EOL / (Char+ EOL?)
Char <- [^\n\r]
EOL <- '\n' / "\r\n"
EOF <- !.
HI, sorry but I know no other channel for pigeon. Please help me with a stupid problem. I stripped the grammar down as tiny as possible to hightlight my problem:
If I feed the parser with text without a newline at the end, I get an expected parsing error:
but if I modify the EOL rule to:
the parser is stuck in a recursive endless loop. With Debug and MaxExpression options i can see the following:
and in the Debug Output I find the next rune as EOF (U+FFFD '�', with width 0)
Any hint appreciated how can I solve this problem.
Best Regards Charly