• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Runtime.MismatchedSetException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Antlr.Runtime.MismatchedSetException的典型用法代码示例。如果您正苦于以下问题:C# MismatchedSetException类的具体用法?C# MismatchedSetException怎么用?C# MismatchedSetException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MismatchedSetException类属于Antlr.Runtime命名空间,在下文中一共展示了MismatchedSetException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: typeArgument


//.........这里部分代码省略.........
				PushFollow(Follow._type_in_typeArgument2975);
				type188=type();
				PopFollow();
				if (state.failed) return retval;
				if (state.backtracking == 0) adaptor.AddChild(root_0, type188.Tree);

				}
				break;
			case 2:
				DebugEnterAlt(2);
				// Java.g:655:9: '?' ( ( 'extends' | 'super' ) type )?
				{
				root_0 = (object)adaptor.Nil();

				DebugLocation(655, 9);
				char_literal189=(IToken)Match(input,QUES,Follow._QUES_in_typeArgument2985); if (state.failed) return retval;
				if (state.backtracking == 0) {
				char_literal189_tree = (object)adaptor.Create(char_literal189);
				adaptor.AddChild(root_0, char_literal189_tree);
				}
				DebugLocation(656, 9);
				// Java.g:656:9: ( ( 'extends' | 'super' ) type )?
				int alt69=2;
				try { DebugEnterSubRule(69);
				try { DebugEnterDecision(69, false);
				int LA69_1 = input.LA(1);

				if ((LA69_1==EXTENDS||LA69_1==SUPER))
				{
					alt69 = 1;
				}
				} finally { DebugExitDecision(69); }
				switch (alt69)
				{
				case 1:
					DebugEnterAlt(1);
					// Java.g:657:13: ( 'extends' | 'super' ) type
					{
					DebugLocation(657, 13);

					set190=(IToken)input.LT(1);
					if (input.LA(1)==EXTENDS||input.LA(1)==SUPER)
					{
						input.Consume();
						if (state.backtracking == 0) adaptor.AddChild(root_0, (object)adaptor.Create(set190));
						state.errorRecovery=false;state.failed=false;
					}
					else
					{
						if (state.backtracking>0) {state.failed=true; return retval;}
						MismatchedSetException mse = new MismatchedSetException(null,input);
						DebugRecognitionException(mse);
						throw mse;
					}

					DebugLocation(660, 13);
					PushFollow(Follow._type_in_typeArgument3053);
					type191=type();
					PopFollow();
					if (state.failed) return retval;
					if (state.backtracking == 0) adaptor.AddChild(root_0, type191.Tree);

					}
					break;

				}
				} finally { DebugExitSubRule(69); }


				}
				break;

			}
			retval.Stop = (IToken)input.LT(-1);

			if (state.backtracking == 0) {
			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("typeArgument", 37);
			LeaveRule("typeArgument", 37);
			LeaveRule_typeArgument();
			if (state.backtracking > 0) { Memoize(input, 37, typeArgument_StartIndex); }

		}
		DebugLocation(662, 4);
		} finally { DebugExitRule(GrammarFileName, "typeArgument"); }
		return retval;

	}
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:101,代码来源:JavaParser.cs


示例2: mESC

	private void mESC()
	{
		Enter_ESC();
		EnterRule("ESC", 47);
		TraceIn("ESC", 47);
		try
		{
			// C:\\Users\\Oscar\\Documents\\Visual Studio 2010\\Projects\\TigerNET\\Grammar\\Tiger.g:86:14: ( '\\\\' ( 'n' | 't' | '\\\\' | '\"' ) )
			DebugEnterAlt(1);
			// C:\\Users\\Oscar\\Documents\\Visual Studio 2010\\Projects\\TigerNET\\Grammar\\Tiger.g:86:16: '\\\\' ( 'n' | 't' | '\\\\' | '\"' )
			{
			DebugLocation(86, 16);
			Match('\\'); 
			DebugLocation(86, 20);
			if (input.LA(1)=='\"'||input.LA(1)=='\\'||input.LA(1)=='n'||input.LA(1)=='t')
			{
				input.Consume();

			}
			else
			{
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				Recover(mse);
				throw mse;}


			}

		}
		finally
		{
			TraceOut("ESC", 47);
			LeaveRule("ESC", 47);
			Leave_ESC();
		}
	}
开发者ID:omederos,项目名称:TigerNET,代码行数:37,代码来源:TigerLexer.cs


示例3: mCHAR

	private void mCHAR()
	{
		Enter_CHAR();
		EnterRule("CHAR", 49);
		TraceIn("CHAR", 49);
		try
		{
			// C:\\Users\\Oscar\\Documents\\Visual Studio 2010\\Projects\\TigerNET\\Grammar\\Tiger.g:88:15: (~ ( '\\n' | '\\t' | '\\\\' | '\"' | ' ' ) )
			DebugEnterAlt(1);
			// C:\\Users\\Oscar\\Documents\\Visual Studio 2010\\Projects\\TigerNET\\Grammar\\Tiger.g:88:17: ~ ( '\\n' | '\\t' | '\\\\' | '\"' | ' ' )
			{
			DebugLocation(88, 17);
			if ((input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF'))
			{
				input.Consume();

			}
			else
			{
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				Recover(mse);
				throw mse;}


			}

		}
		finally
		{
			TraceOut("CHAR", 49);
			LeaveRule("CHAR", 49);
			Leave_CHAR();
		}
	}
开发者ID:omederos,项目名称:TigerNET,代码行数:35,代码来源:TigerLexer.cs


示例4: number

		// $ANTLR start "number"
		// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:265:1: number : ( INT | FLOAT );
		public number_return number() // throws RecognitionException [1]
		{
			var retval = new number_return();
			retval.Start = input.LT( 1 );

			CommonTree root_0 = null;

			IToken set93 = null;

			CommonTree set93_tree = null;

			try
			{
				// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:266:2: ( INT | FLOAT )
				// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:
				{
					root_0 = (CommonTree)adaptor.GetNilNode();

					set93 = input.LT( 1 );
					if ( ( input.LA( 1 ) >= INT && input.LA( 1 ) <= FLOAT ) )
					{
						input.Consume();
						adaptor.AddChild( root_0, adaptor.Create( set93 ) );
						state.errorRecovery = false;
					}
					else
					{
						var mse = new MismatchedSetException( null, input );
						throw mse;
					}
				}

				retval.Stop = input.LT( -1 );

				retval.Tree = adaptor.RulePostProcessing( root_0 );
				adaptor.SetTokenBoundaries( retval.Tree, (IToken)retval.Start, (IToken)retval.Stop );
			}
			catch ( RecognitionException re )
			{
				ReportError( re );
				Recover( input, re );
				// Conversion of the second argument necessary, but harmless
				retval.Tree = adaptor.ErrorNode( input, (IToken)retval.Start, input.LT( -1 ), re );
			}
			finally {}
			return retval;
		}
开发者ID:ChrisEdwards,项目名称:CalcEngine,代码行数:49,代码来源:AntlrCalcEngineParser.cs


示例5: mWS

    // $ANTLR end "TSTOP"

    // $ANTLR start "WS"
    public void mWS() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = WS;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Development\\TT.Net\\TT\\Template.g:23:4: ( ( '\\r' | '\\n' | '\\t' | ' ' )+ )
            // C:\\Development\\TT.Net\\TT\\Template.g:23:6: ( '\\r' | '\\n' | '\\t' | ' ' )+
            {
            	// C:\\Development\\TT.Net\\TT\\Template.g:23:6: ( '\\r' | '\\n' | '\\t' | ' ' )+
            	int cnt3 = 0;
            	do 
            	{
            	    int alt3 = 2;
            	    int LA3_0 = input.LA(1);

            	    if ( ((LA3_0 >= '\t' && LA3_0 <= '\n') || LA3_0 == '\r' || LA3_0 == ' ') )
            	    {
            	        alt3 = 1;
            	    }


            	    switch (alt3) 
            		{
            			case 1 :
            			    // C:\\Development\\TT.Net\\TT\\Template.g:
            			    {
            			    	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;}


            			    }
            			    break;

            			default:
            			    if ( cnt3 >= 1 ) goto loop3;
            		            EarlyExitException eee3 =
            		                new EarlyExitException(3, input);
            		            throw eee3;
            	    }
            	    cnt3++;
            	} while (true);

            	loop3:
            		;	// Stops C# compiler whining that label 'loop3' has no statements

            	 _channel=HIDDEN; 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
开发者ID:claco,项目名称:tt.net,代码行数:68,代码来源:TemplateLexer.cs


示例6: number

	private AstParserRuleReturnScope<CommonTree, IToken> number()
	{
		EnterRule_number();
		EnterRule("number", 129);
		TraceIn("number", 129);
		AstParserRuleReturnScope<CommonTree, IToken> retval = new AstParserRuleReturnScope<CommonTree, IToken>();
		retval.Start = (IToken)input.LT(1);

		CommonTree root_0 = default(CommonTree);

		IToken set427 = default(IToken);

		CommonTree set427_tree = default(CommonTree);
		try { DebugEnterRule(GrammarFileName, "number");
		DebugLocation(983, 1);
		try
		{
			// AS3.g:983:8: ( HEX_LITERAL | DECIMAL_LITERAL | OCTAL_LITERAL | FLOAT_LITERAL )
			DebugEnterAlt(1);
			// AS3.g:
			{
			root_0 = (CommonTree)adaptor.Nil();

			DebugLocation(983, 8);

			set427=(IToken)input.LT(1);
			if (input.LA(1)==DECIMAL_LITERAL||input.LA(1)==FLOAT_LITERAL||input.LA(1)==HEX_LITERAL||input.LA(1)==OCTAL_LITERAL)
			{
				input.Consume();
				if (state.backtracking == 0) adaptor.AddChild(root_0, (CommonTree)adaptor.Create(set427));
				state.errorRecovery=false;state.failed=false;
			}
			else
			{
				if (state.backtracking>0) {state.failed=true; return retval;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				throw mse;
			}


			}

			retval.Stop = (IToken)input.LT(-1);

			if (state.backtracking == 0) {
			retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
			adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
			}
		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		retval.Tree = (CommonTree)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re);

		}
		finally
		{
			TraceOut("number", 129);
			LeaveRule("number", 129);
			LeaveRule_number();
		}
		DebugLocation(987, 1);
		} finally { DebugExitRule(GrammarFileName, "number"); }
		return retval;

	}
开发者ID:jbakst,项目名称:xas,代码行数:68,代码来源:AS3Parser.cs


示例7: mID

	private void mID()
	{
		EnterRule_ID();
		EnterRule("ID", 6);
		TraceIn("ID", 6);
		try
		{
			int _type = ID;
			int _channel = DefaultTokenChannel;
			// FuncProtoToShim.g:38:4: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
			DebugEnterAlt(1);
			// FuncProtoToShim.g:38:6: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
			{
			DebugLocation(38, 6);
			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);
				DebugRecognitionException(mse);
				Recover(mse);
				throw mse;}

			DebugLocation(38, 30);
			// FuncProtoToShim.g:38:30: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
			try { DebugEnterSubRule(3);
			while (true)
			{
				int alt3=2;
				try { DebugEnterDecision(3, false);
				int LA3_0 = input.LA(1);

				if (((LA3_0>='0' && LA3_0<='9')||(LA3_0>='A' && LA3_0<='Z')||LA3_0=='_'||(LA3_0>='a' && LA3_0<='z')))
				{
					alt3 = 1;
				}


				} finally { DebugExitDecision(3); }
				switch ( alt3 )
				{
				case 1:
					DebugEnterAlt(1);
					// FuncProtoToShim.g:
					{
					DebugLocation(38, 30);
					input.Consume();


					}
					break;

				default:
					goto loop3;
				}
			}

			loop3:
				;

			} finally { DebugExitSubRule(3); }


			}

			state.type = _type;
			state.channel = _channel;
		}
		finally
		{
			TraceOut("ID", 6);
			LeaveRule("ID", 6);
			LeaveRule_ID();
		}
	}
