Java parser: transcription finished

Roberto Raggi roberto at kdevelop.org
Fri Dec 2 12:30:07 UTC 2005


On Friday 02 December 2005 12:20, Jakob Petsovits wrote:
> > > (bla)+
> > > is: !(bla)
> >
I think you found the bug :-) I handle it as bla* for the condition but as 
bla+ as recognizer !!! I'll fix it

ciao robe


> > not really :-)  the bang operator means an optional sequence of "blah" so
> > it's more like bla* than bla+.. kdevelop-pg doesn't have a + operator
> > (but actually it is a good idea and i'm going to add it). If you want
> > blah+ you need to write (blah !blah)
>
> So what you're saying now is that !(...) is neither (...)* nor (...)+ but
> something in between. If you want (...)* then you have to write
> ( !(...) | 0 ), otherwise you get strange behaviour when used within
> other rules.
> Still, !(anything) on its own can indeed match an empty set of tokens (0).
>
> I can of course adapt the grammar, it's just that I don't feel this is
> intuitive, and it will probably be a source of errors in future grammars.
> You have to understand the implementation and that epsilon stuff
> to foresee how it will work, I find that suboptimal.
> /me goes off to finally google what epsilon means here.
>
> > extend kdev-pg to support backtracking is pretty easy :-) but LL(k) is
> > not trivial. I think your work is great!! I really want it in KDevelop.
> > So I think it is time to me to implement backtracking in kdev-pg.
>
> terrific!
>
> cheers,
>   Jakob
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at barney.cs.uni-potsdam.de
> http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel




More information about the KDevelop-devel mailing list