[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Re: OC issues - number 6
From: |
Roger While |
Subject: |
[open-cobol-list] Re: OC issues - number 6 |
Date: |
Wed Jan 18 12:50:02 2006 |
Here's the fix - In parser.y, the OBJECT-COMPUTER should
look like this (line 254) :
object_computer_paragraph:
OBJECT_COMPUTER '.' object_computer_entry
;
object_computer_entry:
| '.'
| computer_name '.'
| computer_name object_computer_phrase_sequence '.'
| object_computer_phrase_sequence '.'
;
object_computer_phrase_sequence:
| object_computer_phrase_sequence object_computer_phrase
;
object_computer_phrase:
_program _collating SEQUENCE _is reference
{
current_program->collating_sequence = $5;
}
| MEMORY SIZE _is integer CHARACTERS
{
cb_verify (cb_memory_size_clause, "MEMORY SIZE");
}
;
And change the "expect" at the top of parser.y from 92 to 94.
Roger
I wrote :
The problem is nothing to do with EJECT.
This is skipped by OC.
Problem is that OC parsing of OBJECT-COMPUTER is wrong.
OC is expecting something after the OBJECT-COMPUTER phrase
whereas, if I read correctly, all params are optional (85 and 2002)
for this phrase.
Fix coming up.
Roger
IDENTIFICATION DIVISION.
PROGRAM-ID. ztest INITIAL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
EJECT
DATA DIVISION.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
DISPLAY 'OK'.
GOBACK.
G:\bank64\src\obj>cobc -m -std=ibm ztest6.cbl
ztest6.cbl:8: Error: syntax error, unexpected DATA, expecting WORD