Skip to content

feat (parser): parse empty CLASS-ID paragraph with "unimplemented" warning#284

Merged
nberth merged 4 commits into
OCamlPro:oo4gnucobol-3.xfrom
kmr-srbh:class-id-syntax-test
May 15, 2026
Merged

feat (parser): parse empty CLASS-ID paragraph with "unimplemented" warning#284
nberth merged 4 commits into
OCamlPro:oo4gnucobol-3.xfrom
kmr-srbh:class-id-syntax-test

Conversation

@kmr-srbh

@kmr-srbh kmr-srbh commented Apr 8, 2026

Copy link
Copy Markdown
  • Add support for parsing an "empty" CLASS-ID paragraph with no contained paragraphs and divisions.
  • Emit a "unimplemented" warning and exit.

@kmr-srbh

kmr-srbh commented Apr 9, 2026

Copy link
Copy Markdown
Author

@GitMensch @nberth could you please review?

@nberth nberth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good! One side question though (please ignore if you have discussed this with @GitMensch already): I would have though this kind of changes for OOP would target the gitside-master branch (so GnuCOBOL 4.x instead of GnuCOBOL 3.x).

Comment thread tests/testsuite.src/syn_definition.at Outdated
Comment thread tests/testsuite.src/syn_definition.at Outdated
@GitMensch

GitMensch commented Apr 10, 2026 via email

Copy link
Copy Markdown
Collaborator

…warning

* Add support for parsing an "empty" `CLASS-ID` paragraph with no contained paragraphs and divisions.

* Emit a "unimplemented" warning and exit.

Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from 2907b0e to 8c3e95a Compare May 5, 2026 09:05
@kmr-srbh kmr-srbh marked this pull request as draft May 5, 2026 09:11
Comment thread tests/testsuite.src/syn_definition.at
@GitMensch

Copy link
Copy Markdown
Collaborator

Is there a reason to go on with the PR or should we just close it in favor of #287?

@nberth

nberth commented May 6, 2026

Copy link
Copy Markdown
Contributor

Is there a reason to go on with the PR or should we just close it in favor of #287?

I would be in favor of breaking this work into small chunks for smaller diffs that stay consistent and focused on specific bits of the syntax, so this PR is still relevant in my opinion.
Or would you rather have a final big commit with most OO syntax and tests for syntax checks? In which case it may still make sense to have a temporary target oo-for-gnucobol-3.x branch from which we derive one big svn commit at the end.

@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from 8c3e95a to aa08b32 Compare May 6, 2026 14:32
@kmr-srbh kmr-srbh requested a review from nberth May 6, 2026 14:35
@kmr-srbh kmr-srbh marked this pull request as ready for review May 6, 2026 14:43
Comment thread tests/testsuite.src/syn_oo.at Outdated
Comment thread tests/Makefile.am Outdated
Comment thread tests/testsuite.at Outdated
@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from aa08b32 to 4558c33 Compare May 6, 2026 14:54
@kmr-srbh kmr-srbh changed the base branch from gitside-gnucobol-3.x to oo4gnucobol-3.x May 7, 2026 08:15

@GitMensch GitMensch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good for a baseline; a bit more and we could upstream the first part (as soon as FSF papers are done, which currently seems to take some more time on their side), if you both think that's useful

Comment thread cobc/ChangeLog
Comment thread tests/ChangeLog
Comment thread tests/testsuite.src/syn_oo.at Outdated
Comment thread cobc/parser.y
Comment thread cobc/parser.y Outdated
Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from 4558c33 to 3131611 Compare May 11, 2026 20:20
@kmr-srbh

Copy link
Copy Markdown
Author

Can we add the new branch oo4gnucobol-3.x to the CI workflow? Happy to push a commit for that.

Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/scanner.l Outdated
@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from 3131611 to e717646 Compare May 13, 2026 18:29
@kmr-srbh kmr-srbh requested a review from nberth May 13, 2026 18:30
@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from e717646 to 611ea99 Compare May 13, 2026 18:32
@nberth nberth force-pushed the oo4gnucobol-3.x branch from bcf2e70 to 1bcf9fb Compare May 13, 2026 19:08

@nberth nberth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good. I think we're almost there. Only a minor suggestion to improve message order.

Comment thread cobc/scanner.l Outdated
Comment thread cobc/parser.y
kmr-srbh added 2 commits May 15, 2026 00:04
Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
Signed-off-by: Saurabh Kumar <developer.saurabh@outlook.com>
@kmr-srbh kmr-srbh force-pushed the class-id-syntax-test branch from 611ea99 to c89d8c7 Compare May 14, 2026 18:35
@kmr-srbh kmr-srbh requested review from GitMensch and nberth May 14, 2026 18:38

@nberth nberth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a proper basis to build upon for the subsequent syntactic constructs, so we can merge into our staging oo4gnucobol-3.x branch.

Great job!

(The CI failures seem unrelated to your changes, so I'll merge as is).

@nberth nberth merged commit 9a5c036 into OCamlPro:oo4gnucobol-3.x May 15, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants