[antlr-interest] Using multiple grammars with a single parser
Parambir Singh
speiestaaim at gmail.com
Tue Oct 20 06:36:09 PDT 2009
Hi
I am working on a project where I want to parse input in different locales
(e.g. english, french & german dates). I don't want to create multiple
parsers, since the semantics of the grammar don't change between locales. So
probably I'll need multiple lexers and a single parser. Moreover, I want to
specify a locale to the parser and the input should be matched against only
that particular locale (e.g. german dates should be invalid in english
locale).
What would be the best approach to construct such a parser using ANTLR. I
don't have much experience with ANTLR but I read about grammar inheritance
and think it could be useful here.
Thanks
Param
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091020/cc215a35/attachment.html
More information about the antlr-interest
mailing list