[antlr-interest] working with different dialects
Peggy Fieland
madcapmaggie at yahoo.com
Fri Sep 8 07:53:46 PDT 2006
Tim,
There are several approaches:
Write a general cobol parser and clone it.
Pass a parameter into the parser specifiying which
dialect you are parsing, then use it in the grammar.
Write a parser that does all of them if they are
similar enough.
Subclasses.
I support a number of dialects of SQL from various
vendors and I've got a parser for each one. The
dialects within the vendors are handled in the
individual parsers. The treewalker (handwritten) is a
template instantiated for each parser.
Peggy
--- timo.du.four at telenet.be wrote:
> Dear ANTLR users,
>
> (Sorry for the repost, but I corrected a few things
> in my mail)
>
> I am currently doing some research on parser
> generators for my master-thesis. I have to find a
> generator that is able to generate a parser which is
> able to parse a number of dialects of COBOL. I
> already worked with ANTLR for a project last year,
> so I know it generates a Lexer, a Parser and a
> treeParser. Now my question is: is it possible to
> make a generalParser for the COBOL-language, for the
> part of the language that is the same for all
> dialects, and then make a subclass of it for each
> dialect. Or is there a better way to do this?
>
> Greetings,
>
> Travin
>
>
>
>
More information about the antlr-interest
mailing list