📄 y.tab.c
字号:
"identifier_list : identifier",
"block : label_declaration_part constant_definition_part type_definition_part variable_declaration_part procedure_and_function_declaration_part statement_part",
"module : constant_definition_part type_definition_part variable_declaration_part procedure_and_function_declaration_part",
"label_declaration_part : LABEL label_list semicolon",
"label_declaration_part :",
"label_list : label_list comma label",
"label_list : label",
"label : DIGSEQ",
"constant_definition_part : CONST constant_list",
"constant_definition_part :",
"constant_list : constant_list constant_definition",
"constant_list : constant_definition",
"constant_definition : identifier EQUAL cexpression semicolon",
"cexpression : csimple_expression",
"cexpression : csimple_expression relop csimple_expression",
"csimple_expression : cterm",
"csimple_expression : csimple_expression addop cterm",
"cterm : cfactor",
"cterm : cterm mulop cfactor",
"cfactor : sign cfactor",
"cfactor : cexponentiation",
"cexponentiation : cprimary",
"cexponentiation : cprimary STARSTAR cexponentiation",
"cprimary : identifier",
"cprimary : LPAREN cexpression RPAREN",
"cprimary : unsigned_constant",
"cprimary : NOT cprimary",
"constant : non_string",
"constant : sign non_string",
"constant : CHARACTER_STRING",
"sign : PLUS",
"sign : MINUS",
"non_string : DIGSEQ",
"non_string : identifier",
"non_string : REALNUMBER",
"type_definition_part : TYPE type_definition_list",
"type_definition_part :",
"type_definition_list : type_definition_list type_definition",
"type_definition_list : type_definition",
"type_definition : identifier EQUAL type_denoter semicolon",
"type_denoter : identifier",
"type_denoter : new_type",
"new_type : new_ordinal_type",
"new_type : new_structured_type",
"new_type : new_pointer_type",
"new_ordinal_type : enumerated_type",
"new_ordinal_type : subrange_type",
"enumerated_type : LPAREN identifier_list RPAREN",
"subrange_type : constant DOTDOT constant",
"new_structured_type : structured_type",
"new_structured_type : PACKED structured_type",
"structured_type : array_type",
"structured_type : record_type",
"structured_type : set_type",
"structured_type : file_type",
"array_type : ARRAY LBRAC index_list RBRAC OF component_type",
"index_list : index_list comma index_type",
"index_list : index_type",
"index_type : ordinal_type",
"ordinal_type : new_ordinal_type",
"ordinal_type : identifier",
"component_type : type_denoter",
"record_type : RECORD record_section_list END",
"record_type : RECORD record_section_list semicolon variant_part END",
"record_type : RECORD variant_part END",
"record_section_list : record_section_list semicolon record_section",
"record_section_list : record_section",
"record_section : identifier_list COLON type_denoter",
"variant_part : CASE variant_selector OF variant_list semicolon",
"variant_part : CASE variant_selector OF variant_list",
"variant_part :",
"variant_selector : tag_field COLON tag_type",
"variant_selector : tag_type",
"variant_list : variant_list semicolon variant",
"variant_list : variant",
"variant : case_constant_list COLON LPAREN record_section_list RPAREN",
"variant : case_constant_list COLON LPAREN record_section_list semicolon variant_part RPAREN",
"variant : case_constant_list COLON LPAREN variant_part RPAREN",
"case_constant_list : case_constant_list comma case_constant",
"case_constant_list : case_constant",
"case_constant : constant",
"case_constant : constant DOTDOT constant",
"tag_field : identifier",
"tag_type : identifier",
"set_type : SET OF base_type",
"base_type : ordinal_type",
"file_type : PFILE OF component_type",
"new_pointer_type : UPARROW domain_type",
"domain_type : identifier",
"variable_declaration_part : VAR variable_declaration_list semicolon",
"variable_declaration_part :",
"variable_declaration_list : variable_declaration_list semicolon variable_declaration",
"variable_declaration_list : variable_declaration",
"variable_declaration : identifier_list COLON type_denoter",
"procedure_and_function_declaration_part : proc_or_func_declaration_list semicolon",
"procedure_and_function_declaration_part :",
"proc_or_func_declaration_list : proc_or_func_declaration_list semicolon proc_or_func_declaration",
"proc_or_func_declaration_list : proc_or_func_declaration",
"proc_or_func_declaration : procedure_declaration",
"proc_or_func_declaration : function_declaration",
"procedure_declaration : procedure_heading semicolon directive",
"procedure_declaration : procedure_heading semicolon procedure_block",
"procedure_heading : procedure_identification",
"procedure_heading : procedure_identification formal_parameter_list",
"directive : FORWARD",
"directive : EXTERNAL",
"formal_parameter_list : LPAREN formal_parameter_section_list RPAREN",
"formal_parameter_section_list : formal_parameter_section_list semicolon formal_parameter_section",
"formal_parameter_section_list : formal_parameter_section",
"formal_parameter_section : value_parameter_specification",
"formal_parameter_section : variable_parameter_specification",
"formal_parameter_section : procedural_parameter_specification",
"formal_parameter_section : functional_parameter_specification",
"value_parameter_specification : identifier_list COLON identifier",
"variable_parameter_specification : VAR identifier_list COLON identifier",
"procedural_parameter_specification : procedure_heading",
"functional_parameter_specification : function_heading",
"procedure_identification : PROCEDURE identifier",
"procedure_block : block",
"function_declaration : function_heading semicolon directive",
"function_declaration : function_identification semicolon function_block",
"function_declaration : function_heading semicolon function_block",
"function_heading : FUNCTION identifier COLON result_type",
"function_heading : FUNCTION identifier formal_parameter_list COLON result_type",
"result_type : identifier",
"function_identification : FUNCTION identifier",
"function_block : block",
"statement_part : compound_statement",
"compound_statement : PBEGIN statement_sequence END",
"statement_sequence : statement_sequence semicolon statement",
"statement_sequence : statement",
"statement : open_statement",
"statement : closed_statement",
"open_statement : label COLON non_labeled_open_statement",
"open_statement : non_labeled_open_statement",
"closed_statement : label COLON non_labeled_closed_statement",
"closed_statement : non_labeled_closed_statement",
"non_labeled_closed_statement : assignment_statement",
"non_labeled_closed_statement : procedure_statement",
"non_labeled_closed_statement : goto_statement",
"non_labeled_closed_statement : compound_statement",
"non_labeled_closed_statement : case_statement",
"non_labeled_closed_statement : repeat_statement",
"non_labeled_closed_statement : closed_with_statement",
"non_labeled_closed_statement : closed_if_statement",
"non_labeled_closed_statement : closed_while_statement",
"non_labeled_closed_statement : closed_for_statement",
"non_labeled_closed_statement :",
"non_labeled_open_statement : open_with_statement",
"non_labeled_open_statement : open_if_statement",
"non_labeled_open_statement : open_while_statement",
"non_labeled_open_statement : open_for_statement",
"repeat_statement : REPEAT statement_sequence UNTIL boolean_expression",
"open_while_statement : WHILE boolean_expression DO open_statement",
"closed_while_statement : WHILE boolean_expression DO closed_statement",
"open_for_statement : FOR control_variable ASSIGNMENT initial_value direction final_value DO open_statement",
"closed_for_statement : FOR control_variable ASSIGNMENT initial_value direction final_value DO closed_statement",
"open_with_statement : WITH record_variable_list DO open_statement",
"closed_with_statement : WITH record_variable_list DO closed_statement",
"open_if_statement : IF boolean_expression THEN statement",
"open_if_statement : IF boolean_expression THEN closed_statement ELSE open_statement",
"closed_if_statement : IF boolean_expression THEN closed_statement ELSE closed_statement",
"assignment_statement : variable_access ASSIGNMENT expression",
"variable_access : identifier",
"variable_access : indexed_variable",
"variable_access : field_designator",
"variable_access : variable_access UPARROW",
"indexed_variable : variable_access LBRAC index_expression_list RBRAC",
"index_expression_list : index_expression_list comma index_expression",
"index_expression_list : index_expression",
"index_expression : expression",
"field_designator : variable_access DOT identifier",
"procedure_statement : identifier params",
"procedure_statement : identifier",
"params : LPAREN actual_parameter_list RPAREN",
"actual_parameter_list : actual_parameter_list comma actual_parameter",
"actual_parameter_list : actual_parameter",
"actual_parameter : expression",
"actual_parameter : expression COLON expression",
"actual_parameter : expression COLON expression COLON expression",
"goto_statement : GOTO label",
"case_statement : CASE case_index OF case_list_element_list END",
"case_statement : CASE case_index OF case_list_element_list SEMICOLON END",
"case_statement : CASE case_index OF case_list_element_list semicolon otherwisepart statement END",
"case_statement : CASE case_index OF case_list_element_list semicolon otherwisepart statement SEMICOLON END",
"case_index : expression",
"case_list_element_list : case_list_element_list semicolon case_list_element",
"case_list_element_list : case_list_element",
"case_list_element : case_constant_list COLON statement",
"otherwisepart : OTHERWISE",
"otherwisepart : OTHERWISE COLON",
"control_variable : identifier",
"initial_value : expression",
"direction : TO",
"direction : DOWNTO",
"final_value : expression",
"record_variable_list : record_variable_list comma variable_access",
"record_variable_list : variable_access",
"boolean_expression : expression",
"expression : simple_expression",
"expression : simple_expression relop simple_expression",
"simple_expression : term",
"simple_expression : simple_expression addop term",
"term : factor",
"term : term mulop factor",
"factor : sign factor",
"factor : exponentiation",
"exponentiation : primary",
"exponentiation : primary STARSTAR exponentiation",
"primary : variable_access",
"primary : unsigned_constant",
"primary : function_designator",
"primary : set_constructor",
"primary : LPAREN expression RPAREN",
"primary : NOT primary",
"unsigned_constant : unsigned_number",
"unsigned_constant : CHARACTER_STRING",
"unsigned_constant : NIL",
"unsigned_number : unsigned_integer",
"unsigned_number : unsigned_real",
"unsigned_integer : DIGSEQ",
"unsigned_real : REALNUMBER",
"function_designator : identifier params",
"set_constructor : LBRAC member_designator_list RBRAC",
"set_constructor : LBRAC RBRAC",
"member_designator_list : member_designator_list comma member_designator",
"member_designator_list : member_designator",
"member_designator : member_designator DOTDOT expression",
"member_designator : expression",
"addop : PLUS",
"addop : MINUS",
"addop : OR",
"mulop : STAR",
"mulop : SLASH",
"mulop : DIV",
"mulop : MOD",
"mulop : AND",
"relop : EQUAL",
"relop : NOTEQUAL",
"relop : LT",
"relop : GT",
"relop : LE",
"relop : GE",
"relop : IN",
"identifier : IDENTIFIER",
"semicolon : SEMICOLON",
"comma : COMMA",
};
#endif
#ifndef YYSTYPE
typedef int YYSTYPE;
#endif
#if YYDEBUG
#include <stdio.h>
#endif
#ifdef YYSTACKSIZE
#undef YYMAXDEPTH
#define YYMAXDEPTH YYSTACKSIZE
#else
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
#define YYSTACKSIZE 10000
#define YYMAXDEPTH 10000
#endif
#endif
#define YYINITSTACKSIZE 200
int yydebug;
int yynerrs;
int yyerrflag;
int yychar;
short *yyssp;
YYSTYPE *yyvsp;
YYSTYPE yyval;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -