Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle COMMON keyword in PROGRAM-ID #222

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

engboris
Copy link
Contributor

Problem

The grammar could recognise the INITIAL, RECURSIVE and COMMON keywords after PROGRAM-ID. id IS? but not:

  • INITIAL COMMON and RECURSIVE COMMON;
  • COMMON INITIAL and COMMON RECURSIVE

I followed the grammar of GnuCOBOL.

@engboris engboris added bug Something isn't working ok to review As its name says labels Mar 20, 2024
@engboris engboris requested a review from nberth March 20, 2024 10:49
Copy link
Collaborator

@nberth nberth left a comment

Choose a reason for hiding this comment

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

Fine! Just two minor comments.

@@ -46,17 +46,26 @@ and program_level =
}
| ProgramPrototype

and program_mode = { prog_is_common : bool;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you reformat as the other records ({ and } alone on their lines), and more importantly, put the comment "only within a nested program" on the right of prog_is_common?

let pp_program_mode ppf { prog_is_common;
prog_kind } =
match prog_kind with
| None when prog_is_common -> Fmt.pf ppf "COMMON"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please break lines after each ->.

@nberth nberth changed the title Handles COMMON keyword in PROGRAM-ID Handle COMMON keyword in PROGRAM-ID Mar 20, 2024
Copy link
Collaborator

@nberth nberth left a comment

Choose a reason for hiding this comment

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

Thanks!

@nberth nberth merged commit ab8cd8a into OCamlPro:master Mar 21, 2024
4 checks passed
@engboris engboris deleted the engboris-add-progid-common branch March 27, 2024 14:04
@engboris engboris removed the bug Something isn't working label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok to review As its name says
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants