Exemple #1
0
		/// <summary> This method is what starts the whole parsing
		/// process. After the parsing is complete and
		/// the template has been turned into an AST,
		/// this method returns the root of AST which
		/// can subsequently be traversed by a visitor
		/// which implements the ParserVisitor interface
		/// which is generated automatically by JavaCC
		/// </summary>
		public SimpleNode Process()
		{
			/*@bgen(jjtree) process */
			ASTprocess jjtn000 = new ASTprocess(this, ParserTreeConstants.PROCESS);
			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
			{
				while(true)
				{
					switch(GetCurrentTokenKind())
					{
						case ParserConstants.LPAREN:
						case ParserConstants.RPAREN:
						case ParserConstants.ESCAPE_DIRECTIVE:
						case ParserConstants.SET_DIRECTIVE:
						case ParserConstants.DOUBLE_ESCAPE:
						case ParserConstants.ESCAPE:
						case ParserConstants.TEXT:
						case ParserConstants.SINGLE_LINE_COMMENT:
						case ParserConstants.FORMAL_COMMENT:
						case ParserConstants.MULTI_LINE_COMMENT:
						case ParserConstants.STRING_LITERAL:
						case ParserConstants.IF_DIRECTIVE:
						case ParserConstants.STOP_DIRECTIVE:
						case ParserConstants.NUMBER_LITERAL:
						case ParserConstants.WORD:
						case ParserConstants.IDENTIFIER:
						case ParserConstants.DOT:
						case ParserConstants.LCURLY:
						case ParserConstants.RCURLY:
							break;

						default:
							jj_la1[0] = 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_1_brk;
					}
					Statement();
				}
				//UPGRADE_NOTE: Label 'label_1_brk' was added. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1011"'
				label_1_brk:
				;

				ConsumeToken(0);
				nodeTree.CloseNodeScope(jjtn000, true);
				jjtc000 = false;
				if (true)
					return jjtn000;
			}
			catch(Exception jjte000)
			{
				if (jjtc000)
				{
					nodeTree.ClearNodeScope(jjtn000);
					jjtc000 = false;
				}
				else
				{
					nodeTree.PopNode();
				}
				if (jjte000 is SystemException)
				{
					throw;
				}
				if (jjte000 is ParseException)
				{
					throw;
				}

				throw;
			}
			finally
			{
				if (jjtc000)
				{
					nodeTree.CloseNodeScope(jjtn000, true);
				}
			}
			//throw new ApplicationException("Missing return statement in function");
		}
Exemple #2
0
 public virtual Object Visit(ASTprocess node, Object data)
 {
     data = node.ChildrenAccept(this, data);
     return(data);
 }
 /// <summary>Display an ASTprocess node
 /// </summary>
 public override Object Visit(ASTprocess node, Object data)
 {
     return(ShowNode(node, data));
 }
Exemple #4
0
 /// <summary>Display an ASTprocess node
 /// </summary>
 public override System.Object visit(ASTprocess node, System.Object data)
 {
     return(showNode(node, data));
 }
Exemple #5
0
 public virtual System.Object visit(ASTprocess node, System.Object data)
 {
     data = node.childrenAccept(this, data);
     return(data);
 }
Exemple #6
0
 public override object Visit(ASTprocess node, object data)
 {
     return(this.ShowNode(node, data));
 }