gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Re: problem with source code


From: Roger While
Subject: [open-cobol-list] Re: problem with source code
Date: Fri Nov 18 12:43:00 2005

The private reply never got posted - here it is :

Roger,

    First, I sent an email to the Open Source COBOL community but I do not
think it got distributed. I am thinking that the mail server is down.
Therefore, I decided to email you directly.
    The top level delta of parser.y will not build. The problem is missing
semicolons in the C code. The top delta of parser.c does build. I also
noticed that you added PATCH_LEVEL. Can you tell me what that is about?

Thanks,
Bob Sherry


OK. Tracked down what's going on with bison.
It's a feature :-)
Here it is directly quoted from the bison source
(src/scan-gram.l)

    /* As an undocumented Bison extension, append `;' before the last
       brace in braced code, so that the user code can omit trailing
       `;'.  But do not append `;' if emulating Yacc, since Yacc does
       not append one.

       FIXME: Bison should warn if a semicolon seems to be necessary
       here, and should omit the semicolon if it seems unnecessary
       (e.g., after ';', '{', or '}', each followed by comments or
       white space).  Such a warning shouldn't depend on --yacc; it
       should depend on a new --pedantic option, which would cause
       Bison to warn if it detects an extension to POSIX.  --pedantic
       should also diagnose other Bison extensions like %yacc.
       Perhaps there should also be a GCC-style --pedantic-errors
       option, so that such warnings are diagnosed as errors.  */

This is from 1.875 but is also in all subsequent releases up to and including 2.1.

So I would say QED and that's why I didn't spot it.

Roger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]