Reserved word handling

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

 



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






[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux