On Sun, 7 Sep 2008 18:20:58 -0500, John McKown wrote: >On Sun, 7 Sep 2008, Gibney, Dave wrote: > >> I would suggest that you might be losing usefull information by >> ignoring comments :) > >You are likely correct. However, processing comments in the Bison parser >instead of the Flex lexer code would seriously complicate the parser. In >the lexer, it is really fairly simple. > 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? 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.) -- 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

