public ParseTree getParseTree(CommonTree ast) {
		
		parseTree = new ParseTree();
		
		//Add the root node
		parseTree.value = ast.getText();
		parseTree.attribute = EsperCompiler.getTokenName(Integer.parseInt(Integer.toString(ast.getType())));

		//Add the children
		for (int i = 0; i < ast.getChildCount(); i++)
			parseTree.children.add(convertNode(ast.getChild(i)));
		
		return parseTree;
	}