开发者ID:emperorstarfinder,项目名称:phlox,代码行数:78,代码来源:FuncProtoToShimLexer.cs


示例8: mHEX_DIGIT

    private void mHEX_DIGIT()
    {
    	EnterRule_HEX_DIGIT();
    	EnterRule("HEX_DIGIT", 20);
    	TraceIn("HEX_DIGIT", 20);
    		try
    		{
    		// /Users/abdullin/MessageContracts.g:122:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
    		DebugEnterAlt(1);
    		// /Users/abdullin/MessageContracts.g:
    		{
    		DebugLocation(122, 11);
    		if ((input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f'))
    		{
    			input.Consume();
    		}
    		else
    		{
    			MismatchedSetException mse = new MismatchedSetException(null,input);
    			DebugRecognitionException(mse);
    			Recover(mse);
    			throw mse;
    		}


    		}

    	}
    	finally
    	{
    		TraceOut("HEX_DIGIT", 20);
    		LeaveRule("HEX_DIGIT", 20);
    		LeaveRule_HEX_DIGIT();
        }
    }
开发者ID:TeamKnowledge,项目名称:lokad-cqrs,代码行数:35,代码来源:MessageContractsLexer.cs


示例9: mHEX_DIGIT

    private void mHEX_DIGIT()
    {
    	EnterRule_HEX_DIGIT();
    	EnterRule("HEX_DIGIT", 21);
    	TraceIn("HEX_DIGIT", 21);
    		try
    		{
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:135:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
    		DebugEnterAlt(1);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:
    		{
    		DebugLocation(135, 11);
    		if ((input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f'))
    		{
    			input.Consume();
    		}
    		else
    		{
    			MismatchedSetException mse = new MismatchedSetException(null,input);
    			DebugRecognitionException(mse);
    			Recover(mse);
    			throw mse;
    		}


    		}

    	}
    	finally
    	{
    		TraceOut("HEX_DIGIT", 21);
    		LeaveRule("HEX_DIGIT", 21);
    		LeaveRule_HEX_DIGIT();
        }
    }
开发者ID:seburgi,项目名称:lokad-codedsl,代码行数:35,代码来源:MessageContractsLexer.cs


示例10: mWS

    private void mWS()
    {
    	EnterRule_WS();
    	EnterRule("WS", 25);
    	TraceIn("WS", 25);
    		try
    		{
    		int _type = WS;
    		int _channel = DefaultTokenChannel;
    		// /Users/abdullin/MessageContracts.g:147:5: ( ( ' ' | '\\t' | '\\r' | '\\n' ) )
    		DebugEnterAlt(1);
    		// /Users/abdullin/MessageContracts.g:147:9: ( ' ' | '\\t' | '\\r' | '\\n' )
    		{
    		DebugLocation(147, 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(151, 11);
    		_channel=HIDDEN;

    		}

    		state.type = _type;
    		state.channel = _channel;
    	}
    	finally
    	{
    		TraceOut("WS", 25);
    		LeaveRule("WS", 25);
    		LeaveRule_WS();
        }
    }
开发者ID:TeamKnowledge,项目名称:lokad-cqrs,代码行数:41,代码来源:MessageContractsLexer.cs


示例11: mModifier

    private void mModifier()
    {
    	EnterRule_Modifier();
    	EnterRule("Modifier", 17);
    	TraceIn("Modifier", 17);
    		try
    		{
    		int _type = Modifier;
    		int _channel = DefaultTokenChannel;
    		// /Users/abdullin/MessageContracts.g:106:2: ( '?' | '!' | ';' )
    		DebugEnterAlt(1);
    		// /Users/abdullin/MessageContracts.g:
    		{
    		DebugLocation(106, 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
    	{
    		TraceOut("Modifier", 17);
    		LeaveRule("Modifier", 17);
    		LeaveRule_Modifier();
        }
    }
开发者ID:TeamKnowledge,项目名称:lokad-cqrs,代码行数:39,代码来源:MessageContractsLexer.cs


示例12: mIDENTIFIER_START_ASCII

	private void mIDENTIFIER_START_ASCII()
	{
		EnterRule_IDENTIFIER_START_ASCII();
		EnterRule("IDENTIFIER_START_ASCII", 25);
		TraceIn("IDENTIFIER_START_ASCII", 25);
		try
		{
			// ..\\..\\NameParsing\\CSharpNames.g:184:2: ( 'a' .. 'z' | 'A' .. 'Z' | '_' )
			DebugEnterAlt(1);
			// ..\\..\\NameParsing\\CSharpNames.g:
			{
			DebugLocation(184, 2);
			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);
				DebugRecognitionException(mse);
				Recover(mse);
				throw mse;
			}


			}

		}
		finally
		{
			TraceOut("IDENTIFIER_START_ASCII", 25);
			LeaveRule("IDENTIFIER_START_ASCII", 25);
			LeaveRule_IDENTIFIER_START_ASCII();
		}
	}
开发者ID:modulexcite,项目名称:CSharpSyntax,代码行数:35,代码来源:CSharpNamesLexer.cs


示例13: association

    // $ANTLR end "method"


    // $ANTLR start "association"
    // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:79:1: association returns [Association association] : (ma= multiplicity )? (labelA= label )? a= ( SIMPLE_ASSOCIATION | DIRECTIONAL_ASSOCIATION | BIDECTIONAL_ASSOCIATION | INHERRITANCE_ASSOCIATION ) (labelB= label )? (mb= multiplicity )? ;
    public Association association() // throws RecognitionException [1]
    {   
        Association association = default(Association);

        IToken a = null;
        string ma = default(string);

        string labelA = default(string);

        string labelB = default(string);

        string mb = default(string);


        association = new Association();
        try 
    	{
            // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:80:2: ( (ma= multiplicity )? (labelA= label )? a= ( SIMPLE_ASSOCIATION | DIRECTIONAL_ASSOCIATION | BIDECTIONAL_ASSOCIATION | INHERRITANCE_ASSOCIATION ) (labelB= label )? (mb= multiplicity )? )
            // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:2: (ma= multiplicity )? (labelA= label )? a= ( SIMPLE_ASSOCIATION | DIRECTIONAL_ASSOCIATION | BIDECTIONAL_ASSOCIATION | INHERRITANCE_ASSOCIATION ) (labelB= label )? (mb= multiplicity )?
            {
            	// D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:5: (ma= multiplicity )?
            	int alt11 = 2;
            	int LA11_0 = input.LA(1);

            	if ( (LA11_0 == MM) )
            	{
            	    alt11 = 1;
            	}
            	switch (alt11) 
            	{
            	    case 1 :
            	        // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:5: ma= multiplicity
            	        {
            	        	PushFollow(FOLLOW_multiplicity_in_association276);
            	        	ma = multiplicity();
            	        	state.followingStackPointer--;


            	        }
            	        break;

            	}

            	// D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:28: (labelA= label )?
            	int alt12 = 2;
            	int LA12_0 = input.LA(1);

            	if ( (LA12_0 == 21) )
            	{
            	    alt12 = 1;
            	}
            	switch (alt12) 
            	{
            	    case 1 :
            	        // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:28: labelA= label
            	        {
            	        	PushFollow(FOLLOW_label_in_association283);
            	        	labelA = label();
            	        	state.followingStackPointer--;


            	        }
            	        break;

            	}

            	a = (IToken)input.LT(1);
            	if ( (input.LA(1) >= SIMPLE_ASSOCIATION && input.LA(1) <= INHERRITANCE_ASSOCIATION) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;
            	}
            	else 
            	{
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}

            	// D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:150: (labelB= label )?
            	int alt13 = 2;
            	int LA13_0 = input.LA(1);

            	if ( (LA13_0 == 21) )
            	{
            	    alt13 = 1;
            	}
            	switch (alt13) 
            	{
            	    case 1 :
            	        // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:81:150: labelB= label
            	        {
            	        	PushFollow(FOLLOW_label_in_association312);
            	        	labelB = label();
            	        	state.followingStackPointer--;

//.........这里部分代码省略.........
开发者ID:osdezwart,项目名称:WikiUml,代码行数:101,代码来源:WikiUmlParser.cs


示例14: explicitConstructorInvocation


//.........这里部分代码省略.........
				}
				} finally { DebugExitDecision(77); }
				switch (alt77)
				{
				case 1:
					DebugEnterAlt(1);
					// Java.g:702:10: nonWildcardTypeArguments
					{
					DebugLocation(702, 10);
					PushFollow(Follow._nonWildcardTypeArguments_in_explicitConstructorInvocation3371);
					nonWildcardTypeArguments214=nonWildcardTypeArguments();
					PopFollow();
					if (state.failed) return retval;
					if (state.backtracking == 0) adaptor.AddChild(root_0, nonWildcardTypeArguments214.Tree);

					}
					break;

				}
				} finally { DebugExitSubRule(77); }

				DebugLocation(704, 9);

				set215=(IToken)input.LT(1);
				if (input.LA(1)==SUPER||input.LA(1)==THIS)
				{
					input.Consume();
					if (state.backtracking == 0) adaptor.AddChild(root_0, (object)adaptor.Create(set215));
					state.errorRecovery=false;state.failed=false;
				}
				else
				{
					if (state.backtracking>0) {state.failed=true; return retval;}
					MismatchedSetException mse = new MismatchedSetException(null,input);
					DebugRecognitionException(mse);
					throw mse;
				}

				DebugLocation(707, 9);
				PushFollow(Follow._arguments_in_explicitConstructorInvocation3429);
				arguments216=arguments();
				PopFollow();
				if (state.failed) return retval;
				if (state.backtracking == 0) adaptor.AddChild(root_0, arguments216.Tree);
				DebugLocation(707, 19);
				char_literal217=(IToken)Match(input,SEMI,Follow._SEMI_in_explicitConstructorInvocation3431); if (state.failed) return retval;
				if (state.backtracking == 0) {
				char_literal217_tree = (object)adaptor.Create(char_literal217);
				adaptor.AddChild(root_0, char_literal217_tree);
				}

				}
				break;
			case 2:
				DebugEnterAlt(2);
				// Java.g:709:9: primary '.' ( nonWildcardTypeArguments )? 'super' arguments ';'
				{
				root_0 = (object)adaptor.Nil();

				DebugLocation(709, 9);
				PushFollow(Follow._primary_in_explicitConstructorInvocation3442);
				primary218=primary();
				PopFollow();
				if (state.failed) return retval;
				if (state.backtracking == 0) adaptor.AddChild(root_0, primary218.Tree);
				DebugLocation(710, 9);
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:67,代码来源:JavaParser.cs


示例15: relationalOperator

	private AstParserRuleReturnScope<CommonTree, IToken> relationalOperator()
	{
		EnterRule_relationalOperator();
		EnterRule("relationalOperator", 110);
		TraceIn("relationalOperator", 110);
		AstParserRuleReturnScope<CommonTree, IToken> retval = new AstParserRuleReturnScope<CommonTree, IToken>();
		retval.Start = (IToken)input.LT(1);

		CommonTree root_0 = default(CommonTree);

		IToken set350 = default(IToken);

		CommonTree set350_tree = default(CommonTree);
		try { DebugEnterRule(GrammarFileName, "relationalOperator");
		DebugLocation(828, 1);
		try
		{
			// AS3.g:829:2: ( LT | GT | LE | GE | IS | AS | 'instanceof' )
			DebugEnterAlt(1);
			// AS3.g:
			{
			root_0 = (CommonTree)adaptor.Nil();

			DebugLocation(829, 2);

			set350=(IToken)input.LT(1);
			if (input.LA(1)==AS||input.LA(1)==GE||input.LA(1)==GT||input.LA(1)==IS||input.LA(1)==LE||input.LA(1)==LT||input.LA(1)==249)
			{
				input.Consume();
				if (state.backtracking == 0) adaptor.AddChild(root_0, (CommonTree)adaptor.Create(set350));
				state.errorRecovery=false;state.failed=false;
			}
			else
			{
				if (state.backtracking>0) {state.failed=true; return retval;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				throw mse;
			}


			}

			retval.Stop = (IToken)input.LT(-1);

			if (state.backtracking == 0) {
			retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
			adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
			}
		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		retval.Tree = (CommonTree)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re);

		}
		finally
		{
			TraceOut("relationalOperator", 110);
			LeaveRule("relationalOperator", 110);
			LeaveRule_relationalOperator();
		}
		DebugLocation(830, 1);
		} finally { DebugExitRule(GrammarFileName, "relationalOperator"); }
		return retval;

	}
开发者ID:jbakst,项目名称:xas,代码行数:68,代码来源:AS3Parser.cs


示例16: mWS

    private void mWS()
    {
    	EnterRule_WS();
    	EnterRule("WS", 26);
    	TraceIn("WS", 26);
    		try
    		{
    		int _type = WS;
    		int _channel = DefaultTokenChannel;
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:160:5: ( ( ' ' | '\\t' | '\\r' | '\\n' ) )
    		DebugEnterAlt(1);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:160:9: ( ' ' | '\\t' | '\\r' | '\\n' )
    		{
    		DebugLocation(160, 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(164, 11);
    		_channel=HIDDEN;

    		}

    		state.type = _type;
    		state.channel = _channel;
    	}
    	finally
    	{
    		TraceOut("WS", 26);
    		LeaveRule("WS", 26);
    		LeaveRule_WS();
        }
    }
开发者ID:seburgi,项目名称:lokad-codedsl,代码行数:41,代码来源:MessageContractsLexer.cs


示例17: multiplicativeOperator

	private AstParserRuleReturnScope<CommonTree, IToken> multiplicativeOperator()
	{
		EnterRule_multiplicativeOperator();
		EnterRule("multiplicativeOperator", 116);
		TraceIn("multiplicativeOperator", 116);
		AstParserRuleReturnScope<CommonTree, IToken> retval = new AstParserRuleReturnScope<CommonTree, IToken>();
		retval.Start = (IToken)input.LT(1);

		CommonTree root_0 = default(CommonTree);

		IToken set362 = default(IToken);

		CommonTree set362_tree = default(CommonTree);
		try { DebugEnterRule(GrammarFileName, "multiplicativeOperator");
		DebugLocation(859, 1);
		try
		{
			// AS3.g:860:2: ( STAR | DIV | MOD )
			DebugEnterAlt(1);
			// AS3.g:
			{
			root_0 = (CommonTree)adaptor.Nil();

			DebugLocation(860, 2);

			set362=(IToken)input.LT(1);
			if (input.LA(1)==DIV||input.LA(1)==MOD||input.LA(1)==STAR)
			{
				input.Consume();
				if (state.backtracking == 0) adaptor.AddChild(root_0, (CommonTree)adaptor.Create(set362));
				state.errorRecovery=false;state.failed=false;
			}
			else
			{
				if (state.backtracking>0) {state.failed=true; return retval;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				throw mse;
			}


			}

			retval.Stop = (IToken)input.LT(-1);

			if (state.backtracking == 0) {
			retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
			adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
			}
		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		retval.Tree = (CommonTree)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re);

		}
		finally
		{
			TraceOut("multiplicativeOperator", 116);
			LeaveRule("multiplicativeOperator", 116);
			LeaveRule_multiplicativeOperator();
		}
		DebugLocation(861, 1);
		} finally { DebugExitRule(GrammarFileName, "multiplicativeOperator"); }
		return retval;

	}
开发者ID:jbakst,项目名称:xas,代码行数:68,代码来源:AS3Parser.cs


示例18: mID

    private void mID()
    {
    	EnterRule_ID();
    	EnterRule("ID", 17);
    	TraceIn("ID", 17);
    		try
    		{
    		int _type = ID;
    		int _channel = DefaultTokenChannel;
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:115:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '<' | '>' | '[' | ']' )* )
    		DebugEnterAlt(1);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:115:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '<' | '>' | '[' | ']' )*
    		{
    		DebugLocation(115, 7);
    		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);
    			DebugRecognitionException(mse);
    			Recover(mse);
    			throw mse;
    		}

    		DebugLocation(115, 30);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:115:30: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '<' | '>' | '[' | ']' )*
    		try { DebugEnterSubRule(1);
    		while (true)
    		{
    			int alt1=2;
    			try { DebugEnterDecision(1, decisionCanBacktrack[1]);
    			int LA1_0 = input.LA(1);

    			if (((LA1_0>='0' && LA1_0<='9')||LA1_0=='<'||LA1_0=='>'||(LA1_0>='A' && LA1_0<='[')||LA1_0==']'||LA1_0=='_'||(LA1_0>='a' && LA1_0<='z')))
    			{
    				alt1 = 1;
    			}


    			} finally { DebugExitDecision(1); }
    			switch ( alt1 )
    			{
    			case 1:
    				DebugEnterAlt(1);
    				// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:
    				{
    				DebugLocation(115, 30);
    				input.Consume();


    				}
    				break;

    			default:
    				goto loop1;
    			}
    		}

    		loop1:
    			;

    		} finally { DebugExitSubRule(1); }


    		}

    		state.type = _type;
    		state.channel = _channel;
    	}
    	finally
    	{
    		TraceOut("ID", 17);
    		LeaveRule("ID", 17);
    		LeaveRule_ID();
        }
    }
开发者ID:seburgi,项目名称:lokad-codedsl,代码行数:78,代码来源:MessageContractsLexer.cs


示例19: varOrConst

	private AstParserRuleReturnScope<CommonTree, IToken> varOrConst()
	{
		EnterRule_varOrConst();
		EnterRule("varOrConst", 29);
		TraceIn("varOrConst", 29);
		AstParserRuleReturnScope<CommonTree, IToken> retval = new AstParserRuleReturnScope<CommonTree, IToken>();
		retval.Start = (IToken)input.LT(1);

		CommonTree root_0 = default(CommonTree);

		IToken set99 = default(IToken);

		CommonTree set99_tree = default(CommonTree);
		try { DebugEnterRule(GrammarFileName, "varOrConst");
		DebugLocation(308, 1);
		try
		{
			// AS3.g:309:2: ( VAR | CONST )
			DebugEnterAlt(1);
			// AS3.g:
			{
			root_0 = (CommonTree)adaptor.Nil();

			DebugLocation(309, 2);

			set99=(IToken)input.LT(1);
			if (input.LA(1)==CONST||input.LA(1)==VAR)
			{
				input.Consume();
				if (state.backtracking == 0) adaptor.AddChild(root_0, (CommonTree)adaptor.Create(set99));
				state.errorRecovery=false;state.failed=false;
			}
			else
			{
				if (state.backtracking>0) {state.failed=true; return retval;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				throw mse;
			}


			}

			retval.Stop = (IToken)input.LT(-1);

			if (state.backtracking == 0) {
			retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
			adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
			}
		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		retval.Tree = (CommonTree)adaptor.ErrorNode(input, retval.Start, input.LT(-1), re);

		}
		finally
		{
			TraceOut("varOrConst", 29);
			LeaveRule("varOrConst", 29);
			LeaveRule_varOrConst();
		}
		DebugLocation(310, 1);
		} finally { DebugExitRule(GrammarFileName, "varOrConst"); }
		return retval;

	}
开发者ID:jbakst,项目名称:xas,代码行数:68,代码来源:AS3Parser.cs


示例20: mModifier

    private void mModifier()
    {
    	EnterRule_Modifier();
    	EnterRule("Modifier", 18);
    	TraceIn("Modifier", 18);
    		try
    		{
    		int _type = Modifier;
    		int _channel = DefaultTokenChannel;
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:119:2: ( '?' | '!' | ';' )
    		DebugEnterAlt(1);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:
    		{
    		DebugLocation(119, 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
    	{
    		TraceOut("Modifier", 18);
    		LeaveRule("Modifier", 18);
    		LeaveRule_Modifier();
        }
    }
开发者ID:seburgi,项目名称:lokad-codedsl,代码行数:39,代码来源:MessageContractsLexer.cs



注:本文中的Antlr.Runtime.MismatchedSetException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Runtime.NoViableAltException类代码示例发布时间:2022-05-24
下一篇:
C# Runtime.EarlyExitException类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap