📄 cobol.pars
字号:
> .program_o = < = Is COMMON Program . = Is INITIAL Program . = Is COMMON INITIAL Program . = Is INITIAL COMMON Program . = .> .identification_l = < = . = identification_l sce AUTHOR . = identification_l sce INSTALLATION . = identification_l sce 'DATE-WRITTEN' . = identification_l sce 'DATE-COMPILED' . = identification_l sce SECURITY . = identification_l sce REMARKS . = identification_l copy_or_replace .> .environment_division = environment_o configuration_section_o input_output_section_o .environment_o = < = ENVIRONMENT DIVISION '.' { => { Section = cENV_DIV; }; } . = { => { Section = cENV_DIV; }; } .> .configuration_section_o = < = configuration_o copy_o configuration_l . /* = . */> .input_output_section_o = < = input_output_o file_control i_o_control_o . /* = . */> .configuration_o = < = CONFIGURATION SECTION '.' { => { decimal_point_is_comma = rfalse; Section = cCONF_SCT; }; } . = { => { decimal_point_is_comma = rfalse; Section = cCONF_SCT; }; } .> .configuration_l = < = . = configuration_l source_computer_o . = configuration_l object_computer_o . = configuration_l special_names_o .> .source_computer_o = < = 'SOURCE-COMPUTER' sce '.' . = 'SOURCE-COMPUTER' sce '.' With DEBUGGING MODE '.' { => { IsDebugging = rtrue; }; } . /* = . */> .object_computer_o = < = 'OBJECT-COMPUTER' sce '.' . = 'OBJECT-COMPUTER' sce '.' memory_o program_sequence_o segment_limit_o '.' . /* = . */> .memory_o = < = MEMORY Size integer memory_unit . = .> .memory_unit = < = WORDS . = CHARACTERS . = MODULES .> .program_sequence_o = < = Program Collating SEQUENCE Is alphabet_name . = .> .segment_limit_o = < = 'SEGMENT-LIMIT' Is integer . = .> .special_names_o = < = 'SPECIAL-NAMES' '.' copy_o . = 'SPECIAL-NAMES' '.' copy_o special_names_l '.' . /* = . */> .special_names_l = < = . = special_names_l implementor_name_l ? CONSOLE_Is_CRT . = special_names_l alphabet_names . = special_names_l symbolic_characters . = special_names_l class_names . = special_names_l currency_o . = special_names_l decimal_point_o . = special_names_l numeric_sign_o . = special_names_l call_convention_o . = special_names_l console_o .> .implementor_name_l = < = implementor_name_e . = implementor_name_l implementor_name_e .> .implementor_name_e = < = implementor_name Is name { => { (void) Declare (MN, name:Scan, oDATA, PrevEPos); }; } . = implementor_name Is name on_off { => { (void) Declare (MN, name:Scan, oDATA, PrevEPos); }; } . = name on_off { => { (void) Declare (MN, name:Scan, oBTIN, PrevEPos); }; } .> .implementor_name = < = name . = builtin_name .> .builtin_name = < = PRINTER . = 'PRINTER-1' . = CONSOLE ? { GetLookahead (2) == YYCODE (name) } .> .on_off = < = on_status . = on_status off_status . = off_status . = off_status on_status .> .on_status = ON Status Is condition_name: name { => { (void) Declare (CN, condition_name:Scan, oDATA, PrevEPos); }; } .off_status = OFF Status Is condition_name: name { => { (void) Declare (CN, condition_name:Scan, oDATA, PrevEPos); }; } .alphabet_names = < = alphabet_entry . = alphabet_names alphabet_entry .> .alphabet_entry = < = ALPHABET name Is alphabet_name . = ALPHABET name Is alphabet_l ? implementor_name_e_head .> .alphabet_name = < = 'STANDARD-1' . = name_ .> .alphabet_l = < = alphabet_e . = alphabet_l alphabet_e .> .alphabet_e = < = alphabet_or_class_literal . = alphabet_or_class_literal THROUGH alphabet_or_class_literal . = alphabet_or_class_literal also_l .> .also_l = < = ALSO alphabet_or_class_literal . = also_l ALSO alphabet_or_class_literal .> .alphabet_or_class_literal = < = u_integer . = non_numeric_literal .> .symbolic_characters = < = symbolic_entry . = symbolic_characters symbolic_entry .> .symbolic_entry = < = SYMBOLIC Characters symbolic_l ? - symbolic_e_head . = SYMBOLIC Characters symbolic_l 'IN' alphabet_name .> .symbolic_l = < = symbolic_e . = symbolic_l symbolic_e .> .symbolic_e = symbolic_character_l AreIs integer_l .symbolic_character_l = < = symbolic_character . = symbolic_character_l symbolic_character .> .integer_l = < = integer . = integer_l integer .> .class_names = < = class . = class_names class .> .class = CLASS name Is class_l ? implementor_name_e_head .class_l = < = class_e . = class_l class_e .> .class_e = < = alphabet_or_class_literal . = alphabet_or_class_literal THROUGH alphabet_or_class_literal .> .currency_o = CURRENCY Sign Is non_figurative_literal .decimal_point_o = 'DECIMAL-POINT' Is COMMA { => { decimal_point_is_comma = rtrue; }; } .numeric_sign_o = NUMERIC SIGN Is Trailing SEPARATE .call_convention_o = 'CALL-CONVENTION' integer IS name .console_o = CONSOLE Is CRT cursor_o crt_status_o .cursor_o = < = CURSOR Is name . = .> .crt_status_o = < = CRT STATUS Is name . = .> .input_output_o = < = 'INPUT-OUTPUT' SECTION '.' { => { Section = cIO_SCT; }; } . = { => { Section = cIO_SCT; }; } .> .file_control = file_control_o file_control_entry_l .file_control_o = < = 'FILE-CONTROL' '.' . = .> .file_control_entry_l = < = /* file_control_entry */ . = file_control_entry_l file_control_entry . = file_control_entry_l copy_or_replace . = file_control_entry_l execute period_o .> .file_control_entry = < = 'SELECT' Optional name_f copy_o select_clause_l '.' . = 'SELECT' NOT OPTIONAL name_f copy_o select_clause_l '.' .> .select_clause_l = < = . = select_clause_l select_clause .> .select_clause = < = ASSIGN To external_o LINE ADVANCING File assign_l . = ASSIGN To external_o Multiple REEL File assign_l . = ASSIGN To external_o File assign_l . = ASSIGN To external_o DISK FILE assign_l . = ASSIGN To external_o DISK assign_o . = ASSIGN To external_o KEYBOARD assign_o . = ASSIGN To external_o DISPLAY assign_o . = ASSIGN To external_o PRINTER assign_o . = ASSIGN To external_o 'PRINTER-1' assign_o . = ASSIGN To external_o DISK FROM name_ . = RESERVE integer ? - ALTERNATE_AREA . = RESERVE integer_or_no Alternate AREA . = RESERVE integer_or_no Alternate AREAS . = organization_is_o SEQUENTIAL . = RECORD SEQUENTIAL . = ORGANIZATION Is RECORD SEQUENTIAL . = organization_is_o LINE SEQUENTIAL . = RELATIVE . = ORGANIZATION Is RELATIVE . = organization_is_o INDEXED . = PADDING Character Is qualification_f . = PADDING Character Is non_numeric_literal . = RECORD DELIMITER Is 'STANDARD-1' . = RECORD DELIMITER Is name . = RECORD DELIMITER Is literal . = ACCESS Mode Is SEQUENTIAL ? - RELATIVE_Key_Is_name . /* = ACCESS Mode Is SEQUENTIAL RELATIVE Key Is qualification_f . */ = ACCESS Mode Is RANDOM ? - RELATIVE_Key_Is_name . /* = ACCESS Mode Is RANDOM RELATIVE Key Is qualification_f . */ = ACCESS Mode Is DYNAMIC ? - RELATIVE_Key_Is_name . /* = ACCESS Mode Is DYNAMIC RELATIVE Key Is qualification_f . */ = RELATIVE Key Is qualification_f . = File STATUS Is qualification_f . = File STATUS Is qualification_f qualification_f . = SORT STATUS Is qualification_f . = RECORD Key Is qualification_f . = RECORD Key Is qualification_f '=' name_l . = ALTERNATE Record Key Is alternate_l duplicates_o_2 password_o suppress_o . = LOCK Mode Is MANUAL lock_o . = LOCK Mode Is AUTOMATIC lock_o . = LOCK Mode Is EXCLUSIVE . = PASSWORD Is qualification_f .> .assign_o = < = assign_l . = ? { GetLookahead (2) == YYCODE (STATUS) } .> .assign_l = < = assign_e . = assign_l assign_e .> .assign_e = < = name . = non_figurative_non_numeric_literal .> .external_o = < = EXTERNAL . = DYNAMIC . = .> .integer_or_no = < = integer . = NO .> .organization_is_o = < = ORGANIZATION Is . = .> .alternate_l = < = alternate_e . = alternate_l alternate_e .> .alternate_e = < = qualification_f . = qualification_f e:'=' name_l ? { GetLookahead (2) == YYCODE ('=') } .> .duplicates_o_2 = < = With DUPLICATES . = .> .password_o = < = PASSWORD Is qualification_f . = .> .suppress_o = < /* = SUPPRESS When ZEROS . = SUPPRESS When SPACE . = SUPPRESS When ALL literal . */ = SUPPRESS When literal . = .> .lock_o = < = WITH LOCK ON RECORD . = WITH LOCK ON RECORDS . = WITH LOCK ON MULTIPLE RECORD . = WITH LOCK ON MULTIPLE RECORDS . = WITH LOCK ON ROLLBACK . = .> .i_o_control_o = < = 'I-O-CONTROL' '.' copy_o . = 'I-O-CONTROL' '.' copy_o i_o_control_l '.' . = .> .i_o_control_l = < = . = i_o_control_l i_o_control_e .> .i_o_control_e = < = RERUN Every rerun_e . = RERUN ON name Every rerun_e . = SAME same Area For name name_l . = MULTIPLE FILE Tape Contains multiple_l . = APPLY 'WRITE-ONLY' On name_l . = APPLY 'CORE-INDEX' On name_l . = APPLY 'RECORD-OVERFLOW' On name_l . = APPLY 'REORG-CRITERIA' To name_ On name_ .> .rerun_e = < = REEL Of name . = 'END' Of REEL Of name . = integer RECORDS Of name . = integer 'CLOCK-UNITS' . = condition_name .> .same = < = RECORD . = SORT . = 'SORT-MERGE' .> .multiple_l = < = multiple_e . = multiple_l multiple_e .> .multiple_e = < = name . = name POSITION integer .> .data_division = data_o file_section_o working_storage_section_o local_storage_section_o linkage_section_o communication_section_o report_section_o screen_section_o .data_o = < = DATA DIVISION '.' { => { Section = cDATA_DIV; }; } . = { => { Section = cDATA_DIV; }; } .> .file_section_o = < = file_o file_description_l . /* = . */> .file_o = < = FILE SECTION '.' { => { Section = cFILE_SCT; }; } . = { => { Section = cFILE_SCT; }; } .> .file_description_l = < = . = file_description_l copy_or_replace . = file_description_l execute period_o . = file_description_l file_description_e .> .file_description_e = < = file_description_entry data_description_entry_l . = sort_merge_file_description_entry data_description_entry_l . /* = report_file_description_entry . is covered by file_description_entry */> .working_storage_section_o = < = 'WORKING-STORAGE' SECTION '.' { => { Section = cWS_SCT; }; } data_description_entry_l . = .> .local_storage_section_o = < = 'LOCAL-STORAGE' SECTION '.' { => { Section = cLS_SCT; }; } data_description_entry_l . = .> .linkage_section_o = < = LINKAGE SECTION '.' { => { Section = cLINK_SCT; }; } data_description_entry_l . = .> .communication_section_o = < = COMMUNICATION SECTION '.' { => { Section = cCOMM_SCT; }; } communication_description_l . = .> .communication_description_l = < = communication_description_l communication_description_entry data_description_entry_l . = communication_description_l copy_or_replace . = communication_description_l execute period_o . = .> .report_section_o = < = REPORT SECTION '.' { => { Section = cREP_SCT; }; } report_description_entry_l . = .> .screen_section_o = < = SCREEN SECTION '.'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -