简体   繁体   中英

Java EBNF?

Does anyone know of an accurate source for an (E)BNF for the Java language? Preferably, it would be from an authorative source, eg Sun.

Thanks.

i believe the 3rd edition is the latest:

JLS 3rd edition

First google result :)
Though I can't speak for how up-to-date it might be.

I'm not sure what you want the spec for, but you may be interested to know that:

  • the parser in Javac is hand written. No parser generated tools.
  • there exists a number of repositories for popular parser generators grammars. Here is JavaCC and ANTLR .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM