[antlr-interest] Is ANTLR suitable for wiki grammar parsing?

Wincent Colaiuta win at wincent.com
Thu Jun 7 03:22:55 PDT 2007


El 7/6/2007, a las 11:56, Wincent Colaiuta escribió:

> Any ideas how to make this grammar handle inputs like this one?
>
>   of all the protocols, http is my favorite

The problem is actually worse than I first realized. Although an  
isolated "h" can appear in the input without triggering the  
exception, even strings like this one (note the embedded "ht")  
trigger the problem:

    a weightless experience

The generated lexer complains, "mismatched character 'l' expecting  
set null".

There are no shortage of words in the English language containing  
"ht" (try "grep ht /usr/share/dict/words | wc -l" or similar... I get  
over 1600 on my system)... But I'm not so concerned about this  
specific problem; I'm more worried about the general case because I  
am certain this exact problem will crop up again in the future and  
I'd like to know how to deal with it in a generalized way.

Cheers,
Wincent



More information about the antlr-interest mailing list