more code completion fun!

christopher j bottaro cjb at cs.utexas.edu
Wed Mar 14 02:17:58 GMT 2001


Daniel,
thanks for the tip.  i read up on syntactic predicates in ANTLR and i just 
finished removing all the non-determinisms in my partial c++ grammer.

any tips on resolving the type of an expression?  its easy if the user types 
something like:
blah->
just determine what codeblock the cursor is in, search the variable list of 
that codeblock for "blah", get its type, look up its list of 
methods/variables in the class store.

its even pretty easy if they type something like:
blah->foo.bar->next->

it only gets complicated with a function call that takes doesn't take an 
identifier as an argument:
easy:  func1(foo, bar)->
hard:  func2(3==(3+1), 7+bar)->

cheers,
christopher

> No, you just need sufficient lookahead, and predicates.
>
> Depends on how you look at it.
> Without considering disambiguation rules (IE just the straight
> grammar), yes it is.
> It is easily parsable with LL(k) with backtracking (IE syntactic
> predicates) Look at OpenC++.
>
> --Dan

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list