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.
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.