/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start HEX_CHAR * * Looks to match the characters the constitute the token HEX_CHAR * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mHEX_CHAR(pbelle_sdpLexer ctx) { ANTLR3_UINT32 _type; _type = HEX_CHAR; // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:321:9: ( 'a' .. 'f' | 'A' .. 'F' ) // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g: { if ( ((LA(1) >= 'A') && (LA(1) <= 'F')) || ((LA(1) >= 'a') && (LA(1) <= 'f')) ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleHEX_CHAREx; } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleHEX_CHAREx; /* Prevent compiler warnings */ ruleHEX_CHAREx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ANY_EXCEPT_CR_LF * * Looks to match the characters the constitute the token ANY_EXCEPT_CR_LF * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mANY_EXCEPT_CR_LF(pbelle_sdpLexer ctx) { ANTLR3_UINT32 _type; _type = ANY_EXCEPT_CR_LF; // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:335:17: (~ ( CR | LF ) ) // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:335:19: ~ ( CR | LF ) { if ( ((LA(1) >= 0x0000) && (LA(1) <= '\t')) || ((LA(1) >= 0x000B) && (LA(1) <= '\f')) || ((LA(1) >= 0x000E) && (LA(1) <= 0xFFFF)) ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleANY_EXCEPT_CR_LFEx; } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleANY_EXCEPT_CR_LFEx; /* Prevent compiler warnings */ ruleANY_EXCEPT_CR_LFEx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start DIGIT * * Looks to match the characters the constitute the token DIGIT * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mDIGIT(pbelle_sdpLexer ctx) { ANTLR3_UINT32 _type; _type = DIGIT; // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:315:6: ( ZERO | POS_DIGIT ) // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g: { if ( ((LA(1) >= '0') && (LA(1) <= '9')) ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleDIGITEx; } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleDIGITEx; /* Prevent compiler warnings */ ruleDIGITEx: ; }
/** * $ANTLR start line * corpconf.g:72:1: line[CorpInfo &c] : ( ( 'ATTRIBUTE' v= value | 'STRUCTURE' v= value | 'PROCESS' v= value ) ( LBRACE NL block[*b] r= RBRACE )? NL | a= ATTR v= value NL ); */ static corpconfParser_line_return line(pcorpconfParser ctx, CorpInfo &c) { corpconfParser_line_return retval; pANTLR3_BASE_TREE root_0; pANTLR3_COMMON_TOKEN r; pANTLR3_COMMON_TOKEN a; pANTLR3_COMMON_TOKEN string_literal5; pANTLR3_COMMON_TOKEN string_literal6; pANTLR3_COMMON_TOKEN string_literal7; pANTLR3_COMMON_TOKEN LBRACE8; pANTLR3_COMMON_TOKEN NL9; pANTLR3_COMMON_TOKEN NL11; pANTLR3_COMMON_TOKEN NL12; corpconfParser_value_return v; #undef RETURN_TYPE_v #define RETURN_TYPE_v corpconfParser_value_return corpconfParser_block_return block10; #undef RETURN_TYPE_block10 #define RETURN_TYPE_block10 corpconfParser_block_return pANTLR3_BASE_TREE r_tree; pANTLR3_BASE_TREE a_tree; pANTLR3_BASE_TREE string_literal5_tree; pANTLR3_BASE_TREE string_literal6_tree; pANTLR3_BASE_TREE string_literal7_tree; pANTLR3_BASE_TREE LBRACE8_tree; pANTLR3_BASE_TREE NL9_tree; pANTLR3_BASE_TREE NL11_tree; pANTLR3_BASE_TREE NL12_tree; /* Initialize rule variables */ root_0 = NULL; CorpInfo *b; r = NULL; a = NULL; string_literal5 = NULL; string_literal6 = NULL; string_literal7 = NULL; LBRACE8 = NULL; NL9 = NULL; NL11 = NULL; NL12 = NULL; v.tree = NULL; block10.tree = NULL; retval.start = LT(1); retval.stop = retval.start; r_tree = NULL; a_tree = NULL; string_literal5_tree = NULL; string_literal6_tree = NULL; string_literal7_tree = NULL; LBRACE8_tree = NULL; NL9_tree = NULL; NL11_tree = NULL; NL12_tree = NULL; retval.tree = NULL; { { // corpconf.g:74:2: ( ( 'ATTRIBUTE' v= value | 'STRUCTURE' v= value | 'PROCESS' v= value ) ( LBRACE NL block[*b] r= RBRACE )? NL | a= ATTR v= value NL ) ANTLR3_UINT32 alt4; alt4=2; switch ( LA(1) ) { case 11: case 12: case 13: { alt4=1; } break; case ATTR: { alt4=2; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 4; EXCEPTION->state = 0; goto rulelineEx; } switch (alt4) { case 1: // corpconf.g:75:3: ( 'ATTRIBUTE' v= value | 'STRUCTURE' v= value | 'PROCESS' v= value ) ( LBRACE NL block[*b] r= RBRACE )? NL { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); // corpconf.g:75:3: ( 'ATTRIBUTE' v= value | 'STRUCTURE' v= value | 'PROCESS' v= value ) { int alt2=3; switch ( LA(1) ) { case 11: { alt2=1; } break; case 12: { alt2=2; } break; case 13: { alt2=3; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 2; EXCEPTION->state = 0; goto rulelineEx; } switch (alt2) { case 1: // corpconf.g:75:5: 'ATTRIBUTE' v= value { string_literal5 = (pANTLR3_COMMON_TOKEN) MATCHT(11, &FOLLOW_11_in_line319); if (HASEXCEPTION()) { goto rulelineEx; } string_literal5_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, string_literal5)); ADAPTOR->addChild(ADAPTOR, root_0, string_literal5_tree); FOLLOWPUSH(FOLLOW_value_in_line323); v=value(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto rulelineEx; } ADAPTOR->addChild(ADAPTOR, root_0, v.tree); { b = new CorpInfo(); c.attrs.push_back (std::pair<std::string,CorpInfo*>(v.v, b)); } } break; case 2: // corpconf.g:79:5: 'STRUCTURE' v= value { string_literal6 = (pANTLR3_COMMON_TOKEN) MATCHT(12, &FOLLOW_12_in_line334); if (HASEXCEPTION()) { goto rulelineEx; } string_literal6_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, string_literal6)); ADAPTOR->addChild(ADAPTOR, root_0, string_literal6_tree); FOLLOWPUSH(FOLLOW_value_in_line338); v=value(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto rulelineEx; } ADAPTOR->addChild(ADAPTOR, root_0, v.tree); { b = new CorpInfo(); c.structs.push_back (std::pair<std::string,CorpInfo*>(v.v, b)); } } break; case 3: // corpconf.g:83:5: 'PROCESS' v= value { string_literal7 = (pANTLR3_COMMON_TOKEN) MATCHT(13, &FOLLOW_13_in_line349); if (HASEXCEPTION()) { goto rulelineEx; } string_literal7_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, string_literal7)); ADAPTOR->addChild(ADAPTOR, root_0, string_literal7_tree); FOLLOWPUSH(FOLLOW_value_in_line353); v=value(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto rulelineEx; } ADAPTOR->addChild(ADAPTOR, root_0, v.tree); { b = new CorpInfo(); c.procs.push_back (std::pair<std::string,CorpInfo*>(v.v, b)); } } break; } } // corpconf.g:88:3: ( LBRACE NL block[*b] r= RBRACE )? { int alt3=2; switch ( LA(1) ) { case LBRACE: { alt3=1; } break; } switch (alt3) { case 1: // corpconf.g:88:4: LBRACE NL block[*b] r= RBRACE { LBRACE8 = (pANTLR3_COMMON_TOKEN) MATCHT(LBRACE, &FOLLOW_LBRACE_in_line367); if (HASEXCEPTION()) { goto rulelineEx; } LBRACE8_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, LBRACE8)); ADAPTOR->addChild(ADAPTOR, root_0, LBRACE8_tree); NL9 = (pANTLR3_COMMON_TOKEN) MATCHT(NL, &FOLLOW_NL_in_line369); if (HASEXCEPTION()) { goto rulelineEx; } NL9_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, NL9)); ADAPTOR->addChild(ADAPTOR, root_0, NL9_tree); FOLLOWPUSH(FOLLOW_block_in_line371); block10=block(ctx, *b); FOLLOWPOP(); if (HASEXCEPTION()) { goto rulelineEx; } ADAPTOR->addChild(ADAPTOR, root_0, block10.tree); r = (pANTLR3_COMMON_TOKEN) MATCHT(RBRACE, &FOLLOW_RBRACE_in_line376); if (HASEXCEPTION()) { goto rulelineEx; } r_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, r)); ADAPTOR->addChild(ADAPTOR, root_0, r_tree); } break; } } NL11 = (pANTLR3_COMMON_TOKEN) MATCHT(NL, &FOLLOW_NL_in_line380); if (HASEXCEPTION()) { goto rulelineEx; } NL11_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, NL11)); ADAPTOR->addChild(ADAPTOR, root_0, NL11_tree); } break; case 2: // corpconf.g:89:4: a= ATTR v= value NL { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); a = (pANTLR3_COMMON_TOKEN) MATCHT(ATTR, &FOLLOW_ATTR_in_line387); if (HASEXCEPTION()) { goto rulelineEx; } a_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, a)); ADAPTOR->addChild(ADAPTOR, root_0, a_tree); FOLLOWPUSH(FOLLOW_value_in_line391); v=value(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto rulelineEx; } ADAPTOR->addChild(ADAPTOR, root_0, v.tree); NL12 = (pANTLR3_COMMON_TOKEN) MATCHT(NL, &FOLLOW_NL_in_line393); if (HASEXCEPTION()) { goto rulelineEx; } NL12_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, NL12)); ADAPTOR->addChild(ADAPTOR, root_0, NL12_tree); { c.opts [std::string((const char *) (a->getText(a))->chars)] = v.v; } } break; } } } // This is where rules clean up and exit // goto rulelineEx; /* Prevent compiler warnings */ rulelineEx: ; retval.stop = LT(-1); retval.stop = LT(-1); retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (HASEXCEPTION()) { /* catch(decl,action) */ { PREPORTERROR(); RECOGNIZER->consumeUntil(RECOGNIZER, NL); block(CTX, *b); } } else { } return retval; }
/** * $ANTLR start value * corpconf.g:98:1: value returns [std::string v] : (s= STR | p= PATH | 'AT' a= PATH ); */ static corpconfParser_value_return value(pcorpconfParser ctx) { corpconfParser_value_return retval; pANTLR3_BASE_TREE root_0; pANTLR3_COMMON_TOKEN s; pANTLR3_COMMON_TOKEN p; pANTLR3_COMMON_TOKEN a; pANTLR3_COMMON_TOKEN string_literal13; pANTLR3_BASE_TREE s_tree; pANTLR3_BASE_TREE p_tree; pANTLR3_BASE_TREE a_tree; pANTLR3_BASE_TREE string_literal13_tree; /* Initialize rule variables */ root_0 = NULL; s = NULL; p = NULL; a = NULL; string_literal13 = NULL; retval.start = LT(1); retval.stop = retval.start; s_tree = NULL; p_tree = NULL; a_tree = NULL; string_literal13_tree = NULL; retval.tree = NULL; { { // corpconf.g:99:2: (s= STR | p= PATH | 'AT' a= PATH ) ANTLR3_UINT32 alt5; alt5=3; switch ( LA(1) ) { case STR: { alt5=1; } break; case PATH: { alt5=2; } break; case 14: { alt5=3; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 5; EXCEPTION->state = 0; goto rulevalueEx; } switch (alt5) { case 1: // corpconf.g:99:4: s= STR { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); s = (pANTLR3_COMMON_TOKEN) MATCHT(STR, &FOLLOW_STR_in_value422); if (HASEXCEPTION()) { goto rulevalueEx; } s_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, s)); ADAPTOR->addChild(ADAPTOR, root_0, s_tree); { retval.v= std::string((const char *) (s->getText(s))->chars); } } break; case 2: // corpconf.g:100:4: p= PATH { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); p = (pANTLR3_COMMON_TOKEN) MATCHT(PATH, &FOLLOW_PATH_in_value442); if (HASEXCEPTION()) { goto rulevalueEx; } p_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, p)); ADAPTOR->addChild(ADAPTOR, root_0, p_tree); { retval.v= std::string((const char *) (p->getText(p))->chars); } } break; case 3: // corpconf.g:101:4: 'AT' a= PATH { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); string_literal13 = (pANTLR3_COMMON_TOKEN) MATCHT(14, &FOLLOW_14_in_value459); if (HASEXCEPTION()) { goto rulevalueEx; } string_literal13_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, string_literal13)); ADAPTOR->addChild(ADAPTOR, root_0, string_literal13_tree); a = (pANTLR3_COMMON_TOKEN) MATCHT(PATH, &FOLLOW_PATH_in_value463); if (HASEXCEPTION()) { goto rulevalueEx; } a_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, a)); ADAPTOR->addChild(ADAPTOR, root_0, a_tree); { retval.v= std::string("@") + std::string((const char *) (a->getText(a))->chars); } } break; } } } // This is where rules clean up and exit // goto rulevalueEx; /* Prevent compiler warnings */ rulevalueEx: ; retval.stop = LT(-1); retval.stop = LT(-1); retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (HASEXCEPTION()) { PREPORTERROR(); PRECOVER(); retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); } return retval; }
/** This is the entry point in to the lexer from an object that * wants to generate the next token, such as a pCOMMON_TOKEN_STREAM */ static void mTokens(pbelle_sdpLexer ctx) { { // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:8: ( T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | DIGIT | COMMON_CHAR | HEX_CHAR | SPACE | LQUOTE | RQUOTE | CR | LF | DOT | EQUAL | COLON | SLASH | DASH | ANY_EXCEPT_CR_LF ) ANTLR3_UINT32 alt1; alt1=22; { int LA1_0 = LA(1); if ( (LA1_0 == '!') ) { alt1=1; } else if ( (LA1_0 == '#') ) { alt1=2; } else if ( (LA1_0 == '$') ) { alt1=3; } else if ( (LA1_0 == '&') ) { alt1=4; } else if ( (LA1_0 == '%') ) { alt1=5; } else if ( (LA1_0 == '\'') ) { alt1=6; } else if ( (LA1_0 == '*') ) { alt1=7; } else if ( (LA1_0 == '+') ) { alt1=8; } else if ( (((LA1_0 >= '0') && (LA1_0 <= '9'))) ) { alt1=9; } else if ( (((LA1_0 >= 'G') && (LA1_0 <= 'Z')) || ((LA1_0 >= 'g') && (LA1_0 <= 'z'))) ) { alt1=10; } else if ( (((LA1_0 >= 'A') && (LA1_0 <= 'F')) || ((LA1_0 >= 'a') && (LA1_0 <= 'f'))) ) { alt1=11; } else if ( (LA1_0 == ' ') ) { alt1=12; } else if ( (LA1_0 == '<') ) { alt1=13; } else if ( (LA1_0 == '>') ) { alt1=14; } else if ( (LA1_0 == '\r') ) { alt1=15; } else if ( (LA1_0 == '\n') ) { alt1=16; } else if ( (LA1_0 == '.') ) { alt1=17; } else if ( (LA1_0 == '=') ) { alt1=18; } else if ( (LA1_0 == ':') ) { alt1=19; } else if ( (LA1_0 == '/') ) { alt1=20; } else if ( (LA1_0 == '-') ) { alt1=21; } else if ( (((LA1_0 >= 0x0000) && (LA1_0 <= '\t')) || ((LA1_0 >= 0x000B) && (LA1_0 <= '\f')) || ((LA1_0 >= 0x000E) && (LA1_0 <= 0x001F)) || LA1_0 == '"' || ((LA1_0 >= '(') && (LA1_0 <= ')')) || LA1_0 == ',' || LA1_0 == ';' || ((LA1_0 >= '?') && (LA1_0 <= '@')) || ((LA1_0 >= '[') && (LA1_0 <= '`')) || ((LA1_0 >= '{') && (LA1_0 <= 0xFFFF))) ) { alt1=22; } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 1; EXCEPTION->state = 0; goto ruleTokensEx; } } switch (alt1) { case 1: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:10: T__20 { /* 1:10: T__20 */ mT__20(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 2: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:16: T__21 { /* 1:16: T__21 */ mT__21(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 3: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:22: T__22 { /* 1:22: T__22 */ mT__22(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 4: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:28: T__23 { /* 1:28: T__23 */ mT__23(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 5: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:34: T__24 { /* 1:34: T__24 */ mT__24(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 6: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:40: T__25 { /* 1:40: T__25 */ mT__25(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 7: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:46: T__26 { /* 1:46: T__26 */ mT__26(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 8: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:52: T__27 { /* 1:52: T__27 */ mT__27(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 9: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:58: DIGIT { /* 1:58: DIGIT */ mDIGIT(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 10: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:64: COMMON_CHAR { /* 1:64: COMMON_CHAR */ mCOMMON_CHAR(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 11: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:76: HEX_CHAR { /* 1:76: HEX_CHAR */ mHEX_CHAR(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 12: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:85: SPACE { /* 1:85: SPACE */ mSPACE(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 13: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:91: LQUOTE { /* 1:91: LQUOTE */ mLQUOTE(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 14: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:98: RQUOTE { /* 1:98: RQUOTE */ mRQUOTE(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 15: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:105: CR { /* 1:105: CR */ mCR(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 16: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:108: LF { /* 1:108: LF */ mLF(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 17: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:111: DOT { /* 1:111: DOT */ mDOT(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 18: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:115: EQUAL { /* 1:115: EQUAL */ mEQUAL(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 19: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:121: COLON { /* 1:121: COLON */ mCOLON(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 20: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:127: SLASH { /* 1:127: SLASH */ mSLASH(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 21: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:133: DASH { /* 1:133: DASH */ mDASH(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 22: // /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/build/..//belle-sip/src/belle_sdp.g:1:138: ANY_EXCEPT_CR_LF { /* 1:138: ANY_EXCEPT_CR_LF */ mANY_EXCEPT_CR_LF(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; } } goto ruleTokensEx; /* Prevent compiler warnings */ ruleTokensEx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start WS * * Looks to match the characters the constitute the token WS * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mWS(pExprCppTreeLexer ctx) { ANTLR3_UINT32 _type; _type = WS; // D:\\message\\ExprCppTree.g:45:4: ( ( ' ' | '\\t' )+ ) // D:\\message\\ExprCppTree.g:45:6: ( ' ' | '\\t' )+ { // D:\\message\\ExprCppTree.g:45:6: ( ' ' | '\\t' )+ { int cnt5=0; for (;;) { int alt5=2; switch ( LA(1) ) { case '\t': case ' ': { alt5=1; } break; } switch (alt5) { case 1: // D:\\message\\ExprCppTree.g: { if ( LA(1) == '\t' || LA(1) == ' ' ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleWSEx; } } break; default: if ( cnt5 >= 1 ) { goto loop5; } /* mismatchedSetEx() */ CONSTRUCTEX(); EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; goto ruleWSEx; } cnt5++; } loop5: ; /* Jump to here if this rule does not match */ } { LEXSTATE->channel = HIDDEN; } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleWSEx; /* Prevent compiler warnings */ ruleWSEx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ID * * Looks to match the characters the constitute the token ID * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mID(pExprCppTreeLexer ctx) { ANTLR3_UINT32 _type; _type = ID; // D:\\message\\ExprCppTree.g:42:3: ( ( 'a' .. 'z' | 'A' .. 'Z' )+ ) // D:\\message\\ExprCppTree.g:42:5: ( 'a' .. 'z' | 'A' .. 'Z' )+ { // D:\\message\\ExprCppTree.g:42:5: ( 'a' .. 'z' | 'A' .. 'Z' )+ { int cnt1=0; for (;;) { int alt1=2; switch ( LA(1) ) { case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt1=1; } break; } switch (alt1) { case 1: // D:\\message\\ExprCppTree.g: { if ( ((LA(1) >= 'A') && (LA(1) <= 'Z')) || ((LA(1) >= 'a') && (LA(1) <= 'z')) ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleIDEx; } } break; default: if ( cnt1 >= 1 ) { goto loop1; } /* mismatchedSetEx() */ CONSTRUCTEX(); EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; goto ruleIDEx; } cnt1++; } loop1: ; /* Jump to here if this rule does not match */ } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleIDEx; /* Prevent compiler warnings */ ruleIDEx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start INT * * Looks to match the characters the constitute the token INT * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mINT(pExprCppTreeLexer ctx) { ANTLR3_UINT32 _type; _type = INT; // D:\\message\\ExprCppTree.g:43:4: ( ( '~' )? ( '0' .. '9' )+ ) // D:\\message\\ExprCppTree.g:43:6: ( '~' )? ( '0' .. '9' )+ { // D:\\message\\ExprCppTree.g:43:6: ( '~' )? { int alt2=2; switch ( LA(1) ) { case '~': { alt2=1; } break; } switch (alt2) { case 1: // D:\\message\\ExprCppTree.g:43:6: '~' { MATCHC('~'); if (HASEXCEPTION()) { goto ruleINTEx; } } break; } } // D:\\message\\ExprCppTree.g:43:11: ( '0' .. '9' )+ { int cnt3=0; for (;;) { int alt3=2; switch ( LA(1) ) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { alt3=1; } break; } switch (alt3) { case 1: // D:\\message\\ExprCppTree.g:43:11: '0' .. '9' { MATCHRANGE('0', '9'); if (HASEXCEPTION()) { goto ruleINTEx; } } break; default: if ( cnt3 >= 1 ) { goto loop3; } /* mismatchedSetEx() */ CONSTRUCTEX(); EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; goto ruleINTEx; } cnt3++; } loop3: ; /* Jump to here if this rule does not match */ } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleINTEx; /* Prevent compiler warnings */ ruleINTEx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start TEXT * * Looks to match the characters the constitute the token TEXT * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mTEXT(pMudLexer ctx) { ANTLR3_UINT32 _type; _type = TEXT; // c_src/Mud.g:129:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '1' .. '0' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '(' | ')' )+ ) // c_src/Mud.g:129:7: ( 'a' .. 'z' | 'A' .. 'Z' | '1' .. '0' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '(' | ')' )+ { // c_src/Mud.g:129:7: ( 'a' .. 'z' | 'A' .. 'Z' | '1' .. '0' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '(' | ')' )+ { int cnt2=0; for (;;) { int alt2=2; switch ( LA(1) ) { case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt2=1; } break; } switch (alt2) { case 1: // c_src/Mud.g: { if ( LA(1) == '!' || ((LA(1) >= '#') && (LA(1) <= '&')) || ((LA(1) >= '(') && (LA(1) <= '*')) || ((LA(1) >= '@') && (LA(1) <= 'Z')) || LA(1) == '^' || ((LA(1) >= 'a') && (LA(1) <= 'z')) ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleTEXTEx; } } break; default: if ( cnt2 >= 1 ) { goto loop2; } /* mismatchedSetEx() */ CONSTRUCTEX(); EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; goto ruleTEXTEx; } cnt2++; } loop2: ; /* Jump to here if this rule does not match */ } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleTEXTEx; /* Prevent compiler warnings */ ruleTEXTEx: ; }
/** This is the entry point in to the lexer from an object that * wants to generate the next token, such as a pCOMMON_TOKEN_STREAM */ static void mTokens(pExprCppTreeLexer ctx) { { // D:\\message\\ExprCppTree.g:1:8: ( T__12 | T__13 | PLUS | MINUS | TIMES | ASSIGN | ID | INT | NEWLINE | WS ) ANTLR3_UINT32 alt6; alt6=10; switch ( LA(1) ) { case '(': { alt6=1; } break; case ')': { alt6=2; } break; case '+': { alt6=3; } break; case '-': { alt6=4; } break; case '*': { alt6=5; } break; case '=': { alt6=6; } break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt6=7; } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '~': { alt6=8; } break; case '\n': case '\r': { alt6=9; } break; case '\t': case ' ': { alt6=10; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 6; EXCEPTION->state = 0; goto ruleTokensEx; } switch (alt6) { case 1: // D:\\message\\ExprCppTree.g:1:10: T__12 { /* 1:10: T__12 */ mT__12(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 2: // D:\\message\\ExprCppTree.g:1:16: T__13 { /* 1:16: T__13 */ mT__13(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 3: // D:\\message\\ExprCppTree.g:1:22: PLUS { /* 1:22: PLUS */ mPLUS(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 4: // D:\\message\\ExprCppTree.g:1:27: MINUS { /* 1:27: MINUS */ mMINUS(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 5: // D:\\message\\ExprCppTree.g:1:33: TIMES { /* 1:33: TIMES */ mTIMES(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 6: // D:\\message\\ExprCppTree.g:1:39: ASSIGN { /* 1:39: ASSIGN */ mASSIGN(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 7: // D:\\message\\ExprCppTree.g:1:46: ID { /* 1:46: ID */ mID(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 8: // D:\\message\\ExprCppTree.g:1:49: INT { /* 1:49: INT */ mINT(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 9: // D:\\message\\ExprCppTree.g:1:53: NEWLINE { /* 1:53: NEWLINE */ mNEWLINE(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 10: // D:\\message\\ExprCppTree.g:1:61: WS { /* 1:61: WS */ mWS(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; } } goto ruleTokensEx; /* Prevent compiler warnings */ ruleTokensEx: ; }
/** \brief Lexer rule generated by ANTLR3 * * $ANTLR start WS * * Looks to match the characters the constitute the token WS * from the attached input stream. * * * \remark * - lexer->error == ANTLR3_TRUE if an exception was thrown. */ static ANTLR3_INLINE void mWS(pMudLexer ctx) { ANTLR3_UINT32 _type; _type = WS; // c_src/Mud.g:127:3: ( ( ' ' | '\\t' )+ ) // c_src/Mud.g:127:5: ( ' ' | '\\t' )+ { // c_src/Mud.g:127:5: ( ' ' | '\\t' )+ { int cnt1=0; for (;;) { int alt1=2; switch ( LA(1) ) { case '\t': case ' ': { alt1=1; } break; } switch (alt1) { case 1: // c_src/Mud.g: { if ( LA(1) == '\t' || LA(1) == ' ' ) { CONSUME(); } else { CONSTRUCTEX(); EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; LRECOVER(); goto ruleWSEx; } } break; default: if ( cnt1 >= 1 ) { goto loop1; } /* mismatchedSetEx() */ CONSTRUCTEX(); EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; goto ruleWSEx; } cnt1++; } loop1: ; /* Jump to here if this rule does not match */ } } LEXSTATE->type = _type; // This is where rules clean up and exit // goto ruleWSEx; /* Prevent compiler warnings */ ruleWSEx: ; }
/** This is the entry point in to the lexer from an object that * wants to generate the next token, such as a pCOMMON_TOKEN_STREAM */ static void mTokens(pMudLexer ctx) { { // c_src/Mud.g:1:8: ( T__6 | T__7 | T__8 | T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | WS | TEXT ) ANTLR3_UINT32 alt3; alt3=11; switch ( LA(1) ) { case 'a': { switch ( LA(2) ) { case 'r': { switch ( LA(3) ) { case 'o': { switch ( LA(4) ) { case 'u': { switch ( LA(5) ) { case 'n': { switch ( LA(6) ) { case 'd': { switch ( LA(7) ) { case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt3=11; } break; default: alt3=1; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case 't': { switch ( LA(3) ) { case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt3=11; } break; default: alt3=2; } } break; default: alt3=11; } } break; case 'c': { switch ( LA(2) ) { case 'r': { switch ( LA(3) ) { case 'e': { switch ( LA(4) ) { case 'a': { switch ( LA(5) ) { case 't': { switch ( LA(6) ) { case 'e': { switch ( LA(7) ) { case ' ': { alt3=3; } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case 'j': { switch ( LA(2) ) { case 'o': { switch ( LA(3) ) { case 'i': { switch ( LA(4) ) { case 'n': { switch ( LA(5) ) { case ' ': { alt3=4; } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case 'l': { switch ( LA(2) ) { case 'o': { switch ( LA(3) ) { case 'g': { switch ( LA(4) ) { case 'i': { switch ( LA(5) ) { case 'n': { switch ( LA(6) ) { case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt3=11; } break; default: alt3=5; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case 'o': { switch ( LA(4) ) { case 'k': { switch ( LA(5) ) { case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt3=11; } break; default: alt3=6; } } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case 'm': { switch ( LA(2) ) { case 'o': { switch ( LA(3) ) { case 'v': { switch ( LA(4) ) { case 'e': { switch ( LA(5) ) { case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt3=11; } break; default: alt3=7; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case 'y': { switch ( LA(3) ) { case ' ': { alt3=8; } break; default: alt3=11; } } break; default: alt3=11; } } break; case 'n': { switch ( LA(2) ) { case 'e': { switch ( LA(3) ) { case 'w': { switch ( LA(4) ) { case ' ': { alt3=9; } break; default: alt3=11; } } break; default: alt3=11; } } break; default: alt3=11; } } break; case '\t': case ' ': { alt3=10; } break; case '!': case '#': case '$': case '%': case '&': case '(': case ')': case '*': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case 'b': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'k': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': { alt3=11; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 3; EXCEPTION->state = 0; goto ruleTokensEx; } switch (alt3) { case 1: // c_src/Mud.g:1:10: T__6 { /* 1:10: T__6 */ mT__6(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 2: // c_src/Mud.g:1:15: T__7 { /* 1:15: T__7 */ mT__7(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 3: // c_src/Mud.g:1:20: T__8 { /* 1:20: T__8 */ mT__8(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 4: // c_src/Mud.g:1:25: T__9 { /* 1:25: T__9 */ mT__9(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 5: // c_src/Mud.g:1:30: T__10 { /* 1:30: T__10 */ mT__10(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 6: // c_src/Mud.g:1:36: T__11 { /* 1:36: T__11 */ mT__11(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 7: // c_src/Mud.g:1:42: T__12 { /* 1:42: T__12 */ mT__12(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 8: // c_src/Mud.g:1:48: T__13 { /* 1:48: T__13 */ mT__13(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 9: // c_src/Mud.g:1:54: T__14 { /* 1:54: T__14 */ mT__14(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 10: // c_src/Mud.g:1:60: WS { /* 1:60: WS */ mWS(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; case 11: // c_src/Mud.g:1:63: TEXT { /* 1:63: TEXT */ mTEXT(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; } } break; } } goto ruleTokensEx; /* Prevent compiler warnings */ ruleTokensEx: ; }
/** * $ANTLR start boolean_value * /home/cross/workspace/djondb/db/grammars/filter_expression.g:101:1: boolean_value returns [BaseExpression* val] : ( parenthesized_boolean | nonparentherized_boolean ); */ static BaseExpression* boolean_value(pfilter_expressionParser ctx) { BaseExpression* val; BaseExpression* parenthesized_boolean3; #undef RETURN_TYPE_parenthesized_boolean3 #define RETURN_TYPE_parenthesized_boolean3 BaseExpression* BaseExpression* nonparentherized_boolean4; #undef RETURN_TYPE_nonparentherized_boolean4 #define RETURN_TYPE_nonparentherized_boolean4 BaseExpression* /* Initialize rule variables */ { { // /home/cross/workspace/djondb/db/grammars/filter_expression.g:102:2: ( parenthesized_boolean | nonparentherized_boolean ) ANTLR3_UINT32 alt3; alt3=2; switch ( LA(1) ) { case LPAREN: { alt3=1; } break; case INT: case STRING: case XPATH: { alt3=2; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 3; EXCEPTION->state = 0; goto ruleboolean_valueEx; } switch (alt3) { case 1: // /home/cross/workspace/djondb/db/grammars/filter_expression.g:102:4: parenthesized_boolean { FOLLOWPUSH(FOLLOW_parenthesized_boolean_in_boolean_value170); parenthesized_boolean3=parenthesized_boolean(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto ruleboolean_valueEx; } { val= parenthesized_boolean3 ; } } break; case 2: // /home/cross/workspace/djondb/db/grammars/filter_expression.g:105:2: nonparentherized_boolean { FOLLOWPUSH(FOLLOW_nonparentherized_boolean_in_boolean_value177); nonparentherized_boolean4=nonparentherized_boolean(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto ruleboolean_valueEx; } { val= nonparentherized_boolean4 ; } } break; } } } // This is where rules clean up and exit // goto ruleboolean_valueEx; /* Prevent compiler warnings */ ruleboolean_valueEx: ; return val; }
/** * $ANTLR start constant_expr * /home/cross/workspace/djondb/db/grammars/filter_expression.g:145:1: constant_expr returns [BaseExpression* val] : ( INT | STRING ) ; */ static BaseExpression* constant_expr(pfilter_expressionParser ctx) { BaseExpression* val; pANTLR3_COMMON_TOKEN INT8; pANTLR3_COMMON_TOKEN STRING9; /* Initialize rule variables */ INT8 = NULL; STRING9 = NULL; { // /home/cross/workspace/djondb/db/grammars/filter_expression.g:146:2: ( ( INT | STRING ) ) // /home/cross/workspace/djondb/db/grammars/filter_expression.g:146:4: ( INT | STRING ) { // /home/cross/workspace/djondb/db/grammars/filter_expression.g:146:4: ( INT | STRING ) { int alt6=2; switch ( LA(1) ) { case INT: { alt6=1; } break; case STRING: { alt6=2; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 6; EXCEPTION->state = 0; goto ruleconstant_exprEx; } switch (alt6) { case 1: // /home/cross/workspace/djondb/db/grammars/filter_expression.g:146:5: INT { INT8 = (pANTLR3_COMMON_TOKEN) MATCHT(INT, &FOLLOW_INT_in_constant_expr296); if (HASEXCEPTION()) { goto ruleconstant_exprEx; } { int i = atoi((char*)(INT8->getText(INT8))->chars); val= new ConstantExpression(i); } } break; case 2: // /home/cross/workspace/djondb/db/grammars/filter_expression.g:150:6: STRING { STRING9 = (pANTLR3_COMMON_TOKEN) MATCHT(STRING, &FOLLOW_STRING_in_constant_expr303); if (HASEXCEPTION()) { goto ruleconstant_exprEx; } { char* ptext = (char*)(STRING9->getText(STRING9))->chars; char* text = (char*)malloc(strlen(ptext) - 1); memset(text, 0, strlen(ptext) - 1); memcpy(text, ptext + 1, strlen(ptext) - 2); val= new ConstantExpression(text); free (text); } } break; } } } } // This is where rules clean up and exit // goto ruleconstant_exprEx; /* Prevent compiler warnings */ ruleconstant_exprEx: ; return val; }
/** * $ANTLR start unary_expr * /home/cross/workspace/djondb/db/grammars/filter_expression.g:127:1: unary_expr returns [BaseExpression* val] : (c1= constant_expr |x1= xpath_expr ) ; */ static BaseExpression* unary_expr(pfilter_expressionParser ctx) { BaseExpression* val; BaseExpression* c1; #undef RETURN_TYPE_c1 #define RETURN_TYPE_c1 BaseExpression* BaseExpression* x1; #undef RETURN_TYPE_x1 #define RETURN_TYPE_x1 BaseExpression* /* Initialize rule variables */ val = NULL; { // /home/cross/workspace/djondb/db/grammars/filter_expression.g:131:2: ( (c1= constant_expr |x1= xpath_expr ) ) // /home/cross/workspace/djondb/db/grammars/filter_expression.g:131:4: (c1= constant_expr |x1= xpath_expr ) { // /home/cross/workspace/djondb/db/grammars/filter_expression.g:131:4: (c1= constant_expr |x1= xpath_expr ) { int alt5=2; switch ( LA(1) ) { case INT: case STRING: { alt5=1; } break; case XPATH: { alt5=2; } break; default: CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; EXCEPTION->message = (void *)""; EXCEPTION->decisionNum = 5; EXCEPTION->state = 0; goto ruleunary_exprEx; } switch (alt5) { case 1: // /home/cross/workspace/djondb/db/grammars/filter_expression.g:131:5: c1= constant_expr { FOLLOWPUSH(FOLLOW_constant_expr_in_unary_expr255); c1=constant_expr(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto ruleunary_exprEx; } { val= c1; } } break; case 2: // /home/cross/workspace/djondb/db/grammars/filter_expression.g:133:6: x1= xpath_expr { FOLLOWPUSH(FOLLOW_xpath_expr_in_unary_expr263); x1=xpath_expr(ctx); FOLLOWPOP(); if (HASEXCEPTION()) { goto ruleunary_exprEx; } { val= x1; } } break; } } } } // This is where rules clean up and exit // goto ruleunary_exprEx; /* Prevent compiler warnings */ ruleunary_exprEx: ; return val; }