📄 cppparser.java
字号:
case ASSIGNEQUAL: jj_consume_token(ASSIGNEQUAL); jj_consume_token(OCTALINT); break; default: jj_la1[47] = jj_gen; ; } label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[48] = jj_gen; break label_14; } jj_consume_token(COMMA); member_declarator(isTypedef); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGNEQUAL: jj_consume_token(ASSIGNEQUAL); jj_consume_token(OCTALINT); break; default: jj_la1[49] = jj_gen; ; } } } static final public void member_declarator(boolean isTypedef) throws ParseException { String name; name = declarator(); if (isTypedef) sym.PutTypeName(name); } static final public void conversion_function_decl_or_def() throws ParseException { Scope sc = null; String name = null; if (jj_2_52(2147483647)) { name = scope_override(); } else { ; } jj_consume_token(OPERATOR); declaration_specifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AMPERSAND: case STAR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); break; case AMPERSAND: jj_consume_token(AMPERSAND); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[51] = jj_gen; ; } jj_consume_token(LPARENTHESIS); if (jj_2_53(1)) { parameter_list(); } else { ; } jj_consume_token(RPARENTHESIS); if (jj_2_54(2)) { type_qualifier(); } else { ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROW: exception_spec(); break; default: jj_la1[52] = jj_gen; ; } func_decl_def(null); } static final public void enum_specifier() throws ParseException { Token t; jj_consume_token(ENUM); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LCURLYBRACE: jj_consume_token(LCURLYBRACE); enumerator_list(); jj_consume_token(RCURLYBRACE); break; case ID: t = jj_consume_token(ID); if (jj_2_55(2)) { jj_consume_token(LCURLYBRACE); enumerator_list(); jj_consume_token(RCURLYBRACE); } else { ; } sym.PutTypeName(t.image); break; default: jj_la1[53] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } static final public void enumerator_list() throws ParseException { enumerator(); label_15: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[54] = jj_gen; break label_15; } jj_consume_token(COMMA); enumerator(); } } static final public void enumerator() throws ParseException { jj_consume_token(ID); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGNEQUAL: jj_consume_token(ASSIGNEQUAL); constant_expression(); break; default: jj_la1[55] = jj_gen; ; } } static final public void ptr_operator() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AMPERSAND: jj_consume_token(AMPERSAND); cv_qualifier_seq(); break; case STAR: jj_consume_token(STAR); cv_qualifier_seq(); break; case SCOPE: case ID: ptr_to_member(); cv_qualifier_seq(); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } static final public void cv_qualifier_seq() throws ParseException { if (jj_2_58(2)) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CONST: jj_consume_token(CONST); if (jj_2_56(2)) { jj_consume_token(VOLATILE); } else { ; } break; case VOLATILE: jj_consume_token(VOLATILE); if (jj_2_57(2)) { jj_consume_token(CONST); } else { ; } break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } else { ; } } static final public String declarator() throws ParseException { String name; if (jj_2_59(2147483647)) { ptr_operator(); name = declarator(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPARENTHESIS: case SCOPE: case TILDE: case OPERATOR: case ID: name = direct_declarator(); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return name;} throw new Error("Missing return statement in function"); } static final public String direct_declarator() throws ParseException { String name; Token t; if (jj_2_63(2)) { jj_consume_token(TILDE); t = jj_consume_token(ID); if (jj_2_60(2)) { declarator_suffixes(); } else { ; } {if (true) return "~" + t.image;} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPARENTHESIS: jj_consume_token(LPARENTHESIS); name = declarator(); jj_consume_token(RPARENTHESIS); if (jj_2_61(2)) { declarator_suffixes(); } else { ; } {if (true) return name;} break; case SCOPE: case OPERATOR: case ID: name = qualified_id(); if (jj_2_62(2)) { declarator_suffixes(); } else { ; } {if (true) return name;} break; default: jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } throw new Error("Missing return statement in function"); } static final public void declarator_suffixes() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSQUAREBRACKET: label_16: while (true) { jj_consume_token(LSQUAREBRACKET); if (jj_2_64(1)) { constant_expression(); } else { ; } jj_consume_token(RSQUAREBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSQUAREBRACKET: ; break; default: jj_la1[60] = jj_gen; break label_16; } } break; case LPARENTHESIS: jj_consume_token(LPARENTHESIS); if (jj_2_65(1)) { parameter_list(); } else { ; } jj_consume_token(RPARENTHESIS); if (jj_2_66(2)) { type_qualifier(); } else { ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROW: exception_spec(); break; default: jj_la1[61] = jj_gen; ; } break; default: jj_la1[62] = jj_gen; jj_consume_token(-1); throw new ParseException(); } }/** * Used only for lookahead. */ static final public void function_declarator_lookahead() throws ParseException { label_17: while (true) { if (jj_2_67(2)) { ; } else { break label_17; } ptr_operator(); } qualified_id(); jj_consume_token(LPARENTHESIS); } static final public Scope function_declarator(boolean isTypedef) throws ParseException { Scope sc = null; if (jj_2_68(2147483647)) { ptr_operator(); sc = function_declarator(isTypedef); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SCOPE: case OPERATOR: case ID: sc = function_direct_declarator(isTypedef); break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return sc;} throw new Error("Missing return statement in function"); } static final public Scope function_direct_declarator(boolean isTypedef) throws ParseException { String name; Scope sc = null; boolean closeReqd = false; name = qualified_id(); sc = sym.GetScopeOfFullyScopedName(name); if (closeReqd = (sc != null && sc != sym.GetCurScope())) sym.OpenScope(sc); jj_consume_token(LPARENTHESIS); if (jj_2_69(1)) { parameter_list(); } else { ; } jj_consume_token(RPARENTHESIS); if (jj_2_70(2)) { type_qualifier(); } else { ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROW: exception_spec(); break; default: jj_la1[64] = jj_gen; ; } if (jj_2_71(2147483647)) { jj_consume_token(ASSIGNEQUAL); jj_consume_token(OCTALINT); } else { ; } if (closeReqd) sym.CloseScope(); if (isTypedef) sym.PutTypeName(name); {if (true) return sc;} throw new Error("Missing return statement in function"); } static final public void dtor_ctor_decl_spec() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INLINE: case VIRTUAL: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VIRTUAL: jj_consume_token(VIRTUAL); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INLINE: jj_consume_token(INLINE); break; default: jj_la1[65] = jj_gen; ; } break; case INLINE: jj_consume_token(INLINE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VIRTUAL: jj_consume_token(VIRTUAL); break; default: jj_la1[66] = jj_gen; ; } break; default: jj_la1[67] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[68] = jj_gen; ; } } static final public void dtor_definition() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TEMPLATE: template_head(); break; default: jj_la1[69] = jj_gen; ; } dtor_ctor_decl_spec(); dtor_declarator(); compound_statement(); } static final public void ctor_definition() throws ParseException { Scope sc = null; boolean closeReqd = false; dtor_ctor_decl_spec(); sc = ctor_declarator(); if (closeReqd = (sc != null && sc != sym.GetCurScope())) sym.OpenScope(sc); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROW: exception_spec(); break; default: jj_la1[70] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); break; case LCURLYBRACE: case COLON: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: ctor_initializer(); break; default: jj_la1[71] = jj_gen; ; } compound_statement(); break; default: jj_la1[72] = jj_gen; jj_consume_token(-1); throw new ParseException(); } if (closeReqd) sym.CloseScope(); } static final public void ctor_declarator_lookahead() throws ParseException { if (IsCtor()) { } else { jj_consume_token(-1); throw new ParseException(); } qualified_id(); jj_consume_token(LPARENTHESIS); } static final public Scope ctor_declarator() throws ParseException { String name; Scope sc = null; boolean closeReqd = false; if (IsCtor()) { } else { jj_consume_token(-1); throw new ParseException(); } name = qualified_id(); sc = sym.GetScopeOfFullyScopedName(name); if (closeReqd = (sc != null && sc != sym.GetCurScope())) sym.OpenScope(sc); jj_consume_token(LPARENTHESIS); if (jj_2_72(2)) { parameter_list(); } else { ; } jj_consume_token(RPARENTHESIS); if (jj_2_73(2)) { exception_spec(); } else { ; } if (closeReqd) sym.CloseScope(); {if (true) return sc;} throw new Error("Missing return statement in function"); } static final public void ctor_initializer() throws ParseException { jj_consume_token(COLON); superclass_init(); label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[73] = jj_gen; break label_18; } jj_consume_token(COMMA);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -