[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GnuCOBOL-users] Reserved word handling
From: |
Brian Tiffin |
Subject: |
[GnuCOBOL-users] Reserved word handling |
Date: |
Wed, 21 Jun 2017 16:40:18 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 |
GnuCOBOL partially supports quite a few COBOL dialects and that support
will continue to increase.
One problem this causes is that different COBOL compilers support
different reserved words. A valid identifier in one dialect may be a
verb phrase in another.
A configuration feature "specify-all-reserved: yes/no" was added, along
with a list of the words that the compiler treats as reserved. Edward
Hart did a spectacular job at setting up this powerful feature, allowing
for very fine grained control over dialect support.
But, this also causes a usability issue. Code that is "mostly" IBM
would break when a valid standard clause of END-DISPLAY was used (for
instance) as that is not a supported clause in IBM compilers.
There is a maintained list of reserved words in each .conf file. The
default was going to be "specify-all-reserved: yes" but decisions have
been made to change that default to "specify-all-reserved: no". That
means existing code that worked before will continue to compile. Which
is a good thing.
We'll need to document and propagate information for those rarer times
when someone is porting code from a different compiler that may use a
normally reserved word as an identifier. Or for those developers that
want GnuCOBOL to bark when a feature may not compile with a different
platform compiler.
For GnuCOBOL compiler authors there is a new feature change request at
https://sourceforge.net/p/open-cobol/feature-requests/212/ which is
asking for opinions on how a final implementation should be managed.
For everyone else on the gnucobol-users list, this note is just part of
the information propagation so you are aware that when using -std=ibm or
=mf or others that you may need to tweak the reserved word settings if
porting to or from a different compiler.
The feature is powerful, but also very rich in the small details as
there are lots of variants in dialect syntax.
So, author's take a look at wish list 212 and please add your august
opinions.
Cheers,
Brian
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GnuCOBOL-users] Reserved word handling,
Brian Tiffin <=