[antlr-interest] A "lexicon" for ANTLR

ttsoris <ttsoris at yahoo.com> ttsoris at yahoo.com
Wed Jan 29 01:47:00 PST 2003


Hi,
I was wondering if it is possible to create a parser with ANTLR 
to parse simple english sentences. The problem that I am thinking of
is the amount of recognized words. If I create rules like:
NOUN_SIN : "ant" | "cat" | "mouse" .... ;
NOUN_PLU : "ants" | "cats" | "mice" .... ;
with thousands of alternatives for nouns and some more for verbs and 
other parts of speech, it will produce enormous source files
and an enormous executable (and probably completely inefficient).
Is there a way of specifing an external "lexicon" for the lexemes 
(words), that is more efficient? Or is there another way I haven't 
think of?

Thank you,
Theofilos


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list