Grammar connected by Vadim Zaytsev, see the Grammar Zoo entry for details: cobol/vscobolii/prolog/connected
Source used for this grammar: Ralf Lämmel, IBM VS COBOL II, ibm-transformed.pl
, 4 June 2003 [Explore]
statement_verb
, copy_directive_without_period
, statements
, overflow_phrases
, invalid_key_phrases
, at_end_phrases
, exception_phrases
, size_error_phrases
, examine_statement
, not_at_eop
, at_eop
, write_before_after
, not_at_end
, at_end
, inspect_replacing_phrase
, inspect_tallying_phrase
, before_after_phrase
, when_other_phrase
, when_phrase
, e_phrase
, invalid_key
, not_invalid_key
, not_on_exception
, on_exception
, not_on_overflow
, on_overflow
, not_on_size_error
, on_size_error
, use_directive
, subtract_statement
, set_statement
, search_statement
, perform_statement
, open_statement
, multiply_statement
, move_statement
, inspect_statement
, go_to_statement
, divide_statement
, close_statement
, add_statement
, accept_statement
, call_using_phrase
, altered_go_to
, occurs_clause
, data_clauses
, data_description_entry
, code_set_clause
, recording_mode_clause
, linage_area_clause
, linage_clause
, data_records_clause
, value_of_clause
, label_records_clause
, record_varying_clause
, record_clause
, block_contains_clause
, global_clause
, external_clause
, file_clauses
, file_description_entry
, status_clause
, relative_key
, record_key
, password_clause
, key_clause
, access_mode_clause
, record_delimiter_clause
, padding_character_clause
, organisation_clause
, reserve_clause
, file_control_clauses
, assign_clause
, select_clause
, file_control_entry
, special_names_clauses
, currency_clause
, class_clause
, symbolic_clause
, alphabet_clause
, environment_clause
, computer_paragraphs
, sentence
, series_of_imperative_statements
, procedure_division_content
, section
, using_phrase
, record_description_entry
, data_division_content
, environment_division_content
, identification_division_content
, copy_operand
, abbreviation_rest
, object
, relational_operator
, operand
, simple_condition
, combinable_condition
, condition
, basis
, power
, times_div
, arithmetic_expression
, mode
, special_register
, literal
, figurative_constant
, assignment_name
, environment_name
, computer_name
, section_name
, paragraph_name
, text_name
, program_name
, library_name
, symbolic_character
, record_name
, mnemonic_name
, index_name
, file_name
, data_name
, condition_name
, class_name
, alphabet_name
, mod_length
, leftmost_character_position
, condition_name_reference
, subscript
, qualified_data_name
, identifier
, procedure_name
, abbreviated_combined_relation_condition
, accept_statement_format_i
, accept_statement_format_ii
, add_statement_format_i
, add_statement_format_ii
, add_statement_format_iii
, after_phrase
, alter_statement
, blank_when_zero_clause
, call_statement_format_i
, call_statement_format_ii
, cancel_statement
, class_condition
, close_statement_format_i
, close_statement_format_ii
, cobol_source_program
, combined_condition
, compute_statement
, condition_name_condition
, condition_name_in_data_division
, condition_name_in_special_names_paragraph
, configuration_section
, continue_statement
, copy_directive
, data_description_entry_format_i
, data_description_entry_format_ii
, data_description_entry_format_iii
, delete_statement
, display_statement
, divide_statement_format_i
, divide_statement_format_ii
, divide_statement_format_iii
, divide_statement_format_iv
, divide_statement_format_v
, entry_statement
, evaluate_statement
, exit_program_statement
, exit_statement
, file_control_paragraph
, go_to_statement_format_i
, go_to_statement_format_ii
, go_to_statement_format_iv
, goback_statement
, i_o_control_paragraph
, identifier_format_i
, identifier_format_ii
, idx_entry
, if_statement
, initialize_statement
, input_output_section
, inspect_statement_format_i
, inspect_statement_format_ii
, inspect_statement_format_iii
, inspect_statement_format_iv
, justified_clause
, merge_statement
, move_statement_format_i
, move_statement_format_ii
, multiply_statement_format_i
, multiply_statement_format_ii
, negated_simple_condition
, nested_source_program
, object_computer_paragraph
, occurs_clause_format_i
, occurs_clause_format_ii
, ocp_entry
, open_statement_format_i
, open_statement_format_ii
, para
, perform_statement_format_i
, perform_statement_format_ii
, perform_statement_format_iii
, perform_statement_format_iv
, picture_clause
, qsam_or_sam_i_o_control_entries
, read_statement_format_i
, read_statement_format_ii
, redefines_clause
, reference_to_procedure_division_name_format_i
, reference_to_procedure_division_name_format_ii
, relation_condition
, release_statement
, renames_clause
, return_statement
, rewrite_statement
, search_statement_format_i
, search_statement_format_ii
, sect
, set_statement_format_i
, set_statement_format_ii
, set_statement_format_iii
, set_statement_format_iv
, set_statement_format_v
, sign_clause
, sign_condition
, snp_entry
, sort_merge_i_o_control_entries
, sort_statement
, source_computer_paragraph
, special_names_paragraph
, start_statement
, stop_statement
, string_statement
, subtract_statement_format_i
, subtract_statement_format_ii
, subtract_statement_format_iii
, switch_status_condition
, synchronized_clause
, test_phrase
, unstring_statement
, usage_clause
, use_directive_format_i
, use_directive_format_ii
, use_directive_format_iii
, value_clause_format_i
, value_clause_format_ii
, varying_phrase
, vsam_i_o_control_entries
, w_phrase
, write_statement_format_i
), 1 root (cobol_source_program
), 0 top (—), 13 bottom (integer
29, system_name
4, quoted_pseudo_text
, cobol_word
, user_defined_word
5, comment_entry
6, dbcs
, numeric
, character_string
, priority_number
3, level_number
, alphabetic_user_defined_word
8, nonnumeric
).statement_verb ::= "ACCEPT" "ADD" "ALTER" "CALL" "CANCEL" "CLOSE" "COMPUTE" "CONTINUE" "DELETE" "DISPLAY" "DIVIDE" "ENTRY" "EVALUATE" "EXIT" "GOBACK" "GO" "IF" "INITIALIZE" "INSPECT" "MERGE" "MOVE" "MULTIPLY" "OPEN" "PERFORM" "READ" "RELEASE" "RETURN" "REWRITE" "SEARCH" "SET" "SORT" "START" "STOP" "STRING" "SUBTRACT" "UNSTRING" "WRITE" "EXAMINE" "COPY"
copy_directive_without_period ::= "COPY" text_name literal "OF""IN" library_name literal "SUPPRESS" "REPLACING" copy_operand "BY" copy_operand
statements ::= accept_statement "END-ADD" statement_verb statements size_error_phrases "END-ADD" statement_verb statements ε alter_statement statement_verb statements call_statement_format_i statement_verb statements"END-CALL" statement_verb statements on_overflow "END-CALL" statement_verb statements ε call_statement_format_ii statement_verb statements"END-CALL" statement_verb statements exception_phrases "END-CALL" statement_verb statements ε cancel_statement statement_verb statements close_statement statement_verb statements compute_statement statement_verb statements"END-COMPUTE" statement_verb statements size_error_phrases "END-COMPUTE" statement_verb statements ε continue_statement statement_verb statements delete_statement statement_verb statements"END-DELETE" statement_verb statements invalid_key_phrases "END-DELETE" statement_verb statements ε display_statement statement_verb statements divide_statement statement_verb statements"END-DIVIDE" statement_verb statements size_error_phrases "END-DIVIDE" statement_verb statements ε entry_statement statement_verb statements evaluate_statement "END-EVALUATE" statement_verb statements exit_statement statement_verb statements exit_program_statement statement_verb statements goback_statement statement_verb statements go_to_statement statement_verb statements if_statement "END-IF" statement_verb statements initialize_statement statement_verb statements inspect_statement statement_verb statements merge_statement statement_verb statements move_statement statement_verb statements multiply_statement statement_verb statements"END-MULTIPLY" statement_verb statements size_error_phrases "END-MULTIPLY" statement_verb statements ε open_statement statement_verb statements perform_statement statement_verb statements read_statement_format_i statement_verb statements"END-READ" statement_verb statements at_end_phrases "END-READ" statement_verb statements ε read_statement_format_ii statement_verb statements"END-READ" statement_verb statements invalid_key_phrases "END-READ" statement_verb statements ε release_statement statement_verb statements return_statement "END-RETURN" statement_verb statements rewrite_statement statement_verb statements"END-REWRITE" statement_verb statements invalid_key_phrases "END-REWRITE" statement_verb statements ε search_statement "END-SEARCH" statement_verb statements set_statement statement_verb statements sort_statement statement_verb statements start_statement statement_verb statements"END-START" statement_verb statements invalid_key_phrases "END-START" statement_verb statements ε stop_statement statement_verb statements string_statement statement_verb statements"END-STRING" statement_verb statements overflow_phrases "END-STRING" statement_verb statements ε subtract_statement statement_verb statements"END-SUBTRACT" statement_verb statements size_error_phrases "END-SUBTRACT" statement_verb statements ε unstring_statement statement_verb statements"END-UNSTRING" statement_verb statements overflow_phrases "END-UNSTRING" statement_verb statements ε write_statement_format_i statement_verb statements"END-WRITE" statement_verb statements write_before_after statement_verb statements"END-WRITE" statement_verb statements w_phrase "END-WRITE" statement_verb statements ε invalid_key_phrases "END-WRITE" statement_verb statements ε examine_statement statement_verb statements copy_directive statement_verb statementsstatement_verb statements add_statement statement_verb statements
overflow_phrases ::= on_overflownot_on_overflow
invalid_key_phrases ::= invalid_key not_invalid_key invalid_key not_invalid_key
at_end_phrases ::= at_end not_at_end at_end not_at_end
exception_phrases ::= on_exception not_on_exception on_exception not_on_exception
size_error_phrases ::= on_size_error not_on_size_error on_size_error not_on_size_error
examine_statement ::= "EXAMINE" identifier "TALLYING" "ALL""LEADING" literal
not_at_eop ::= "NOT" "AT" "END-OF-PAGE""EOP" series_of_imperative_statements
at_eop ::= "AT" "END-OF-PAGE""EOP" series_of_imperative_statements
write_before_after ::= "BEFORE""AFTER" "ADVANCING" identifier integer "LINE""LINES" ε mnemonic_name"PAGE"
not_at_end ::= "NOT" "AT" "END" series_of_imperative_statements
at_end ::= "AT" "END" series_of_imperative_statements
inspect_replacing_phrase ::= "REPLACING" "CHARACTERS" "BY" identifier literal before_after_phrase"ALL""LEADING""FIRST" identifier literal "BY" identifier literal before_after_phrase
inspect_tallying_phrase ::= "TALLYING" identifier "FOR" "CHARACTERS" before_after_phrase"ALL""LEADING" identifier literal before_after_phrase
before_after_phrase ::= "BEFORE""AFTER" "INITIAL" identifier literal
when_other_phrase ::= "WHEN" "OTHER" series_of_imperative_statements
when_phrase ::= "WHEN" e_phrase "ALSO" e_phrase series_of_imperative_statements
e_phrase ::= "ANY" condition "TRUE" "FALSE" "NOT" identifier literal arithmetic_expression "THROUGH""THRU" identifier literal arithmetic_expression
invalid_key ::= "INVALID" "KEY" series_of_imperative_statements
not_invalid_key ::= "NOT" "INVALID" "KEY" series_of_imperative_statements
not_on_exception ::= "NOT" "ON" "EXCEPTION" series_of_imperative_statements
on_exception ::= "ON" "EXCEPTION" series_of_imperative_statements
not_on_overflow ::= "NOT" "ON" "OVERFLOW" series_of_imperative_statements
on_overflow ::= "ON" "OVERFLOW" series_of_imperative_statements
not_on_size_error ::= "NOT" "ON" "SIZE" "ERROR" series_of_imperative_statements
on_size_error ::= "ON" "SIZE" "ERROR" series_of_imperative_statements
use_directive ::= use_directive_format_i use_directive_format_ii use_directive_format_iii
subtract_statement ::= subtract_statement_format_i subtract_statement_format_ii subtract_statement_format_iii
set_statement ::= set_statement_format_i set_statement_format_ii set_statement_format_iii set_statement_format_iv set_statement_format_v
search_statement ::= search_statement_format_i search_statement_format_ii
perform_statement ::= perform_statement_format_i perform_statement_format_ii perform_statement_format_iii perform_statement_format_iv
open_statement ::= open_statement_format_i open_statement_format_ii
multiply_statement ::= multiply_statement_format_i multiply_statement_format_ii
move_statement ::= move_statement_format_i move_statement_format_ii
inspect_statement ::= inspect_statement_format_i inspect_statement_format_ii inspect_statement_format_iii inspect_statement_format_iv
go_to_statement ::= go_to_statement_format_i go_to_statement_format_ii altered_go_to go_to_statement_format_iv
divide_statement ::= divide_statement_format_i divide_statement_format_ii divide_statement_format_iii divide_statement_format_iv divide_statement_format_v
close_statement ::= close_statement_format_i close_statement_format_ii
add_statement ::= add_statement_format_i add_statement_format_ii add_statement_format_iii
accept_statement ::= accept_statement_format_i accept_statement_format_ii
call_using_phrase ::= "USING" "BY" "REFERENCE" identifier"ADDRESS" "OF" identifier file_name"BY" "CONTENT" "LENGTH" "OF" identifier"ADDRESS" "OF" identifier literal
altered_go_to ::= "GO" "TO"
occurs_clause ::= occurs_clause_format_ii occurs_clause_format_i
data_clauses ::=blank_when_zero_clause external_clause global_clause justified_clause occurs_clause picture_clause sign_clause synchronized_clause usage_clause value_clause_format_i
data_description_entry ::= data_description_entry_format_i data_description_entry_format_ii data_description_entry_format_iii copy_directive
code_set_clause ::= "CODE-SET" "IS" alphabet_name
recording_mode_clause ::= "RECORDING" "MODE" "IS" mode
linage_area_clause ::= "WITH" "FOOTING" "AT" data_name integer "LINES" "AT" "TOP" data_name integer "LINES" "AT" "BOTTOM" data_name integer
linage_clause ::= "LINAGE" "IS" qualified_data_name integer "LINES" linage_area_clause
data_records_clause ::= "DATA" "RECORD""RECORDS" "IS""ARE" ε qualified_data_name
value_of_clause ::= "VALUE" "OF" system_name "IS" qualified_data_name literal
label_records_clause ::= "LABEL" "RECORD""RECORDS" "IS""ARE" ε "STANDARD""OMITTED" qualified_data_name
record_varying_clause ::= "IS" "VARYING" "IN" "SIZE" "FROM" integer "TO" integer "CHARACTERS"
record_clause ::= "RECORD" "CONTAINS" integer "CHARACTERS""CONTAINS" integer "TO" integer "CHARACTERS" record_varying_clause "DEPENDING" "ON" qualified_data_name
block_contains_clause ::= "BLOCK" "CONTAINS" integer "TO" integer "CHARACTERS""RECORDS""RECORD" ε
global_clause ::= "IS" "GLOBAL"
external_clause ::= "IS" "EXTERNAL"
file_clauses ::=external_clause global_clause block_contains_clause record_clause label_records_clause value_of_clause data_records_clause linage_clause recording_mode_clause code_set_clause
file_description_entry ::= "FD""SD" file_name file_clauses ";"
status_clause ::= "FILE" "STATUS" "IS" qualified_data_name qualified_data_name
relative_key ::= "RELATIVE" "KEY" "IS" qualified_data_name
record_key ::= "RECORD" "KEY" "IS" qualified_data_name password_clause idx_entry
password_clause ::= "PASSWORD" "IS" qualified_data_name
key_clause ::= record_key relative_key
access_mode_clause ::= "ACCESS" "MODE" "IS" "SEQUENTIAL""RANDOM""DYNAMIC"
record_delimiter_clause ::= "RECORD" "DELIMITER" "IS" "STANDARD-1" assignment_name
padding_character_clause ::= "PADDING" "CHARACTER" "IS" qualified_data_name literal
organisation_clause ::= "ORGANIZATION" "IS" "SEQUENTIAL""INDEXED""RELATIVE"
reserve_clause ::= "RESERVE" integer "AREA""AREAS" ε
file_control_clauses ::=reserve_clause organisation_clause padding_character_clause record_delimiter_clause access_mode_clause key_clause password_clause status_clause
assign_clause ::= "ASSIGN" "TO" assignment_name literal
select_clause ::= "SELECT" "OPTIONAL" file_name
file_control_entry ::=
select_clause assign_clause file_control_clauses ";"
special_names_clauses ::=environment_clause alphabet_clause symbolic_clause class_clause currency_clause
currency_clause ::= "CURRENCY" "SIGN" "IS" literal "DECIMAL-POINT" "IS" "COMMA" "CURRENCY" "SIGN" "IS" literal "DECIMAL-POINT" "IS" "COMMA"
class_clause ::= "CLASS" class_name "IS" literal "THROUGH""THRU" literal
symbolic_clause ::= "SYMBOLIC" "CHARACTERS" symbolic_character "ARE""IS" ε integer "IN" alphabet_name
alphabet_clause ::= "ALPHABET" alphabet_name "IS" "STANDARD-1""STANDARD-2""NATIVE""EBCDIC" literal "THROUGH""THRU" literal"ALSO" literal ε
environment_clause ::= environment_name "IS" mnemonic_name environment_name "IS" mnemonic_name snp_entry snp_entry
computer_paragraphs ::=source_computer_paragraph object_computer_paragraph
sentence ::=
statements ";"
series_of_imperative_statements ::= statements
procedure_division_content ::= "DECLARATIVES" ";" sect ";" use_directive ";" para "END" "DECLARATIVES" ";" para section
section ::= section_name "SECTION" priority_number ";" para
using_phrase ::= "USING" data_name
record_description_entry ::= data_description_entry
data_division_content ::= "FILE" "SECTION" ";" file_description_entry record_description_entry "WORKING-STORAGE" "SECTION" ";" data_description_entry "LINKAGE" "SECTION" ";" data_description_entry
environment_division_content ::= configuration_sectioninput_output_section
identification_division_content ::= "AUTHOR" ";" comment_entry"INSTALLATION" ";" comment_entry"DATE-WRITTEN" ";" comment_entry"DATE-COMPILED" ";" comment_entry"SECURITY" ";" comment_entry"REMARKS" ";" comment_entry
copy_operand ::= quoted_pseudo_text identifier literal cobol_word
abbreviation_rest ::= "AND""OR" "NOT" relational_operator object"(" object abbreviation_rest ")"
object ::= arithmetic_expression
relational_operator ::= "IS""NOT""IS" "NOT""NOT" "IS" ε "GREATER" "THAN"">""LESS" "THAN""<""EQUAL" "TO""=""GREATER" "THAN" "OR" "EQUAL" "TO"">=""LESS" "THAN" "OR" "EQUAL" "TO""<="
operand ::= arithmetic_expression
simple_condition ::= class_condition condition_name_condition relation_condition sign_condition switch_status_condition "(" condition ")"
combinable_condition ::= simple_condition negated_simple_condition abbreviated_combined_relation_condition
condition ::= combinable_condition combined_condition
basis ::= identifier literal "(" arithmetic_expression ")"
power ::= "+""-" ε basis "**" basis
times_div ::= power "*""/" power
arithmetic_expression ::= times_div "+""-" times_div
mode ::= "F" "V" "U" "S"
special_register ::= "ADDRESS" "OF" data_name "DEBUG-ITEM" "LENGTH" "OF" identifier "RETURN-CODE" "SHIFT-OUT" "SHIFT-IN" "SORT-CONTROL" "SORT-CORE-SIZE" "SORT-FILE-SIZE" "SORT-MESSAGE" "SORT-MODE-SIZE" "SORT-RETURN" "TALLY" "WHEN-COMPILED"
literal ::= nonnumeric numeric dbcs figurative_constant
figurative_constant ::= "ZERO" "ZEROS" "ZEROES" "SPACE" "SPACES" "HIGH-VALUE" "HIGH-VALUES" "LOW-VALUE" "LOW-VALUES" "QUOTE" "QUOTES" "ALL" literal "NULL" "NULLS"
assignment_name ::= system_name
environment_name ::= system_name
computer_name ::= system_name
section_name ::= user_defined_word
paragraph_name ::= user_defined_word
text_name ::= user_defined_word
program_name ::= user_defined_word
library_name ::= user_defined_word
symbolic_character ::= alphabetic_user_defined_word
record_name ::= qualified_data_name
mnemonic_name ::= alphabetic_user_defined_word
index_name ::= alphabetic_user_defined_word
file_name ::= alphabetic_user_defined_word
data_name ::= alphabetic_user_defined_word
condition_name ::= alphabetic_user_defined_word
class_name ::= alphabetic_user_defined_word
alphabet_name ::= alphabetic_user_defined_word
mod_length ::= arithmetic_expression
leftmost_character_position ::= arithmetic_expression
condition_name_reference ::= condition_name_in_data_division condition_name_in_special_names_paragraph
subscript ::= integer identifier "+""-" integer index_name "+""-" integer "+""-" integer
qualified_data_name ::= data_name "IN""OF" data_name "IN""OF" file_name
identifier ::= identifier_format_i identifier_format_ii special_register
procedure_name ::= reference_to_procedure_division_name_format_i reference_to_procedure_division_name_format_ii
abbreviated_combined_relation_condition ::= relation_condition abbreviation_rest arithmetic_expression relational_operator "(" "NOT" arithmetic_expression abbreviation_rest ")" arithmetic_expression "(" "NOT" relational_operator arithmetic_expression abbreviation_rest ")"
accept_statement_format_i ::= "ACCEPT" identifier "FROM" mnemonic_name environment_name
accept_statement_format_ii ::= "ACCEPT" identifier "FROM" "DATE""DAY""DAY-OF-WEEK""TIME"
add_statement_format_i ::= "ADD" identifier literal "TO" identifier "ROUNDED"
add_statement_format_ii ::= "ADD" identifier literal "TO" identifier literal "GIVING" identifier "ROUNDED"
add_statement_format_iii ::= "ADD" "CORRESPONDING""CORR" identifier "TO" identifier "ROUNDED"
after_phrase ::= "AFTER" identifier index_name "FROM" identifier index_name literal "BY" identifier literal "UNTIL" condition
alter_statement ::= "ALTER" procedure_name "TO" "PROCEED" "TO" procedure_name
blank_when_zero_clause ::= "BLANK" "WHEN" "ZERO""ZEROS""ZEROES"
call_statement_format_i ::= "CALL" identifier literal call_using_phrase copy_directive_without_period
call_statement_format_ii ::= "CALL" identifier literal call_using_phrase copy_directive_without_period
cancel_statement ::= "CANCEL" identifier literal
class_condition ::= identifier "IS""NOT""IS" "NOT""NOT" "IS" ε "NUMERIC""ALPHABETIC""ALPHABETIC-LOWER""ALPHABETIC-UPPER" class_name"DBCS""KANJI"
close_statement_format_i ::= "CLOSE" file_name "REEL""UNIT" "FOR" "REMOVAL""WITH" "NO" "REWIND" ε"WITH" "NO" "REWIND""LOCK" ε
close_statement_format_ii ::= "CLOSE" file_name "WITH" "LOCK"
cobol_source_program ::= "IDENTIFICATION""ID" "DIVISION" ";" "PROGRAM-ID" ";" program_name "IS" "INITIAL" "PROGRAM" ";" identification_division_content "ENVIRONMENT" "DIVISION" ";" environment_division_content "DATA" "DIVISION" ";" data_division_content "PROCEDURE" "DIVISION" using_phrase ";" copy_directive"USING" data_name copy_directive procedure_division_content nested_source_program "END" "PROGRAM" program_name ";"
combined_condition ::= combinable_condition "AND""OR" combinable_condition
compute_statement ::= "COMPUTE" identifier "ROUNDED" "=""EQUAL" arithmetic_expression
condition_name_condition ::= condition_name_reference
condition_name_in_data_division ::= condition_name "IN""OF" data_name "IN""OF" file_name "(" subscript ")"
condition_name_in_special_names_paragraph ::= condition_name "IN""OF" mnemonic_name
configuration_section ::= "CONFIGURATION" "SECTION" ";" computer_paragraphs special_names_paragraph
continue_statement ::=
"CONTINUE"
copy_directive ::=
copy_directive_without_period ";"
data_description_entry_format_i ::= level_number "FILLER" ε redefines_clause data_clauses ";"data_name
data_description_entry_format_ii ::= "66" data_name renames_clause ";"
data_description_entry_format_iii ::= "88" condition_name value_clause_format_ii ";"
delete_statement ::= "DELETE" file_name "RECORD"
display_statement ::= "DISPLAY" identifier literal "UPON" mnemonic_name environment_name "WITH" "NO" "ADVANCING"
divide_statement_format_i ::= "DIVIDE" identifier literal "INTO" identifier "ROUNDED"
divide_statement_format_ii ::= "DIVIDE" identifier literal "INTO" identifier literal "GIVING" identifier "ROUNDED"
divide_statement_format_iii ::= "DIVIDE" identifier literal "BY" identifier literal "GIVING" identifier "ROUNDED"
divide_statement_format_iv ::= "DIVIDE" identifier literal "INTO" identifier literal "GIVING" identifier "ROUNDED" "REMAINDER" identifier
divide_statement_format_v ::= "DIVIDE" identifier literal "BY" identifier literal "GIVING" identifier "ROUNDED" "REMAINDER" identifier
entry_statement ::= "ENTRY" literal "USING" data_name
evaluate_statement ::= "EVALUATE" identifier literal arithmetic_expression condition"TRUE""FALSE" "ALSO" identifier literal arithmetic_expression condition"TRUE""FALSE" when_phrase when_other_phrase
exit_program_statement ::= "EXIT" "PROGRAM"
exit_statement ::=
"EXIT"
file_control_paragraph ::= "FILE-CONTROL" ";" file_control_entry
go_to_statement_format_i ::= "GO" "TO" procedure_name
go_to_statement_format_ii ::= "GO" "TO" procedure_name "DEPENDING" "ON" identifier
go_to_statement_format_iv ::= "GO" "TO" "MORE-LABELS"
goback_statement ::=
"GOBACK"
i_o_control_paragraph ::= "I-O-CONTROL" ";" qsam_or_sam_i_o_control_entries vsam_i_o_control_entries ";" sort_merge_i_o_control_entries ";"
identifier_format_i ::= qualified_data_name "(" subscript ")" "(" leftmost_character_position ":" mod_length ")"
identifier_format_ii ::= "LINAGE-COUNTER" "IN""OF" file_name
idx_entry ::= "ALTERNATE" "RECORD" "KEY" "IS" qualified_data_name "PASSWORD" "IS" qualified_data_name "WITH" "DUPLICATES"
if_statement ::= "IF" condition "THEN" statement_verb"NEXT" "SENTENCE" statements"NEXT" "SENTENCE" "ELSE" statements"NEXT" "SENTENCE"
initialize_statement ::= "INITIALIZE" identifier "REPLACING" "ALPHABETIC""ALPHANUMERIC""NUMERIC""ALPHANUMERIC-EDITED""NUMERIC-EDITED""DBCS""EGCS" "DATA" "BY" identifier literal
input_output_section ::= "INPUT-OUTPUT" "SECTION" ";" file_control_paragraph i_o_control_paragraph
inspect_statement_format_i ::=
"INSPECT" identifier inspect_tallying_phrase
inspect_statement_format_ii ::=
"INSPECT" identifier inspect_replacing_phrase
inspect_statement_format_iii ::=
"INSPECT" identifier inspect_tallying_phrase inspect_replacing_phrase
inspect_statement_format_iv ::= "INSPECT" identifier "CONVERTING" identifier literal "TO" identifier literal before_after_phrase
justified_clause ::= "JUSTIFIED""JUST" "RIGHT"
merge_statement ::= "MERGE" file_name "ON" "ASCENDING""DESCENDING" "KEY" qualified_data_name "COLLATING" "SEQUENCE" "IS" alphabet_name "USING" file_name file_name "OUTPUT" "PROCEDURE" "IS" procedure_name "THROUGH""THRU" procedure_name"GIVING" file_name
move_statement_format_i ::= "MOVE" identifier literal "TO" identifier
move_statement_format_ii ::= "MOVE" "CORRESPONDING""CORR" identifier "TO" identifier
multiply_statement_format_i ::= "MULTIPLY" identifier literal "BY" identifier "ROUNDED"
multiply_statement_format_ii ::= "MULTIPLY" identifier literal "BY" identifier literal "GIVING" identifier "ROUNDED"
negated_simple_condition ::=
"NOT" condition
nested_source_program ::= "IDENTIFICATION""ID" "DIVISION" ";" "PROGRAM-ID" ";" program_name "IS" "COMMON" "INITIAL""INITIAL" "COMMON" "PROGRAM" ";" identification_division_content "ENVIRONMENT" "DIVISION" ";" environment_division_content "DATA" "DIVISION" ";" data_division_content "PROCEDURE" "DIVISION" using_phrase ";" copy_directive"USING" data_name copy_directive procedure_division_content nested_source_program "END" "PROGRAM" program_name ";"
object_computer_paragraph ::= "OBJECT-COMPUTER" ";" computer_name "MEMORY" "SIZE" integer "WORDS""CHARACTERS""MODULES" ocp_entry ";"
occurs_clause_format_i ::= "OCCURS" integer "TIMES" "ASCENDING""DESCENDING" "KEY" "IS" data_name "INDEXED" "BY" index_name
occurs_clause_format_ii ::= "OCCURS" integer "TO" integer "TIMES" "DEPENDING" "ON" qualified_data_name "ASCENDING""DESCENDING" "KEY" "IS" data_name "INDEXED" "BY" index_name
ocp_entry ::= "PROGRAM" "COLLATING" "SEQUENCE" "IS" alphabet_name "SEGMENT-LIMIT" "IS" priority_number
open_statement_format_i ::= "OPEN" "INPUT" file_name "REVERSED""WITH" "NO" "REWIND" ε"OUTPUT" file_name "WITH" "NO" "REWIND""I-O" file_name"EXTEND" file_name
open_statement_format_ii ::= "OPEN" "INPUT" file_name"OUTPUT" file_name"I-O" file_name"EXTEND" file_name
para ::= ";" sentencesentence paragraph_name
perform_statement_format_i ::= "PERFORM" procedure_name "THROUGH""THRU" procedure_name series_of_imperative_statements "END-PERFORM"
perform_statement_format_ii ::= "PERFORM" procedure_name "THROUGH""THRU" procedure_name identifier integer "TIMES" identifier integer "TIMES" series_of_imperative_statements "END-PERFORM"
perform_statement_format_iii ::= "PERFORM" procedure_name "THROUGH""THRU" procedure_name test_phrase test_phrase series_of_imperative_statements "END-PERFORM"
perform_statement_format_iv ::= "PERFORM" procedure_name "THROUGH""THRU" procedure_name varying_phrase after_phrase varying_phrase series_of_imperative_statements "END-PERFORM"
picture_clause ::= "PICTURE""PIC" "IS" character_string
qsam_or_sam_i_o_control_entries ::= "RERUN" "ON" assignment_name file_name "EVERY" integer "RECORDS""END" "OF" "REEL""UNIT" "OF" file_name "SAME" "RECORD" "AREA" "FOR" file_name file_name "MULTIPLE" "FILE" "TAPE" "CONTAINS" file_name "POSITION" integer "APPLY" "WRITE-ONLY" "ON" file_name
read_statement_format_i ::= "READ" file_name "NEXT" "RECORD" "INTO" identifier
read_statement_format_ii ::= "READ" file_name "RECORD" "INTO" identifier "KEY" "IS" qualified_data_name
redefines_clause ::=
"REDEFINES" data_name
reference_to_procedure_division_name_format_i ::= paragraph_name "IN""OF" section_name
reference_to_procedure_division_name_format_ii ::= section_name
relation_condition ::= operand relational_operator operand
release_statement ::= "RELEASE" record_name "FROM" identifier
renames_clause ::= "RENAMES" qualified_data_name "THROUGH""THRU" qualified_data_name
return_statement ::= "RETURN" file_name "RECORD" "INTO" identifier at_end not_at_end
rewrite_statement ::= "REWRITE" record_name "FROM" identifier
search_statement_format_i ::= "SEARCH" identifier "VARYING" identifier index_name at_end "WHEN" condition series_of_imperative_statements"NEXT" "SENTENCE"
search_statement_format_ii ::= "SEARCH" "ALL" identifier at_end "WHEN" identifier "IS" "EQUAL" "TO""=" identifier literal arithmetic_expression condition_name_reference "AND" identifier "IS" "EQUAL" "TO""=" identifier literal arithmetic_expression condition_name_reference series_of_imperative_statements"NEXT" "SENTENCE" ε
sect ::= section_name "SECTION" priority_number
set_statement_format_i ::= "SET" index_name identifier "TO" index_name identifier integer
set_statement_format_ii ::= "SET" index_name "UP" "BY""DOWN" "BY" identifier integer
set_statement_format_iii ::= "SET" mnemonic_name "TO" "ON""OFF"
set_statement_format_iv ::= "SET" condition_name_reference "TO" "TRUE"
set_statement_format_v ::= "SET" identifier"ADDRESS" "OF" identifier "TO" identifier"ADDRESS" "OF" identifier"NULL""NULLS"
sign_clause ::= "SIGN" "IS" "LEADING""TRAILING" "SEPARATE" "CHARACTER"
sign_condition ::= operand "IS""NOT""IS" "NOT""NOT" "IS" ε "POSITIVE""NEGATIVE""ZERO"
snp_entry ::= "ON" "STATUS" "IS" condition "OFF" "STATUS" "IS" condition "OFF" "STATUS" "IS" condition "ON" "STATUS" "IS" condition
sort_merge_i_o_control_entries ::= "RERUN" "ON" assignment_name "SAME" "RECORD""SORT""SORT-MERGE" "AREA" "FOR" file_name file_name
sort_statement ::= "SORT" file_name "ON" "ASCENDING""DESCENDING" "KEY" qualified_data_name "WITH" "DUPLICATES" "IN" "ORDER" "COLLATING" "SEQUENCE" "IS" alphabet_name "USING" file_name"INPUT" "PROCEDURE" "IS" procedure_name "THROUGH""THRU" procedure_name "GIVING" file_name"OUTPUT" "PROCEDURE" "IS" procedure_name "THROUGH""THRU" procedure_name
source_computer_paragraph ::= "SOURCE-COMPUTER" ";" computer_name "WITH" "DEBUGGING" "MODE" ";"
special_names_paragraph ::= "SPECIAL-NAMES" ";" special_names_clauses ";"
start_statement ::= "START" file_name "KEY" "IS" "EQUAL" "TO""=""GREATER" "THAN"">""NOT" "LESS" "THAN""NOT" "<""GREATER" "THAN" "OR" "EQUAL" "TO"">=" qualified_data_name
stop_statement ::= "STOP" "RUN" literal
string_statement ::= "STRING" identifier literal "DELIMITED" "BY" identifier literal"SIZE" "INTO" identifier "WITH" "POINTER" identifier
subtract_statement_format_i ::= "SUBTRACT" identifier literal "FROM" identifier "ROUNDED"
subtract_statement_format_ii ::= "SUBTRACT" identifier literal "FROM" identifier literal "GIVING" identifier "ROUNDED"
subtract_statement_format_iii ::= "SUBTRACT" "CORRESPONDING""CORR" identifier "FROM" identifier "ROUNDED"
switch_status_condition ::= condition_name_reference
synchronized_clause ::= "SYNCHRONIZED""SYNC" "LEFT""RIGHT" ε
test_phrase ::= "WITH" "TEST" "BEFORE""AFTER" "UNTIL" condition
unstring_statement ::= "UNSTRING" identifier "DELIMITED" "BY" "ALL" identifier literal "OR" "ALL" identifier literal "INTO" identifier "DELIMITER" "IN" identifier "COUNT" "IN" identifier "WITH" "POINTER" identifier "TALLYING" "IN" identifier
usage_clause ::= "USAGE" "IS" "BINARY""COMP""COMP-1""COMP-2""COMP-3""COMP-4""COMPUTATIONAL""COMPUTATIONAL-1""COMPUTATIONAL-2""COMPUTATIONAL-3""COMPUTATIONAL-4""DISPLAY""DISPLAY-1""INDEX""PACKED-DECIMAL""POINTER"
use_directive_format_i ::= "USE" "GLOBAL" "AFTER" "STANDARD" "EXCEPTION""ERROR" "PROCEDURE" "ON" file_name"INPUT""OUTPUT""I-O""EXTEND"
use_directive_format_ii ::= "USE" "GLOBAL" "AFTER" "STANDARD" "BEGINNING""ENDING" ε "FILE""REEL""UNIT" ε "LABEL" "PROCEDURE" "ON" file_name"INPUT""OUTPUT""I-O""EXTEND"
use_directive_format_iii ::= "USE" "FOR" "DEBUGGING" "ON" procedure_name"ALL" "PROCEDURES"
value_clause_format_i ::= "VALUE" "IS" literal
value_clause_format_ii ::= "VALUE" "IS""VALUES" "ARE" literal "THROUGH""THRU" literal
varying_phrase ::= "WITH" "TEST" "BEFORE""AFTER" "VARYING" identifier index_name "FROM" identifier index_name literal "BY" identifier literal "UNTIL" condition
vsam_i_o_control_entries ::= "RERUN" "ON" assignment_name file_name "EVERY" integer "RECORDS" "OF" file_name "SAME" "RECORD" "AREA" "FOR" file_name file_name
w_phrase ::= at_eop not_at_eop at_eop not_at_eop
write_statement_format_i ::= "WRITE" record_name "FROM" identifier