You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2006/08/12 03:17:49 UTC

svn commit: r430936 [3/5] - in /db/ojb/trunk/proposals/jdo: ./ java/ java/org/ java/org/apache/ java/org/apache/ojb/ java/org/apache/ojb/jdo/ java/org/apache/ojb/jdo/jdoql/ java/org/apache/ojb/jdo/spi/ test/ test/org/ test/org/apache/ test/org/apache/o...

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParser.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParser.java?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParser.java (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParser.java Fri Aug 11 18:17:46 2006
@@ -0,0 +1,1528 @@
+// $ANTLR 2.7.3: "jdoql-ojb-parser.g" -> "JDOQLParser.java"$
+
+    package org.apache.ojb.jdo.jdoql;
+
+/* Copyright 2003-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import antlr.TokenBuffer;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.ANTLRException;
+import antlr.LLkParser;
+import antlr.Token;
+import antlr.TokenStream;
+import antlr.RecognitionException;
+import antlr.NoViableAltException;
+import antlr.MismatchedTokenException;
+import antlr.SemanticException;
+import antlr.ParserSharedInputState;
+import antlr.collections.impl.BitSet;
+import antlr.collections.AST;
+import java.util.Hashtable;
+import antlr.ASTFactory;
+import antlr.ASTPair;
+import antlr.collections.impl.ASTArray;
+
+public class JDOQLParser extends antlr.LLkParser       implements JDOQLParserTokenTypes
+ {
+
+protected JDOQLParser(TokenBuffer tokenBuf, int k) {
+  super(tokenBuf,k);
+  tokenNames = _tokenNames;
+  buildTokenTypeASTClassMap();
+  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
+}
+
+public JDOQLParser(TokenBuffer tokenBuf) {
+  this(tokenBuf,2);
+}
+
+protected JDOQLParser(TokenStream lexer, int k) {
+  super(lexer,k);
+  tokenNames = _tokenNames;
+  buildTokenTypeASTClassMap();
+  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
+}
+
+public JDOQLParser(TokenStream lexer) {
+  this(lexer,2);
+}
+
+public JDOQLParser(ParserSharedInputState state) {
+  super(state,2);
+  tokenNames = _tokenNames;
+  buildTokenTypeASTClassMap();
+  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
+}
+
+	public final void declareParameters() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST declareParameters_AST = null;
+		
+		parameter();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop3:
+		do {
+			if ((LA(1)==SEP_COMMA) && (_tokenSet_0.member(LA(2)))) {
+				match(SEP_COMMA);
+				parameter();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop3;
+			}
+			
+		} while (true);
+		}
+		{
+		switch ( LA(1)) {
+		case SEP_COMMA:
+		{
+			match(SEP_COMMA);
+			break;
+		}
+		case EOF:
+		{
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		if ( inputState.guessing==0 ) {
+			declareParameters_AST = (AST)currentAST.root;
+			declareParameters_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(PARAMETERS,"PARAMETERS")).add(declareParameters_AST));
+			currentAST.root = declareParameters_AST;
+			currentAST.child = declareParameters_AST!=null &&declareParameters_AST.getFirstChild()!=null ?
+				declareParameters_AST.getFirstChild() : declareParameters_AST;
+			currentAST.advanceChildToEnd();
+		}
+		declareParameters_AST = (AST)currentAST.root;
+		returnAST = declareParameters_AST;
+	}
+	
+	public final void parameter() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST parameter_AST = null;
+		
+		type();
+		astFactory.addASTChild(currentAST, returnAST);
+		identifier();
+		astFactory.addASTChild(currentAST, returnAST);
+		if ( inputState.guessing==0 ) {
+			parameter_AST = (AST)currentAST.root;
+			parameter_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(PARAMETER,"PARAMETER")).add(parameter_AST));
+			currentAST.root = parameter_AST;
+			currentAST.child = parameter_AST!=null &&parameter_AST.getFirstChild()!=null ?
+				parameter_AST.getFirstChild() : parameter_AST;
+			currentAST.advanceChildToEnd();
+		}
+		parameter_AST = (AST)currentAST.root;
+		returnAST = parameter_AST;
+	}
+	
+	public final void type() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST type_AST = null;
+		
+		switch ( LA(1)) {
+		case LITERAL_BOOLEAN:
+		case LITERAL_BYTE:
+		case LITERAL_SHORT:
+		case LITERAL_INT:
+		case LITERAL_LONG:
+		case LITERAL_CHAR:
+		case LITERAL_FLOAT:
+		case LITERAL_DOUBLE:
+		{
+			primitiveType();
+			astFactory.addASTChild(currentAST, returnAST);
+			type_AST = (AST)currentAST.root;
+			break;
+		}
+		case IDENTIFIER:
+		{
+			name();
+			astFactory.addASTChild(currentAST, returnAST);
+			type_AST = (AST)currentAST.root;
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		returnAST = type_AST;
+	}
+	
+	public final void identifier() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST identifier_AST = null;
+		
+		AST tmp3_AST = null;
+		tmp3_AST = astFactory.create(LT(1));
+		astFactory.addASTChild(currentAST, tmp3_AST);
+		match(IDENTIFIER);
+		identifier_AST = (AST)currentAST.root;
+		returnAST = identifier_AST;
+	}
+	
+	public final void declareVariables() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST declareVariables_AST = null;
+		
+		variable();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop8:
+		do {
+			if ((LA(1)==SEP_SEMICOLON) && (_tokenSet_0.member(LA(2)))) {
+				match(SEP_SEMICOLON);
+				variable();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop8;
+			}
+			
+		} while (true);
+		}
+		{
+		switch ( LA(1)) {
+		case SEP_SEMICOLON:
+		{
+			match(SEP_SEMICOLON);
+			break;
+		}
+		case EOF:
+		{
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		if ( inputState.guessing==0 ) {
+			declareVariables_AST = (AST)currentAST.root;
+			declareVariables_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(VARIABLES,"VARIABLES")).add(declareVariables_AST));
+			currentAST.root = declareVariables_AST;
+			currentAST.child = declareVariables_AST!=null &&declareVariables_AST.getFirstChild()!=null ?
+				declareVariables_AST.getFirstChild() : declareVariables_AST;
+			currentAST.advanceChildToEnd();
+		}
+		declareVariables_AST = (AST)currentAST.root;
+		returnAST = declareVariables_AST;
+	}
+	
+	public final void variable() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST variable_AST = null;
+		
+		type();
+		astFactory.addASTChild(currentAST, returnAST);
+		identifier();
+		astFactory.addASTChild(currentAST, returnAST);
+		if ( inputState.guessing==0 ) {
+			variable_AST = (AST)currentAST.root;
+			variable_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(VARIABLE,"VARIABLE")).add(variable_AST));
+			currentAST.root = variable_AST;
+			currentAST.child = variable_AST!=null &&variable_AST.getFirstChild()!=null ?
+				variable_AST.getFirstChild() : variable_AST;
+			currentAST.advanceChildToEnd();
+		}
+		variable_AST = (AST)currentAST.root;
+		returnAST = variable_AST;
+	}
+	
+	public final void declareImports() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST declareImports_AST = null;
+		
+		importDeclaration();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop13:
+		do {
+			if ((LA(1)==SEP_SEMICOLON) && (LA(2)==LITERAL_IMPORT)) {
+				match(SEP_SEMICOLON);
+				importDeclaration();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop13;
+			}
+			
+		} while (true);
+		}
+		{
+		switch ( LA(1)) {
+		case SEP_SEMICOLON:
+		{
+			match(SEP_SEMICOLON);
+			break;
+		}
+		case EOF:
+		{
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		if ( inputState.guessing==0 ) {
+			declareImports_AST = (AST)currentAST.root;
+			declareImports_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(IMPORTS,"IMPORTS")).add(declareImports_AST));
+			currentAST.root = declareImports_AST;
+			currentAST.child = declareImports_AST!=null &&declareImports_AST.getFirstChild()!=null ?
+				declareImports_AST.getFirstChild() : declareImports_AST;
+			currentAST.advanceChildToEnd();
+		}
+		declareImports_AST = (AST)currentAST.root;
+		returnAST = declareImports_AST;
+	}
+	
+	public final void importDeclaration() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST importDeclaration_AST = null;
+		Token  node = null;
+		AST node_AST = null;
+		
+		node = LT(1);
+		node_AST = astFactory.create(node);
+		astFactory.makeASTRoot(currentAST, node_AST);
+		match(LITERAL_IMPORT);
+		name();
+		astFactory.addASTChild(currentAST, returnAST);
+		if ( inputState.guessing==0 ) {
+			node_AST.setType(IMPORT);
+		}
+		{
+		switch ( LA(1)) {
+		case SEP_DOT:
+		{
+			match(SEP_DOT);
+			match(OP_MULTIPLY);
+			if ( inputState.guessing==0 ) {
+				node_AST.setType(ON_DEMAND_IMPORT);
+			}
+			break;
+		}
+		case EOF:
+		case SEP_SEMICOLON:
+		{
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		importDeclaration_AST = (AST)currentAST.root;
+		returnAST = importDeclaration_AST;
+	}
+	
+	public final void name() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST name_AST = null;
+		Token  dot = null;
+		AST dot_AST = null;
+		AST i_AST = null;
+		
+		identifier();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop80:
+		do {
+			if ((LA(1)==SEP_DOT) && (LA(2)==IDENTIFIER)) {
+				dot = LT(1);
+				dot_AST = astFactory.create(dot);
+				match(SEP_DOT);
+				identifier();
+				i_AST = (AST)returnAST;
+				if ( inputState.guessing==0 ) {
+					name_AST = (AST)currentAST.root;
+					
+							  name_AST.setText(name_AST.getText() + dot_AST.getText() + i_AST.getText());
+						
+				}
+			}
+			else {
+				break _loop80;
+			}
+			
+		} while (true);
+		}
+		if ( inputState.guessing==0 ) {
+			name_AST = (AST)currentAST.root;
+			name_AST.setType(NAME);
+		}
+		name_AST = (AST)currentAST.root;
+		returnAST = name_AST;
+	}
+	
+	public final void setOrdering() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST setOrdering_AST = null;
+		
+		orderSpecification();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop19:
+		do {
+			if ((LA(1)==SEP_COMMA) && (_tokenSet_1.member(LA(2)))) {
+				match(SEP_COMMA);
+				orderSpecification();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop19;
+			}
+			
+		} while (true);
+		}
+		{
+		switch ( LA(1)) {
+		case SEP_COMMA:
+		{
+			match(SEP_COMMA);
+			break;
+		}
+		case EOF:
+		{
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		if ( inputState.guessing==0 ) {
+			setOrdering_AST = (AST)currentAST.root;
+			setOrdering_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ORDERSPECS,"ORDERSPECS")).add(setOrdering_AST));
+			currentAST.root = setOrdering_AST;
+			currentAST.child = setOrdering_AST!=null &&setOrdering_AST.getFirstChild()!=null ?
+				setOrdering_AST.getFirstChild() : setOrdering_AST;
+			currentAST.advanceChildToEnd();
+		}
+		setOrdering_AST = (AST)currentAST.root;
+		returnAST = setOrdering_AST;
+	}
+	
+	public final void orderSpecification() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST orderSpecification_AST = null;
+		
+		expression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		switch ( LA(1)) {
+		case LITERAL_ASCENDING:
+		{
+			AST tmp12_AST = null;
+			tmp12_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp12_AST);
+			match(LITERAL_ASCENDING);
+			break;
+		}
+		case LITERAL_DESCENDING:
+		{
+			AST tmp13_AST = null;
+			tmp13_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp13_AST);
+			match(LITERAL_DESCENDING);
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		if ( inputState.guessing==0 ) {
+			orderSpecification_AST = (AST)currentAST.root;
+			orderSpecification_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ORDERSPEC,"ORDERSPEC")).add(orderSpecification_AST));
+			currentAST.root = orderSpecification_AST;
+			currentAST.child = orderSpecification_AST!=null &&orderSpecification_AST.getFirstChild()!=null ?
+				orderSpecification_AST.getFirstChild() : orderSpecification_AST;
+			currentAST.advanceChildToEnd();
+		}
+		orderSpecification_AST = (AST)currentAST.root;
+		returnAST = orderSpecification_AST;
+	}
+	
+	public final void expression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST expression_AST = null;
+		
+		conditionalOrExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		expression_AST = (AST)currentAST.root;
+		returnAST = expression_AST;
+	}
+	
+	public final void primary() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST primary_AST = null;
+		
+		{
+		switch ( LA(1)) {
+		case LITERAL_TRUE:
+		case LITERAL_FALSE:
+		case LITERAL_NULL:
+		case FLOATING_POINT_LITERAL:
+		case INTEGER_LITERAL:
+		case CHARACTER_LITERAL:
+		case STRING_LITERAL:
+		{
+			literal();
+			astFactory.addASTChild(currentAST, returnAST);
+			break;
+		}
+		case LITERAL_THIS:
+		{
+			AST tmp14_AST = null;
+			tmp14_AST = astFactory.create(LT(1));
+			astFactory.makeASTRoot(currentAST, tmp14_AST);
+			match(LITERAL_THIS);
+			break;
+		}
+		case SEP_OPENING_PARENTHESIS:
+		{
+			match(SEP_OPENING_PARENTHESIS);
+			expression();
+			astFactory.addASTChild(currentAST, returnAST);
+			match(SEP_CLOSING_PARENTHESIS);
+			break;
+		}
+		case IDENTIFIER:
+		{
+			directAccess();
+			astFactory.addASTChild(currentAST, returnAST);
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		primary_AST = (AST)currentAST.root;
+		returnAST = primary_AST;
+	}
+	
+	public final void literal() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST literal_AST = null;
+		
+		switch ( LA(1)) {
+		case LITERAL_TRUE:
+		{
+			AST tmp17_AST = null;
+			tmp17_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp17_AST);
+			match(LITERAL_TRUE);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		case LITERAL_FALSE:
+		{
+			AST tmp18_AST = null;
+			tmp18_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp18_AST);
+			match(LITERAL_FALSE);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		case LITERAL_NULL:
+		{
+			AST tmp19_AST = null;
+			tmp19_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp19_AST);
+			match(LITERAL_NULL);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		case INTEGER_LITERAL:
+		{
+			AST tmp20_AST = null;
+			tmp20_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp20_AST);
+			match(INTEGER_LITERAL);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		case FLOATING_POINT_LITERAL:
+		{
+			AST tmp21_AST = null;
+			tmp21_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp21_AST);
+			match(FLOATING_POINT_LITERAL);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		case CHARACTER_LITERAL:
+		{
+			AST tmp22_AST = null;
+			tmp22_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp22_AST);
+			match(CHARACTER_LITERAL);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		case STRING_LITERAL:
+		{
+			AST tmp23_AST = null;
+			tmp23_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp23_AST);
+			match(STRING_LITERAL);
+			literal_AST = (AST)currentAST.root;
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		returnAST = literal_AST;
+	}
+	
+	public final void directAccess() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST directAccess_AST = null;
+		Token  id = null;
+		AST id_AST = null;
+		
+		id = LT(1);
+		id_AST = astFactory.create(id);
+		astFactory.makeASTRoot(currentAST, id_AST);
+		match(IDENTIFIER);
+		{
+		switch ( LA(1)) {
+		case SEP_OPENING_PARENTHESIS:
+		{
+			match(SEP_OPENING_PARENTHESIS);
+			argList();
+			astFactory.addASTChild(currentAST, returnAST);
+			match(SEP_CLOSING_PARENTHESIS);
+			if ( inputState.guessing==0 ) {
+				directAccess_AST = (AST)currentAST.root;
+				directAccess_AST.setType(METHOD_INVOCATION);
+			}
+			break;
+		}
+		case EOF:
+		case LITERAL_ASCENDING:
+		case LITERAL_DESCENDING:
+		case OP_GREATER_OR_EQUAL:
+		case OP_LOWER_OR_EQUAL:
+		case OP_NOT_EQUAL:
+		case OP_AND:
+		case OP_OR:
+		case SEP_DOT:
+		case SEP_CLOSING_PARENTHESIS:
+		case SEP_COMMA:
+		case OP_EQUAL:
+		case OP_GREATER:
+		case OP_LOWER:
+		case OP_BITWISE_AND:
+		case OP_BITWISE_OR:
+		case OP_BITWISE_XOR:
+		case OP_BINARY_PLUS:
+		case OP_BINARY_MINUS:
+		case OP_MULTIPLY:
+		case OP_DIVIDE:
+		{
+			if ( inputState.guessing==0 ) {
+				directAccess_AST = (AST)currentAST.root;
+				directAccess_AST.setType(NAME_EXPRESSION);
+			}
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		directAccess_AST = (AST)currentAST.root;
+		returnAST = directAccess_AST;
+	}
+	
+	public final void argList() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST argList_AST = null;
+		
+		{
+		switch ( LA(1)) {
+		case LITERAL_TRUE:
+		case LITERAL_FALSE:
+		case LITERAL_NULL:
+		case LITERAL_THIS:
+		case FLOATING_POINT_LITERAL:
+		case INTEGER_LITERAL:
+		case SEP_OPENING_PARENTHESIS:
+		case OP_NOT:
+		case OP_BITWISE_COMPLEMENT:
+		case OP_BINARY_PLUS:
+		case OP_BINARY_MINUS:
+		case IDENTIFIER:
+		case CHARACTER_LITERAL:
+		case STRING_LITERAL:
+		{
+			expression();
+			astFactory.addASTChild(currentAST, returnAST);
+			{
+			_loop30:
+			do {
+				if ((LA(1)==SEP_COMMA)) {
+					match(SEP_COMMA);
+					expression();
+					astFactory.addASTChild(currentAST, returnAST);
+				}
+				else {
+					break _loop30;
+				}
+				
+			} while (true);
+			}
+			if ( inputState.guessing==0 ) {
+				argList_AST = (AST)currentAST.root;
+				argList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ARG_LIST,"ARG_LIST")).add(argList_AST));
+				currentAST.root = argList_AST;
+				currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ?
+					argList_AST.getFirstChild() : argList_AST;
+				currentAST.advanceChildToEnd();
+			}
+			break;
+		}
+		case SEP_CLOSING_PARENTHESIS:
+		{
+			if ( inputState.guessing==0 ) {
+				argList_AST = (AST)currentAST.root;
+				argList_AST = astFactory.create(ARG_LIST,"ARG_LIST");
+				currentAST.root = argList_AST;
+				currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ?
+					argList_AST.getFirstChild() : argList_AST;
+				currentAST.advanceChildToEnd();
+			}
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		argList_AST = (AST)currentAST.root;
+		returnAST = argList_AST;
+	}
+	
+	public final void postfixExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST postfixExpression_AST = null;
+		
+		primary();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop33:
+		do {
+			if ((LA(1)==SEP_DOT)) {
+				AST tmp27_AST = null;
+				tmp27_AST = astFactory.create(LT(1));
+				astFactory.makeASTRoot(currentAST, tmp27_AST);
+				match(SEP_DOT);
+				directAccess();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop33;
+			}
+			
+		} while (true);
+		}
+		postfixExpression_AST = (AST)currentAST.root;
+		returnAST = postfixExpression_AST;
+	}
+	
+	public final void unaryExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST unaryExpression_AST = null;
+		Token  op1 = null;
+		AST op1_AST = null;
+		Token  op2 = null;
+		AST op2_AST = null;
+		
+		{
+		switch ( LA(1)) {
+		case OP_BINARY_MINUS:
+		{
+			op1 = LT(1);
+			op1_AST = astFactory.create(op1);
+			astFactory.makeASTRoot(currentAST, op1_AST);
+			match(OP_BINARY_MINUS);
+			unaryExpression();
+			astFactory.addASTChild(currentAST, returnAST);
+			if ( inputState.guessing==0 ) {
+				
+					  op1_AST.setType(OP_UNARY_MINUS);
+				
+			}
+			break;
+		}
+		case OP_BINARY_PLUS:
+		{
+			op2 = LT(1);
+			op2_AST = astFactory.create(op2);
+			astFactory.makeASTRoot(currentAST, op2_AST);
+			match(OP_BINARY_PLUS);
+			unaryExpression();
+			astFactory.addASTChild(currentAST, returnAST);
+			if ( inputState.guessing==0 ) {
+				
+					  op2_AST.setType(OP_UNARY_PLUS);
+				
+			}
+			break;
+		}
+		case LITERAL_TRUE:
+		case LITERAL_FALSE:
+		case LITERAL_NULL:
+		case LITERAL_THIS:
+		case FLOATING_POINT_LITERAL:
+		case INTEGER_LITERAL:
+		case SEP_OPENING_PARENTHESIS:
+		case OP_NOT:
+		case OP_BITWISE_COMPLEMENT:
+		case IDENTIFIER:
+		case CHARACTER_LITERAL:
+		case STRING_LITERAL:
+		{
+			unaryExpressionNotPlusMinus();
+			astFactory.addASTChild(currentAST, returnAST);
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		unaryExpression_AST = (AST)currentAST.root;
+		returnAST = unaryExpression_AST;
+	}
+	
+	public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST unaryExpressionNotPlusMinus_AST = null;
+		
+		{
+		switch ( LA(1)) {
+		case OP_BITWISE_COMPLEMENT:
+		{
+			AST tmp28_AST = null;
+			tmp28_AST = astFactory.create(LT(1));
+			astFactory.makeASTRoot(currentAST, tmp28_AST);
+			match(OP_BITWISE_COMPLEMENT);
+			unaryExpression();
+			astFactory.addASTChild(currentAST, returnAST);
+			break;
+		}
+		case OP_NOT:
+		{
+			AST tmp29_AST = null;
+			tmp29_AST = astFactory.create(LT(1));
+			astFactory.makeASTRoot(currentAST, tmp29_AST);
+			match(OP_NOT);
+			unaryExpression();
+			astFactory.addASTChild(currentAST, returnAST);
+			break;
+		}
+		default:
+			boolean synPredMatched39 = false;
+			if (((LA(1)==SEP_OPENING_PARENTHESIS) && (_tokenSet_0.member(LA(2))))) {
+				int _m39 = mark();
+				synPredMatched39 = true;
+				inputState.guessing++;
+				try {
+					{
+					match(SEP_OPENING_PARENTHESIS);
+					type();
+					match(SEP_CLOSING_PARENTHESIS);
+					unaryExpression();
+					}
+				}
+				catch (RecognitionException pe) {
+					synPredMatched39 = false;
+				}
+				rewind(_m39);
+				inputState.guessing--;
+			}
+			if ( synPredMatched39 ) {
+				castExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else if ((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {
+				postfixExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+		else {
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
+		returnAST = unaryExpressionNotPlusMinus_AST;
+	}
+	
+	public final void castExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST castExpression_AST = null;
+		
+		match(SEP_OPENING_PARENTHESIS);
+		type();
+		astFactory.addASTChild(currentAST, returnAST);
+		match(SEP_CLOSING_PARENTHESIS);
+		unaryExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		if ( inputState.guessing==0 ) {
+			castExpression_AST = (AST)currentAST.root;
+			castExpression_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CAST,"CAST")).add(castExpression_AST));
+			currentAST.root = castExpression_AST;
+			currentAST.child = castExpression_AST!=null &&castExpression_AST.getFirstChild()!=null ?
+				castExpression_AST.getFirstChild() : castExpression_AST;
+			currentAST.advanceChildToEnd();
+		}
+		castExpression_AST = (AST)currentAST.root;
+		returnAST = castExpression_AST;
+	}
+	
+	public final void multiplicativeExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST multiplicativeExpression_AST = null;
+		
+		unaryExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop44:
+		do {
+			if ((LA(1)==OP_MULTIPLY||LA(1)==OP_DIVIDE)) {
+				{
+				switch ( LA(1)) {
+				case OP_MULTIPLY:
+				{
+					AST tmp32_AST = null;
+					tmp32_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp32_AST);
+					match(OP_MULTIPLY);
+					break;
+				}
+				case OP_DIVIDE:
+				{
+					AST tmp33_AST = null;
+					tmp33_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp33_AST);
+					match(OP_DIVIDE);
+					break;
+				}
+				default:
+				{
+					throw new NoViableAltException(LT(1), getFilename());
+				}
+				}
+				}
+				unaryExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop44;
+			}
+			
+		} while (true);
+		}
+		multiplicativeExpression_AST = (AST)currentAST.root;
+		returnAST = multiplicativeExpression_AST;
+	}
+	
+	public final void additiveExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST additiveExpression_AST = null;
+		
+		multiplicativeExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop48:
+		do {
+			if ((LA(1)==OP_BINARY_PLUS||LA(1)==OP_BINARY_MINUS)) {
+				{
+				switch ( LA(1)) {
+				case OP_BINARY_PLUS:
+				{
+					AST tmp34_AST = null;
+					tmp34_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp34_AST);
+					match(OP_BINARY_PLUS);
+					break;
+				}
+				case OP_BINARY_MINUS:
+				{
+					AST tmp35_AST = null;
+					tmp35_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp35_AST);
+					match(OP_BINARY_MINUS);
+					break;
+				}
+				default:
+				{
+					throw new NoViableAltException(LT(1), getFilename());
+				}
+				}
+				}
+				multiplicativeExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop48;
+			}
+			
+		} while (true);
+		}
+		additiveExpression_AST = (AST)currentAST.root;
+		returnAST = additiveExpression_AST;
+	}
+	
+	public final void relationalExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST relationalExpression_AST = null;
+		
+		additiveExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop52:
+		do {
+			if ((_tokenSet_4.member(LA(1)))) {
+				{
+				switch ( LA(1)) {
+				case OP_LOWER:
+				{
+					AST tmp36_AST = null;
+					tmp36_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp36_AST);
+					match(OP_LOWER);
+					break;
+				}
+				case OP_GREATER:
+				{
+					AST tmp37_AST = null;
+					tmp37_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp37_AST);
+					match(OP_GREATER);
+					break;
+				}
+				case OP_LOWER_OR_EQUAL:
+				{
+					AST tmp38_AST = null;
+					tmp38_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp38_AST);
+					match(OP_LOWER_OR_EQUAL);
+					break;
+				}
+				case OP_GREATER_OR_EQUAL:
+				{
+					AST tmp39_AST = null;
+					tmp39_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp39_AST);
+					match(OP_GREATER_OR_EQUAL);
+					break;
+				}
+				default:
+				{
+					throw new NoViableAltException(LT(1), getFilename());
+				}
+				}
+				}
+				additiveExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop52;
+			}
+			
+		} while (true);
+		}
+		relationalExpression_AST = (AST)currentAST.root;
+		returnAST = relationalExpression_AST;
+	}
+	
+	public final void equalityExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST equalityExpression_AST = null;
+		
+		relationalExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop56:
+		do {
+			if ((LA(1)==OP_NOT_EQUAL||LA(1)==OP_EQUAL)) {
+				{
+				switch ( LA(1)) {
+				case OP_EQUAL:
+				{
+					AST tmp40_AST = null;
+					tmp40_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp40_AST);
+					match(OP_EQUAL);
+					break;
+				}
+				case OP_NOT_EQUAL:
+				{
+					AST tmp41_AST = null;
+					tmp41_AST = astFactory.create(LT(1));
+					astFactory.makeASTRoot(currentAST, tmp41_AST);
+					match(OP_NOT_EQUAL);
+					break;
+				}
+				default:
+				{
+					throw new NoViableAltException(LT(1), getFilename());
+				}
+				}
+				}
+				relationalExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop56;
+			}
+			
+		} while (true);
+		}
+		equalityExpression_AST = (AST)currentAST.root;
+		returnAST = equalityExpression_AST;
+	}
+	
+	public final void andExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST andExpression_AST = null;
+		
+		equalityExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop59:
+		do {
+			if ((LA(1)==OP_BITWISE_AND)) {
+				AST tmp42_AST = null;
+				tmp42_AST = astFactory.create(LT(1));
+				astFactory.makeASTRoot(currentAST, tmp42_AST);
+				match(OP_BITWISE_AND);
+				equalityExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop59;
+			}
+			
+		} while (true);
+		}
+		andExpression_AST = (AST)currentAST.root;
+		returnAST = andExpression_AST;
+	}
+	
+	public final void exclusiveOrExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST exclusiveOrExpression_AST = null;
+		
+		andExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop62:
+		do {
+			if ((LA(1)==OP_BITWISE_XOR)) {
+				AST tmp43_AST = null;
+				tmp43_AST = astFactory.create(LT(1));
+				astFactory.makeASTRoot(currentAST, tmp43_AST);
+				match(OP_BITWISE_XOR);
+				andExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop62;
+			}
+			
+		} while (true);
+		}
+		exclusiveOrExpression_AST = (AST)currentAST.root;
+		returnAST = exclusiveOrExpression_AST;
+	}
+	
+	public final void inclusiveOrExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST inclusiveOrExpression_AST = null;
+		
+		exclusiveOrExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop65:
+		do {
+			if ((LA(1)==OP_BITWISE_OR)) {
+				AST tmp44_AST = null;
+				tmp44_AST = astFactory.create(LT(1));
+				astFactory.makeASTRoot(currentAST, tmp44_AST);
+				match(OP_BITWISE_OR);
+				exclusiveOrExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop65;
+			}
+			
+		} while (true);
+		}
+		inclusiveOrExpression_AST = (AST)currentAST.root;
+		returnAST = inclusiveOrExpression_AST;
+	}
+	
+	public final void conditionalAndExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST conditionalAndExpression_AST = null;
+		
+		inclusiveOrExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop68:
+		do {
+			if ((LA(1)==OP_AND)) {
+				AST tmp45_AST = null;
+				tmp45_AST = astFactory.create(LT(1));
+				astFactory.makeASTRoot(currentAST, tmp45_AST);
+				match(OP_AND);
+				inclusiveOrExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop68;
+			}
+			
+		} while (true);
+		}
+		conditionalAndExpression_AST = (AST)currentAST.root;
+		returnAST = conditionalAndExpression_AST;
+	}
+	
+	public final void conditionalOrExpression() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST conditionalOrExpression_AST = null;
+		
+		conditionalAndExpression();
+		astFactory.addASTChild(currentAST, returnAST);
+		{
+		_loop71:
+		do {
+			if ((LA(1)==OP_OR)) {
+				AST tmp46_AST = null;
+				tmp46_AST = astFactory.create(LT(1));
+				astFactory.makeASTRoot(currentAST, tmp46_AST);
+				match(OP_OR);
+				conditionalAndExpression();
+				astFactory.addASTChild(currentAST, returnAST);
+			}
+			else {
+				break _loop71;
+			}
+			
+		} while (true);
+		}
+		conditionalOrExpression_AST = (AST)currentAST.root;
+		returnAST = conditionalOrExpression_AST;
+	}
+	
+	public final void dummyExpressionUsage() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST dummyExpressionUsage_AST = null;
+		
+		expression();
+		astFactory.addASTChild(currentAST, returnAST);
+		dummyExpressionUsage_AST = (AST)currentAST.root;
+		returnAST = dummyExpressionUsage_AST;
+	}
+	
+	public final void primitiveType() throws RecognitionException, TokenStreamException {
+		
+		returnAST = null;
+		ASTPair currentAST = new ASTPair();
+		AST primitiveType_AST = null;
+		
+		{
+		switch ( LA(1)) {
+		case LITERAL_BOOLEAN:
+		{
+			AST tmp47_AST = null;
+			tmp47_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp47_AST);
+			match(LITERAL_BOOLEAN);
+			break;
+		}
+		case LITERAL_BYTE:
+		{
+			AST tmp48_AST = null;
+			tmp48_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp48_AST);
+			match(LITERAL_BYTE);
+			break;
+		}
+		case LITERAL_SHORT:
+		{
+			AST tmp49_AST = null;
+			tmp49_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp49_AST);
+			match(LITERAL_SHORT);
+			break;
+		}
+		case LITERAL_INT:
+		{
+			AST tmp50_AST = null;
+			tmp50_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp50_AST);
+			match(LITERAL_INT);
+			break;
+		}
+		case LITERAL_LONG:
+		{
+			AST tmp51_AST = null;
+			tmp51_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp51_AST);
+			match(LITERAL_LONG);
+			break;
+		}
+		case LITERAL_CHAR:
+		{
+			AST tmp52_AST = null;
+			tmp52_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp52_AST);
+			match(LITERAL_CHAR);
+			break;
+		}
+		case LITERAL_FLOAT:
+		{
+			AST tmp53_AST = null;
+			tmp53_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp53_AST);
+			match(LITERAL_FLOAT);
+			break;
+		}
+		case LITERAL_DOUBLE:
+		{
+			AST tmp54_AST = null;
+			tmp54_AST = astFactory.create(LT(1));
+			astFactory.addASTChild(currentAST, tmp54_AST);
+			match(LITERAL_DOUBLE);
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(LT(1), getFilename());
+		}
+		}
+		}
+		if ( inputState.guessing==0 ) {
+			primitiveType_AST = (AST)currentAST.root;
+			primitiveType_AST.setType(PRIMITIVE_TYPE);
+		}
+		primitiveType_AST = (AST)currentAST.root;
+		returnAST = primitiveType_AST;
+	}
+	
+	
+	public static final String[] _tokenNames = {
+		"<0>",
+		"EOF",
+		"<2>",
+		"NULL_TREE_LOOKAHEAD",
+		"PARAMETERS",
+		"PARAMETER",
+		"VARIABLES",
+		"VARIABLE",
+		"IMPORTS",
+		"IMPORT",
+		"ON_DEMAND_IMPORT",
+		"ORDERSPECS",
+		"ORDERSPEC",
+		"EXPR",
+		"CAST",
+		"METHOD_INVOCATION",
+		"ARG_LIST",
+		"NAME_EXPRESSION",
+		"PRIMITIVE_TYPE",
+		"NAME",
+		"\"import\"",
+		"\"ascending\"",
+		"\"descending\"",
+		"\"true\"",
+		"\"false\"",
+		"\"null\"",
+		"\"this\"",
+		"\"boolean\"",
+		"\"byte\"",
+		"\"short\"",
+		"\"int\"",
+		"\"long\"",
+		"\"char\"",
+		"\"float\"",
+		"\"double\"",
+		"OP_GREATER_OR_EQUAL",
+		"OP_LOWER_OR_EQUAL",
+		"OP_NOT_EQUAL",
+		"OP_AND",
+		"OP_OR",
+		"OP_UNARY_MINUS",
+		"OP_UNARY_PLUS",
+		"SEP_DOT",
+		"FLOATING_POINT_LITERAL",
+		"INTEGER_LITERAL",
+		"SEP_OPENING_PARENTHESIS",
+		"SEP_CLOSING_PARENTHESIS",
+		"SEP_SEMICOLON",
+		"SEP_COMMA",
+		"OP_EQUAL",
+		"OP_GREATER",
+		"OP_LOWER",
+		"OP_NOT",
+		"OP_BITWISE_COMPLEMENT",
+		"OP_BITWISE_AND",
+		"OP_BITWISE_OR",
+		"OP_BITWISE_XOR",
+		"OP_BINARY_PLUS",
+		"OP_BINARY_MINUS",
+		"OP_MULTIPLY",
+		"OP_DIVIDE",
+		"WHITESPACE",
+		"IDENTIFIER",
+		"CHARACTER_LITERAL",
+		"STRING_LITERAL",
+		"INT_OR_FLOAT_LITERAL_OR_DOT",
+		"LINE_TERMINATOR",
+		"ESCAPE_SEQUENCE",
+		"UNICODE_ESCAPE",
+		"OCTAL_ESCAPE",
+		"OCTAL_DIGIT",
+		"DIGIT",
+		"HEX_DIGIT",
+		"EXPONENT_PART",
+		"INTEGER_TYPE_SUFFIX",
+		"FLOAT_TYPE_SUFFIX",
+		"IDENTIFIER_START",
+		"IDENTIFIER_PART"
+	};
+	
+	protected void buildTokenTypeASTClassMap() {
+		tokenTypeToASTClassMap=null;
+	};
+	
+	private static final long[] mk_tokenSet_0() {
+		long[] data = { 4611686052652908544L, 0L};
+		return data;
+	}
+	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+	private static final long[] mk_tokenSet_1() {
+		long[] data = { -4165768082540724224L, 1L, 0L, 0L};
+		return data;
+	}
+	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
+	private static final long[] mk_tokenSet_2() {
+		long[] data = { -4611624445650403328L, 1L, 0L, 0L};
+		return data;
+	}
+	public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
+	private static final long[] mk_tokenSet_3() {
+		long[] data = { -2305987079464550398L, 1L, 0L, 0L};
+		return data;
+	}
+	public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
+	private static final long[] mk_tokenSet_4() {
+		long[] data = { 3377802799742976L, 0L};
+		return data;
+	}
+	public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
+	
+	}

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.java?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.java (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.java Fri Aug 11 18:17:46 2006
@@ -0,0 +1,97 @@
+// $ANTLR 2.7.3: "jdoql-ojb-parser.g" -> "JDOQLParser.java"$
+
+    package org.apache.ojb.jdo.jdoql;
+
+/* Copyright 2003-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public interface JDOQLParserTokenTypes {
+	int EOF = 1;
+	int NULL_TREE_LOOKAHEAD = 3;
+	int PARAMETERS = 4;
+	int PARAMETER = 5;
+	int VARIABLES = 6;
+	int VARIABLE = 7;
+	int IMPORTS = 8;
+	int IMPORT = 9;
+	int ON_DEMAND_IMPORT = 10;
+	int ORDERSPECS = 11;
+	int ORDERSPEC = 12;
+	int EXPR = 13;
+	int CAST = 14;
+	int METHOD_INVOCATION = 15;
+	int ARG_LIST = 16;
+	int NAME_EXPRESSION = 17;
+	int PRIMITIVE_TYPE = 18;
+	int NAME = 19;
+	int LITERAL_IMPORT = 20;
+	int LITERAL_ASCENDING = 21;
+	int LITERAL_DESCENDING = 22;
+	int LITERAL_TRUE = 23;
+	int LITERAL_FALSE = 24;
+	int LITERAL_NULL = 25;
+	int LITERAL_THIS = 26;
+	int LITERAL_BOOLEAN = 27;
+	int LITERAL_BYTE = 28;
+	int LITERAL_SHORT = 29;
+	int LITERAL_INT = 30;
+	int LITERAL_LONG = 31;
+	int LITERAL_CHAR = 32;
+	int LITERAL_FLOAT = 33;
+	int LITERAL_DOUBLE = 34;
+	int OP_GREATER_OR_EQUAL = 35;
+	int OP_LOWER_OR_EQUAL = 36;
+	int OP_NOT_EQUAL = 37;
+	int OP_AND = 38;
+	int OP_OR = 39;
+	int OP_UNARY_MINUS = 40;
+	int OP_UNARY_PLUS = 41;
+	int SEP_DOT = 42;
+	int FLOATING_POINT_LITERAL = 43;
+	int INTEGER_LITERAL = 44;
+	int SEP_OPENING_PARENTHESIS = 45;
+	int SEP_CLOSING_PARENTHESIS = 46;
+	int SEP_SEMICOLON = 47;
+	int SEP_COMMA = 48;
+	int OP_EQUAL = 49;
+	int OP_GREATER = 50;
+	int OP_LOWER = 51;
+	int OP_NOT = 52;
+	int OP_BITWISE_COMPLEMENT = 53;
+	int OP_BITWISE_AND = 54;
+	int OP_BITWISE_OR = 55;
+	int OP_BITWISE_XOR = 56;
+	int OP_BINARY_PLUS = 57;
+	int OP_BINARY_MINUS = 58;
+	int OP_MULTIPLY = 59;
+	int OP_DIVIDE = 60;
+	int WHITESPACE = 61;
+	int IDENTIFIER = 62;
+	int CHARACTER_LITERAL = 63;
+	int STRING_LITERAL = 64;
+	int INT_OR_FLOAT_LITERAL_OR_DOT = 65;
+	int LINE_TERMINATOR = 66;
+	int ESCAPE_SEQUENCE = 67;
+	int UNICODE_ESCAPE = 68;
+	int OCTAL_ESCAPE = 69;
+	int OCTAL_DIGIT = 70;
+	int DIGIT = 71;
+	int HEX_DIGIT = 72;
+	int EXPONENT_PART = 73;
+	int INTEGER_TYPE_SUFFIX = 74;
+	int FLOAT_TYPE_SUFFIX = 75;
+	int IDENTIFIER_START = 76;
+	int IDENTIFIER_PART = 77;
+}

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.txt
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.txt?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.txt (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLParserTokenTypes.txt Fri Aug 11 18:17:46 2006
@@ -0,0 +1,76 @@
+// $ANTLR 2.7.3: jdoql-ojb-parser.g -> JDOQLParserTokenTypes.txt$
+JDOQLParser    // output token vocab name
+PARAMETERS=4
+PARAMETER=5
+VARIABLES=6
+VARIABLE=7
+IMPORTS=8
+IMPORT=9
+ON_DEMAND_IMPORT=10
+ORDERSPECS=11
+ORDERSPEC=12
+EXPR=13
+CAST=14
+METHOD_INVOCATION=15
+ARG_LIST=16
+NAME_EXPRESSION=17
+PRIMITIVE_TYPE=18
+NAME=19
+LITERAL_IMPORT="import"=20
+LITERAL_ASCENDING="ascending"=21
+LITERAL_DESCENDING="descending"=22
+LITERAL_TRUE="true"=23
+LITERAL_FALSE="false"=24
+LITERAL_NULL="null"=25
+LITERAL_THIS="this"=26
+LITERAL_BOOLEAN="boolean"=27
+LITERAL_BYTE="byte"=28
+LITERAL_SHORT="short"=29
+LITERAL_INT="int"=30
+LITERAL_LONG="long"=31
+LITERAL_CHAR="char"=32
+LITERAL_FLOAT="float"=33
+LITERAL_DOUBLE="double"=34
+OP_GREATER_OR_EQUAL=35
+OP_LOWER_OR_EQUAL=36
+OP_NOT_EQUAL=37
+OP_AND=38
+OP_OR=39
+OP_UNARY_MINUS=40
+OP_UNARY_PLUS=41
+SEP_DOT=42
+FLOATING_POINT_LITERAL=43
+INTEGER_LITERAL=44
+SEP_OPENING_PARENTHESIS=45
+SEP_CLOSING_PARENTHESIS=46
+SEP_SEMICOLON=47
+SEP_COMMA=48
+OP_EQUAL=49
+OP_GREATER=50
+OP_LOWER=51
+OP_NOT=52
+OP_BITWISE_COMPLEMENT=53
+OP_BITWISE_AND=54
+OP_BITWISE_OR=55
+OP_BITWISE_XOR=56
+OP_BINARY_PLUS=57
+OP_BINARY_MINUS=58
+OP_MULTIPLY=59
+OP_DIVIDE=60
+WHITESPACE=61
+IDENTIFIER=62
+CHARACTER_LITERAL=63
+STRING_LITERAL=64
+INT_OR_FLOAT_LITERAL_OR_DOT=65
+LINE_TERMINATOR=66
+ESCAPE_SEQUENCE=67
+UNICODE_ESCAPE=68
+OCTAL_ESCAPE=69
+OCTAL_DIGIT=70
+DIGIT=71
+HEX_DIGIT=72
+EXPONENT_PART=73
+INTEGER_TYPE_SUFFIX=74
+FLOAT_TYPE_SUFFIX=75
+IDENTIFIER_START=76
+IDENTIFIER_PART=77

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.java?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.java (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.java Fri Aug 11 18:17:46 2006
@@ -0,0 +1,97 @@
+// $ANTLR 2.7.3: "jdoql-ojb-lexer.g" -> "JDOQLLexer.java"$
+
+    package org.apache.ojb.jdo.jdoql;
+
+/* Copyright 2003-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public interface JDOQLTokenTypes {
+	int EOF = 1;
+	int NULL_TREE_LOOKAHEAD = 3;
+	int PARAMETERS = 4;
+	int PARAMETER = 5;
+	int VARIABLES = 6;
+	int VARIABLE = 7;
+	int IMPORTS = 8;
+	int IMPORT = 9;
+	int ON_DEMAND_IMPORT = 10;
+	int ORDERSPECS = 11;
+	int ORDERSPEC = 12;
+	int EXPR = 13;
+	int CAST = 14;
+	int METHOD_INVOCATION = 15;
+	int ARG_LIST = 16;
+	int NAME_EXPRESSION = 17;
+	int PRIMITIVE_TYPE = 18;
+	int NAME = 19;
+	int LITERAL_IMPORT = 20;
+	int LITERAL_ASCENDING = 21;
+	int LITERAL_DESCENDING = 22;
+	int LITERAL_TRUE = 23;
+	int LITERAL_FALSE = 24;
+	int LITERAL_NULL = 25;
+	int LITERAL_THIS = 26;
+	int LITERAL_BOOLEAN = 27;
+	int LITERAL_BYTE = 28;
+	int LITERAL_SHORT = 29;
+	int LITERAL_INT = 30;
+	int LITERAL_LONG = 31;
+	int LITERAL_CHAR = 32;
+	int LITERAL_FLOAT = 33;
+	int LITERAL_DOUBLE = 34;
+	int OP_GREATER_OR_EQUAL = 35;
+	int OP_LOWER_OR_EQUAL = 36;
+	int OP_NOT_EQUAL = 37;
+	int OP_AND = 38;
+	int OP_OR = 39;
+	int OP_UNARY_MINUS = 40;
+	int OP_UNARY_PLUS = 41;
+	int SEP_DOT = 42;
+	int FLOATING_POINT_LITERAL = 43;
+	int INTEGER_LITERAL = 44;
+	int SEP_OPENING_PARENTHESIS = 45;
+	int SEP_CLOSING_PARENTHESIS = 46;
+	int SEP_SEMICOLON = 47;
+	int SEP_COMMA = 48;
+	int OP_EQUAL = 49;
+	int OP_GREATER = 50;
+	int OP_LOWER = 51;
+	int OP_NOT = 52;
+	int OP_BITWISE_COMPLEMENT = 53;
+	int OP_BITWISE_AND = 54;
+	int OP_BITWISE_OR = 55;
+	int OP_BITWISE_XOR = 56;
+	int OP_BINARY_PLUS = 57;
+	int OP_BINARY_MINUS = 58;
+	int OP_MULTIPLY = 59;
+	int OP_DIVIDE = 60;
+	int WHITESPACE = 61;
+	int IDENTIFIER = 62;
+	int CHARACTER_LITERAL = 63;
+	int STRING_LITERAL = 64;
+	int INT_OR_FLOAT_LITERAL_OR_DOT = 65;
+	int LINE_TERMINATOR = 66;
+	int ESCAPE_SEQUENCE = 67;
+	int UNICODE_ESCAPE = 68;
+	int OCTAL_ESCAPE = 69;
+	int OCTAL_DIGIT = 70;
+	int DIGIT = 71;
+	int HEX_DIGIT = 72;
+	int EXPONENT_PART = 73;
+	int INTEGER_TYPE_SUFFIX = 74;
+	int FLOAT_TYPE_SUFFIX = 75;
+	int IDENTIFIER_START = 76;
+	int IDENTIFIER_PART = 77;
+}

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.txt
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.txt?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.txt (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTokenTypes.txt Fri Aug 11 18:17:46 2006
@@ -0,0 +1,76 @@
+// $ANTLR 2.7.3: jdoql-ojb-lexer.g -> JDOQLTokenTypes.txt$
+JDOQL    // output token vocab name
+PARAMETERS=4
+PARAMETER=5
+VARIABLES=6
+VARIABLE=7
+IMPORTS=8
+IMPORT=9
+ON_DEMAND_IMPORT=10
+ORDERSPECS=11
+ORDERSPEC=12
+EXPR=13
+CAST=14
+METHOD_INVOCATION=15
+ARG_LIST=16
+NAME_EXPRESSION=17
+PRIMITIVE_TYPE=18
+NAME=19
+LITERAL_IMPORT="import"=20
+LITERAL_ASCENDING="ascending"=21
+LITERAL_DESCENDING="descending"=22
+LITERAL_TRUE="true"=23
+LITERAL_FALSE="false"=24
+LITERAL_NULL="null"=25
+LITERAL_THIS="this"=26
+LITERAL_BOOLEAN="boolean"=27
+LITERAL_BYTE="byte"=28
+LITERAL_SHORT="short"=29
+LITERAL_INT="int"=30
+LITERAL_LONG="long"=31
+LITERAL_CHAR="char"=32
+LITERAL_FLOAT="float"=33
+LITERAL_DOUBLE="double"=34
+OP_GREATER_OR_EQUAL=35
+OP_LOWER_OR_EQUAL=36
+OP_NOT_EQUAL=37
+OP_AND=38
+OP_OR=39
+OP_UNARY_MINUS=40
+OP_UNARY_PLUS=41
+SEP_DOT=42
+FLOATING_POINT_LITERAL=43
+INTEGER_LITERAL=44
+SEP_OPENING_PARENTHESIS=45
+SEP_CLOSING_PARENTHESIS=46
+SEP_SEMICOLON=47
+SEP_COMMA=48
+OP_EQUAL=49
+OP_GREATER=50
+OP_LOWER=51
+OP_NOT=52
+OP_BITWISE_COMPLEMENT=53
+OP_BITWISE_AND=54
+OP_BITWISE_OR=55
+OP_BITWISE_XOR=56
+OP_BINARY_PLUS=57
+OP_BINARY_MINUS=58
+OP_MULTIPLY=59
+OP_DIVIDE=60
+WHITESPACE=61
+IDENTIFIER=62
+CHARACTER_LITERAL=63
+STRING_LITERAL=64
+INT_OR_FLOAT_LITERAL_OR_DOT=65
+LINE_TERMINATOR=66
+ESCAPE_SEQUENCE=67
+UNICODE_ESCAPE=68
+OCTAL_ESCAPE=69
+OCTAL_DIGIT=70
+DIGIT=71
+HEX_DIGIT=72
+EXPONENT_PART=73
+INTEGER_TYPE_SUFFIX=74
+FLOAT_TYPE_SUFFIX=75
+IDENTIFIER_START=76
+IDENTIFIER_PART=77

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParser.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParser.java?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParser.java (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParser.java Fri Aug 11 18:17:46 2006
@@ -0,0 +1,1240 @@
+// $ANTLR 2.7.3: "jdoql-ojb-treeparser.g" -> "JDOQLTreeParser.java"$
+
+    package org.apache.ojb.jdo.jdoql;
+
+/* Copyright 2003-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+	import java.util.*;
+
+import antlr.TreeParser;
+import antlr.Token;
+import antlr.collections.AST;
+import antlr.RecognitionException;
+import antlr.ANTLRException;
+import antlr.NoViableAltException;
+import antlr.MismatchedTokenException;
+import antlr.SemanticException;
+import antlr.collections.impl.BitSet;
+import antlr.ASTPair;
+import antlr.collections.impl.ASTArray;
+
+
+public class JDOQLTreeParser extends antlr.TreeParser       implements JDOQLTreeParserTokenTypes
+ {
+public JDOQLTreeParser() {
+	tokenNames = _tokenNames;
+}
+
+	public final Map  declareParameters(AST _t) throws RecognitionException {
+		Map result;
+		
+		AST declareParameters_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		
+				LocalVariable varDecl;
+		
+				result = new HashMap();
+			
+		AST __t2 = _t;
+		AST tmp1_AST_in = (AST)_t;
+		match(_t,PARAMETERS);
+		_t = _t.getFirstChild();
+		{
+		_loop4:
+		do {
+			if (_t==null) _t=ASTNULL;
+			if ((_t.getType()==PARAMETER)) {
+				varDecl=parameter(_t);
+				_t = _retTree;
+				
+					    result.put(varDecl.getName(), varDecl);
+				
+			}
+			else {
+				break _loop4;
+			}
+			
+		} while (true);
+		}
+		_t = __t2;
+		_t = _t.getNextSibling();
+		_retTree = _t;
+		return result;
+	}
+	
+	public final LocalVariable  parameter(AST _t) throws RecognitionException {
+		LocalVariable varDecl;
+		
+		AST parameter_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST name = null;
+		
+		
+				Type varType = null;
+			
+		AST __t6 = _t;
+		AST tmp2_AST_in = (AST)_t;
+		match(_t,PARAMETER);
+		_t = _t.getFirstChild();
+		varType=type(_t);
+		_t = _retTree;
+		name = (AST)_t;
+		match(_t,IDENTIFIER);
+		_t = _t.getNextSibling();
+		_t = __t6;
+		_t = _t.getNextSibling();
+		
+			    varDecl = new LocalVariable(varType, name.getText());
+			    varDecl.setPosition(varType.getLine(), varType.getColumn());
+		
+		_retTree = _t;
+		return varDecl;
+	}
+	
+	public final Type  type(AST _t) throws RecognitionException {
+		Type result;
+		
+		AST type_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST primitiveTypeName = null;
+		AST typeName = null;
+		
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case PRIMITIVE_TYPE:
+		{
+			primitiveTypeName = (AST)_t;
+			match(_t,PRIMITIVE_TYPE);
+			_t = _t.getNextSibling();
+			
+				      result = new Type(primitiveTypeName.getText(), true);
+				  	  result.setPosition(primitiveTypeName.getLine(), primitiveTypeName.getColumn());
+				
+			break;
+		}
+		case NAME:
+		{
+			typeName = (AST)_t;
+			match(_t,NAME);
+			_t = _t.getNextSibling();
+			
+				      result = new Type(typeName.getText(), false);
+				  	  result.setPosition(typeName.getLine(), typeName.getColumn());
+				
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_retTree = _t;
+		return result;
+	}
+	
+	public final Map  declareVariables(AST _t) throws RecognitionException {
+		Map result;
+		
+		AST declareVariables_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		
+				LocalVariable varDecl;
+		
+				result = new HashMap();
+			
+		AST __t8 = _t;
+		AST tmp3_AST_in = (AST)_t;
+		match(_t,VARIABLES);
+		_t = _t.getFirstChild();
+		{
+		_loop10:
+		do {
+			if (_t==null) _t=ASTNULL;
+			if ((_t.getType()==VARIABLE)) {
+				varDecl=variable(_t);
+				_t = _retTree;
+				
+					    result.put(varDecl.getName(), varDecl);
+				
+			}
+			else {
+				break _loop10;
+			}
+			
+		} while (true);
+		}
+		_t = __t8;
+		_t = _t.getNextSibling();
+		_retTree = _t;
+		return result;
+	}
+	
+	public final LocalVariable  variable(AST _t) throws RecognitionException {
+		LocalVariable varDecl;
+		
+		AST variable_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST name = null;
+		
+		
+				Type varType = null;
+			
+		AST __t12 = _t;
+		AST tmp4_AST_in = (AST)_t;
+		match(_t,VARIABLE);
+		_t = _t.getFirstChild();
+		varType=type(_t);
+		_t = _retTree;
+		name = (AST)_t;
+		match(_t,IDENTIFIER);
+		_t = _t.getNextSibling();
+		_t = __t12;
+		_t = _t.getNextSibling();
+		
+			    varDecl = new LocalVariable(varType, name.getText());
+			    varDecl.setPosition(varType.getLine(), varType.getColumn());
+		
+		_retTree = _t;
+		return varDecl;
+	}
+	
+	public final List  declareImports(AST _t) throws RecognitionException {
+		List result;
+		
+		AST declareImports_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		
+				Import importDecl;
+		
+				result = new ArrayList();
+			
+		AST __t14 = _t;
+		AST tmp5_AST_in = (AST)_t;
+		match(_t,IMPORTS);
+		_t = _t.getFirstChild();
+		{
+		_loop16:
+		do {
+			if (_t==null) _t=ASTNULL;
+			if ((_t.getType()==IMPORT||_t.getType()==ON_DEMAND_IMPORT)) {
+				importDecl=importDeclaration(_t);
+				_t = _retTree;
+				
+					    result.add(importDecl);
+				
+			}
+			else {
+				break _loop16;
+			}
+			
+		} while (true);
+		}
+		_t = __t14;
+		_t = _t.getNextSibling();
+		_retTree = _t;
+		return result;
+	}
+	
+	public final Import  importDeclaration(AST _t) throws RecognitionException {
+		Import importDecl;
+		
+		AST importDeclaration_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST i1 = null;
+		AST name1 = null;
+		AST i2 = null;
+		AST name2 = null;
+		
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case IMPORT:
+		{
+			AST __t19 = _t;
+			i1 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,IMPORT);
+			_t = _t.getFirstChild();
+			name1 = (AST)_t;
+			match(_t,NAME);
+			_t = _t.getNextSibling();
+			_t = __t19;
+			_t = _t.getNextSibling();
+			
+				  	  importDecl = new Import(name1.getText(), false);
+				  	  importDecl.setPosition(i1.getLine(), i1.getColumn());
+				
+			break;
+		}
+		case ON_DEMAND_IMPORT:
+		{
+			AST __t20 = _t;
+			i2 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,ON_DEMAND_IMPORT);
+			_t = _t.getFirstChild();
+			name2 = (AST)_t;
+			match(_t,NAME);
+			_t = _t.getNextSibling();
+			_t = __t20;
+			_t = _t.getNextSibling();
+			
+				  	  importDecl = new Import(name2.getText(), true);
+				  	  importDecl.setPosition(i2.getLine(), i2.getColumn());
+				
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_retTree = _t;
+		return importDecl;
+	}
+	
+	public final List  setOrdering(AST _t) throws RecognitionException {
+		List result;
+		
+		AST setOrdering_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		
+				Ordering orderingDecl;
+		
+				result = new ArrayList();
+			
+		AST __t22 = _t;
+		AST tmp6_AST_in = (AST)_t;
+		match(_t,ORDERSPECS);
+		_t = _t.getFirstChild();
+		{
+		_loop24:
+		do {
+			if (_t==null) _t=ASTNULL;
+			if ((_t.getType()==ORDERSPEC)) {
+				orderingDecl=orderSpecification(_t);
+				_t = _retTree;
+				
+					    result.add(orderingDecl);
+				
+			}
+			else {
+				break _loop24;
+			}
+			
+		} while (true);
+		}
+		_t = __t22;
+		_t = _t.getNextSibling();
+		_retTree = _t;
+		return result;
+	}
+	
+	public final Ordering  orderSpecification(AST _t) throws RecognitionException {
+		Ordering orderingDecl;
+		
+		AST orderSpecification_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST o = null;
+		
+		
+				Expression expr = null;
+				boolean    isAscending;
+			
+		AST __t26 = _t;
+		o = _t==ASTNULL ? null :(AST)_t;
+		match(_t,ORDERSPEC);
+		_t = _t.getFirstChild();
+		expr=expression(_t);
+		_t = _retTree;
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case LITERAL_ASCENDING:
+		{
+			AST tmp7_AST_in = (AST)_t;
+			match(_t,LITERAL_ASCENDING);
+			_t = _t.getNextSibling();
+			
+				    isAscending = true;
+			
+			break;
+		}
+		case LITERAL_DESCENDING:
+		{
+			AST tmp8_AST_in = (AST)_t;
+			match(_t,LITERAL_DESCENDING);
+			_t = _t.getNextSibling();
+			
+				    isAscending = false;
+			
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_t = __t26;
+		_t = _t.getNextSibling();
+		
+				orderingDecl = new Ordering(expr, isAscending);
+				orderingDecl.setPosition(o.getLine(), o.getColumn());
+			
+		_retTree = _t;
+		return orderingDecl;
+	}
+	
+	public final Expression  expression(AST _t) throws RecognitionException {
+		Expression expr;
+		
+		AST expression_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case LITERAL_TRUE:
+		case LITERAL_FALSE:
+		case FLOATING_POINT_LITERAL:
+		case INTEGER_LITERAL:
+		case CHARACTER_LITERAL:
+		case STRING_LITERAL:
+		{
+			expr=literal(_t);
+			_t = _retTree;
+			break;
+		}
+		case LITERAL_NULL:
+		{
+			expr=nullLiteral(_t);
+			_t = _retTree;
+			break;
+		}
+		case LITERAL_THIS:
+		{
+			expr=thisExpression(_t);
+			_t = _retTree;
+			break;
+		}
+		case OP_GREATER_OR_EQUAL:
+		case OP_LOWER_OR_EQUAL:
+		case OP_NOT_EQUAL:
+		case OP_AND:
+		case OP_OR:
+		case OP_EQUAL:
+		case OP_GREATER:
+		case OP_LOWER:
+		case OP_BITWISE_AND:
+		case OP_BITWISE_OR:
+		case OP_BITWISE_XOR:
+		case OP_BINARY_PLUS:
+		case OP_BINARY_MINUS:
+		case OP_MULTIPLY:
+		case OP_DIVIDE:
+		{
+			expr=binaryExpression(_t);
+			_t = _retTree;
+			break;
+		}
+		case CAST:
+		case OP_UNARY_MINUS:
+		case OP_UNARY_PLUS:
+		case OP_NOT:
+		case OP_BITWISE_COMPLEMENT:
+		{
+			expr=unaryExpression(_t);
+			_t = _retTree;
+			break;
+		}
+		case METHOD_INVOCATION:
+		{
+			expr=methodInvocation(_t);
+			_t = _retTree;
+			break;
+		}
+		case NAME_EXPRESSION:
+		{
+			expr=nameExpression(_t);
+			_t = _retTree;
+			break;
+		}
+		case SEP_DOT:
+		{
+			expr=postfixExpression(_t);
+			_t = _retTree;
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_retTree = _t;
+		return expr;
+	}
+	
+	public final Literal  literal(AST _t) throws RecognitionException {
+		Literal literal;
+		
+		AST literal_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST l1 = null;
+		AST l2 = null;
+		AST l3 = null;
+		AST l4 = null;
+		AST l5 = null;
+		AST l6 = null;
+		
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case LITERAL_TRUE:
+		{
+			l1 = (AST)_t;
+			match(_t,LITERAL_TRUE);
+			_t = _t.getNextSibling();
+			
+				  	  literal = new Literal(boolean.class, l1.getText());
+					  literal.setPosition(l1.getLine(), l2.getColumn());
+				
+			break;
+		}
+		case LITERAL_FALSE:
+		{
+			l2 = (AST)_t;
+			match(_t,LITERAL_FALSE);
+			_t = _t.getNextSibling();
+			
+				  	  literal = new Literal(boolean.class, l2.getText());
+					  literal.setPosition(l2.getLine(), l2.getColumn());
+				
+			break;
+		}
+		case INTEGER_LITERAL:
+		{
+			l3 = (AST)_t;
+			match(_t,INTEGER_LITERAL);
+			_t = _t.getNextSibling();
+			
+				  	  literal = new Literal(long.class, l3.getText());
+					  literal.setPosition(l3.getLine(), l3.getColumn());
+				
+			break;
+		}
+		case FLOATING_POINT_LITERAL:
+		{
+			l4 = (AST)_t;
+			match(_t,FLOATING_POINT_LITERAL);
+			_t = _t.getNextSibling();
+			
+				  	  literal = new Literal(double.class, l4.getText());
+					  literal.setPosition(l4.getLine(), l4.getColumn());
+				
+			break;
+		}
+		case CHARACTER_LITERAL:
+		{
+			l5 = (AST)_t;
+			match(_t,CHARACTER_LITERAL);
+			_t = _t.getNextSibling();
+			
+				  	  literal = new Literal(char.class, l5.getText());
+					  literal.setPosition(l5.getLine(), l5.getColumn());
+				
+			break;
+		}
+		case STRING_LITERAL:
+		{
+			l6 = (AST)_t;
+			match(_t,STRING_LITERAL);
+			_t = _t.getNextSibling();
+			
+				  	  literal = new Literal(String.class, l6.getText());
+					  literal.setPosition(l6.getLine(), l6.getColumn());
+				
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_retTree = _t;
+		return literal;
+	}
+	
+	public final NullLiteral  nullLiteral(AST _t) throws RecognitionException {
+		NullLiteral literal;
+		
+		AST nullLiteral_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST l = null;
+		
+		l = (AST)_t;
+		match(_t,LITERAL_NULL);
+		_t = _t.getNextSibling();
+		
+			  	literal = new NullLiteral();
+				literal.setPosition(l.getLine(), l.getColumn());
+			
+		_retTree = _t;
+		return literal;
+	}
+	
+	public final ThisExpression  thisExpression(AST _t) throws RecognitionException {
+		ThisExpression expr;
+		
+		AST thisExpression_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST l = null;
+		
+		l = (AST)_t;
+		match(_t,LITERAL_THIS);
+		_t = _t.getNextSibling();
+		
+		expr = new ThisExpression();
+				expr.setPosition(l.getLine(), l.getColumn());
+		
+		_retTree = _t;
+		return expr;
+	}
+	
+	public final BinaryExpression  binaryExpression(AST _t) throws RecognitionException {
+		BinaryExpression expr;
+		
+		AST binaryExpression_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST o1 = null;
+		AST o2 = null;
+		AST o3 = null;
+		AST o4 = null;
+		AST o5 = null;
+		AST o6 = null;
+		AST o7 = null;
+		AST o8 = null;
+		AST o9 = null;
+		AST o10 = null;
+		AST o11 = null;
+		AST o12 = null;
+		AST o13 = null;
+		AST o14 = null;
+		AST o15 = null;
+		
+		
+				Expression left  = null;
+				Expression right = null;
+			
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case OP_MULTIPLY:
+		{
+			AST __t53 = _t;
+			o1 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_MULTIPLY);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t53;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_MULTIPLY, right);
+					  expr.setPosition(o1.getLine(), o1.getColumn());
+				
+			break;
+		}
+		case OP_DIVIDE:
+		{
+			AST __t54 = _t;
+			o2 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_DIVIDE);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t54;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_DIVIDE, right);
+					  expr.setPosition(o2.getLine(), o2.getColumn());
+				
+			break;
+		}
+		case OP_BINARY_PLUS:
+		{
+			AST __t55 = _t;
+			o3 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_BINARY_PLUS);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t55;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_PLUS, right);
+					  expr.setPosition(o3.getLine(), o3.getColumn());
+				
+			break;
+		}
+		case OP_BINARY_MINUS:
+		{
+			AST __t56 = _t;
+			o4 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_BINARY_MINUS);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t56;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_MINUS, right);
+					  expr.setPosition(o4.getLine(), o4.getColumn());
+				
+			break;
+		}
+		case OP_LOWER:
+		{
+			AST __t57 = _t;
+			o5 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_LOWER);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t57;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_LOWER, right);
+					  expr.setPosition(o5.getLine(), o5.getColumn());
+				
+			break;
+		}
+		case OP_GREATER:
+		{
+			AST __t58 = _t;
+			o6 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_GREATER);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t58;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_GREATER, right);
+					  expr.setPosition(o6.getLine(), o6.getColumn());
+				
+			break;
+		}
+		case OP_LOWER_OR_EQUAL:
+		{
+			AST __t59 = _t;
+			o7 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_LOWER_OR_EQUAL);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t59;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_LOWER_OR_EQUAL, right);
+					  expr.setPosition(o7.getLine(), o7.getColumn());
+				
+			break;
+		}
+		case OP_GREATER_OR_EQUAL:
+		{
+			AST __t60 = _t;
+			o8 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_GREATER_OR_EQUAL);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t60;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_GREATER_OR_EQUAL, right);
+					  expr.setPosition(o8.getLine(), o8.getColumn());
+				
+			break;
+		}
+		case OP_EQUAL:
+		{
+			AST __t61 = _t;
+			o9 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_EQUAL);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t61;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_EQUAL, right);
+					  expr.setPosition(o9.getLine(), o9.getColumn());
+				
+			break;
+		}
+		case OP_NOT_EQUAL:
+		{
+			AST __t62 = _t;
+			o10 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_NOT_EQUAL);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t62;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_NOT_EQUAL, right);
+					  expr.setPosition(o10.getLine(), o10.getColumn());
+				
+			break;
+		}
+		case OP_BITWISE_AND:
+		{
+			AST __t63 = _t;
+			o11 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_BITWISE_AND);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t63;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_BITWISE_AND, right);
+					  expr.setPosition(o11.getLine(), o11.getColumn());
+				
+			break;
+		}
+		case OP_BITWISE_XOR:
+		{
+			AST __t64 = _t;
+			o12 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_BITWISE_XOR);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t64;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_BITWISE_XOR, right);
+					  expr.setPosition(o12.getLine(), o12.getColumn());
+				
+			break;
+		}
+		case OP_BITWISE_OR:
+		{
+			AST __t65 = _t;
+			o13 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_BITWISE_OR);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t65;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_BITWISE_OR, right);
+					  expr.setPosition(o13.getLine(), o13.getColumn());
+				
+			break;
+		}
+		case OP_AND:
+		{
+			AST __t66 = _t;
+			o14 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_AND);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t66;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_AND, right);
+					  expr.setPosition(o14.getLine(), o14.getColumn());
+				
+			break;
+		}
+		case OP_OR:
+		{
+			AST __t67 = _t;
+			o15 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_OR);
+			_t = _t.getFirstChild();
+			left=expression(_t);
+			_t = _retTree;
+			right=expression(_t);
+			_t = _retTree;
+			_t = __t67;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new BinaryExpression(left, BinaryExpression.OPERATOR_OR, right);
+					  expr.setPosition(o15.getLine(), o15.getColumn());
+				
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_retTree = _t;
+		return expr;
+	}
+	
+	public final UnaryExpression  unaryExpression(AST _t) throws RecognitionException {
+		UnaryExpression expr;
+		
+		AST unaryExpression_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST o1 = null;
+		AST o2 = null;
+		AST o3 = null;
+		AST o4 = null;
+		AST o5 = null;
+		
+		
+				Expression inner    = null;
+				Type       castType = null;
+			
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case OP_UNARY_MINUS:
+		{
+			AST __t46 = _t;
+			o1 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_UNARY_MINUS);
+			_t = _t.getFirstChild();
+			inner=expression(_t);
+			_t = _retTree;
+			_t = __t46;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new UnaryExpression(UnaryExpression.OPERATOR_MINUS, inner);
+					  expr.setPosition(o1.getLine(), o1.getColumn());
+				
+			break;
+		}
+		case OP_UNARY_PLUS:
+		{
+			AST __t47 = _t;
+			o2 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_UNARY_PLUS);
+			_t = _t.getFirstChild();
+			inner=expression(_t);
+			_t = _retTree;
+			_t = __t47;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new UnaryExpression(UnaryExpression.OPERATOR_PLUS, inner);
+					  expr.setPosition(o2.getLine(), o2.getColumn());
+				
+			break;
+		}
+		case OP_BITWISE_COMPLEMENT:
+		{
+			AST __t48 = _t;
+			o3 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_BITWISE_COMPLEMENT);
+			_t = _t.getFirstChild();
+			inner=expression(_t);
+			_t = _retTree;
+			_t = __t48;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new UnaryExpression(UnaryExpression.OPERATOR_BITWISE_COMPLEMENT, inner);
+					  expr.setPosition(o3.getLine(), o3.getColumn());
+				
+			break;
+		}
+		case OP_NOT:
+		{
+			AST __t49 = _t;
+			o4 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,OP_NOT);
+			_t = _t.getFirstChild();
+			inner=expression(_t);
+			_t = _retTree;
+			_t = __t49;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new UnaryExpression(UnaryExpression.OPERATOR_NOT, inner);
+					  expr.setPosition(o4.getLine(), o4.getColumn());
+				
+			break;
+		}
+		case CAST:
+		{
+			AST __t50 = _t;
+			o5 = _t==ASTNULL ? null :(AST)_t;
+			match(_t,CAST);
+			_t = _t.getFirstChild();
+			castType=type(_t);
+			_t = _retTree;
+			inner=expression(_t);
+			_t = _retTree;
+			_t = __t50;
+			_t = _t.getNextSibling();
+			
+				  	  expr = new UnaryExpression(castType, inner);
+					  expr.setPosition(o5.getLine(), o5.getColumn());
+				
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_retTree = _t;
+		return expr;
+	}
+	
+	public final MethodInvocation  methodInvocation(AST _t) throws RecognitionException {
+		MethodInvocation methodInvoc;
+		
+		AST methodInvocation_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST m = null;
+		
+		
+				List args = null;
+			
+		AST __t35 = _t;
+		m = _t==ASTNULL ? null :(AST)_t;
+		match(_t,METHOD_INVOCATION);
+		_t = _t.getFirstChild();
+		args=argList(_t);
+		_t = _retTree;
+		_t = __t35;
+		_t = _t.getNextSibling();
+		
+				methodInvoc = new MethodInvocation(null, m.getText(), args);
+				methodInvoc.setPosition(m.getLine(), m.getColumn());
+			
+		_retTree = _t;
+		return methodInvoc;
+	}
+	
+	public final NameExpression  nameExpression(AST _t) throws RecognitionException {
+		NameExpression nameExpr;
+		
+		AST nameExpression_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		AST expr = null;
+		
+		expr = (AST)_t;
+		match(_t,NAME_EXPRESSION);
+		_t = _t.getNextSibling();
+		
+				nameExpr = new NameExpression(null, expr.getText());
+			    nameExpr.setPosition(expr.getLine(), expr.getColumn());
+			
+		_retTree = _t;
+		return nameExpr;
+	}
+	
+	public final PostfixExpression  postfixExpression(AST _t) throws RecognitionException {
+		PostfixExpression expr;
+		
+		AST postfixExpression_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		
+				Expression        baseExpr     = null;
+				PostfixExpression trailingExpr = null;
+			
+		AST __t42 = _t;
+		AST tmp9_AST_in = (AST)_t;
+		match(_t,SEP_DOT);
+		_t = _t.getFirstChild();
+		baseExpr=expression(_t);
+		_t = _retTree;
+		{
+		if (_t==null) _t=ASTNULL;
+		switch ( _t.getType()) {
+		case NAME_EXPRESSION:
+		{
+			trailingExpr=nameExpression(_t);
+			_t = _retTree;
+			break;
+		}
+		case METHOD_INVOCATION:
+		{
+			trailingExpr=methodInvocation(_t);
+			_t = _retTree;
+			break;
+		}
+		default:
+		{
+			throw new NoViableAltException(_t);
+		}
+		}
+		}
+		_t = __t42;
+		_t = _t.getNextSibling();
+		
+				expr = trailingExpr;
+				expr.setBaseExpression(baseExpr);
+			
+		_retTree = _t;
+		return expr;
+	}
+	
+	public final List  argList(AST _t) throws RecognitionException {
+		List args;
+		
+		AST argList_AST_in = (_t == ASTNULL) ? null : (AST)_t;
+		
+		
+				Expression argExpr = null;
+		
+				args = new ArrayList();
+			
+		AST __t37 = _t;
+		AST tmp10_AST_in = (AST)_t;
+		match(_t,ARG_LIST);
+		_t = _t.getFirstChild();
+		{
+		_loop39:
+		do {
+			if (_t==null) _t=ASTNULL;
+			if ((_tokenSet_0.member(_t.getType()))) {
+				argExpr=expression(_t);
+				_t = _retTree;
+				
+					     args.add(argExpr);
+				
+			}
+			else {
+				break _loop39;
+			}
+			
+		} while (true);
+		}
+		_t = __t37;
+		_t = _t.getNextSibling();
+		_retTree = _t;
+		return args;
+	}
+	
+	
+	public static final String[] _tokenNames = {
+		"<0>",
+		"EOF",
+		"<2>",
+		"NULL_TREE_LOOKAHEAD",
+		"PARAMETERS",
+		"PARAMETER",
+		"VARIABLES",
+		"VARIABLE",
+		"IMPORTS",
+		"IMPORT",
+		"ON_DEMAND_IMPORT",
+		"ORDERSPECS",
+		"ORDERSPEC",
+		"EXPR",
+		"CAST",
+		"METHOD_INVOCATION",
+		"ARG_LIST",
+		"NAME_EXPRESSION",
+		"PRIMITIVE_TYPE",
+		"NAME",
+		"\"import\"",
+		"\"ascending\"",
+		"\"descending\"",
+		"\"true\"",
+		"\"false\"",
+		"\"null\"",
+		"\"this\"",
+		"\"boolean\"",
+		"\"byte\"",
+		"\"short\"",
+		"\"int\"",
+		"\"long\"",
+		"\"char\"",
+		"\"float\"",
+		"\"double\"",
+		"OP_GREATER_OR_EQUAL",
+		"OP_LOWER_OR_EQUAL",
+		"OP_NOT_EQUAL",
+		"OP_AND",
+		"OP_OR",
+		"OP_UNARY_MINUS",
+		"OP_UNARY_PLUS",
+		"SEP_DOT",
+		"FLOATING_POINT_LITERAL",
+		"INTEGER_LITERAL",
+		"SEP_OPENING_PARENTHESIS",
+		"SEP_CLOSING_PARENTHESIS",
+		"SEP_SEMICOLON",
+		"SEP_COMMA",
+		"OP_EQUAL",
+		"OP_GREATER",
+		"OP_LOWER",
+		"OP_NOT",
+		"OP_BITWISE_COMPLEMENT",
+		"OP_BITWISE_AND",
+		"OP_BITWISE_OR",
+		"OP_BITWISE_XOR",
+		"OP_BINARY_PLUS",
+		"OP_BINARY_MINUS",
+		"OP_MULTIPLY",
+		"OP_DIVIDE",
+		"WHITESPACE",
+		"IDENTIFIER",
+		"CHARACTER_LITERAL",
+		"STRING_LITERAL",
+		"INT_OR_FLOAT_LITERAL_OR_DOT",
+		"LINE_TERMINATOR",
+		"ESCAPE_SEQUENCE",
+		"UNICODE_ESCAPE",
+		"OCTAL_ESCAPE",
+		"OCTAL_DIGIT",
+		"DIGIT",
+		"HEX_DIGIT",
+		"EXPONENT_PART",
+		"INTEGER_TYPE_SUFFIX",
+		"FLOAT_TYPE_SUFFIX",
+		"IDENTIFIER_START",
+		"IDENTIFIER_PART"
+	};
+	
+	private static final long[] mk_tokenSet_0() {
+		long[] data = { -6918056827456143360L, 1L, 0L, 0L};
+		return data;
+	}
+	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+	}
+	

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.java?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.java (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.java Fri Aug 11 18:17:46 2006
@@ -0,0 +1,99 @@
+// $ANTLR 2.7.3: "jdoql-ojb-treeparser.g" -> "JDOQLTreeParser.java"$
+
+    package org.apache.ojb.jdo.jdoql;
+
+/* Copyright 2003-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+	import java.util.*;
+
+public interface JDOQLTreeParserTokenTypes {
+	int EOF = 1;
+	int NULL_TREE_LOOKAHEAD = 3;
+	int PARAMETERS = 4;
+	int PARAMETER = 5;
+	int VARIABLES = 6;
+	int VARIABLE = 7;
+	int IMPORTS = 8;
+	int IMPORT = 9;
+	int ON_DEMAND_IMPORT = 10;
+	int ORDERSPECS = 11;
+	int ORDERSPEC = 12;
+	int EXPR = 13;
+	int CAST = 14;
+	int METHOD_INVOCATION = 15;
+	int ARG_LIST = 16;
+	int NAME_EXPRESSION = 17;
+	int PRIMITIVE_TYPE = 18;
+	int NAME = 19;
+	int LITERAL_IMPORT = 20;
+	int LITERAL_ASCENDING = 21;
+	int LITERAL_DESCENDING = 22;
+	int LITERAL_TRUE = 23;
+	int LITERAL_FALSE = 24;
+	int LITERAL_NULL = 25;
+	int LITERAL_THIS = 26;
+	int LITERAL_BOOLEAN = 27;
+	int LITERAL_BYTE = 28;
+	int LITERAL_SHORT = 29;
+	int LITERAL_INT = 30;
+	int LITERAL_LONG = 31;
+	int LITERAL_CHAR = 32;
+	int LITERAL_FLOAT = 33;
+	int LITERAL_DOUBLE = 34;
+	int OP_GREATER_OR_EQUAL = 35;
+	int OP_LOWER_OR_EQUAL = 36;
+	int OP_NOT_EQUAL = 37;
+	int OP_AND = 38;
+	int OP_OR = 39;
+	int OP_UNARY_MINUS = 40;
+	int OP_UNARY_PLUS = 41;
+	int SEP_DOT = 42;
+	int FLOATING_POINT_LITERAL = 43;
+	int INTEGER_LITERAL = 44;
+	int SEP_OPENING_PARENTHESIS = 45;
+	int SEP_CLOSING_PARENTHESIS = 46;
+	int SEP_SEMICOLON = 47;
+	int SEP_COMMA = 48;
+	int OP_EQUAL = 49;
+	int OP_GREATER = 50;
+	int OP_LOWER = 51;
+	int OP_NOT = 52;
+	int OP_BITWISE_COMPLEMENT = 53;
+	int OP_BITWISE_AND = 54;
+	int OP_BITWISE_OR = 55;
+	int OP_BITWISE_XOR = 56;
+	int OP_BINARY_PLUS = 57;
+	int OP_BINARY_MINUS = 58;
+	int OP_MULTIPLY = 59;
+	int OP_DIVIDE = 60;
+	int WHITESPACE = 61;
+	int IDENTIFIER = 62;
+	int CHARACTER_LITERAL = 63;
+	int STRING_LITERAL = 64;
+	int INT_OR_FLOAT_LITERAL_OR_DOT = 65;
+	int LINE_TERMINATOR = 66;
+	int ESCAPE_SEQUENCE = 67;
+	int UNICODE_ESCAPE = 68;
+	int OCTAL_ESCAPE = 69;
+	int OCTAL_DIGIT = 70;
+	int DIGIT = 71;
+	int HEX_DIGIT = 72;
+	int EXPONENT_PART = 73;
+	int INTEGER_TYPE_SUFFIX = 74;
+	int FLOAT_TYPE_SUFFIX = 75;
+	int IDENTIFIER_START = 76;
+	int IDENTIFIER_PART = 77;
+}

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.txt
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.txt?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.txt (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/JDOQLTreeParserTokenTypes.txt Fri Aug 11 18:17:46 2006
@@ -0,0 +1,76 @@
+// $ANTLR 2.7.3: jdoql-ojb-treeparser.g -> JDOQLTreeParserTokenTypes.txt$
+JDOQLTreeParser    // output token vocab name
+PARAMETERS=4
+PARAMETER=5
+VARIABLES=6
+VARIABLE=7
+IMPORTS=8
+IMPORT=9
+ON_DEMAND_IMPORT=10
+ORDERSPECS=11
+ORDERSPEC=12
+EXPR=13
+CAST=14
+METHOD_INVOCATION=15
+ARG_LIST=16
+NAME_EXPRESSION=17
+PRIMITIVE_TYPE=18
+NAME=19
+LITERAL_IMPORT="import"=20
+LITERAL_ASCENDING="ascending"=21
+LITERAL_DESCENDING="descending"=22
+LITERAL_TRUE="true"=23
+LITERAL_FALSE="false"=24
+LITERAL_NULL="null"=25
+LITERAL_THIS="this"=26
+LITERAL_BOOLEAN="boolean"=27
+LITERAL_BYTE="byte"=28
+LITERAL_SHORT="short"=29
+LITERAL_INT="int"=30
+LITERAL_LONG="long"=31
+LITERAL_CHAR="char"=32
+LITERAL_FLOAT="float"=33
+LITERAL_DOUBLE="double"=34
+OP_GREATER_OR_EQUAL=35
+OP_LOWER_OR_EQUAL=36
+OP_NOT_EQUAL=37
+OP_AND=38
+OP_OR=39
+OP_UNARY_MINUS=40
+OP_UNARY_PLUS=41
+SEP_DOT=42
+FLOATING_POINT_LITERAL=43
+INTEGER_LITERAL=44
+SEP_OPENING_PARENTHESIS=45
+SEP_CLOSING_PARENTHESIS=46
+SEP_SEMICOLON=47
+SEP_COMMA=48
+OP_EQUAL=49
+OP_GREATER=50
+OP_LOWER=51
+OP_NOT=52
+OP_BITWISE_COMPLEMENT=53
+OP_BITWISE_AND=54
+OP_BITWISE_OR=55
+OP_BITWISE_XOR=56
+OP_BINARY_PLUS=57
+OP_BINARY_MINUS=58
+OP_MULTIPLY=59
+OP_DIVIDE=60
+WHITESPACE=61
+IDENTIFIER=62
+CHARACTER_LITERAL=63
+STRING_LITERAL=64
+INT_OR_FLOAT_LITERAL_OR_DOT=65
+LINE_TERMINATOR=66
+ESCAPE_SEQUENCE=67
+UNICODE_ESCAPE=68
+OCTAL_ESCAPE=69
+OCTAL_DIGIT=70
+DIGIT=71
+HEX_DIGIT=72
+EXPONENT_PART=73
+INTEGER_TYPE_SUFFIX=74
+FLOAT_TYPE_SUFFIX=75
+IDENTIFIER_START=76
+IDENTIFIER_PART=77

Added: db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/Literal.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/Literal.java?rev=430936&view=auto
==============================================================================
--- db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/Literal.java (added)
+++ db/ojb/trunk/proposals/jdo/java/org/apache/ojb/jdo/jdoql/Literal.java Fri Aug 11 18:17:46 2006
@@ -0,0 +1,75 @@
+package org.apache.ojb.jdo.jdoql;
+
+/* Copyright 2003-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * A literal.
+ * 
+ * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
+ */
+public class Literal extends Expression
+{
+    /** The type of the literal */
+    private Class  _type;
+    /** The textual representation */
+    private String _textRep;
+
+    /**
+     * Creates a new literal object.
+     * 
+     * @param type    The type of the literal
+     * @param textRep The textual representation
+     */
+    public Literal(Class type, String textRep)
+    {
+        _type    = type;
+        _textRep = textRep;
+    }
+
+    /**
+     * Returns the (original) textual representation.
+     * 
+     * @return The text 
+     */
+    public String getTextRepresentation()
+    {
+        return _textRep;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.ojb.jdo.jdoql.Expression#getType()
+     */
+    public Class getType()
+    {
+        return _type;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.ojb.jdo.jdoql.Acceptor#accept(org.apache.ojb.jdo.jdoql.Visitor)
+     */
+    public void accept(Visitor visitor)
+    {
+        visitor.visit(this);
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return _textRep;
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org