[antlr-interest] IBM MVS JCL recognition
Jim O'Connor
Jim.OConnor at microfocus.com
Fri Mar 14 06:14:59 PST 2003
Thanks Silvain,
Your advice does help. I'm worried about retaining positional/file
information, i.e. "Where does this text come from?", but I have more than
enough work to do with the preprocessor/lexer/grammar.
Thanks for the wise words.
Jim
-----Original Message-----
From: Silvain Piree
To: antlr-interest at yahoogroups.com
Sent: 3/14/03 3:34 AM
Subject: Re: [antlr-interest] IBM MVS JCL recognition
Jim,
> JCL has a number of fun recognition problems for which
> ANTLR might have solutions.
We've built a IBM JCL parser for our re-engineering services
and I would advise you to take the preprocessor route.
We've built a preprocessor using ANTLR lexer to handle
constructs like:
- EXEC PROC=name, symbols
- PROC name, symbols
- INCLUDE MEMBER=name
- DD *, DLM=...
- SET symbols
- etc.
It would be VERY difficult to build a one-pass parser that does
both preprocessing and parsing.
In fact, even the preprocessing is pretty complex. We usually
build multiple small preprocessors to handle the different
preprocessing constructs (i.e. multi-pass preprocessing),
but for JCL the only solution was to build a one-pass preprocessor
because everything depends on everything.
Hope this helps, kind greetings,
Silvain Piree
Refactive (www.refactive.com)
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list