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

C# Runtime.EarlyExitException类代码示例

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

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



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

示例1: mInteger

	private void mInteger()
	{
		EnterRule_Integer();
		EnterRule("Integer", 35);
		TraceIn("Integer", 35);
		try
		{
			int _type = Integer;
			int _channel = DefaultTokenChannel;
			// Grammar\\SimpleC.g:277:8: ( ( '0' .. '9' )+ )
			DebugEnterAlt(1);
			// Grammar\\SimpleC.g:278:2: ( '0' .. '9' )+
			{
			DebugLocation(278, 2);
			// Grammar\\SimpleC.g:278:2: ( '0' .. '9' )+
			int cnt2=0;
			try { DebugEnterSubRule(2);
			while (true)
			{
				int alt2=2;
				try { DebugEnterDecision(2, false);
				int LA2_0 = input.LA(1);

				if (((LA2_0>='0' && LA2_0<='9')))
				{
					alt2 = 1;
				}


				} finally { DebugExitDecision(2); }
				switch (alt2)
				{
				case 1:
					DebugEnterAlt(1);
					// Grammar\\SimpleC.g:
					{
					DebugLocation(278, 2);
					input.Consume();


					}
					break;

				default:
					if (cnt2 >= 1)
						goto loop2;

					EarlyExitException eee2 = new EarlyExitException( 2, input );
					DebugRecognitionException(eee2);
					throw eee2;
				}
				cnt2++;
			}
			loop2:
				;

			} finally { DebugExitSubRule(2); }


			}

			state.type = _type;
			state.channel = _channel;
		}
		finally
		{
			TraceOut("Integer", 35);
			LeaveRule("Integer", 35);
			LeaveRule_Integer();
		}
	}
开发者ID:chursin-andrey,项目名称:CCompiler,代码行数:71,代码来源:SimpleCLexer.cs


示例2: propertyModifiers


//.........这里部分代码省略.........
									var root_1 = (CommonTree)adaptor.GetNilNode();
									root_1 = (CommonTree)adaptor.BecomeRoot( adaptor.Create( MODIFIERS, "MODIFIERS" ), root_1 );

									adaptor.AddChild( root_1, stream_exclusivePropertyModifier.NextTree() );

									adaptor.AddChild( root_0, root_1 );
								}
							}

							retval.Tree = root_0;
							retval.Tree = root_0;
						}
						break;
					case 2:
						// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:102:4: ( propertyModifier )+
						{
							// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:102:4: ( propertyModifier )+
							int cnt7 = 0;
							do
							{
								int alt7 = 2;
								int LA7_0 = input.LA( 1 );

								if ( ( ( LA7_0 >= 65 && LA7_0 <= 66 ) ) )
									alt7 = 1;


								switch ( alt7 )
								{
									case 1:
										// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:102:4: propertyModifier
										{
											PushFollow( FOLLOW_propertyModifier_in_propertyModifiers434 );
											propertyModifier22 = propertyModifier();
											state.followingStackPointer--;

											stream_propertyModifier.Add( propertyModifier22.Tree );
										}
										break;

									default:
										if ( cnt7 >= 1 ) goto loop7;
										var eee7 =
												new EarlyExitException( 7, input );
										throw eee7;
								}
								cnt7++;
							} while ( true );

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


							// AST REWRITE
							// elements:          propertyModifier
							// token labels:      
							// rule labels:       retval
							// token list labels: 
							// rule list labels:  
							// wildcard labels: 
							retval.Tree = root_0;
							var stream_retval = new RewriteRuleSubtreeStream( adaptor, "rule retval", retval != null ? retval.Tree : null );

							root_0 = (CommonTree)adaptor.GetNilNode();
							// 102:22: -> ^( MODIFIERS ( propertyModifier )+ )
							{
								// C:\\Projects\\CalcEngine\\src\\CalcEngine\\Parsers\\Antlr\\AntlrCalcEngine.g:102:25: ^( MODIFIERS ( propertyModifier )+ )
								{
									var root_1 = (CommonTree)adaptor.GetNilNode();
									root_1 = (CommonTree)adaptor.BecomeRoot( adaptor.Create( MODIFIERS, "MODIFIERS" ), root_1 );

									if ( !( stream_propertyModifier.HasNext() ) ) throw new RewriteEarlyExitException();
									while ( stream_propertyModifier.HasNext() )
										adaptor.AddChild( root_1, stream_propertyModifier.NextTree() );
									stream_propertyModifier.Reset();

									adaptor.AddChild( root_0, root_1 );
								}
							}

							retval.Tree = root_0;
							retval.Tree = root_0;
						}
						break;
				}
				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,代码行数:101,代码来源:AntlrCalcEngineParser.cs


