Skip to content

feat (parser): add parsing support for all class attributes with "unimplemented" warning#287

Open
kmr-srbh wants to merge 2 commits into
OCamlPro:oo4gnucobol-3.xfrom
kmr-srbh:class-attributes-syntax
Open

feat (parser): add parsing support for all class attributes with "unimplemented" warning#287
kmr-srbh wants to merge 2 commits into
OCamlPro:oo4gnucobol-3.xfrom
kmr-srbh:class-attributes-syntax

Conversation

@kmr-srbh

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

Copy link
Copy Markdown

Adds support for the following class attributes:

  • AS literal
  • IS FINAL
  • INHERITS FROM {class-name ...}
  • USING {param-name ...}

Also support MF extensions IS STATIC, IS ABSTRACT, IS PARTIAL,
IS PUBLIC, IS INTERNAL.

MF docs: https://docs.rocketsoftware.com/de-DE/bundle/visualcoboldevhub_ug_110/page/pho1742953034730.html

@kmr-srbh kmr-srbh changed the title feat (parser): add parsing support for all class attributes with unimplemented warning feat (parser): add parsing support for all class attributes with "unimplemented" warning Apr 20, 2026
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch 2 times, most recently from 100bb74 to 261377b Compare April 20, 2026 16:33
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch from 261377b to 13fa1f6 Compare May 5, 2026 09:01
@kmr-srbh kmr-srbh marked this pull request as draft May 5, 2026 09:11
@nberth

nberth commented May 15, 2026

Copy link
Copy Markdown
Contributor

@kmr-srbh You can now rebase and retarget this PR onto oo4gnucobol-3.x.

@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch 2 times, most recently from 2bd9e65 to aa26caf Compare May 15, 2026 14:27
@kmr-srbh kmr-srbh changed the base branch from gitside-gnucobol-3.x to oo4gnucobol-3.x May 15, 2026 14:27
@kmr-srbh

Copy link
Copy Markdown
Author

I am moving the tests into syn_oo.at.

Comment thread cobc/parser.y Outdated
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch 2 times, most recently from 3619ce7 to c6115a8 Compare May 19, 2026 18:09
Comment thread cobc/parser.y Outdated
@kmr-srbh kmr-srbh requested a review from nberth May 19, 2026 18:11
@kmr-srbh

Copy link
Copy Markdown
Author

I will next add some error tests for the attributes. Then either in this PR, or in a different one, I can work on adding the class specifier in the REPOSITORY paragraph.

Comment thread cobc/parser.y
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch from c6115a8 to 3123a9e Compare May 26, 2026 17:17
@kmr-srbh kmr-srbh marked this pull request as ready for review May 26, 2026 17:17
@kmr-srbh kmr-srbh requested review from GitMensch and nberth May 26, 2026 17:19

@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.

this is a good time to start learning about not only bison features but also our internal style - as noted below there is most likely documentation missing for this, then please add it to the wiki / make suggestions

... and now I'm keen to see your next iteration

Comment thread cobc/ChangeLog Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread tests/testsuite.src/syn_oo.at
Comment thread tests/testsuite.src/syn_oo.at Outdated
Comment thread cobc/parser.y Outdated
Comment thread tests/testsuite.src/syn_oo.at Outdated
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch 2 times, most recently from 5faa418 to e91ee2e Compare May 28, 2026 19:08
@kmr-srbh kmr-srbh requested a review from GitMensch May 28, 2026 19:10

@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.

That looks quite nice, so possibly ready for feature branch upstream before working on the next constructs?

Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y
Comment thread cobc/parser.y Outdated
Comment thread tests/testsuite.src/syn_oo.at Outdated
Comment thread tests/testsuite.src/syn_oo.at Outdated
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch from e91ee2e to 033245b Compare May 30, 2026 18:10
@kmr-srbh kmr-srbh requested a review from GitMensch May 30, 2026 18:11
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch from 033245b to 4bf6f2f Compare May 31, 2026 16:25

@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.

please try to limit review requests outside of your mentoring to one every 1-2 weeks, or when you feel stuck

Comment thread cobc/tree.h Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch from 4bf6f2f to ab7b4b9 Compare June 4, 2026 19:16
@kmr-srbh kmr-srbh requested a review from nberth June 4, 2026 19:19
Comment thread cobc/tree.h Outdated
Comment thread cobc/parser.y Outdated
@kmr-srbh kmr-srbh force-pushed the class-attributes-syntax branch 3 times, most recently from 7466af7 to ff54230 Compare June 11, 2026 08:36

@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.

I'm not sure if there's anything left "feature wise" for this PR - overall it looks quite good to me.

Comment thread cobc/parser.y Outdated
Comment thread cobc/parser.y Outdated
kmr-srbh added 2 commits June 12, 2026 21:07
…plemented warning

Adds support for the following class attributes:

* AS literal
* IS FINAL
* INHERITS FROM {class-name ...}
* USING {param-name ...}

Also support MF extensions IS STATIC, IS ABSTRACT, IS PARTIAL,
IS PUBLIC, IS INTERNAL.

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-attributes-syntax branch from ff54230 to 7b25f56 Compare June 12, 2026 15:37
@kmr-srbh

Copy link
Copy Markdown
Author

The CI failed as:

  cd build_windows
  set CL=/I "%VCPKG_ROOT%\installed\x64-windows\include\libxml2"
  "%MSBUILD%" .\vs2019\GnuCOBOL.sln /m /p:Platform=x64 /p:Configuration=Debug
  shell: C:\Windows\system32\cmd.EXE /D /E:ON /V:OFF /S /C "CALL "{0}""
  env:
    GC_VERSION: GnuCOBOL 3.3-dev
    FLEXBISON: https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip
    MSBUILD: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe
    VCVARS32: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat
    VCVARS64: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
    VCPKG_ROOT: C:\vcpkg
    VCPKGS32: mpir:x86-windows pdcurses:x86-windows berkeleydb:x86-windows libxml2:x86-windows cjson:x86-windows
    VCPKGS64: mpir:x64-windows pdcurses:x64-windows berkeleydb:x64-windows libxml2:x64-windows cjson:x64-windows
    MSYS2_ROOT: C:\msys64
    MSYSTEM: UCRT64
    MSYSPKGS: autoconf
    VCVARS: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
    VCPKGS: mpir:x64-windows pdcurses:x64-windows berkeleydb:x64-windows libxml2:x64-windows cjson:x64-windows
    ARCHDIR: x64
The system cannot find the path specified.
Error: Process completed with exit code 1.

The Visual Studio version was bumped to 2026. We recently fixed this same issue at LFortran with https://github.com/lfortran/lfortran/pull/11811/changes. I can push a PR for this if the changes in the linked PR seem fine.

@GitMensch

Copy link
Copy Markdown
Collaborator

The Visual Studio version was bumped to 2026. We recently fixed this same issue at LFortran with https://github.com/lfortran/lfortran/pull/11811/changes. I can push a PR for this if the changes in the linked PR seem fine.

Yes, please create a separate PR to the gitside-3.x branch that replaces all 2022 with the latest option, maybe we don't need the vars where those are used any more).

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