Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Gefilus

C or Java grammar in BNF?

This topic is 6732 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Try with javacc. It comes with a full description of the Java grammar. Not in BNF, however, I''m afraid.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!