[antlr-interest] antlr or javacc?

Li Li fancyerii at gmail.com
Fri Dec 16 01:06:16 PST 2011


hi all,
    I need to implement a search query rewriter. because I am dealing
Chinese other than English, I need to use my own scanner/tokenizer.
    Then I will define rules for rewriting like this:
     original query: hp laptop
     after scanner: [brand:hp] [category:laptop]
     after rewriter: brand:hp^10 category:laptop^1 which means we will
search "hp" in brand field and "laptop" in category field and their weights
are 10 and 1 respectively.
     our grammar should be simple, I guess it's LL(1).
     I am using Java so I now have 2 alternatives: JavaCC and ANTLR.
     From
http://stackoverflow.com/questions/382211/whats-better-antlr-or-javacc
     it seems ANTLR is full featured but heavy weighted. maybe JavaCC can
meet my demand well. but they say JavaCC's documents are poor.
     would you please give some advices? Thanks.


More information about the antlr-interest mailing list