[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: Free-form problem



That's why in cobol2K comment entries re not allowed. You could I guess
take the approach that comment entries turn off enough of free format to
allow the end of comment entries to be detected. 

Come to think of it, the standard is full of things like that, so why
not!

Tim Josling

Michael McKernan wrote:
> 
> >>>>> "Tim" == Tim Josling <tej@melbpc.org.au>
> >>>>> wrote the following on Mon, 15 Nov 1999 05:43:47 +1000
> 
>   Tim> Basically this can't be cleanly handled. In the preprocessor I
>   Tim> go into a special lex mode, where I scan ahead for:
> 
>   Tim> a) Anything in area a ("warning - comment entry assumed ended
>   Tim> by next paragraph") b) Period space.
> 
>   Tim> Don't forget that continuations are not allowed in comment
>   Tim> entries, and lots of other trash. That's why I did the PP to
>   Tim> handle all this ugly stuff.
> 
>   Tim> The preprocessor basically throws away the comment entries,
>   Tim> except for date-compiled where it retains only the paragraph
>   Tim> header.
> 
> Gee, I'm glad you're taking care of this, Tim ;-)
> 
> Even so, the language in the original standard makes these paragraphs
> completely dependent on syntactic margin A.  If we're going to have
> free form COBOL, some accommodation must have been made.  I'm still
> curious about how it's handled.  If I write something like this, how
> much trouble am I in?
> 
>      IDENTIFICATION DIVISION.
>      PROGRAM-ID. FOO.
>      AUTHOR. ENVIRONMENT DIVISION.
>      INSTALLATION. DATA DIVISION.
>      DATE-WRITTEN. PROCEDURE DIVISION.
> 
>      ENVIRONMENT DIVISION.
> 
> Even "PERIOD SPACE" is not sacrosanct by the language in my book.
> Since the comment-entry is permitted to occupy multiple line, if we
> go strictly by the book and ignore margin A, the next thing we'll see
> is eof.  I doubt that's what is intended.
> 
> --
> This message was sent through the gnu-cobol mailing list.  To remove yourself
> from this mailing list, send a message to majordomo@lusars.net with the
> words "unsubscribe gnu-cobol" in the message body.  For more information on
> the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.