[antlr-interest] IBM MVS JCL recognition

Jim O'Connor Jim.OConnor at microfocus.com
Thu Mar 13 11:22:05 PST 2003


Sounds like a plan.  I'll try it out.
That's why you get the big bucks, eh?

Jim

-----Original Message-----
From: mzukowski at yci.com [mailto:mzukowski at yci.com]
Sent: Thursday, March 13, 2003 2:03 PM
To: antlr-interest at yahoogroups.com
Subject: RE: [antlr-interest] IBM MVS JCL recognition


Why don't you just insert all the tokens into the stream?  Basically you
could keep a token queue in your filter and just be sure to empty the queue
before you pull another token from the lexer.

Monty

-----Original Message-----
From: Jim O'Connor [mailto:Jim.OConnor at microfocus.com]
Sent: Thursday, March 13, 2003 10:59 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] IBM MVS JCL recognition


Hi all,
  JCL has a number of fun recognition problems for which ANTLR might have
solutions.  There hasn't been a publicly available JCL grammar, as far as I
know.  I'll start with a direct ANTLR related question, just to get the ball
rolling.

  JCL has "symbolic replacement".  For example, "OBJECT" below would be
assigned a value, say "FILE.NAME".

//SYSLIN DD DSN=&OBJECT,UNIT=SYSDA,SPACE=(CYL,1)

  which results in 

//SYSLIN DD DSN=FILE.NAME,UNIT=SYSDA,SPACE=(CYL,1)

  For this example I see a TokenStreamFilter working nicely.  I gather the
definitions (Hashtable), get a "symbolic" token, look up the definition and
replace the text.

  Another example gets more complicated. Setting OBJECT =
"FILE.NEW,MYOPTION(1,4)", would translate to


//SYSLIN DD DSN=FILE.NEW,MYOPTION(1,4),UNIT=SYSDA,SPACE=(CYL,1)

 I don't have a token for token match.  I would be more comfortable
resorting back to a character stream and re-lexing.  I'd be glad to make the
example clearer if it isn't well described.

  Looking forward to hearing opinions, comments and being directed down
productive paths..... if there is such parsing JCL.

Jim







    

 

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/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list