-
A Basic BNF for C
Does anyone out there have a basic grammar for C in Basic Backus-Naur form? So far, I've only been able to find it defined in the extended BNF, which is proving to be a problem because my parser doesn't handle EBNF so well. If you know of one somewhere, I would really appreciate a link to it.
Thanks,
starX
www.axisoftime.com
-
There is one here that looks fairly standard...
http://lists.canonical.org/pipermail...er/000201.html
What parser are you using? I think bison, yacc, and a host of others handle EBNF pretty well?
-
Thanks, this looks like the easiest to convert of all the ones I've stumbled across.
The parser is actually a homegrown one, for which I figured the best test would be if it could read a BNF of a programming language, and then spit out a program that would compile and run (although not necessarily do anything noticeable). The problem is that when I was putting it together, I didn't know about EBNF, and although I've theoretically added support, it's processing of EBNF specific notation is spotty at best.
Thanks again,
starX
www.axisoftime.com