[antlr-interest] Having the "include" file as part the AST
Jim O'Connor
Jim.OConnor at microfocus.com
Mon May 12 08:32:38 PDT 2003
Hi All,
I am working with the Job Control Language (JCL). It has statements
that "describe" INCLUDE-type files.
//**** Main File ****/
//LABEL1 EXEC PROC=MYPROC,SYMB1=VALUE1
/********* Proc file: MYPROC.PRC *********/
//D1 DD DSN=DATAFILE,DISP=&SYMB1
//D2 DD DUMMY
What would result for processing is
//LABEL1 EXEC PROC=MYPROC,SYMB1=VALUE1
//D1 DD DSN=DATAFILE,DISP=VALUE1
//D2 DD DUMMY
I am struggling with the INCLUDE file mechanism. It hides the
INCLUDE file statement from the main parser. An INCLUDE statement is not
part of the C language. It is part of pre-processing.
With my JCL parser, I am trying to create an AST that contains the
EXEC PROC statement. Is there a mechanism that passes the "//" "LABEL1"
"EXEC" "PROC" "=" "MYPROC" tokens to the parser while starting the new lexer
at the correct time? Is this description clear?
Jim
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list