6

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

Thanks.

Eyvind
  • 5,221
  • 5
  • 40
  • 59

3 Answers3

5

i believe the 3rd edition is the latest:

JLS 3rd edition

james
  • 244
  • 1
  • 1
3

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

J Cooper
  • 16,891
  • 12
  • 65
  • 110
0

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.
jamesh
  • 19,863
  • 14
  • 56
  • 96