Skip to content

Commit

Permalink
Fix screen section clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
engboris committed Feb 19, 2024
1 parent 2ff35a3 commit e7de85a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-02-19 Boris Eng <[email protected]>

* parser.y: changed basic_literal for literal in screen section
clauses

2023-11-29 Fabrice Le Fessant <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion cobc/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -10144,7 +10144,7 @@ screen_option:
;

screen_value_clause:
_value_is basic_literal
_value_is literal
{
/* omitting VALUE is at least allowed in MS-COBOL, MF-COBOL, ACUCOBOL for SCREEN VALUE,
and not according to XOPEN uses 85-std which has no SCREEN SECTION and newer Standards */
Expand Down
3 changes: 3 additions & 0 deletions tests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-02-19 Boris Eng <[email protected]>

* testsuite.src/syn_screen.at: added the test "VALUE ALL in SCREEN SECTION"

2023-07-10 Simon Sobisch <[email protected]>

Expand Down
24 changes: 24 additions & 0 deletions tests/testsuite.src/syn_screen.at
Original file line number Diff line number Diff line change
Expand Up @@ -882,3 +882,27 @@ AT_CHECK([$COMPILE_ONLY prog.cob], [0], [],
])

AT_CLEANUP


AT_SETUP([VALUE ALL in SCREEN SECTION])
AT_KEYWORDS([SCREEN VALUE ALL])

AT_DATA([prog.cob], [
IDENTIFICATION DIVISION.
PROGRAM-ID. SCREEN-VALUE-ALL.

DATA DIVISION.
WORKING-STORAGE SECTION.

SCREEN SECTION.
01 SCREEN001 BLANK SCREEN AUTO-SKIP.
03 SCR01 BACKGROUND-COLOR 2 FOREGROUND-COLOR 7.
05 LINE 02 COL 001 PIC X(50) VALUE ALL '-'.

PROCEDURE DIVISION.
GOBACK.
])

AT_CHECK([$COMPILE_ONLY prog.cob], [0], [], [])

AT_CLEANUP

0 comments on commit e7de85a

Please sign in to comment.