コード例 #1
0
		public virtual Object Visit(ASTExpression node, Object data)
		{
			data = node.ChildrenAccept(this, data);
			return data;
		}
コード例 #2
0
ファイル: Parser.cs プロジェクト: modulexcite/Transformalize
		/* -----------------------------------------------------------------------
		* 
		*  Expression Syntax
		* 
		* ----------------------------------------------------------------------*/

		public void Expression()
		{
			/*@bgen(jjtree) Expression */
			ASTExpression jjtn000 = new ASTExpression(this, ParserTreeConstants.EXPRESSION);
			bool jjtc000 = true;
			nodeTree.OpenNodeScope(jjtn000);
			//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to ' ' which has different behavior. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1100"'
			try
			{
				if (jj_2_10(2147483647))
				{
					Assignment();
				}
				else
				{
					switch(GetCurrentTokenKind())
					{
						case ParserConstants.LBRACKET:
						case ParserConstants.LPAREN:
						case ParserConstants.WHITESPACE:
						case ParserConstants.STRING_LITERAL:
						case ParserConstants.TRUE:
						case ParserConstants.FALSE:
						case ParserConstants.LOGICAL_NOT:
						case ParserConstants.NUMBER_LITERAL:
						case ParserConstants.IDENTIFIER:
						case ParserConstants.LCURLY:
							ConditionalOrExpression();
							break;

						default:
							jj_la1[36] = jj_gen;
							ConsumeToken(-1);
							throw new ParseException();
					}
				}
			}
			catch(System.Exception exception)
			{
				nodeTree.ClearNodeScope(jjtn000);
				jjtc000 = false;
				if (exception is SystemException)
				{
					throw;
				}
				if (exception is ParseException)
				{
					throw;
				}
				throw (ApplicationException) exception;
			}
			finally
			{
				if (jjtc000)
				{
					nodeTree.CloseNodeScope(jjtn000, true);
				}
			}
		}
コード例 #3
0
		/// <summary>Display an ASTExpression node
		/// </summary>
		public override Object Visit(ASTExpression node, Object data)
		{
			return ShowNode(node, data);
		}