John McKown wrote:
Just to prove that I am indeed insane, I am attempting to write a JCL
parser using the "flex" (lexical analyzer generator) and "bison" (parser
generator) programs on Linux. Again, this is just so that I can learn how
to use those tools, not for anything necessarily productive. However, on
the off chance that I actually succeed, does anybody think that donating
this to the CBT would be worth while? If so, what should the parser output
be? I was thinking either a tree structure which describes the JCL, or
maybe the JCL converted to an XML format output. What say ye?
Hi John,
flex on an ASCII box will not generate a lexer that works
in an EBCDIC environment; so you'll need to address that...
I'd suggest writting the lexer by-hand, it's not difficult
to knock out a regular-expression based parser, and you can
handle the various hosting issues pretty straightforwardly.
Of course, bison deals in tokens - which are sufficiently
abstract to not have ASCII/EBCDIC issues.
By the way - you can download flex/bison utilities that run
on MVS from the 'freebies' section on our web site.
- Dave Rivers -
--
[EMAIL PROTECTED] Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html