Example #1
0
	public Invoke simpleFunc()
	{
		EnterRule_simpleFunc();
		EnterRule("simpleFunc", 22);
		TraceIn("simpleFunc", 22);
		Invoke fi = default(Invoke);


		IToken identifier42 = default(IToken);
		List<List<IToken>> identifierListParam43 = default(List<List<IToken>>);


				fi = new Invoke();
			
		try { DebugEnterRule(GrammarFileName, "simpleFunc");
		DebugLocation(460, 1);
		try
		{
			// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:465:2: ( identifier LPAREN ( identifierListParam )? RPAREN )
			DebugEnterAlt(1);
			// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:465:4: identifier LPAREN ( identifierListParam )? RPAREN
			{
			DebugLocation(465, 4);
			PushFollow(Follow._identifier_in_simpleFunc1631);
			identifier42=identifier();
			PopFollow();

			DebugLocation(466, 3);

						fi.SetName(identifier42);
					
			DebugLocation(469, 3);
			Match(input,LPAREN,Follow._LPAREN_in_simpleFunc1639); 
			DebugLocation(470, 3);
			// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:470:3: ( identifierListParam )?
			int alt20=2;
			try { DebugEnterSubRule(20);
			try { DebugEnterDecision(20, false);
			int LA20_0 = input.LA(1);

			if ((LA20_0==ID))
			{
				alt20 = 1;
			}
			} finally { DebugExitDecision(20); }
			switch (alt20)
			{
			case 1:
				DebugEnterAlt(1);
				// D:\\projects\\repository\\ifmo\\Компиляторы\\PascalCompiler\\PascalCompiler\\Grammar\\Pascal.g:470:5: identifierListParam
				{
				DebugLocation(470, 5);
				PushFollow(Follow._identifierListParam_in_simpleFunc1645);
				identifierListParam43=identifierListParam();
				PopFollow();

				DebugLocation(471, 3);

							fi.SetArgs(identifierListParam43);
						

				}
				break;

			}
			} finally { DebugExitSubRule(20); }

			DebugLocation(474, 6);
			Match(input,RPAREN,Follow._RPAREN_in_simpleFunc1656); 

			}

		}

			catch (RecognitionException e)
			{
		        	throw e;
		    	}

		finally
		{
			TraceOut("simpleFunc", 22);
			LeaveRule("simpleFunc", 22);
			LeaveRule_simpleFunc();
		}
		DebugLocation(475, 1);
		} finally { DebugExitRule(GrammarFileName, "simpleFunc"); }
		return fi;

	}