Closed RobertBaruch closed 1 year ago
In the original grammar you posted you're taking care of parsing comments, and not using TatSu facilities. It's likely that the regular expressions used in the grammar are not correct.
These are the kind of queries that should be posted on StackOverflow under the tatsu tag.
See also #249. Summary: Either #249 was not actually fixed, or the documentation on how to specify comment regexps (
docs/syntax.rst
) is incorrect. Note also that the workaround in #249 still fixes this issue.Tested using
pip install tatsu
(v 5.8.3) and Python 3.10.6.Test grammar (
comments.peg
)Main:
Test file (
comments.peg
):Resulting output:
Expected output: