private LiteralExpressionParser.namespaceFragment_return namespaceFragment() { Enter_namespaceFragment(); EnterRule("namespaceFragment", 4); TraceIn("namespaceFragment", 4); LiteralExpressionParser.namespaceFragment_return retval = new LiteralExpressionParser.namespaceFragment_return(); retval.Start = (IToken)input.LT(1); object root_0 = null; IToken set13 = null; object set13_tree = null; try { DebugEnterRule(GrammarFileName, "namespaceFragment"); DebugLocation(22, 19); try { // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g:23:2: ( '*' | IDENTIFIER ) DebugEnterAlt(1); // D:\\Dev\\Codeplex\\sheepaop\\SheepAop\\Saql\\Ast\\LiteralExpression.g: { root_0 = (object)adaptor.Nil(); DebugLocation(23, 2); set13 = (IToken)input.LT(1); if (input.LA(1) == IDENTIFIER || input.LA(1) == 12) { input.Consume(); adaptor.AddChild(root_0, (object)adaptor.Create(set13)); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); throw mse; } } retval.Stop = (IToken)input.LT(-1); retval.Tree = (object)adaptor.RulePostProcessing(root_0); adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop); } catch (RecognitionException re) { ReportError(re); Recover(input, re); retval.Tree = (object)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re); } finally { TraceOut("namespaceFragment", 4); LeaveRule("namespaceFragment", 4); Leave_namespaceFragment(); } DebugLocation(23, 19); } finally { DebugExitRule(GrammarFileName, "namespaceFragment"); } return(retval); }
private void mEscapeSequence() { Enter_EscapeSequence(); EnterRule("EscapeSequence", 23); TraceIn("EscapeSequence", 23); try { // UniAspect.g:183:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) ) DebugEnterAlt(1); // UniAspect.g:183:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) { DebugLocation(183, 9); Match('\\'); DebugLocation(183, 14); if (input.LA(1) == '\"' || input.LA(1) == '\'' || input.LA(1) == '\\' || input.LA(1) == 'b' || input.LA(1) == 'f' || input.LA(1) == 'n' || input.LA(1) == 'r' || input.LA(1) == 't') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("EscapeSequence", 23); LeaveRule("EscapeSequence", 23); Leave_EscapeSequence(); } }
private void mVCHAR() { EnterRule_VCHAR(); EnterRule("VCHAR", 28); TraceIn("VCHAR", 28); try { // AbnfAst.g:363:2: ( '\\u0021' .. '\\u007E' ) DebugEnterAlt(1); // AbnfAst.g: { DebugLocation(363, 2); if ((input.LA(1) >= '!' && input.LA(1) <= '~')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("VCHAR", 28); LeaveRule("VCHAR", 28); LeaveRule_VCHAR(); } }
// $ANTLR end "T__10" // $ANTLR start "WS" private void mWS() { try { int _type = WS; int _channel = DefaultTokenChannel; // abevformula.g:33:6: ( ( '\\t' | ' ' ) ) // abevformula.g:33:6: ( '\\t' | ' ' ) { if (input.LA(1) == '\t' || input.LA(1) == ' ') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } Skip(); } state.type = _type; state.channel = _channel; } finally { } }
// $ANTLR end "COMMENT" // $ANTLR start "LINECOMMENT" public void mLINECOMMENT() // throws RecognitionException [2] { try { int _type = LINECOMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; // ..\\Source\\Antlr.Grammars\\Dhsq.g:229:2: ( '//' (~ ( '\\r' | '\\n' ) )* NEWLINE ) // ..\\Source\\Antlr.Grammars\\Dhsq.g:229:4: '//' (~ ( '\\r' | '\\n' ) )* NEWLINE { Match("//"); // ..\\Source\\Antlr.Grammars\\Dhsq.g:229:9: (~ ( '\\r' | '\\n' ) )* do { int alt7 = 2; int LA7_0 = input.LA(1); if (((LA7_0 >= '\u0000' && LA7_0 <= '\t') || (LA7_0 >= '\u000B' && LA7_0 <= '\f') || (LA7_0 >= '\u000E' && LA7_0 <= '\uFFFF'))) { alt7 = 1; } switch (alt7) { case 1: // ..\\Source\\Antlr.Grammars\\Dhsq.g:229:9: ~ ( '\\r' | '\\n' ) { if ((input.LA(1) >= '\u0000' && input.LA(1) <= '\t') || (input.LA(1) >= '\u000B' && input.LA(1) <= '\f') || (input.LA(1) >= '\u000E' && input.LA(1) <= '\uFFFF')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } } break; default: goto loop7; } } while (true); loop7: ; // Stops C# compiler whining that label 'loop7' has no statements mNEWLINE(); _channel = HIDDEN; } state.type = _type; state.channel = _channel; } finally { } }
// $ANTLR end "line" // $ANTLR start "commands" // interfaces.g:33:1: commands : ( 'pre-up' | 'up' | 'post-up' | 'pre-down' | 'down' | 'post-down' ) id ; public void commands() // throws RecognitionException [1] { try { // interfaces.g:34:2: ( ( 'pre-up' | 'up' | 'post-up' | 'pre-down' | 'down' | 'post-down' ) id ) // interfaces.g:34:3: ( 'pre-up' | 'up' | 'post-up' | 'pre-down' | 'down' | 'post-down' ) id { if ((input.LA(1) >= 18 && input.LA(1) <= 23)) { input.Consume(); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); throw mse; } PushFollow(FOLLOW_id_in_commands217); id(); state.followingStackPointer--; } } catch (RecognitionException re) { ReportError(re); Recover(input, re); } finally { } return; }
// $ANTLR end "NUMBER" // $ANTLR start "WS" private void mWS() { try { int _type = WS; int _channel = DefaultTokenChannel; // FastSimpleExpression.g3:87:4: ( ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' ) ) // FastSimpleExpression.g3:87:4: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' ) { if ((input.LA(1) >= '\t' && input.LA(1) <= '\n') || (input.LA(1) >= '\f' && input.LA(1) <= '\r') || input.LA(1) == ' ') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } _channel = Hidden; } state.type = _type; state.channel = _channel; } finally { } }
private void mDECIMAL_DIGIT() { EnterRule_DECIMAL_DIGIT(); EnterRule("DECIMAL_DIGIT", 11); TraceIn("DECIMAL_DIGIT", 11); try { // C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Test\\Test.g:60:14: ( '0' .. '9' ) DebugEnterAlt(1); // C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Test\\Test.g: { DebugLocation(60, 14); if ((input.LA(1) >= '0' && input.LA(1) <= '9')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("DECIMAL_DIGIT", 11); LeaveRule("DECIMAL_DIGIT", 11); LeaveRule_DECIMAL_DIGIT(); } }
// $ANTLR start "iface_conf" // interfaces.g:76:1: iface_conf : ( STATIC | DHCP | LOOPBACK ); public interfacesParser.iface_conf_return iface_conf() // throws RecognitionException [1] { interfacesParser.iface_conf_return retval = new interfacesParser.iface_conf_return(); retval.Start = input.LT(1); try { // interfaces.g:77:2: ( STATIC | DHCP | LOOPBACK ) // interfaces.g: { if ((input.LA(1) >= STATIC && input.LA(1) <= LOOPBACK)) { input.Consume(); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); throw mse; } } retval.Stop = input.LT(-1); } catch (RecognitionException re) { ReportError(re); Recover(input, re); } finally { } return(retval); }
// $ANTLR end "COMMENT" // $ANTLR start "WS" public void mWS() // throws RecognitionException [2] { try { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; // interfaces.g:105:5: ( ( ' ' | '\\t' | '\\r' | '\\n' ) ) // interfaces.g:105:9: ( ' ' | '\\t' | '\\r' | '\\n' ) { if ((input.LA(1) >= '\t' && input.LA(1) <= '\n') || input.LA(1) == '\r' || input.LA(1) == ' ') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } _channel = HIDDEN; } state.type = _type; state.channel = _channel; } finally { } }
private void mEOL() { EnterRule_EOL(); EnterRule("EOL", 5); TraceIn("EOL", 5); try { // ../Grammars/OslcPrefix.g:60:5: ( '\\n' | '\\r' ) DebugEnterAlt(1); // ../Grammars/OslcPrefix.g: { DebugLocation(60, 5); if (input.LA(1) == '\n' || input.LA(1) == '\r') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("EOL", 5); LeaveRule("EOL", 5); LeaveRule_EOL(); } }
private void mPN_CHARS_U() { EnterRule_PN_CHARS_U(); EnterRule("PN_CHARS_U", 9); TraceIn("PN_CHARS_U", 9); try { // ../Grammars/OslcPrefix.g:96:5: ( PN_CHARS_BASE | '_' ) DebugEnterAlt(1); // ../Grammars/OslcPrefix.g: { DebugLocation(96, 5); if ((input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u00C0' && input.LA(1) <= '\u00D6') || (input.LA(1) >= '\u00D8' && input.LA(1) <= '\u00F6') || (input.LA(1) >= '\u00F8' && input.LA(1) <= '\u02FF') || (input.LA(1) >= '\u0370' && input.LA(1) <= '\u037D') || (input.LA(1) >= '\u037F' && input.LA(1) <= '\u1FFF') || (input.LA(1) >= '\u200C' && input.LA(1) <= '\u200D') || (input.LA(1) >= '\u2070' && input.LA(1) <= '\u218F') || (input.LA(1) >= '\u2C00' && input.LA(1) <= '\u2FEF') || (input.LA(1) >= '\u3001' && input.LA(1) <= '\uD7FF') || (input.LA(1) >= '\uF900' && input.LA(1) <= '\uFDCF') || (input.LA(1) >= '\uFDF0' && input.LA(1) <= '\uFFFD')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("PN_CHARS_U", 9); LeaveRule("PN_CHARS_U", 9); LeaveRule_PN_CHARS_U(); } }
private void mDigit() { EnterRule_Digit(); EnterRule("Digit", 15); TraceIn("Digit", 15); try { // C:\\Users\\franz\\SkyDrive\\Dokumente\\workspace\\TextTable\\src\\eu\\reitmayer\\texttable\\lang\\TextTable.g:72:7: ( '0' .. '9' ) DebugEnterAlt(1); // C:\\Users\\franz\\SkyDrive\\Dokumente\\workspace\\TextTable\\src\\eu\\reitmayer\\texttable\\lang\\TextTable.g: { DebugLocation(72, 7); if ((input.LA(1) >= '0' && input.LA(1) <= '9')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("Digit", 15); LeaveRule("Digit", 15); LeaveRule_Digit(); } }
private void mLetter() { EnterRule_Letter(); EnterRule("Letter", 16); TraceIn("Letter", 16); try { // C:\\Users\\franz\\SkyDrive\\Dokumente\\workspace\\TextTable\\src\\eu\\reitmayer\\texttable\\lang\\TextTable.g:75:8: ( 'a' .. 'z' | 'A' .. 'Z' ) DebugEnterAlt(1); // C:\\Users\\franz\\SkyDrive\\Dokumente\\workspace\\TextTable\\src\\eu\\reitmayer\\texttable\\lang\\TextTable.g: { DebugLocation(75, 8); if ((input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("Letter", 16); LeaveRule("Letter", 16); LeaveRule_Letter(); } }
private void mModifier() { try { int _type = Modifier; int _channel = DefaultTokenChannel; // C:\\Projects\\lokad-codedsl\\Source\\MessageContracts\\MessageContracts.g:74:2: ( '?' | '!' | ';' ) DebugEnterAlt(1); // C:\\Projects\\lokad-codedsl\\Source\\MessageContracts\\MessageContracts.g: { DebugLocation(74, 2); if (input.LA(1) == '!' || input.LA(1) == ';' || input.LA(1) == '?') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } state.type = _type; state.channel = _channel; } finally { } }
// $ANTLR end "NL" // $ANTLR start "WS" public void mWS() // throws RecognitionException [2] { try { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; // GDBMI.g:507:4: ( ( ' ' | '\\t' ) ) // GDBMI.g: { if (input.LA(1) == '\t' || input.LA(1) == ' ') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } } state.type = _type; state.channel = _channel; } finally { } }
// $ANTLR end "ppp_methods" // $ANTLR start "hwclass" // interfaces.g:55:1: hwclass : ( 'ether' | 'ax25' | 'ARCnet' | 'netrom' ) ; public void hwclass() // throws RecognitionException [1] { try { // interfaces.g:56:2: ( ( 'ether' | 'ax25' | 'ARCnet' | 'netrom' ) ) // interfaces.g:56:3: ( 'ether' | 'ax25' | 'ARCnet' | 'netrom' ) { if ((input.LA(1) >= 39 && input.LA(1) <= 42)) { input.Consume(); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); throw mse; } } } catch (RecognitionException re) { ReportError(re); Recover(input, re); } finally { } return; }
private void mIdentifierPart() { EnterRule_IdentifierPart(); EnterRule("IdentifierPart", 8); TraceIn("IdentifierPart", 8); try { // C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Test\\Test.g:47:2: ( 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '_' ) DebugEnterAlt(1); // C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Test\\Test.g: { DebugLocation(47, 2); if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("IdentifierPart", 8); LeaveRule("IdentifierPart", 8); LeaveRule_IdentifierPart(); } }
// $ANTLR end mul // $ANTLR start atom // T.g:73:1: atom : ( ID | INT ); public void atom() // throws RecognitionException [1] { try { // T.g:73:5: ( ID | INT ) // T.g: { if ((input.LA(1) >= ID && input.LA(1) <= INT)) { input.Consume(); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); throw mse; } } } catch (RecognitionException re) { ReportError(re); Recover(input, re); } finally { } return; }
// $ANTLR end "dhcp_methods" // $ANTLR start "bootp_methods" // interfaces.g:47:1: bootp_methods : ( 'bootfile' | 'server' | 'hwaddr' ) id ; public void bootp_methods() // throws RecognitionException [1] { try { // interfaces.g:48:2: ( ( 'bootfile' | 'server' | 'hwaddr' ) id ) // interfaces.g:48:4: ( 'bootfile' | 'server' | 'hwaddr' ) id { if ((input.LA(1) >= 35 && input.LA(1) <= 37)) { input.Consume(); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null, input); throw mse; } PushFollow(FOLLOW_id_in_bootp_methods339); id(); state.followingStackPointer--; } } catch (RecognitionException re) { ReportError(re); Recover(input, re); } finally { } return; }
private void mLETTER() { EnterRule_LETTER(); EnterRule("LETTER", 13); TraceIn("LETTER", 13); try { // C:\\REPO\\PowerLog\\PowerLog.Parser\\PowerLogGrammar.g3:123:5: ( '\\u0024' | '\\u0041' .. '\\u005a' | '\\u005f' | '\\u0061' .. '\\u007a' | '\\u00c0' .. '\\u00d6' | '\\u00d8' .. '\\u00f6' | '\\u00f8' .. '\\u00ff' | '\\u0100' .. '\\u1fff' | '\\u3040' .. '\\u318f' | '\\u3300' .. '\\u337f' | '\\u3400' .. '\\u3d2d' | '\\u4e00' .. '\\u9fff' | '\\uf900' .. '\\ufaff' | '.' | ',' | ':' | ';' ) DebugEnterAlt(1); // C:\\REPO\\PowerLog\\PowerLog.Parser\\PowerLogGrammar.g3: { DebugLocation(123, 5); if (input.LA(1) == '$' || input.LA(1) == ',' || input.LA(1) == '.' || (input.LA(1) >= ':' && input.LA(1) <= ';') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u00C0' && input.LA(1) <= '\u00D6') || (input.LA(1) >= '\u00D8' && input.LA(1) <= '\u00F6') || (input.LA(1) >= '\u00F8' && input.LA(1) <= '\u1FFF') || (input.LA(1) >= '\u3040' && input.LA(1) <= '\u318F') || (input.LA(1) >= '\u3300' && input.LA(1) <= '\u337F') || (input.LA(1) >= '\u3400' && input.LA(1) <= '\u3D2D') || (input.LA(1) >= '\u4E00' && input.LA(1) <= '\u9FFF') || (input.LA(1) >= '\uF900' && input.LA(1) <= '\uFAFF')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("LETTER", 13); LeaveRule("LETTER", 13); LeaveRule_LETTER(); } }
private void mDIGIT() { EnterRule_DIGIT(); EnterRule("DIGIT", 4); TraceIn("DIGIT", 4); try { // C:\\REPO\\PowerLog\\PowerLog.Parser\\PowerLogGrammar.g3:90:5: ( '\\u0030' .. '\\u0039' | '\\u0660' .. '\\u0669' | '\\u06f0' .. '\\u06f9' | '\\u0966' .. '\\u096f' | '\\u09e6' .. '\\u09ef' | '\\u0a66' .. '\\u0a6f' | '\\u0ae6' .. '\\u0aef' | '\\u0b66' .. '\\u0b6f' | '\\u0be7' .. '\\u0bef' | '\\u0c66' .. '\\u0c6f' | '\\u0ce6' .. '\\u0cef' | '\\u0d66' .. '\\u0d6f' | '\\u0e50' .. '\\u0e59' | '\\u0ed0' .. '\\u0ed9' | '\\u1040' .. '\\u1049' ) DebugEnterAlt(1); // C:\\REPO\\PowerLog\\PowerLog.Parser\\PowerLogGrammar.g3: { DebugLocation(90, 5); if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= '\u0660' && input.LA(1) <= '\u0669') || (input.LA(1) >= '\u06F0' && input.LA(1) <= '\u06F9') || (input.LA(1) >= '\u0966' && input.LA(1) <= '\u096F') || (input.LA(1) >= '\u09E6' && input.LA(1) <= '\u09EF') || (input.LA(1) >= '\u0A66' && input.LA(1) <= '\u0A6F') || (input.LA(1) >= '\u0AE6' && input.LA(1) <= '\u0AEF') || (input.LA(1) >= '\u0B66' && input.LA(1) <= '\u0B6F') || (input.LA(1) >= '\u0BE7' && input.LA(1) <= '\u0BEF') || (input.LA(1) >= '\u0C66' && input.LA(1) <= '\u0C6F') || (input.LA(1) >= '\u0CE6' && input.LA(1) <= '\u0CEF') || (input.LA(1) >= '\u0D66' && input.LA(1) <= '\u0D6F') || (input.LA(1) >= '\u0E50' && input.LA(1) <= '\u0E59') || (input.LA(1) >= '\u0ED0' && input.LA(1) <= '\u0ED9') || (input.LA(1) >= '\u1040' && input.LA(1) <= '\u1049')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("DIGIT", 4); LeaveRule("DIGIT", 4); LeaveRule_DIGIT(); } }
private void mECHAR() { EnterRule_ECHAR(); EnterRule("ECHAR", 5); TraceIn("ECHAR", 5); try { // ../Grammars/OslcSearchTerms.g:66:5: ( '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) ) DebugEnterAlt(1); // ../Grammars/OslcSearchTerms.g:66:7: '\\\\' ( 't' | 'b' | 'n' | 'r' | 'f' | '\\\\' | '\"' | '\\'' ) { DebugLocation(66, 7); Match('\\'); DebugLocation(66, 12); if (input.LA(1) == '\"' || input.LA(1) == '\'' || input.LA(1) == '\\' || input.LA(1) == 'b' || input.LA(1) == 'f' || input.LA(1) == 'n' || input.LA(1) == 'r' || input.LA(1) == 't') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("ECHAR", 5); LeaveRule("ECHAR", 5); LeaveRule_ECHAR(); } }
private void mDIGIT() { EnterRule_DIGIT(); EnterRule("DIGIT", 10); TraceIn("DIGIT", 10); try { // ../Grammars/OslcPrefix.g:101:5: ( '0' .. '9' ) DebugEnterAlt(1); // ../Grammars/OslcPrefix.g: { DebugLocation(101, 5); if ((input.LA(1) >= '0' && input.LA(1) <= '9')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } } } finally { TraceOut("DIGIT", 10); LeaveRule("DIGIT", 10); LeaveRule_DIGIT(); } }
private void mWS() { try { int _type = WS; int _channel = DefaultTokenChannel; // C:\\Projects\\lokad-codedsl\\Source\\MessageContracts\\MessageContracts.g:88:5: ( ( ' ' | '\\t' | '\\r' | '\\n' ) ) DebugEnterAlt(1); // C:\\Projects\\lokad-codedsl\\Source\\MessageContracts\\MessageContracts.g:88:9: ( ' ' | '\\t' | '\\r' | '\\n' ) { DebugLocation(88, 9); if ((input.LA(1) >= '\t' && input.LA(1) <= '\n') || input.LA(1) == '\r' || input.LA(1) == ' ') { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); Recover(mse); throw mse; } DebugLocation(92, 11); _channel = HIDDEN; } state.type = _type; state.channel = _channel; } finally { } }
// $ANTLR end "T__45" // $ANTLR start "TSTRING" public void mTSTRING() // throws RecognitionException [2] { try { int _type = TSTRING; int _channel = DEFAULT_TOKEN_CHANNEL; // ..\\Source\\Antlr.Grammars\\Dhsq.g:176:5: ( SQUOTE (~ '\\'' )* SQUOTE ) // ..\\Source\\Antlr.Grammars\\Dhsq.g:176:7: SQUOTE (~ '\\'' )* SQUOTE { mSQUOTE(); // ..\\Source\\Antlr.Grammars\\Dhsq.g:176:14: (~ '\\'' )* do { int alt1 = 2; int LA1_0 = input.LA(1); if (((LA1_0 >= '\u0000' && LA1_0 <= '&') || (LA1_0 >= '(' && LA1_0 <= '\uFFFF'))) { alt1 = 1; } switch (alt1) { case 1: // ..\\Source\\Antlr.Grammars\\Dhsq.g:176:15: ~ '\\'' { if ((input.LA(1) >= '\u0000' && input.LA(1) <= '&') || (input.LA(1) >= '(' && input.LA(1) <= '\uFFFF')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } } break; default: goto loop1; } } while (true); loop1: ; // Stops C# compiler whining that label 'loop1' has no statements mSQUOTE(); Text = Text.Substring(1, Text.Length - 2); } state.type = _type; state.channel = _channel; } finally { } }
public virtual string GetErrorMessage(RecognitionException e, string[] tokenNames) { string result = e.Message; if (e is UnwantedTokenException) { UnwantedTokenException ex = (UnwantedTokenException)e; string text = "<unknown>"; text = ((ex.Expecting != -1) ? tokenNames[ex.Expecting] : "EndOfFile"); result = "extraneous input " + this.GetTokenErrorDisplay(ex.UnexpectedToken) + " expecting " + text; } else if (e is MissingTokenException) { MissingTokenException ex2 = (MissingTokenException)e; string text2 = "<unknown>"; text2 = ((ex2.Expecting != -1) ? tokenNames[ex2.Expecting] : "EndOfFile"); result = "missing " + text2 + " at " + this.GetTokenErrorDisplay(e.Token); } else if (e is MismatchedTokenException) { MismatchedTokenException ex3 = (MismatchedTokenException)e; string text3 = "<unknown>"; text3 = ((ex3.Expecting != -1) ? tokenNames[ex3.Expecting] : "EndOfFile"); result = "mismatched input " + this.GetTokenErrorDisplay(e.Token) + " expecting " + text3; } else if (e is MismatchedTreeNodeException) { MismatchedTreeNodeException ex4 = (MismatchedTreeNodeException)e; string text4 = "<unknown>"; text4 = ((ex4.Expecting != -1) ? tokenNames[ex4.Expecting] : "EndOfFile"); string str = (ex4.Node != null) ? (ex4.Node.ToString() ?? string.Empty) : string.Empty; result = "mismatched tree node: " + str + " expecting " + text4; } else if (e is NoViableAltException) { result = "no viable alternative at input " + this.GetTokenErrorDisplay(e.Token); } else if (e is EarlyExitException) { result = "required (...)+ loop did not match anything at input " + this.GetTokenErrorDisplay(e.Token); } else if (e is MismatchedSetException) { MismatchedSetException ex5 = (MismatchedSetException)e; result = "mismatched input " + this.GetTokenErrorDisplay(e.Token) + " expecting set " + ex5.Expecting; } else if (e is MismatchedNotSetException) { MismatchedNotSetException ex6 = (MismatchedNotSetException)e; result = "mismatched input " + this.GetTokenErrorDisplay(e.Token) + " expecting set " + ex6.Expecting; } else if (e is FailedPredicateException) { FailedPredicateException ex7 = (FailedPredicateException)e; result = "rule " + ex7.RuleName + " failed predicate: {" + ex7.PredicateText + "}?"; } return(result); }
// $ANTLR end "OctalEscape" // $ANTLR start "STRING" public void mSTRING() // throws RecognitionException [2] { try { int _type = STRING; int _channel = DEFAULT_TOKEN_CHANNEL; // E:\\DEVELOP\\Visual Studio Projects\\Vsual Studio 2010\\GameEngineSlimDX\\GEngine\\ResourcesManagers\\FBXParser\\fbx.g:49:8: ( '\"' (~ ( '\"' ) )* '\"' ) // E:\\DEVELOP\\Visual Studio Projects\\Vsual Studio 2010\\GameEngineSlimDX\\GEngine\\ResourcesManagers\\FBXParser\\fbx.g:49:10: '\"' (~ ( '\"' ) )* '\"' { Match('\"'); // E:\\DEVELOP\\Visual Studio Projects\\Vsual Studio 2010\\GameEngineSlimDX\\GEngine\\ResourcesManagers\\FBXParser\\fbx.g:49:14: (~ ( '\"' ) )* do { int alt13 = 2; int LA13_0 = input.LA(1); if (((LA13_0 >= '\u0000' && LA13_0 <= '!') || (LA13_0 >= '#' && LA13_0 <= '\uFFFF'))) { alt13 = 1; } switch (alt13) { case 1: // E:\\DEVELOP\\Visual Studio Projects\\Vsual Studio 2010\\GameEngineSlimDX\\GEngine\\ResourcesManagers\\FBXParser\\fbx.g:49:16: ~ ( '\"' ) { if ((input.LA(1) >= '\u0000' && input.LA(1) <= '!') || (input.LA(1) >= '#' && input.LA(1) <= '\uFFFF')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } } break; default: goto loop13; } } while (true); loop13: ; // Stops C# compiler whining that label 'loop13' has no statements Match('\"'); } state.type = _type; state.channel = _channel; } finally { } }
// $ANTLR end "T__11" // $ANTLR start "IDENTIFIER" private void mIDENTIFIER() { try { int _type = IDENTIFIER; int _channel = DefaultTokenChannel; // FastSimpleExpression.g3:78:4: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) // FastSimpleExpression.g3:78:4: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* { if ((input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) { input.Consume(); } else { MismatchedSetException mse = new MismatchedSetException(null, input); Recover(mse); throw mse; } // FastSimpleExpression.g3:79:3: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* while (true) { int alt1 = 2; int LA1_0 = input.LA(1); if (((LA1_0 >= '0' && LA1_0 <= '9') || (LA1_0 >= 'A' && LA1_0 <= 'Z') || LA1_0 == '_' || (LA1_0 >= 'a' && LA1_0 <= 'z'))) { alt1 = 1; } switch (alt1) { case 1: // FastSimpleExpression.g3: { input.Consume(); } break; default: goto loop1; } } loop1: ; } state.type = _type; state.channel = _channel; } finally { } }
private void loopStmt() { EnterRule_loopStmt(); EnterRule("loopStmt", 3); TraceIn("loopStmt", 3); try { DebugEnterRule(GrammarFileName, "loopStmt"); DebugLocation(45, 1); try { // Analyze.g:46:2: ( ( WHILE_STMT | FOR_STMT | DO_WHILE_STMT ) ) DebugEnterAlt(1); // Analyze.g:46:4: ( WHILE_STMT | FOR_STMT | DO_WHILE_STMT ) { DebugLocation(46, 4); if (input.LA(1) == DO_WHILE_STMT || input.LA(1) == FOR_STMT || input.LA(1) == WHILE_STMT) { input.Consume(); state.errorRecovery = false; state.failed = false; } else { if (state.backtracking > 0) { state.failed = true; return; } MismatchedSetException mse = new MismatchedSetException(null, input); DebugRecognitionException(mse); throw mse; } DebugLocation(47, 3); if (state.backtracking == 1) { if (currentBranch != null) { LoopStatement loop = new LoopStatement(currentBranch); currentBranch.SetNextStatement(loop); currentBranch = loop; } } } } catch (RecognitionException re) { ReportError(re); Recover(input, re); } finally { TraceOut("loopStmt", 3); LeaveRule("loopStmt", 3); LeaveRule_loopStmt(); } DebugLocation(55, 1); } finally { DebugExitRule(GrammarFileName, "loopStmt"); } return; }