-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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 ->
.
COMMON
keyword in PROGRAM-ID
Fix coding style
fc0ac24
to
11f5e1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Problem
The grammar could recognise the
INITIAL
,RECURSIVE
andCOMMON
keywords afterPROGRAM-ID. id IS?
but not:INITIAL COMMON
andRECURSIVE COMMON
;COMMON INITIAL
andCOMMON RECURSIVE
I followed the grammar of GnuCOBOL.