c++ code completion status report
snuffeler at gmx.net
Sat Jan 5 23:09:01 UTC 2002
> Yes, it does. Read http://www.acm.org/crossroads/xrds7-5/bison.html It
> properly shows that Bison is arcane. I'm currently working with flex/bison
> at university, and from a theoretical point of view, bison uses a parsing
> algorithm that is pretty fast and yet powerful enough for most languages
Hm, interesting article.
> However - it is not very intuitive, as you have to avoid
> left-recursion and other shift/reduce and reduce/reduce-errors.
Hm, well it's not that bad, I think. Currently i've only 168 shift/reduce
conflicts and only ~40 reduce/reduce conflicts. I don't know if this is
much but i suppose so. (it's due to "expr: expr '+' expr" and this for every
operator but it works, although i use both left and right recursion).
> like GLR can handle those easily, but have a slightly higher complexity,
> which doesn't really matter according to the author of the document cited
Sure performance doesn't matter, not really. The problem is that we have
do minimize parser calls. I'd suggest to do it only when special
characters were typed (such as '.' or '->') and waiting (max.) half a second
the completion shouldn't be too much trouble.
Nevertheless I'm currently working on a concept to reuse information
from earlier parser calls.
> Another possibility would be to take the same bison files as the GCC
> project. Don't know if they are any usable, though.
That's how I learned that something like BISON existed. (Knew nothing
of BISON or YACC before - we don't have this in school ;-)
More information about the KDevelop-devel