📄 cobol.pars
字号:
= screen_description_entry_l copy_or_replace . = screen_description_entry_l execute period_o .> .screen_description_entry = < = level_number name screen_clause_l '.' { => { (void) Declare (level_number:Value, name:Scan, oDATA, PrevEPos); }; } . = level_number Filler screen_clause_l '.' { => { tScanAttribute a; a.name.Ident = NoIdent; a.Position = level_number:Position; (void) Declare (level_number:Value, a, oDATA, PrevEPos); }; } .> .screen_clause_l = < = . = screen_clause_l screen_clause .> .screen_clause = < = BLANK SCREEN . = BLANK LINE . = BELL . = BEEP . = BLINK . = ERASE EOL . = ERASE EOS . = HIGHLIGHT . = LOWLIGHT . = GRID . = LEFTLINE . = OVERLINE . = 'REVERSE-VIDEO' . = UNDERLINE . = SIZE Is identifier_or_integer . = LINE . = LINE Number Is sign_line_o identifier_or_integer . = COLUMN . = COLUMN Number Is sign_line_o identifier_or_integer . = COL . = COL Number Is sign_line_o identifier_or_integer . = 'FOREGROUND-COLOR' Is identifier_or_integer . = 'BACKGROUND-COLOR' Is identifier_or_integer . = CONTROL Is identifier . = VALUE Is literal . = string . = PICTURE Is string . = FROM identifier_or_literal . = TO identifier . = USING identifier . = USAGE Is DISPLAY . = DISPLAY . = BLANK When ZERO . = ZERO . = JUSTIFIED Right . = SIGN Is sign_1 . = sign_1 . = AUTO . = 'AUTO-SKIP' . = SECURE . = 'NO-ECHO' . = REQUIRED . = 'EMPTY-CHECK' . = PROMPT . = PROMPT CHARACTER Is identifier_or_literal . = PROMPT IS identifier_or_literal . = PROMPT identifier . = PROMPT string . = OCCURS integer Times . = FULL . = 'LENGTH-CHECK' . = 'ZERO-FILL' .> .sign_line_o = < = PLUS . = '+' . = '-' . = .> ./* LR(2) Version */procedure_division = < = procedure_head using_o '.' declaratives_o section_l . = procedure_head using_o '.' declaratives_o . = procedure_head using_o '.' copy_or_replace declaratives_o section_l . = procedure_head using_o '.' copy_or_replace declaratives_o .> .procedure_head = PROCEDURE DIVISION mnemonic_name_o { => { Section = cPROC_DIV; }; } .mnemonic_name_o = < = name_ . = .> .using_o = < = USING using_l . = CHAINING using_l . = .> .using_l = < = using_1_e . = using_l using_2_e .> .using_1_e = < = name_l . = using_2_e .> .using_2_e = < = BY REFERENCE name_l . = BY VALUE name_l .> .declaratives_o = < = DECLARATIVES '.' d_section_l 'END' DECLARATIVES '.' . = .> .d_section_l = < = section_head use_o paragraph_l ? { GetLookahead (2) == YYCODE (SECTION) } . = section_head use_o ? { GetLookahead (2) == YYCODE (SECTION) } . = d_section_l section_head use_o paragraph_l ? { GetLookahead (2) == YYCODE (SECTION) } . = d_section_l section_head use_o ? { GetLookahead (2) == YYCODE (SECTION) } .> .section_l = < = paragraph_l ? { GetLookahead (2) == YYCODE (SECTION) } . = section_e . = section_l section_e .> .section_e = < = section_head ? { GetLookahead (2) == YYCODE (SECTION) } { => { DeclareEnd (lSECTION, PrevEPos); }; } . = section_head paragraph_l ? { GetLookahead (2) == YYCODE (SECTION) } { => { DeclareEnd (lSECTION, PrevEPos); }; } .> .section_head = chapter_name SECTION segment_number_o '.' { => { (void) DeclareLabel (chapter_name:Scan, lSECTION, PrevEPos); }; } .segment_number_o = < = integer . = .> .use_o = < = use '.' . = .> .paragraph_l = < = sentence_l . = paragraph_e . = paragraph_l paragraph_e .> .paragraph_e = < = paragraph_head { => { DeclareEnd (lPARAGRPH, PrevEPos); }; } . = paragraph_head sentence_l { => { DeclareEnd (lPARAGRPH, PrevEPos); }; } .> .paragraph_head = chapter_name '.' { => { (void) DeclareLabel (chapter_name:Scan, lPARAGRPH, PrevEPos); }; } .sentence_l = < = statement_l '.' . = '.' . = copy_or_replace . = sentence_l statement_l '.' . = sentence_l '.' . = sentence_l copy_or_replace .> .statement_l = < = statement . = statement statement_l .> .statement = < = accept . = add . = alter . = call . = cancel . = chain . = close . = commit . = compute . = continue . = delete . = disable . = display . = divide . = enable . = enter . = entry . = evaluate . = examine . = execute . = exhibit . = exit . = generate . = goback . = goto . = if . = initialize . = initiate . = inspect . = merge . = move . = multiply . = next_sentence . = on . = open . = perform . = purge . = read . = ready_trace . = receive . = release . = reset_trace . = return . = rewrite . = rollback . = search . = send . = service . = set . = sort . = start . = stop . = string_v . = subtract . = suppress . = terminate . = transform . = unlock . = unstring . = write .> .imperative_statement = < = statement_i . = statement_i imperative_statement .> .statement_i = < = accept_i . = add_i . = alter . = call_i . = cancel . = chain . = close . = commit . = compute_i . = continue . = delete_i . = disable . = display_i . = divide_i . = enable . = evaluate_i . = examine . = execute . = exhibit . = exit . = generate . = goback . = goto . = if_i . = initialize . = initiate . = inspect . = merge . = move . = multiply_i . = next_sentence . = on . = open . = perform . = purge . = read_i . = ready_trace . = receive_i . = release . = reset_trace . = return_i . = rewrite_i . = rollback . = search_i . = send . = service . = set . = sort . = start_i . = stop . = string_i . = subtract_i . = suppress . = terminate . = transform . = unlock . = unstring_i . = write_i .> .accept = < = ACCEPT identifier_w FROM accept_name End_accept . = ACCEPT identifier_w exception_2 End_accept . = ACCEPT identifier_w FROM accept_name exception End_accept . = ACCEPT identifier_w FROM accept_from End_accept . = ACCEPT ? name_Message_COUNT name_ Message COUNT . = ACCEPT identifier_w End_accept . = ACCEPT identifier_w with End_accept . = ACCEPT identifier_w mode_block with_o End_accept . = ACCEPT identifier_w from_crt mode_block_o with_o End_accept . = ACCEPT identifier_w line_column from_crt_o mode_block_o with_o End_accept . = ACCEPT identifier_w escape End_accept . = ACCEPT identifier_w with escape End_accept . = ACCEPT identifier_w mode_block with_o escape End_accept . = ACCEPT identifier_w from_crt mode_block_o with_o escape End_accept . = ACCEPT identifier_w line_column from_crt_o mode_block_o with_o escape End_accept . = ACCEPT '(' integer integer ')' identifier_w .> .accept_i = < = ACCEPT identifier_w FROM accept_name End_accept . = ACCEPT identifier_w exception_2 'END-ACCEPT' . = ACCEPT identifier_w FROM accept_name exception 'END-ACCEPT' . = ACCEPT identifier_w FROM accept_from End_accept . = ACCEPT ? name_Message_COUNT name_ Message COUNT . = ACCEPT identifier_w End_accept . = ACCEPT identifier_w with End_accept . = ACCEPT identifier_w mode_block with_o End_accept . = ACCEPT identifier_w from_crt mode_block_o with_o End_accept . = ACCEPT identifier_w line_column from_crt_o mode_block_o with_o End_accept . = ACCEPT identifier_w escape 'END-ACCEPT' . = ACCEPT identifier_w with escape 'END-ACCEPT' . = ACCEPT identifier_w mode_block with_o escape 'END-ACCEPT' . = ACCEPT identifier_w from_crt mode_block_o with_o escape 'END-ACCEPT' . = ACCEPT identifier_w line_column from_crt_o mode_block_o with_o escape 'END-ACCEPT' . = ACCEPT '(' integer integer ')' identifier_w .> .exception_2 = < = EXCEPTION imperative_statement . = EXCEPTION imperative_statement NOT On EXCEPTION imperative_statement .> .accept_name = < = name_ . = CONSOLE .> .accept_from = < = DATE . = DAY . = 'DAY-OF-WEEK' . = TIME . = LINE NUMBER . = USER NAME . = ESCAPE KEY . = EXCEPTION STATUS .> .escape = < = ON exception_or_escape imperative_statement . = NOT On exception_or_escape imperative_statement . = ON exception_or_escape imperative_statement NOT On exception_or_escape imperative_statement .> .exception_or_escape = < = EXCEPTION . = ESCAPE .> .line_column = < = At LINE Number identifier_or_integer . = At COLUMN Number identifier_or_integer . = At COL Number identifier_or_integer . = At LINE Number identifier_or_integer COLUMN Number identifier_or_integer . = At LINE Number identifier_or_integer COL Number identifier_or_integer . = AT identifier_or_integer .> .from_crt_o = < from_crt = FROM CRT . = .> .mode_block_o = < mode_block = MODE Is BLOCK . = .> .with_o = < with = WITH with_l . = ? { GetLookahead (2) == YYCODE (DATA) } .> .with_l = < = . = with_l AUTO . = with_l 'AUTO-SKIP' . = with_l BELL . = with_l BEEP . = with_l BLINK . = with_l FULL . = with_l 'LENGTH-CHECK' . = with_l GRID . = with_l HIGHLIGHT . = with_l LOWLIGHT . = with_l LEFTLINE . = with_l OVERLINE . = with_l PROMPT Character Is . = with_l PROMPT Character Is literal . = with_l REQUIRED . = with_l 'EMPTY-CHECK' . = with_l 'REVERSE-VIDEO' . = with_l SECURE . = with_l 'NO-ECHO' . = with_l SIZE Is identifier_or_integer . = with_l UNDERLINE . = with_l 'FOREGROUND-COLOR' Is integer . = with_l 'BACKGROUND-COLOR' Is integer . = with_l CONTROL Is identifier_or_literal . = with_l 'TIME-OUT' AFTER identifier_or_integer . = with_l 'LEFT-JUSTIFY' . = with_l 'RIGHT-JUSTIFY' . = with_l 'SPACE-FILL' . = with_l 'TRAILING-SIGN' . = with_l UPDATE . = with_l UPPER . = with_l LOWER . = with_l 'ZERO-FILL' .> .add = < = ADD identifier_or_numeric_literal_l TO identifier_rounded_l_w End_add . = ADD identifier_or_numeric_literal_l TO identifier_rounded_l_w size_error End_add . = ADD identifier_or_numeric_literal_l TO giving identifier_or_numeric_literal GIVING identifier_rounded_l_w End_add . = ADD identifier_or_numeric_literal_l TO giving identifier_or_numeric_literal GIVING identifier_rounded_l_w size_error End_add . = ADD CORRESPONDING identifier TO identifier_rounded_c End_add . = ADD CORRESPONDING identifier TO identifier_rounded_c size_error End_add . = ADD identifier_or_numeric_literal_l GIVING identifier_rounded_l_w End_add . = ADD identifier_or_numeric_literal_l GIVING identifier_rounded_l_w size_error End_add .> .add_i = < = ADD identifier_or_numeric_literal_l TO identifier_rounded_l_w End_add . = ADD identifier_or_numeric_literal_l TO identifier_rounded_l_w size_error 'END-ADD' . = ADD identifier_or_numeric_literal_l TO giving identifier_or_numeric_literal GIVING identifier_rounded_l_w End_add . = ADD identifier_or_numeric_literal_l TO giving identifier_or_numeric_literal GIVING identifier_rounded_l_w size_error 'END-ADD' . = ADD CORRESPONDING identifier TO identifier_rounded_c End_add . = ADD CORRESPONDING identifier TO identifier_rounded_c size_error 'END-ADD' . = ADD identifier_or_numeric_literal_l GIVING identifier_rounded_l_w End_add . = ADD identifier_or_numeric_literal_l GIVING identifier_rounded_l_w size_error 'END-ADD' .> .size_error = < = On SIZE ERROR imperative_statement . = NOT On SIZE ERROR imperative_statement . = On SIZE ERROR imperative_statement NOT On SIZE ERROR imperative_statement .> .giving = ? identifier_or_numeric_literal_GIVING .alter = ALTER alter_l .alter_l = < = alter_e . = alter_l alter_e .> .alter_e = <
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -