Java parser: transcription finished
jpetso at gmx.at
Fri Dec 2 11:36:10 UTC 2005
Hi Roberto, mailinglist,
The good news: I'm done with transcribing the ANTLR grammar.
That means a complete Java 1.5 grammar for kdevelop-pg.
The bad news: it doesn't work as I would expect.
Of course I knew that it wouldn't work out of the box from the beginning,
so that's not such a big problem.
As far as I can see, there are two main problems:
1. The bug in kdev-pg. Roberto, maybe you can find some time to fix it
in between optimizing the C++ preprocessor? Please? Would be so cool.
I believe most parse errors (it's reeeally bad at the moment) are caused
by that bug. Must be that way, otherwise I'm in big trouble ;-)
2. There are 5 conflicts where I couldn't think of a non-LL(k) way to solve
them. I documented all the conflicts, and the 5 problematic ones would be
quite a restriction in their current state.
(Worst one: no variable declarations).
So what's up next for me is:
- Care for the other courses again
- Write a program that outputs the parsed AST (next milestone for the prof)
- Get the parser working perfectly.
That last one would most likely involve extending kdev-pg with LL(k) stuff.
Roberto already said that this isn't exactly trivial, so I'll ask my professor
what he thinks about it. At least there's something to do over the
christmas holidays :D
For the time being, I put the grammar under the LGPL. Don't know if that's the
best thing I can do, anyways I can still relax it afterwards. (Comments?)
Feedback appreciated, regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 107274 bytes
Desc: not available
More information about the KDevelop-devel