On Sun, 7 Sep 2008, Paul Gilmartin wrote:

> The munging of comments performed by some lexers is quite annoying.
> Examples:
> 
> o I have a program that generates SYSLIN for Binder (admittedly some
>   of my own munging).  Before each object code unit I place a comment
>   documenting its provenance (version, etc.)  Formerly, Binder
>   SYSPRINT listed the loaded CSECTs prior to the comment that had
>   preceded the object code.  IBM fixed this without my reporting it.
>   Good.
> 
> o The same program generstes input to the SAS prelinker, with similar
>   comments.  SAS does not list them.  Bad.
> 
> o In JCL, I sometimes precede a block of statements such as a job step
>   with a block comment.  In the JESJCL listing, if the preceding
>   statement involves resolving a symbol, the resolved form appears
>   after the block comment.  Bad.  I think this is utterly needless.
>   Aren't  JCL statements, even continued ones, self delimiting?

I don't know what you mean by this. But as an example, think of a PARM=
which is in quotes and spans multiple cards. That is simple for me to
process in my lexer code. But likely much more difficult in the Bison
code. I'd need to keep variables which would tell the parser that I am in
the midst of a continued apostrophe delimited PARM. The same for PATH=. It
truly is easier, for me in my ignorance of Bison and parsing in general,
to create a single logical JCL card from multiple physical JCL cards which
make up a single statement.

What might be possible (but this is off-the-cuff) would be to include each 
physical card as an XML comment. Seems ugly to me.

>   There should be no need for the parser to perform such a lookahead.
>   (My comments do not appear between lines of a continued JCL
>   statement.)

But such is valid. For now, I'm going with simple. JCL, sans comments, is 
making me crazy <grin>.

> 
> -- gil
> 
> ----------------------------------------------------------------------
> 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
> 

-- 
Q: What do theoretical physicists drink beer from?
A: An EIN stein.

Maranatha!
John McKown

----------------------------------------------------------------------
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

Reply via email to