BNF representation of the java 1.5 langauge?

T

Tom Forsmo

Does anybody know if there is an BNF or similar description of the java
language available out there? I am looking to improve my java
development environment (Emacs with Jdee), and I thought a good solution
to improving it is by adding support for real-time syntax parsing of the
code.

So any hints?

tom
 
O

Oliver Wong

Tom Forsmo said:
Does anybody know if there is an BNF or similar description of the java
language available out there? I am looking to improve my java development
environment (Emacs with Jdee), and I thought a good solution to improving
it is by adding support for real-time syntax parsing of the code.

So any hints?

Yes, these BNF descriptions are typically refered to as "grammars", so
googling for "java grammar" gives me about 5 different BNF-like
representations of the Java language. I don't know which format you/emacs
prefers. http://cobase-www.cs.ucla.edu/pub/javacc/ is in JavaCC format, for
example.

- Oliver
 
M

mouser

Oliver said:
Yes, these BNF descriptions are typically refered to as "grammars", so
googling for "java grammar" gives me about 5 different BNF-like
representations of the Java language.

And I'd like to thank you VERY much for pointing ME in the proper direction.
I've just started in the last month or two trying to learn Java
programming; and it's quite a steep learning curve! I've looked at a lot of
books that tell me what to do WITH the language, (and some are more useful
than others), but I hadn't until now encountered a book or tutorial that
could tell me what Java IS. (Yes, I DO have the Sun documentation handy,
but there's such a LOT of that, one hardly knows where to start...)

Again, thanks for the tipoff!
 
O

Oliver Wong

mouser said:
And I'd like to thank you VERY much for pointing ME in the proper
direction.
I've just started in the last month or two trying to learn Java
programming; and it's quite a steep learning curve! I've looked at a lot
of
books that tell me what to do WITH the language, (and some are more useful
than others), but I hadn't until now encountered a book or tutorial that
could tell me what Java IS. (Yes, I DO have the Sun documentation handy,
but there's such a LOT of that, one hardly knows where to start...)

You're welcome, but if you can learn programming languages by reading
their grammars, then... wow! Usually when I want to learn a new language
(right now I'm trying to learn Haskell), I'd google for "Haskell Tutorials"
or "Learn Haskell" or something similar.

- Oliver
 
M

mouser

Oliver Wong wrote:

You're welcome, but if you can learn programming languages by reading
their grammars, then... wow!

No, I don't intend for the grammar to be my sole instruction source. I've
got all the Java tutorials (including the ones in the Sun documentation)
and a pair of programming books (Ivor Horton's BEGINNING JAVA2 and a link
to THINKING IN JAVA). But the grammar is a good supplement to the how-to
books and tutorials.

Doubtless, I would have found it EVENTUALLY in the Sun documentation
package, but your note was a handy shortcut.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top