[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] I have been beating up the parser.
From: |
Larry Cullen |
Subject: |
[open-cobol-list] I have been beating up the parser. |
Date: |
Sat, 19 Jul 2008 20:51:31 -0500 |
User-agent: |
Thunderbird 2.0.0.14 (Windows/20080421) |
Greetings,
I have been intentionally trying various things to see just what I might
get away with. This was done with a build from the latest tarball that I
downloaded and built this afternoon.
The attached COBOL source code is 82 lines long. When compiled it
generates the following compile time message:
codegen.c: 3780: Invalid type cast from 'null'
Tag 1 0 Tag 2 28
Aborting compile of CGENERR.COB at line 82
This was evidently caused by the inclusion of the two PROGRAM-ID lines.
The inclusion of the multiple IDENTIFICATION DIVISION entries doesn't
seem to be the culprit.
Enjoy!
000010* CGENERR.COB : Test Identification Division parsing
000020***************************************************************
000030* Since the Identification Division entry is commentary
000040* See if it can defined any number of times.
000050***************************************************************
000060 IDENTIFICATION DIVISION.
000070 identification division.
000080 ID DIVISION.
000090 id division.
000100
000110***************************************************************
000120* The PROGRAM-ID. entry is required. See if it can be defined
000130* multiple times.
000140***************************************************************
000150 PROGRAM-ID. PROGRAM-NAME.
000160 program-id. "ProgramName".
000170* PROGRAM-ID. PROGRAM-NAME IS INITIAL PROGRAM.
000180
000190***************************************************************
000200* All remaining entries in the IDENTIFICATION DIVISION are
000210* treated as commentary. See if multiple defines are allowed.
000220***************************************************************
000230 AUTHOR. THIS IS THE AUTHORs NAME.
000240 author. Another author name.
000250
000260 INSTALLATION. Unterminted comment line
000270 installation. Terminated comment line.
000280
000290 DATE-WRITTEN. 01 JAN 1985
000300 date-written. 02 JAN 1985.
000310
000320 DATE-COMPILED.
000330 date-compiled.
000340
000350 SECURITY. What security?.
000360 security. Comment line
000370
001160 DATA DIVISION.
001350
001360*
001370 WORKING-STORAGE SECTION.
001380*---------------------------------------------------------------------
001390* 7-level-entry
001400*---------------------------------------------------------------------
001410 77 USER-ENTRY PIC X(10).
001420
001430*---------------------------------------------------------------------
001440* record-description-entry
001450*---------------------------------------------------------------------
001460
001470*
001480*SCREEN SECTION.
001490*
001500*---------------------------------------------------------------------
001510* screen-description-entry
001520*---------------------------------------------------------------------
001530
001540*LINKAGE SECTION.
001550*---------------------------------------------------------------------
001560* 7-level-entry
001570*---------------------------------------------------------------------
001580*---------------------------------------------------------------------
001590* record-description-entry
001600*---------------------------------------------------------------------
001610
001620 PROCEDURE DIVISION.
001630 100-MAIN.
001640 DISPLAY "HELLO WORLD!" AT LINE NUMBER 1 COLUMN NUMBER 1
001650 WITH BACKGROUND-COLOR IS 7 BEEP BLINK
001660 FOREGROUND-COLOR IS 0 HIGHLIGHT REVERSE-VIDEO
001670 UNDERLINE BLANK SCREEN.
001680
001690 ACCEPT USER-ENTRY AT LINE NUMBER 1 COLUMN NUMBER 14
001700 WITH AUTO BACKGROUND-COLOR IS 0 BELL BLINK
001710 FOREGROUND-COLOR IS 7 HIGHLIGHT SECURE REVERSE-VIDEO
001720* RIGHT-JUSTIFY <- OpenCOBOL doesn't like this
001730* SPACE-FILL <- OpenCOBOL doesn't like this
001740 UNDERLINE
001750 UPDATE.
001760
001770 STOP RUN.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [open-cobol-list] I have been beating up the parser.,
Larry Cullen <=