[antlr-interest] Parsing of partial input

Kamil Burzynski nopik at data.pl
Wed Apr 2 06:38:18 PDT 2008


Hello,
I am considering a small project which involve parsing of "partial input" - 
something that IntelliSense have to do, e.g. user types in:

void foo( int a, float b );
int bar = foo( 5,

and I would like to figure out, that parser have stopped second parameter 
to the function call (and there were no other alternative matches). Of 
course in general such task is full of ambiguities (in extreme case input 
text is empty, so any rule do match), as in some cases few rules may match. 
However, in most cases it is possible to figure out that we are calling 
function or are in middle of expression etc. - i.e. getting list of 
possible matching rules together with their progress (how much tokens these 
rules already matched) should be possible. I am wondering how much antlr 
does support such approach, if at all?


-- 
Best regards from
Kamil Burzynski



More information about the antlr-interest mailing list