示例3: 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


示例4: mLETTERS

	private void mLETTERS()
	{
		EnterRule_LETTERS();
		EnterRule("LETTERS", 40);
		TraceIn("LETTERS", 40);
		try
		{
			int _type = LETTERS;
			int _channel = DefaultTokenChannel;
			// FlashTeaseScript.g:229:2: ( ( 'a' .. 'z' | 'A' .. 'Z' )+ )
			DebugEnterAlt(1);
			// FlashTeaseScript.g:229:4: ( 'a' .. 'z' | 'A' .. 'Z' )+
			{
			DebugLocation(229, 4);
			// FlashTeaseScript.g:229:4: ( 'a' .. 'z' | 'A' .. 'Z' )+
			int cnt5=0;
			try { DebugEnterSubRule(5);
			while (true)
			{
				int alt5=2;
				try { DebugEnterDecision(5, false);
				int LA5_0 = input.LA(1);

				if (((LA5_0>='A' && LA5_0<='Z')||(LA5_0>='a' && LA5_0<='z')))
				{
					alt5 = 1;
				}


				} finally { DebugExitDecision(5); }
				switch (alt5)
				{
				case 1:
					DebugEnterAlt(1);
					// FlashTeaseScript.g:
					{
					DebugLocation(229, 4);
					input.Consume();


					}
					break;

				default:
					if (cnt5 >= 1)
						goto loop5;

					EarlyExitException eee5 = new EarlyExitException( 5, input );
					DebugRecognitionException(eee5);
					throw eee5;
				}
				cnt5++;
			}
			loop5:
				;

			} finally { DebugExitSubRule(5); }


			}

			state.type = _type;
			state.channel = _channel;
		}
		finally
		{
			TraceOut("LETTERS", 40);
			LeaveRule("LETTERS", 40);
			LeaveRule_LETTERS();
		}
	}
开发者ID:d3vi0n,项目名称:TeaseMe,代码行数:71,代码来源:FlashTeaseScriptLexer.cs


示例5: structdec

    // $ANTLR start "structdec"
    // Interp.g:93:1: structdec returns [StructDeclaration ret] : ( 'Struct' variable '{' (el1= structvardec )+ '}' ) END_OF_STATEMENT ;
    public InterpParser.structdec_return structdec() // throws RecognitionException [1]
    {   
        InterpParser.structdec_return retval = new InterpParser.structdec_return();
        retval.Start = input.LT(1);

        object root_0 = null;

        IToken string_literal26 = null;
        IToken char_literal28 = null;
        IToken char_literal29 = null;
        IToken END_OF_STATEMENT30 = null;
        InterpParser.structvardec_return el1 = null;

        InterpParser.variable_return variable27 = null;


        object string_literal26_tree=null;
        object char_literal28_tree=null;
        object char_literal29_tree=null;
        object END_OF_STATEMENT30_tree=null;


        	retval.ret = new StructDeclaration();
        	
        try 
    	{
            // Interp.g:97:2: ( ( 'Struct' variable '{' (el1= structvardec )+ '}' ) END_OF_STATEMENT )
            // Interp.g:97:4: ( 'Struct' variable '{' (el1= structvardec )+ '}' ) END_OF_STATEMENT
            {
            	root_0 = (object)adaptor.GetNilNode();

            	// Interp.g:97:4: ( 'Struct' variable '{' (el1= structvardec )+ '}' )
            	// Interp.g:97:5: 'Struct' variable '{' (el1= structvardec )+ '}'
            	{
            		string_literal26=(IToken)Match(input,16,FOLLOW_16_in_structdec446); 
            			string_literal26_tree = (object)adaptor.Create(string_literal26);
            			adaptor.AddChild(root_0, string_literal26_tree);

            		PushFollow(FOLLOW_variable_in_structdec448);
            		variable27 = variable();
            		state.followingStackPointer--;

            		adaptor.AddChild(root_0, variable27.Tree);
            		 retval.ret.setName(((variable27 != null) ? variable27.ret : null));
            		char_literal28=(IToken)Match(input,17,FOLLOW_17_in_structdec453); 
            			char_literal28_tree = (object)adaptor.Create(char_literal28);
            			adaptor.AddChild(root_0, char_literal28_tree);

            		// Interp.g:98:6: (el1= structvardec )+
            		int cnt7 = 0;
            		do 
            		{
            		    int alt7 = 2;
            		    int LA7_0 = input.LA(1);

            		    if ( (LA7_0 == TYPE) )
            		    {
            		        alt7 = 1;
            		    }


            		    switch (alt7) 
            			{
            				case 1 :
            				    // Interp.g:98:7: el1= structvardec
            				    {
            				    	PushFollow(FOLLOW_structvardec_in_structdec458);
            				    	el1 = structvardec();
            				    	state.followingStackPointer--;

            				    	adaptor.AddChild(root_0, el1.Tree);
            				    	 retval.ret.setVarType(((el1 != null) ? el1.ret : null));

            				    }
            				    break;

            				default:
            				    if ( cnt7 >= 1 ) goto loop7;
            			            EarlyExitException eee7 =
            			                new EarlyExitException(7, input);
            			            throw eee7;
            		    }
            		    cnt7++;
            		} while (true);

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

            		char_literal29=(IToken)Match(input,18,FOLLOW_18_in_structdec465); 
            			char_literal29_tree = (object)adaptor.Create(char_literal29);
            			adaptor.AddChild(root_0, char_literal29_tree);


            	}

            	END_OF_STATEMENT30=(IToken)Match(input,END_OF_STATEMENT,FOLLOW_END_OF_STATEMENT_in_structdec467); 
            		END_OF_STATEMENT30_tree = (object)adaptor.Create(END_OF_STATEMENT30);
            		adaptor.AddChild(root_0, END_OF_STATEMENT30_tree);
//.........这里部分代码省略.........
开发者ID:shranjan,项目名称:pinac,代码行数:101,代码来源:InterpParser.cs


示例6: diagram

    // $ANTLR start "diagram"
    // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:20:1: diagram returns [Diagram result] : ( ( associated_classes )+ EOF | );
    public Diagram diagram() // throws RecognitionException [1]
    {   
        Diagram result = default(Diagram);


        	result = new Diagram();

        try 
    	{
            // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:23:4: ( ( associated_classes )+ EOF | )
            int alt2 = 2;
            int LA2_0 = input.LA(1);

            if ( ((LA2_0 >= WS && LA2_0 <= LBRACK)) )
            {
                alt2 = 1;
            }
            else if ( (LA2_0 == EOF) )
            {
                alt2 = 2;
            }
            else 
            {
                NoViableAltException nvae_d2s0 =
                    new NoViableAltException("", 2, 0, input);

                throw nvae_d2s0;
            }
            switch (alt2) 
            {
                case 1 :
                    // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:23:5: ( associated_classes )+ EOF
                    {
                    	// D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:23:5: ( associated_classes )+
                    	int cnt1 = 0;
                    	do 
                    	{
                    	    int alt1 = 2;
                    	    int LA1_0 = input.LA(1);

                    	    if ( ((LA1_0 >= WS && LA1_0 <= LBRACK)) )
                    	    {
                    	        alt1 = 1;
                    	    }


                    	    switch (alt1) 
                    		{
                    			case 1 :
                    			    // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:23:6: associated_classes
                    			    {
                    			    	PushFollow(FOLLOW_associated_classes_in_diagram62);
                    			    	associated_classes();
                    			    	state.followingStackPointer--;


                    			    }
                    			    break;

                    			default:
                    			    if ( cnt1 >= 1 ) goto loop1;
                    		            EarlyExitException eee =
                    		                new EarlyExitException(1, input);
                    		            throw eee;
                    	    }
                    	    cnt1++;
                    	} while (true);

                    	loop1:
                    		;	// Stops C# compiler whinging that label 'loop1' has no statements

                    	Match(input,EOF,FOLLOW_EOF_in_diagram66); 
                    	 result.umlClasses.AddRange(umlClasses.Values); result.umlClasses.AddRange(unnamedUmlClasses);

                    }
                    break;
                case 2 :
                    // D:\\Olle\\Projects\\WikiUml\\source\\Grammar\\WikiUml.g:23:132: 
                    {
                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return result;
    }
开发者ID:osdezwart,项目名称:WikiUml,代码行数:96,代码来源:WikiUmlParser.cs


示例7: mINT

    private void mINT()
    {
    	EnterRule_INT();
    	EnterRule("INT", 19);
    	TraceIn("INT", 19);
    		try
    		{
    		int _type = INT;
    		int _channel = DefaultTokenChannel;
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:125:5: ( ( '0' .. '9' )+ )
    		DebugEnterAlt(1);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:125:7: ( '0' .. '9' )+
    		{
    		DebugLocation(125, 7);
    		// D:\\_Dokumente\\GitHub\\lokad-codedsl\\Source\\MessageContracts.g:125:7: ( '0' .. '9' )+
    		int cnt2=0;
    		try { DebugEnterSubRule(2);
    		while (true)
    		{
    			int alt2=2;
    			try { DebugEnterDecision(2, decisionCanBacktrack[2]);
    			int LA2_0 = input.LA(1);

    			if (((LA2_0>='0' && LA2_0<='9')))
    			{
    				alt2 = 1;
    			}


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


    				}
    				break;

    			default:
    				if (cnt2 >= 1)
    					goto loop2;

    				EarlyExitException eee2 = new EarlyExitException( 2, input );
    				DebugRecognitionException(eee2);
    				throw eee2;
    			}
    			cnt2++;
    		}
    		loop2:
    			;

    		} finally { DebugExitSubRule(2); }


    		}

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


示例8: mWhiteSpace

    // $ANTLR end "USP"

    // $ANTLR start "WhiteSpace"
    public void mWhiteSpace() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = WhiteSpace;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:600:2: ( ( TAB | VT | FF | SP | NBSP | USP )+ )
            // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:600:4: ( TAB | VT | FF | SP | NBSP | USP )+
            {
            	// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:600:4: ( TAB | VT | FF | SP | NBSP | USP )+
            	int cnt1 = 0;
            	do 
            	{
            	    int alt1 = 2;
            	    int LA1_0 = input.LA(1);

            	    if ( (LA1_0 == '\t' || (LA1_0 >= '\u000B' && LA1_0 <= '\f') || LA1_0 == ' ' || LA1_0 == '\u00A0' || LA1_0 == '\u1680' || LA1_0 == '\u180E' || (LA1_0 >= '\u2000' && LA1_0 <= '\u200A') || LA1_0 == '\u202F' || LA1_0 == '\u205F' || LA1_0 == '\u3000') )
            	    {
            	        alt1 = 1;
            	    }


            	    switch (alt1) 
            		{
            			case 1 :
            			    // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:
            			    {
            			    	if ( input.LA(1) == '\t' || (input.LA(1) >= '\u000B' && input.LA(1) <= '\f') || input.LA(1) == ' ' || input.LA(1) == '\u00A0' || input.LA(1) == '\u1680' || input.LA(1) == '\u180E' || (input.LA(1) >= '\u2000' && input.LA(1) <= '\u200A') || input.LA(1) == '\u202F' || input.LA(1) == '\u205F' || input.LA(1) == '\u3000' ) 
            			    	{
            			    	    input.Consume();

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


            			    }
            			    break;

            			default:
            			    if ( cnt1 >= 1 ) goto loop1;
            		            EarlyExitException eee1 =
            		                new EarlyExitException(1, input);
            		            throw eee1;
            	    }
            	    cnt1++;
            	} while (true);

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

            	 _channel = HIDDEN; 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
开发者ID:splhack,项目名称:unity-jint,代码行数:68,代码来源:ES3Lexer.cs


示例9: mExponentPart

    // $ANTLR end "OctalDigit"

    // $ANTLR start "ExponentPart"
    public void mExponentPart() // throws RecognitionException [2]
    {
    		try
    		{
            // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:865:2: ( ( 'e' | 'E' ) ( '+' | '-' )? ( DecimalDigit )+ )
            // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:865:4: ( 'e' | 'E' ) ( '+' | '-' )? ( DecimalDigit )+
            {
            	if ( input.LA(1) == 'E' || input.LA(1) == 'e' ) 
            	{
            	    input.Consume();

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

            	// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:865:18: ( '+' | '-' )?
            	int alt10 = 2;
            	int LA10_0 = input.LA(1);

            	if ( (LA10_0 == '+' || LA10_0 == '-') )
            	{
            	    alt10 = 1;
            	}
            	switch (alt10) 
            	{
            	    case 1 :
            	        // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:
            	        {
            	        	if ( input.LA(1) == '+' || input.LA(1) == '-' ) 
            	        	{
            	        	    input.Consume();

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


            	        }
            	        break;

            	}

            	// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:865:33: ( DecimalDigit )+
            	int cnt11 = 0;
            	do 
            	{
            	    int alt11 = 2;
            	    int LA11_0 = input.LA(1);

            	    if ( ((LA11_0 >= '0' && LA11_0 <= '9')) )
            	    {
            	        alt11 = 1;
            	    }


            	    switch (alt11) 
            		{
            			case 1 :
            			    // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:865:33: DecimalDigit
            			    {
            			    	mDecimalDigit(); 

            			    }
            			    break;

            			default:
            			    if ( cnt11 >= 1 ) goto loop11;
            		            EarlyExitException eee11 =
            		                new EarlyExitException(11, input);
            		            throw eee11;
            	    }
            	    cnt11++;
            	} while (true);

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


            }

        }
        finally 
    	{
        }
    }
开发者ID:splhack,项目名称:unity-jint,代码行数:94,代码来源:ES3Lexer.cs


示例10: mWS

    // $ANTLR end "COMMENT"

    // $ANTLR start "WS"
    public void mWS() // throws RecognitionException [2]
    {
    		try
    		{
            int _type = WS;
    	int _channel = DEFAULT_TOKEN_CHANNEL;
            // SpecFlowLangLexer_en.g:33:17: ( ( WSCHAR )+ )
            // SpecFlowLangLexer_en.g:33:19: ( WSCHAR )+
            {
            	// SpecFlowLangLexer_en.g:33:19: ( WSCHAR )+
            	int cnt5 = 0;
            	do 
            	{
            	    int alt5 = 2;
            	    int LA5_0 = input.LA(1);

            	    if ( (LA5_0 == '\t' || LA5_0 == ' ') )
            	    {
            	        alt5 = 1;
            	    }


            	    switch (alt5) 
            		{
            			case 1 :
            			    // SpecFlowLangLexer_en.g:33:19: WSCHAR
            			    {
            			    	mWSCHAR(); if (state.failed) return ;

            			    }
            			    break;

            			default:
            			    if ( cnt5 >= 1 ) goto loop5;
            			    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            		            EarlyExitException eee5 =
            		                new EarlyExitException(5, input);
            		            throw eee5;
            	    }
            	    cnt5++;
            	} while (true);

            	loop5:
            		;	// Stops C# compiler whinging that label 'loop5' has no statements


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
开发者ID:x97mdr,项目名称:SpecFlow,代码行数:58,代码来源:SpecFlowLangLexer_en.cs


示例11: mWORDCHAR


//.........这里部分代码省略.........
            			    {
            			    	// SpecFlowLangLexer_en.g:35:20: ( '\\u0000' .. '\\b' )
            			    	// SpecFlowLangLexer_en.g:35:21: '\\u0000' .. '\\b'
            			    	{
            			    		MatchRange('\u0000','\b'); if (state.failed) return ;

            			    	}


            			    }
            			    break;
            			case 2 :
            			    // SpecFlowLangLexer_en.g:36:7: ( '\\u000B' .. '\\f' )
            			    {
            			    	// SpecFlowLangLexer_en.g:36:7: ( '\\u000B' .. '\\f' )
            			    	// SpecFlowLangLexer_en.g:36:8: '\\u000B' .. '\\f'
            			    	{
            			    		MatchRange('\u000B','\f'); if (state.failed) return ;

            			    	}


            			    }
            			    break;
            			case 3 :
            			    // SpecFlowLangLexer_en.g:37:7: ( '\\u000E' .. '\\u001F' )
            			    {
            			    	// SpecFlowLangLexer_en.g:37:7: ( '\\u000E' .. '\\u001F' )
            			    	// SpecFlowLangLexer_en.g:37:8: '\\u000E' .. '\\u001F'
            			    	{
            			    		MatchRange('\u000E','\u001F'); if (state.failed) return ;

            			    	}


            			    }
            			    break;
            			case 4 :
            			    // SpecFlowLangLexer_en.g:38:7: ( '!' .. '\"' )
            			    {
            			    	// SpecFlowLangLexer_en.g:38:7: ( '!' .. '\"' )
            			    	// SpecFlowLangLexer_en.g:38:8: '!' .. '\"'
            			    	{
            			    		MatchRange('!','\"'); if (state.failed) return ;

            			    	}


            			    }
            			    break;
            			case 5 :
            			    // SpecFlowLangLexer_en.g:39:7: ( '$' .. '?' )
            			    {
            			    	// SpecFlowLangLexer_en.g:39:7: ( '$' .. '?' )
            			    	// SpecFlowLangLexer_en.g:39:8: '$' .. '?'
            			    	{
            			    		MatchRange('$','?'); if (state.failed) return ;

            			    	}


            			    }
            			    break;
            			case 6 :
            			    // SpecFlowLangLexer_en.g:40:7: ( 'A' .. '\\uFFFF' )
            			    {
            			    	// SpecFlowLangLexer_en.g:40:7: ( 'A' .. '\\uFFFF' )
            			    	// SpecFlowLangLexer_en.g:40:8: 'A' .. '\\uFFFF'
            			    	{
            			    		MatchRange('A','\uFFFF'); if (state.failed) return ;

            			    	}


            			    }
            			    break;

            			default:
            			    if ( cnt7 >= 1 ) goto loop7;
            			    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            		            EarlyExitException eee7 =
            		                new EarlyExitException(7, input);
            		            throw eee7;
            	    }
            	    cnt7++;
            	} while (true);

            	loop7:
            		;	// Stops C# compiler whinging that label 'loop7' has no statements


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally 
    	{
        }
    }
开发者ID:x97mdr,项目名称:SpecFlow,代码行数:101,代码来源:SpecFlowLangLexer_en.cs


示例12: mDigits

	private void mDigits()
	{
		EnterRule_Digits();
		EnterRule("Digits", 110);
		TraceIn("Digits", 110);
		try
		{
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:678:2: ( ( '0' .. '9' )+ )
			DebugEnterAlt(1);
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:678:4: ( '0' .. '9' )+
			{
			DebugLocation(678, 7);
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:678:7: ( '0' .. '9' )+
			int cnt16=0;
			try { DebugEnterSubRule(16);
			while (true)
			{
				int alt16=2;
				try { DebugEnterDecision(16, false);
				int LA16_1 = input.LA(1);

				if (((LA16_1>='0' && LA16_1<='9')))
				{
					alt16 = 1;
				}


				} finally { DebugExitDecision(16); }
				switch (alt16)
				{
				case 1:
					DebugEnterAlt(1);
					// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:
					{
					DebugLocation(678, 7);
					input.Consume();
					state.failed=false;

					}
					break;

				default:
					if (cnt16 >= 1)
						goto loop16;

					if (state.backtracking>0) {state.failed=true; return;}
					EarlyExitException eee16 = new EarlyExitException( 16, input );
					DebugRecognitionException(eee16);
					throw eee16;
				}
				cnt16++;
			}
			loop16:
				;

			} finally { DebugExitSubRule(16); }


			}

		}
		finally
		{
			TraceOut("Digits", 110);
			LeaveRule("Digits", 110);
			LeaveRule_Digits();
		}
	}
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:68,代码来源:PhpLexer.cs


示例13: mOctal

	private void mOctal()
	{
		EnterRule_Octal();
		EnterRule("Octal", 108);
		TraceIn("Octal", 108);
		try
		{
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:670:2: ( '0' ( '0' .. '7' )+ )
			DebugEnterAlt(1);
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:670:4: '0' ( '0' .. '7' )+
			{
			DebugLocation(670, 4);
			Match('0'); if (state.failed) return;
			DebugLocation(670, 7);
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:670:7: ( '0' .. '7' )+
			int cnt14=0;
			try { DebugEnterSubRule(14);
			while (true)
			{
				int alt14=2;
				try { DebugEnterDecision(14, false);
				int LA14_1 = input.LA(1);

				if (((LA14_1>='0' && LA14_1<='7')))
				{
					alt14 = 1;
				}


				} finally { DebugExitDecision(14); }
				switch (alt14)
				{
				case 1:
					DebugEnterAlt(1);
					// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:
					{
					DebugLocation(670, 7);
					input.Consume();
					state.failed=false;

					}
					break;

				default:
					if (cnt14 >= 1)
						goto loop14;

					if (state.backtracking>0) {state.failed=true; return;}
					EarlyExitException eee14 = new EarlyExitException( 14, input );
					DebugRecognitionException(eee14);
					throw eee14;
				}
				cnt14++;
			}
			loop14:
				;

			} finally { DebugExitSubRule(14); }


			}

		}
		finally
		{
			TraceOut("Octal", 108);
			LeaveRule("Octal", 108);
			LeaveRule_Octal();
		}
	}
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:70,代码来源:PhpLexer.cs


示例14: mHexadecimal

	private void mHexadecimal()
	{
		EnterRule_Hexadecimal();
		EnterRule("Hexadecimal", 107);
		TraceIn("Hexadecimal", 107);
		try
		{
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:665:2: ( '0' ( 'x' | 'X' ) ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ )
			DebugEnterAlt(1);
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:665:4: '0' ( 'x' | 'X' ) ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+
			{
			DebugLocation(665, 4);
			Match('0'); if (state.failed) return;
			DebugLocation(665, 7);
			if (input.LA(1)=='X'||input.LA(1)=='x')
			{
				input.Consume();
			state.failed=false;
			}
			else
			{
				if (state.backtracking>0) {state.failed=true; return;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				DebugRecognitionException(mse);
				Recover(mse);
				throw mse;
			}

			DebugLocation(665, 16);
			// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:665:16: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+
			int cnt13=0;
			try { DebugEnterSubRule(13);
			while (true)
			{
				int alt13=2;
				try { DebugEnterDecision(13, false);
				int LA13_1 = input.LA(1);

				if (((LA13_1>='0' && LA13_1<='9')||(LA13_1>='A' && LA13_1<='F')||(LA13_1>='a' && LA13_1<='f')))
				{
					alt13 = 1;
				}


				} finally { DebugExitDecision(13); }
				switch (alt13)
				{
				case 1:
					DebugEnterAlt(1);
					// C:\\Users\\exKAZUu\\Projects\\Code2Xml\\Code2Xml.Core\\Generators\\ANTLRv3\\Php\\Php.g:
					{
					DebugLocation(665, 16);
					input.Consume();
					state.failed=false;

					}
					break;

				default:
					if (cnt13 >= 1)
						goto loop13;

					if (state.backtracking>0) {state.failed=true; return;}
					EarlyExitException eee13 = new EarlyExitException( 13, input );
					DebugRecognitionException(eee13);
					throw eee13;
				}
				cnt13++;
			}
			loop13:
				;

			} finally { DebugExitSubRule(13); }


			}

		}
		finally
		{
			TraceOut("Hexadecimal", 107);
			LeaveRule("Hexadecimal", 107);
			LeaveRule_Hexadecimal();
		}
	}
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:85,代码来源:PhpLexer.cs


示例15: formalParameterDecls


//.........这里部分代码省略.........
						}
						break;
					case BOOLEAN:
					case BYTE:
					case CHAR:
					case DOUBLE:
					case FLOAT:
					case INT:
					case LONG:
					case SHORT:
						{
						int LA74_2 = input.LA(2);

						if ((EvaluatePredicate(synpred102_Java_fragment)))
						{
							alt74 = 1;
						}


						}
						break;
					}

					} finally { DebugExitDecision(74); }
					switch (alt74)
					{
					case 1:
						DebugEnterAlt(1);
						// Java.g:682:10: normalParameterDecl ','
						{
						DebugLocation(682, 10);
						PushFollow(Follow._normalParameterDecl_in_formalParameterDecls3226);
						normalParameterDecl202=normalParameterDecl();
						PopFollow();
						if (state.failed) return retval;
						if (state.backtracking == 0) adaptor.AddChild(root_0, normalParameterDecl202.Tree);
						DebugLocation(683, 9);
						char_literal203=(IToken)Match(input,COMMA,Follow._COMMA_in_formalParameterDecls3236); if (state.failed) return retval;
						if (state.backtracking == 0) {
						char_literal203_tree = (object)adaptor.Create(char_literal203);
						adaptor.AddChild(root_0, char_literal203_tree);
						}

						}
						break;

					default:
						if (cnt74 >= 1)
							goto loop74;

						if (state.backtracking>0) {state.failed=true; return retval;}
						EarlyExitException eee74 = new EarlyExitException( 74, input );
						DebugRecognitionException(eee74);
						throw eee74;
					}
					cnt74++;
				}
				loop74:
					;

				} finally { DebugExitSubRule(74); }

				DebugLocation(685, 9);
				PushFollow(Follow._ellipsisParameterDecl_in_formalParameterDecls3258);
				ellipsisParameterDecl204=ellipsisParameterDecl();
				PopFollow();
				if (state.failed) return retval;
				if (state.backtracking == 0) adaptor.AddChild(root_0, ellipsisParameterDecl204.Tree);

				}
				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("formalParameterDecls", 40);
			LeaveRule("formalParameterDecls", 40);
			LeaveRule_formalParameterDecls();
			if (state.backtracking > 0) { Memoize(input, 40, formalParameterDecls_StartIndex); }

		}
		DebugLocation(686, 4);
		} finally { DebugExitRule(GrammarFileName, "formalParameterDecls"); }
		return retval;

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


示例16: mDecimalLiteral


//.........这里部分代码省略.........


                    }
                    break;
                case 2 :
                    // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:875:4: '.' ( DecimalDigit )+ ( ExponentPart )?
                    {
                    	Match('.'); 
                    	// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:875:8: ( DecimalDigit )+
                    	int cnt16 = 0;
                    	do 
                    	{
                    	    int alt16 = 2;
                    	    int LA16_0 = input.LA(1);

                    	    if ( ((LA16_0 >= '0' && LA16_0 <= '9')) )
                    	    {
                    	        alt16 = 1;
                    	    }


                    	    switch (alt16) 
                    		{
                    			case 1 :
                    			    // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:875:8: DecimalDigit
                    			    {
                    			    	mDecimalDigit(); 

                    			    }
                    			    break;

                    			default:
                    			    if ( cnt16 >= 1 ) goto loop16;
                    		            EarlyExitException eee16 =
                    		                new EarlyExitException(16, input);
                    		            throw eee16;
                    	    }
                    	    cnt16++;
                    	} while (true);

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

                    	// C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:875:22: ( ExponentPart )?
                    	int alt17 = 2;
                    	int LA17_0 = input.LA(1);

                    	if ( (LA17_0 == 'E' || LA17_0 == 'e') )
                    	{
                    	    alt17 = 1;
                    	}
                    	switch (alt17) 
                    	{
                    	    case 1 :
                    	        // C:\\Users\\s.ros\\Projets\\Jint\\Jint\\ES3.g:875:22: ExponentPart
                    	        {
                    	        	mExponentPart(); 

                    	        }
                    	        break;

                    	}


                    }
                    break;
开发者ID:splhack,项目名称:unity-jint,代码行数:67,代码来源:ES3Lexer.cs


示例17: annotations

	private AstParserRuleReturnScope<object, IToken> annotations()
	{
		EnterRule_annotations();
		EnterRule("annotations", 45);
		TraceIn("annotations", 45);
		AstParserRuleReturnScope<object, IToken> retval = new AstParserRuleReturnScope<object, IToken>();
		retval.Start = (IToken)input.LT(1);
		int annotations_StartIndex = input.Index;

		object root_0 = default(object);

		AstParserRuleReturnScope<object, IToken> annotation227 = default(AstParserRuleReturnScope<object, IToken>);

		try { DebugEnterRule(GrammarFileName, "annotations");
		DebugLocation(723, 4);
		try
		{
			if (state.backtracking > 0 && AlreadyParsedRule(input, 45)) { return retval; }

			// Java.g:724:5: ( ( annotation )+ )
			DebugEnterAlt(1);
			// Java.g:724:9: ( annotation )+
			{
			root_0 = (object)adaptor.Nil();

			DebugLocation(724, 9);
			// Java.g:724:9: ( annotation )+
			int cnt81=0;
			try { DebugEnterSubRule(81);
			while (true)
			{
				int alt81=2;
				try { DebugEnterDecision(81, false);
				int LA81_1 = input.LA(1);

				if ((LA81_1==MONKEYS_AT))
				{
					alt81 = 1;
				}


				} finally { DebugExitDecision(81); }
				switch (alt81)
				{
				case 1:
					DebugEnterAlt(1);
					// Java.g:724:10: annotation
					{
					DebugLocation(724, 10);
					PushFollow(Follow._annotation_in_annotations3561);
					annotation227=annotation();
					PopFollow();
					if (state.failed) return retval;
					if (state.backtracking == 0) adaptor.AddChild(root_0, annotation227.Tree);

					}
					break;

				default:
					if (cnt81 >= 1)
						goto loop81;

					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee81 = new EarlyExitException( 81, input );
					DebugRecognitionException(eee81);
					throw eee81;
				}
				cnt81++;
			}
			loop81:
				;

			} finally { DebugExitSubRule(81); }


			}

			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("annotations", 45);
			LeaveRule("annotations", 45);
			LeaveRule_annotations();
			if (state.backtracking > 0) { Memoize(input, 45, annotations_StartIndex); }

		}
		DebugLocation(726, 4);
//.........这里部分代码省略.........
开发者ID:RainsSoft,项目名称:Code2Xml,代码行数:101,代码来源:JavaParser.cs


示例18: mOctalIntegerLiteral


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Runtime.MismatchedSetException类代码示例发布时间:2022-05-24
下一篇:
C# Runtime.DFA类代码示例发布时间: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