Exemple #1
0
		public void MultiplicativeExpression()
		{
			UnaryExpression();
			while(true)
			{
				switch(GetCurrentTokenKind())
				{
					case ParserConstants.MULTIPLY:
					case ParserConstants.DIVIDE:
					case ParserConstants.MODULUS:
						;
						break;

					default:
						jj_la1[45] = jj_gen;
						//UPGRADE_NOTE: Labeled break statement was changed to a goto statement. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1012"'
						goto label_18_brk;
				}
				switch(GetCurrentTokenKind())
				{
					case ParserConstants.MULTIPLY:
						ConsumeToken(ParserConstants.MULTIPLY);
						ASTMulNode jjtn001 = new ASTMulNode(this, ParserTreeConstants.MUL_NODE);
						bool jjtc001 = true;
						nodeTree.OpenNodeScope(jjtn001);
						//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to ' ' which has different behavior. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1100"'
						try
						{
							UnaryExpression();
						}
						catch(Exception jjte001)
						{
							nodeTree.ClearNodeScope(jjtn001);
							jjtc001 = false;
							if (jjte001 is SystemException)
							{
								throw;
							}
							if (jjte001 is ParseException)
							{
								throw;
							}
							throw (ApplicationException) jjte001;
						}
						finally
						{
							if (jjtc001)
							{
								nodeTree.CloseNodeScope(jjtn001, 2);
							}
						}
						break;

					case ParserConstants.DIVIDE:
						ConsumeToken(ParserConstants.DIVIDE);
						ASTDivNode jjtn002 = new ASTDivNode(this, ParserTreeConstants.DIV_NODE);
						bool jjtc002 = true;
						nodeTree.OpenNodeScope(jjtn002);
						//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to ' ' which has different behavior. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1100"'
						try
						{
							UnaryExpression();
						}
						catch(Exception jjte002)
						{
							nodeTree.ClearNodeScope(jjtn002);
							jjtc002 = false;
							if (jjte002 is SystemException)
							{
								throw;
							}
							if (jjte002 is ParseException)
							{
								throw;
							}
							throw (ApplicationException) jjte002;
						}
						finally
						{
							if (jjtc002)
							{
								nodeTree.CloseNodeScope(jjtn002, 2);
							}
						}
						break;

					case ParserConstants.MODULUS:
						ConsumeToken(ParserConstants.MODULUS);
						ASTModNode jjtn003 = new ASTModNode(this, ParserTreeConstants.MOD_NODE);
						bool jjtc003 = true;
						nodeTree.OpenNodeScope(jjtn003);
						//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to ' ' which has different behavior. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1100"'
						try
						{
							UnaryExpression();
						}
						catch(Exception jjte003)
						{
							nodeTree.ClearNodeScope(jjtn003);
							jjtc003 = false;
							if (jjte003 is SystemException)
							{
								throw;
							}
							if (jjte003 is ParseException)
							{
								throw;
							}
							throw (ApplicationException) jjte003;
						}
						finally
						{
							if (jjtc003)
							{
								nodeTree.CloseNodeScope(jjtn003, 2);
							}
						}
						break;

					default:
						jj_la1[46] = jj_gen;
						ConsumeToken(-1);
						throw new ParseException();
				}
			}
			//UPGRADE_NOTE: Label 'label_18_brk' was added. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1011"'
			label_18_brk:
			;
		}
Exemple #2
0
 public virtual Object Visit(ASTMulNode node, Object data)
 {
     data = node.ChildrenAccept(this, data);
     return(data);
 }
 /// <summary>Display an ASTMulNode ( * )
 /// </summary>
 public override Object Visit(ASTMulNode node, Object data)
 {
     return(ShowNode(node, data));
 }
Exemple #4
0
 /// <summary>Display an ASTMulNode ( * )
 /// </summary>
 public override System.Object visit(ASTMulNode node, System.Object data)
 {
     return(showNode(node, data));
 }
Exemple #5
0
 public virtual System.Object visit(ASTMulNode node, System.Object data)
 {
     data = node.childrenAccept(this, data);
     return(data);
 }
Exemple #6
0
 public override object Visit(ASTMulNode node, object data)
 {
     return(this.ShowNode(node, data));
 }