[antlr-interest] Newbie: problem with semantic differentiation in the lexer

Martin Probst mail at martin-probst.com
Tue Feb 14 07:16:27 PST 2006


> Because I want to develop a query editor I want to extend it with an 
> auto completion mechanism. This means at the position of IDENT after 
> 'from' I want to choose between all existing objects coming from an 
> repository and at the position of IDENT after 'select' I want to show 
> all available attributes corresponding to the object selected after 'from'.
> To do this, I have to distinguish between both of these IDENTs. So how 
> can I do this???? Any proposals? Please help.

What about getting the last token in the editor left of the current
caret position and deciding depending on it's type?

Martin



More information about the antlr-interest mailing list