Saturday, April 28, 2001 11:39 PM
Where can I find it "HTML output code generator for ANTLR".
Saturday, April 28, 2001 01:32 PM
Do you mean token completion or sentence completion? Either is a solvable problem. For both tokens and sentences, ANTLR computes (statically before parser execution) the next set of k characters or tokens that could match given the current point in the parse.
I believe the (incomplete) HTML output code generator for ANTLR would be a good start. I think I set it up to dump out FIRST sets (at least for the start of rules). You would have to modify this to ask ANTLR to figure out what can come next at every point in the grammar. Should be fast enough...roughly linear in size of grammar and k. :)