C or Java grammar in BNF?
I''m working on a scripting system. I intend to make it somewhat object oriented with a C/java-like syntax, and need to start with a Yacc-compatible parse rule set.
Does anyone know any links to examples of java or C syntax in Backus-Naur Form? I''m sure it would be more effective to start cutting down from an tried and tested implementation, than to start figuring out all the schemantics from scratch myself... To specify, I don''t necessarily need the complete Yacc file, just the BNF form.
I believe Johnston''s RDP program comes with a C BNF file. Usually your compiler documentation will contain an grammar for the language as well. For example C++ Builder comes with a help faile call "C++ Builder Language Guide" that lays out, section by section, the C++ grammar.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement