question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comments in grammar files

See original GitHub issue

I like the simplicity of tsPEG very much. What would be helpful for me to develop bigger grammars and to not lose track is the possibility to add comments in .gram files.

Could you please add some kind of comment syntax (e. g. # or //), at least for single lines or even multiple lines, which will simply be ignored by the parser generator? Would appreciate that very much 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
EoinDaveycommented, Dec 3, 2020

Will investigate

1reaction
EoinDaveycommented, Sep 15, 2020

Thanks for the suggestion! Should have been added long ago. Added in commit 700dc8. Will update issue when released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Comments to Antlr Java 8 grammar - Stack Overflow
I am wondering if there is a -simple- adjustment to the grammar that would allow this... (or if my naive idea of having...
Read more >
comments in grammar files - Discussion - BMC Community
I am writing a grammar file to parse some asp code. the grammar file works fine on the areas in the file that...
Read more >
3.1 Outline of a Bison Grammar - GNU.org
3.1 Outline of a Bison Grammar. A Bison grammar file has four main sections, shown here with the appropriate delimiters: %{ Prologue %}...
Read more >
How are comments expressed in programming language ...
"They can appear alomost everywhere" is somewhat of a stretch. There are quite a few languages that only allow comments between statements. ·...
Read more >
Line comment problem at end of file (antlr4) - Google Groups
we have not been able to end a file with line comment unless we included a line return. It looks like this issue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found