Question

I will be writing a small grammar to parse a text file, the grammar can be a bit large so I want to read it with highlight.

I know it's a bit off-question but find this using google is very hard. What else place is better than ask to this to a lot of experient programmers.

Was it helpful?

Solution

Sort of. There's this answer for Emacs. Apple hosts a yacc syntax file for vim. Based on what's mentioned for this archive, Kate may also handle yacc, but I can't find a specific confirmation.

And yes, I'm mixing straight BNF with yacc. The pickings were slim enough that it seems like a reasonable leap, and it might not be too hard to hack the yacc-specific parts out of the syntax descriptions.

OTHER TIPS

For BNF you could use IntelliJ from JetBrains with Grammar-Kit plugin. EBNF support seems not included at the moment.

Here is another one: https://github.com/rochus-keller/EbnfStudio/blob/master/README.md.

It supports syntax highlighting, inline warnings, symbol navigation and cross-referencing. The grammar is automatically analyzed for syntax errors, missing non-terminals and left recursion while editing. The grammar can also be checked for LL(1) ambiguities and the effectiveness of conflict resolvers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top