diff options
Diffstat (limited to 'bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel')
40 files changed, 0 insertions, 5658 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java deleted file mode 100644 index a3c6a6eafc..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTAddExpress.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTAddExpress extends SimpleNode { - public ASTAddExpress(int id) { - super(id); - } - - public ASTAddExpress(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java deleted file mode 100644 index c3b6eac73c..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTAddExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTAddExpression extends ASTOperatorExpression { - public ASTAddExpression(int id) { - super(id); - } - - public ASTAddExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java deleted file mode 100644 index befe402036..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTAndExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTAndExpression extends ASTOperatorExpression { - public ASTAndExpression(int id) { - super(id); - } - - public ASTAndExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java deleted file mode 100644 index 779079e30b..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTChoiceExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTChoiceExpression extends SimpleNode { - public ASTChoiceExpression(int id) { - super(id); - } - - public ASTChoiceExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java deleted file mode 100644 index 4a06113a00..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTEqualityExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTEqualityExpression extends ASTOperatorExpression { - public ASTEqualityExpression(int id) { - super(id); - } - - public ASTEqualityExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java deleted file mode 100644 index 9d93f38a2e..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTExpression extends SimpleNode { - public ASTExpression(int id) { - super(id); - } - - public ASTExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java deleted file mode 100644 index a0cad90208..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTFunctionInvocation.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTFunctionInvocation extends SimpleNode { - String fullFunctionName; - - public ASTFunctionInvocation(int id) { - super(id); - } - - public ASTFunctionInvocation(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } - -public String getFullFunctionName() { - return fullFunctionName; -} - -public void setFullFunctionName(String fullFunctionName) { - this.fullFunctionName = fullFunctionName; -} -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java deleted file mode 100644 index d40005b68c..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTGTNode.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTGTNode extends SimpleNode { - public ASTGTNode(int id) { - super(id); - } - - public ASTGTNode(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java deleted file mode 100644 index 1049ad52d4..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTImplicitObject.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTImplicitObject extends SimpleNode { - public ASTImplicitObject(int id) { - super(id); - } - - public ASTImplicitObject(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java deleted file mode 100644 index fb334f433c..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTLiteral.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTLiteral extends SimpleNode { - public ASTLiteral(int id) { - super(id); - } - - public ASTLiteral(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java deleted file mode 100644 index 3d8f600610..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTMultiplyExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTMultiplyExpression extends ASTOperatorExpression { - public ASTMultiplyExpression(int id) { - super(id); - } - - public ASTMultiplyExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java deleted file mode 100644 index 3da6b77f57..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -import java.util.ArrayList; -import java.util.List; - -public class ASTOperatorExpression extends SimpleNode { - protected ArrayList operatorTokens = new ArrayList(); - - public ASTOperatorExpression(int i) { - super(i); - } - - public ASTOperatorExpression(JSPELParser p, int i) { - this(i); - parser = p; - } - - public void addOperatorToken(Token opToken) { - operatorTokens.add(opToken); - } - - public List getOperatorTokens() { - return operatorTokens; - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java deleted file mode 100644 index f3bb76c4aa..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTOrExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTOrExpression extends ASTOperatorExpression { - public ASTOrExpression(int id) { - super(id); - } - - public ASTOrExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java deleted file mode 100644 index 30238463ff..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTRelationalExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTRelationalExpression extends ASTOperatorExpression { - public ASTRelationalExpression(int id) { - super(id); - } - - public ASTRelationalExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java deleted file mode 100644 index 3a117e5c61..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Gopyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTStart extends SimpleNode { - public ASTStart(int id) { - super(id); - } - - public ASTStart(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java deleted file mode 100644 index 86870a33db..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTUnaryExpression.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTUnaryExpression extends SimpleNode { - public ASTUnaryExpression(int id) { - super(id); - } - - public ASTUnaryExpression(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java deleted file mode 100644 index fd6a36c84a..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTValue.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTValue extends SimpleNode { - public ASTValue(int id) { - super(id); - } - - public ASTValue(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java deleted file mode 100644 index 1f2bf03f81..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTValuePrefix.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTValuePrefix extends SimpleNode { - public ASTValuePrefix(int id) { - super(id); - } - - public ASTValuePrefix(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java deleted file mode 100644 index 2317267337..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. ASTValueSuffix.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class ASTValueSuffix extends SimpleNode { - - protected Token propertyNameToken; - - public ASTValueSuffix(int id) { - super(id); - } - - public ASTValueSuffix(JSPELParser p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } - -public Token getPropertyNameToken() { - return propertyNameToken; -} - -public void setPropertyNameToken(Token propertyNameToken) { - this.propertyNameToken = propertyNameToken; -} -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java deleted file mode 100644 index 462ae6f6da..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -import java.util.Map; - -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection; - -/** - * The code checker for the jsf/jsp EL. - */ -public final class ELGenerator { - /** - * Constructor. - * - * @param locator A valid ELLocator instance, may not be null. - */ - public ELGenerator() { - } // constructor - - - /** - * Check the netuiel AST and set diagnostics as necessary. - * @param translator TODO - * @param jspReferenceRegion TODO - * @param contentStart - * @param contentLength - */ - public void generate(ASTExpression root, IStructuredDocumentRegion currentNode, StringBuffer result, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart, int contentLength) { - ELGeneratorVisitor visitor = new ELGeneratorVisitor(result, currentNode, codeMap, document, jspReferenceRegion, contentStart); - root.jjtAccept(visitor, null); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java deleted file mode 100644 index 3a31984add..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java +++ /dev/null @@ -1,464 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - * Bug 154474 EL: 'and', 'or', ... operator - * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154474 - * Bernhard Huemer <bernhard.huemer@gmail.com> - * - *******************************************************************************/ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.jface.text.Position; -import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController; -import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentImpl; -import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager; -import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker; -import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDFunction; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; -import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection; - -public class ELGeneratorVisitor implements JSPELParserVisitor { - - private static final String ENDL = "\n"; //$NON-NLS-1$ - - private static final String fExpressionHeader1 = "public String _elExpression"; //$NON-NLS-1$ - private static final String fExpressionHeader2 = "()" + ENDL + //$NON-NLS-1$ - "\t\tthrows java.io.IOException, javax.servlet.ServletException {" + ENDL + //$NON-NLS-1$ - "javax.servlet.jsp.PageContext pageContext = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map param = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map paramValues = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map header = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map headerValues = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map cookie = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map initParam = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map pageScope = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map requestScope = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map sessionScope = null;" + ENDL + //$NON-NLS-1$ - "java.util.Map applicationScope = null;" + ENDL + //$NON-NLS-1$ - "return \"\"+"; //$NON-NLS-1$ - - private static final String fJspImplicitObjects[] = { "pageContext" }; //$NON-NLS-1$ - - private static final String fJspImplicitMaps[] = { "param", "paramValues", "header", "headerValues", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - "cookie", "initParam", "pageScope", "requestScope", "sessionScope", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - "applicationScope" }; //$NON-NLS-1$ - - private static final HashMap fJSPImplicitObjectMap = new HashMap(fJspImplicitObjects.length); - static { - for(int i = 0; i < fJspImplicitObjects.length; i++) { - fJSPImplicitObjectMap.put(fJspImplicitObjects[i], new Boolean(true)); - } - - for(int i = 0; i < fJspImplicitMaps.length; i++) { - fJSPImplicitObjectMap.put(fJspImplicitMaps[i], new Boolean(false)); - } - } - - private static final String fFooter = " ;" + ENDL + "}" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ - - private StringBuffer fResult; - private Map fCodeMap; - private int fOffsetInUserCode; - private static int methodCounter = 0; - private IStructuredDocument fDocument = null; - private int fContentStart; - private static Map fOperatorMap; - - // this flag lets us know if we were unable to generate for some reason. One possible reason is that the expression - // contains a reference to a variable for which information is only available at runtime. - private boolean fCanGenerate = true; - - private IStructuredDocumentRegion fCurrentNode; - - /** - * Tranlsation of XML-style operators to java - */ - static { - fOperatorMap = new HashMap(); - fOperatorMap.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("ge", ">="); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("le", "<="); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("mod", "%"); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("eq", "=="); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("and", "&&"); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("or", "||"); //$NON-NLS-1$ //$NON-NLS-2$ - fOperatorMap.put("not", "!"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * The constructor squirrels away a few things we'll need later - * - * @param result - * @param codeMap - * @param translator - * @param jspReferenceRegion - * @param contentStart - */ - public ELGeneratorVisitor(StringBuffer result, IStructuredDocumentRegion currentNode, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart) - { - fResult = result; - fCodeMap = codeMap; - fOffsetInUserCode = result.length(); - fContentStart = contentStart; - fDocument = document; - fCurrentNode = currentNode; - } - - /** - * Append a token to the output stream. Automatically calculating mapping. - * - * @param token - */ - private void append(Token token) - { - append(token.image, token.beginColumn - 1, token.endColumn); - } - - /** - * Append a translation for the corresponding input token. - * - * @param translated - * @param token - */ - private void append(String translated, Token token) - { - append(translated, token.beginColumn - 1, token.endColumn); - } - - /** - * Append a string explicitly giving the input mapping. - * - * @param newText - * @param jspPositionStart - * @param jspPositionEnd - */ - private void append(String newText, int jspPositionStart, int jspPositionEnd) - { - fResult.append(newText); - Position javaRange = new Position(fOffsetInUserCode, newText.length()); - Position jspRange = new Position(fContentStart + jspPositionStart, jspPositionEnd - jspPositionStart); - - fCodeMap.put(javaRange, jspRange); - fOffsetInUserCode += newText.length(); - } - - /** - * Append text that will be unmapped and therefore will not be available for completion. - * - * @param newText - */ - private void append(String newText) - { - fResult.append(newText); - fOffsetInUserCode += newText.length(); - } - - /** - * Generate a function invocation. - * - * @param fullFunctionName - * @return - */ - protected String genFunction(String fullFunctionName) { - TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(fDocument); - int colonIndex = fullFunctionName.indexOf(':'); - String prefix = fullFunctionName.substring(0, colonIndex); - String functionName = fullFunctionName.substring(colonIndex + 1); - if (docMgr == null) - return null; - - Iterator taglibs = docMgr.getCMDocumentTrackers(fCurrentNode.getStartOffset()).iterator(); - while (taglibs.hasNext()) { - TaglibTracker tracker = (TaglibTracker)taglibs.next(); - if(tracker.getPrefix().equals(prefix)) { - CMDocumentImpl doc = (CMDocumentImpl)tracker.getDocument(); - - List functions = doc.getFunctions(); - for(Iterator it = functions.iterator(); it.hasNext(); ) { - TLDFunction function = (TLDFunction)it.next(); - if(function.getName().equals(functionName)) { - return function.getClassName() + "." + function.getName(); //$NON-NLS-1$ - } - } - } - } - return null; - } - - /** - * Handle a simple node -- fallback - */ - public Object visit(SimpleNode node, Object data) { - return(node.childrenAccept(this, data)); - } - - static synchronized int getMethodCounter() { - return methodCounter++; - } - - /** - * Handle top-level expression - */ - public Object visit(ASTExpression node, Object data) { - int start = node.getFirstToken().beginColumn - 1; - int end = node.lastToken.endColumn - 1; - append(fExpressionHeader1, start, start); - append(Integer.toString(getMethodCounter()), start, start); - append(fExpressionHeader2, start, start); - - Object retval = node.childrenAccept(this, data); - - append(fFooter, end, end); - - // something is preventing good code generation so empty out the result and the map. - if(!fCanGenerate) { - fResult.delete(0, fResult.length()); - fCodeMap.clear(); - } - return retval; - } - - /** - * Generically generate an operator node. - * - * @param node - * @param data - */ - private void generateOperatorNode(ASTOperatorExpression node, Object data) { - for(int i = 0; i < node.children.length; i++) { - node.children[i].jjtAccept(this, data); - if( node.children.length - i > 1) { - appendOperator((Token)node.getOperatorTokens().get(i)); - } - } - } - - /** - * Append an operator to the output stream after translation (if any) - * - * @param token - * @return - */ - private String appendOperator(Token token) { - String tokenImage = token.image.trim(); - String translated = (String)fOperatorMap.get(tokenImage); - if(null != translated) { - append(translated, token); - } else { - append(token); - } - return(translated); - } - - /** - * Handle or Expression - */ - public Object visit(ASTOrExpression node, Object data) { - generateOperatorNode(node, data); - return(null); - } - - - /** - * Handle and expression - */ - public Object visit(ASTAndExpression node, Object data) { - generateOperatorNode(node, data); - return(null); - } - - - /** - * Handle equality - */ - public Object visit(ASTEqualityExpression node, Object data) { - generateOperatorNode(node, data); - return(null); - } - - - /** - * Handle Relational - */ - public Object visit(ASTRelationalExpression node, Object data) { - generateOperatorNode(node, data); - return(null); - } - - - /** - * Handle addition - */ - public Object visit(ASTAddExpression node, Object data) { - generateOperatorNode(node, data); - return(null); - } - - - /** - * Handle multiply - */ - public Object visit(ASTMultiplyExpression node, Object data) { - generateOperatorNode(node, data); - return(null); - } - - - /** - * Choice Expression (ternary operator) - */ - public Object visit(ASTChoiceExpression node, Object data) { - node.children[0].jjtAccept(this, data); - append("?"); //$NON-NLS-1$ - node.children[1].jjtAccept(this, data); - append(":"); //$NON-NLS-1$ - node.children[2].jjtAccept(this,data); - return null; - } - - - /** - * Handle unary - */ - public Object visit(ASTUnaryExpression node, Object data) { - if(JSPELParserConstants.EMPTY == node.firstToken.kind) { - append("((null == "); //$NON-NLS-1$ - node.childrenAccept(this, data); - append(") || ("); //$NON-NLS-1$ - node.childrenAccept(this, data); - append(").isEmpty())"); //$NON-NLS-1$ - } else if(JSPELParserConstants.NOT1 == node.firstToken.kind || JSPELParserConstants.NOT2 == node.firstToken.kind) { - append("(!"); //$NON-NLS-1$ - node.childrenAccept(this, data); - append(")"); //$NON-NLS-1$ - } else if(JSPELParserConstants.MINUS == node.firstToken.kind) { - append("(-"); //$NON-NLS-1$ - node.childrenAccept(this, data); - append(")"); //$NON-NLS-1$ - } else { - node.childrenAccept(this, data); - } - return null; - } - - - /** - * Value node - */ - public Object visit(ASTValue node, Object data) { - if(node.jjtGetNumChildren() >= 2) { - if(node.jjtGetChild(0) instanceof ASTValuePrefix && node.jjtGetChild(1) instanceof ASTValueSuffix) { - ASTValuePrefix prefix = (ASTValuePrefix) node.jjtGetChild(0); - ASTValueSuffix suffix = (ASTValueSuffix) node.jjtGetChild(1); - if(prefix.firstToken.image.equals("pageContext") && suffix.getPropertyNameToken().image.equals("request")) { - append("((HTTPServletRequest)"); - } - } - } - return node.childrenAccept(this, data); - } - - - /** - * Value Prefix - */ - public Object visit(ASTValuePrefix node, Object data) { - // this is a raw identifier. May sure it's an implicit object. - // This is the primary plae where modification is needed to - // support JSF backing beans. - if(null == node.children) { - if(isCompletingObject(node.firstToken.image)) { - append(node.firstToken); - } else { - fCanGenerate = false; - } - return(null); - } - return node.childrenAccept(this, data); - } - - - /** - * Function for testing implicit objects. - * - * @param image - * @return - */ - private boolean isCompletingObject(String image) { - Boolean value = (Boolean)fJSPImplicitObjectMap.get(image); - return null == value ? false : value.booleanValue(); - } - - /** - * Value suffix - */ - public Object visit(ASTValueSuffix node, Object data) { - if(JSPELParserConstants.LBRACKET == node.firstToken.kind) { - fCanGenerate = false; - } else if(null != node.getPropertyNameToken()) { - Token suffix = node.getPropertyNameToken(); - String ucaseName = suffix.image.substring(0, 1).toUpperCase() + suffix.image.substring(1, suffix.image.length()); - - // This is a special case. Note that the type system, no matter how much type information - // we would have wouldn't give us the correct result. We're looking for "pageContext.request" - // here and will add a downcast to (HTTPServletRequest) - - append(node.firstToken); - append("get" + ucaseName + "()", suffix); //$NON-NLS-1$ //$NON-NLS-2$ - - SimpleNode parent = (SimpleNode) node.jjtGetParent(); - if(suffix.image.equals("request") && parent instanceof ASTValue && //$NON-NLS-1$ - parent.jjtGetParent() instanceof ASTUnaryExpression && parent.firstToken.image.equals("pageContext")) { //$NON-NLS-1$ - append(")"); - } - - - } else { - append(node.firstToken); - } - return null; - } - - - /** - * Function invocation - */ - public Object visit(ASTFunctionInvocation node, Object data) { - String functionTranslation = genFunction(node.getFullFunctionName()); - if(null != functionTranslation) - { - append(functionTranslation + "(", node.getFirstToken()); //$NON-NLS-1$ - for(int i = 0; i < node.children.length; i++) { - node.children[i].jjtAccept(this, data); - if( node.children.length - i > 1){ - append(","); //$NON-NLS-1$ - } - } - append(")"); //$NON-NLS-1$ - } - return null; - } - - /** - * Literal - */ - public Object visit(ASTLiteral node, Object data) { - // TODO any further translation needed? - append(node.firstToken); - return null; - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java deleted file mode 100644 index e05c5622de..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class FindFunctionInvocationVisitor implements JSPELParserVisitor { - protected int fCursorPosition; - - public FindFunctionInvocationVisitor(int cursorPosition) - { - fCursorPosition = cursorPosition; - } - - protected boolean isEnclosing(SimpleNode node) { - return(node.firstToken.beginColumn < fCursorPosition && node.lastToken.endColumn >= fCursorPosition); - } - - - protected Object visitEnclosingChild(SimpleNode node, Object data) { - if(null == node.children) - return null; - - for(int i = 0; i < node.children.length; i++) { - if(isEnclosing(node)) - return node.children[i].jjtAccept(this, data); - } - return null; - } - - public Object visit(SimpleNode node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTOrExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTAndExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTEqualityExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTRelationalExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTAddExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTMultiplyExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTChoiceExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTUnaryExpression node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTValue node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTValuePrefix node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTValueSuffix node, Object data) { - return visitEnclosingChild(node, data); - } - - public Object visit(ASTFunctionInvocation node, Object data) { - Object nestedInvocation = visitEnclosingChild(node, data); - if(null != nestedInvocation) - return nestedInvocation; - return node; - } - - public Object visit(ASTLiteral node, Object data) { - return visitEnclosingChild(node, data); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java deleted file mode 100644 index 6e7436c2c9..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java +++ /dev/null @@ -1,134 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. JJTJSPELParserState.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -class JJTJSPELParserState { - private java.util.Stack nodes; - private java.util.Stack marks; - - private int sp; // number of nodes on stack - private int mk; // current mark - private boolean node_created; - - JJTJSPELParserState() { - nodes = new java.util.Stack(); - marks = new java.util.Stack(); - sp = 0; - mk = 0; - } - - /* Determines whether the current node was actually closed and - pushed. This should only be called in the final user action of a - node scope. */ - boolean nodeCreated() { - return node_created; - } - - /* Call this to reinitialize the node stack. It is called - automatically by the parser's ReInit() method. */ - void reset() { - nodes.removeAllElements(); - marks.removeAllElements(); - sp = 0; - mk = 0; - } - - /* Returns the root node of the AST. It only makes sense to call - this after a successful parse. */ - Node rootNode() { - return (Node)nodes.elementAt(0); - } - - /* Pushes a node on to the stack. */ - void pushNode(Node n) { - nodes.push(n); - ++sp; - } - - /* Returns the node on the top of the stack, and remove it from the - stack. */ - Node popNode() { - if (--sp < mk) { - mk = ((Integer)marks.pop()).intValue(); - } - return (Node)nodes.pop(); - } - - /* Returns the node currently on the top of the stack. */ - Node peekNode() { - return (Node)nodes.peek(); - } - - /* Returns the number of children on the stack in the current node - scope. */ - int nodeArity() { - return sp - mk; - } - - - void clearNodeScope(Node n) { - while (sp > mk) { - popNode(); - } - mk = ((Integer)marks.pop()).intValue(); - } - - - void openNodeScope(Node n) { - marks.push(new Integer(mk)); - mk = sp; - n.jjtOpen(); - } - - - /* A definite node is constructed from a specified number of - children. That number of nodes are popped from the stack and - made the children of the definite node. Then the definite node - is pushed on to the stack. */ - void closeNodeScope(Node n, int num) { - mk = ((Integer)marks.pop()).intValue(); - while (num-- > 0) { - Node c = popNode(); - c.jjtSetParent(n); - n.jjtAddChild(c, num); - } - n.jjtClose(); - pushNode(n); - node_created = true; - } - - - /* A conditional node is constructed if its condition is true. All - the nodes that have been pushed since the node was opened are - made children of the the conditional node, which is then pushed - on to the stack. If the condition is false the node is not - constructed and they are left on the stack. */ - void closeNodeScope(Node n, boolean condition) { - if (condition) { - int a = nodeArity(); - mk = ((Integer)marks.pop()).intValue(); - while (a-- > 0) { - Node c = popNode(); - c.jjtSetParent(n); - n.jjtAddChild(c, a); - } - n.jjtClose(); - pushNode(n); - node_created = true; - } else { - mk = ((Integer)marks.pop()).intValue(); - node_created = false; - } - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj deleted file mode 100644 index 0e383b4047..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj +++ /dev/null @@ -1,675 +0,0 @@ -*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. JSPEL.jj */
-/*@egen*//* I know that haing some of these options on one line is rude but
- * if we don't do that the line number reported from javacc are off
- * which, trust me, is far more annoying. --tcarroll@bea.com
- */
-options {
- JAVA_UNICODE_ESCAPE = false;
- UNICODE_INPUT = true;
- STATIC = false;
- OPTIMIZE_TOKEN_MANAGER = true;
-}
-
-PARSER_BEGIN(JSPELParser)
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser/*@bgen(jjtree)*/implements JSPELParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
- protected JJTJSPELParserState jjtree = new JJTJSPELParserState();
-
-/*@egen*/
-
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
-}
-
-PARSER_END(JSPELParser)
-
-SKIP :
-{
- " "
-| "\t"
-| "\n"
-| "\r"
-}
-
-TOKEN :
-{
-/* Literals */
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* >
-|
- < FLOATING_POINT_LITERAL:
- (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-|
- < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
-|
- < STRING_LITERAL:
- ("\"" ((~["\"","\\"]) | ("\\" ( ["\\","\""] )))* "\"") |
- ("\'" ((~["\'","\\"]) | ("\\" ( ["\\","\'"] )))* "\'")
- >
-|
- < BADLY_ESCAPED_STRING_LITERAL:
- ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] ))) |
- ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
-
-/* Reserved Words and Symbols */
-| < TRUE: "true" >
-| < FALSE: "false" >
-| < NULL: "null" >
-| < DOT: "." >
-| < GT1: ">" >
-| < GT2: "gt" >
-| < LT1: "<" >
-| < LT2: "lt" >
-| < EQ1: "==" >
-| < EQ2: "eq" >
-| < LE1: "<=" >
-| < LE2: "le" >
-| < GE1: ">=" >
-| < GE2: "ge" >
-| < NEQ1: "!=" >
-| < NEQ2: "ne" >
-| < LPAREN: "(" >
-| < RPAREN: ")" >
-| < COMMA: "," >
-| < COLON: ":" >
-| < LBRACKET: "[" >
-| < RBRACKET: "]" >
-| < PLUS: "+" >
-| < MINUS: "-" >
-| < MULTIPLY: "*" >
-| < DIVIDE1: "/" >
-| < DIVIDE2: "div" >
-| < MODULUS1: "%" >
-| < MODULUS2: "mod" >
-| < NOT1: "not" >
-| < NOT2: "!" >
-| < AND1: "and" >
-| < AND2: "&&" >
-| < OR1: "or" >
-| < OR2: "||" >
-| < EMPTY: "empty" >
-| < COND: "?" >
-
-/* Identifiers */
-
-| < IDENTIFIER: (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < #IMPL_OBJ_START: "#" >
-|
- < #LETTER:
- [
- "$",
- "A"-"Z",
- "_",
- "a"-"z",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-|
- < #DIGIT:
- [
- "0"-"9",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-}
-
-ASTExpression Expression() : {/*@bgen(jjtree) Expression */
- ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Expression */
- try {
-/*@egen*/
- (LOOKAHEAD("?") ChoiceExpression() | OrExpression())/*@bgen(jjtree)*/
- {
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- }
-/*@egen*/ { return jjtn000; }/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void OrExpression() :
-{/*@bgen(jjtree) #OrExpression(> 1) */
- ASTOrExpression jjtn000 = new ASTOrExpression(JJTOREXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #OrExpression(> 1) */
- try {
-/*@egen*/
- AndExpression() ((t = <OR1> | t = <OR2>) { jjtn000.addOperatorToken(t); }
- AndExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void AndExpression() :
-{/*@bgen(jjtree) #AndExpression(> 1) */
- ASTAndExpression jjtn000 = new ASTAndExpression(JJTANDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #AndExpression(> 1) */
- try {
-/*@egen*/
- EqualityExpression() ((t = <AND1> | t = <AND2>) { jjtn000.addOperatorToken(t); }
- EqualityExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void EqualityExpression() :
-{/*@bgen(jjtree) #EqualityExpression(> 1) */
- ASTEqualityExpression jjtn000 = new ASTEqualityExpression(JJTEQUALITYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #EqualityExpression(> 1) */
- try {
-/*@egen*/
- RelationalExpression()
- ((t = <EQ1> | t = <EQ2> | t = <NEQ1> | t = <NEQ2>) { jjtn000.addOperatorToken(t); }
- RelationalExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void RelationalExpression() :
-{/*@bgen(jjtree) #RelationalExpression(> 1) */
- ASTRelationalExpression jjtn000 = new ASTRelationalExpression(JJTRELATIONALEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #RelationalExpression(> 1) */
- try {
-/*@egen*/
- AddExpression()
- (
- (t = <LT1> | t = <LT2> | t = <GT1> | t = <GT2> | t = <GE1> | t = <GE2> | t = <LE1> | t = <LE2>) { jjtn000.addOperatorToken(t); }
- AddExpression()
- )*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void AddExpression() :
-{/*@bgen(jjtree) #AddExpression(> 1) */
- ASTAddExpression jjtn000 = new ASTAddExpression(JJTADDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #AddExpression(> 1) */
- try {
-/*@egen*/
- MultiplyExpression() ((t = <PLUS> | t = <MINUS>) { jjtn000.addOperatorToken(t); }
- MultiplyExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void MultiplyExpression() :
-{/*@bgen(jjtree) #MultiplyExpression(> 1) */
- ASTMultiplyExpression jjtn000 = new ASTMultiplyExpression(JJTMULTIPLYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #MultiplyExpression(> 1) */
- try {
-/*@egen*/
- UnaryExpression() (
- ( t = <MULTIPLY> | t = <DIVIDE1> | t = <DIVIDE2> | t = <MODULUS1> | t = <MODULUS2>) { jjtn000.addOperatorToken(t); }
- UnaryExpression()
- )*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ChoiceExpression() : {/*@bgen(jjtree) ChoiceExpression */
- ASTChoiceExpression jjtn000 = new ASTChoiceExpression(JJTCHOICEEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ChoiceExpression */
- try {
-/*@egen*/
- OrExpression() <COND> OrExpression() <COLON> OrExpression()/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void UnaryExpression() : {/*@bgen(jjtree) UnaryExpression */
- ASTUnaryExpression jjtn000 = new ASTUnaryExpression(JJTUNARYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) UnaryExpression */
- try {
-/*@egen*/
- ((<NOT1> | <NOT2> | <MINUS> | <EMPTY>) UnaryExpression())
- | Value()/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-
-}
-
-void Value() : {/*@bgen(jjtree) Value */
- ASTValue jjtn000 = new ASTValue(JJTVALUE);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Value */
- try {
-/*@egen*/
- ValuePrefix() (ValueSuffix())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ValuePrefix() : {/*@bgen(jjtree) ValuePrefix */
- ASTValuePrefix jjtn000 = new ASTValuePrefix(JJTVALUEPREFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ValuePrefix */
- try {
-/*@egen*/
- Literal() | (<LPAREN> Expression() <RPAREN>) | LOOKAHEAD(3) FunctionInvocation() | <IDENTIFIER>/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ValueSuffix() :
-{/*@bgen(jjtree) ValueSuffix */
- ASTValueSuffix jjtn000 = new ASTValueSuffix(JJTVALUESUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t = null;
-}
-{/*@bgen(jjtree) ValueSuffix */
- try {
-/*@egen*/
- (<DOT> (t = <IDENTIFIER>)?)/*@bgen(jjtree)*/
- {
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- }
-/*@egen*/ { jjtn000.setPropertyNameToken(t); }
- | (<LBRACKET> Expression() <RBRACKET>)/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void FunctionInvocation() :
-{/*@bgen(jjtree) FunctionInvocation */
- ASTFunctionInvocation jjtn000 = new ASTFunctionInvocation(JJTFUNCTIONINVOCATION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token prefix = null, name = null;
-}
-{/*@bgen(jjtree) FunctionInvocation */
- try {
-/*@egen*/
- (prefix = <IDENTIFIER> <COLON>) { jjtn000.setFullFunctionName(prefix.image + ":"); }
- (name = <IDENTIFIER>)? {
- if(null != prefix && null != name)
- jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtn000.setFullFunctionName(name.image);
- }
- (<LPAREN> Expression() (<COMMA> Expression())* try { (<RPAREN>) } catch (Exception e) {} )?/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void Literal() : {/*@bgen(jjtree) Literal */
- ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Literal */
- try {
-/*@egen*/
- <TRUE> | <FALSE> | <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <STRING_LITERAL> | <NULL>/*@bgen(jjtree)*/
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt deleted file mode 100644 index 9fd40d9242..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt +++ /dev/null @@ -1,281 +0,0 @@ -*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* I know that having some of these options on one line is rude but
- * if we don't do that the line number reported from javacc are off
- * which, trust me, is far more annoying. --tcarroll@bea.com
- */
-options {
- JAVA_UNICODE_ESCAPE = false;
- UNICODE_INPUT = true;
- STATIC = false;
- OPTIMIZE_TOKEN_MANAGER = true; MULTI = true; VISITOR = true; NODE_PACKAGE = "org.eclipse.jst.jsp.core.internal.java.jspel"; NODE_SCOPE_HOOK = true;
-}
-
-PARSER_BEGIN(JSPELParser)
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser {
-
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
-}
-
-PARSER_END(JSPELParser)
-
-SKIP :
-{
- " "
-| "\t"
-| "\n"
-| "\r"
-}
-
-TOKEN :
-{
-/* Literals */
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* >
-|
- < FLOATING_POINT_LITERAL:
- (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-|
- < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
-|
- < STRING_LITERAL:
- ("\"" ((~["\"","\\"]) | ("\\" ( ["\\","\""] )))* "\"") |
- ("\'" ((~["\'","\\"]) | ("\\" ( ["\\","\'"] )))* "\'")
- >
-|
- < BADLY_ESCAPED_STRING_LITERAL:
- ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] ))) |
- ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
-
-/* Reserved Words and Symbols */
-| < TRUE: "true" >
-| < FALSE: "false" >
-| < NULL: "null" >
-| < DOT: "." >
-| < GT1: ">" >
-| < GT2: "gt" >
-| < LT1: "<" >
-| < LT2: "lt" >
-| < EQ1: "==" >
-| < EQ2: "eq" >
-| < LE1: "<=" >
-| < LE2: "le" >
-| < GE1: ">=" >
-| < GE2: "ge" >
-| < NEQ1: "!=" >
-| < NEQ2: "ne" >
-| < LPAREN: "(" >
-| < RPAREN: ")" >
-| < COMMA: "," >
-| < COLON: ":" >
-| < LBRACKET: "[" >
-| < RBRACKET: "]" >
-| < PLUS: "+" >
-| < MINUS: "-" >
-| < MULTIPLY: "*" >
-| < DIVIDE1: "/" >
-| < DIVIDE2: "div" >
-| < MODULUS1: "%" >
-| < MODULUS2: "mod" >
-| < NOT1: "not" >
-| < NOT2: "!" >
-| < AND1: "and" >
-| < AND2: "&&" >
-| < OR1: "or" >
-| < OR2: "||" >
-| < EMPTY: "empty" >
-| < COND: "?" >
-
-/* Identifiers */
-
-| < IDENTIFIER: (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < #IMPL_OBJ_START: "#" >
-|
- < #LETTER:
- [
- "\u0024",
- "\u0041"-"\u005a",
- "\u005f",
- "\u0061"-"\u007a",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-|
- < #DIGIT:
- [
- "\u0030"-"\u0039",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-}
-
-ASTExpression Expression() : {}
-{
- (LOOKAHEAD("?") ChoiceExpression() | OrExpression()) { return jjtThis; }
-}
-
-void OrExpression() #OrExpression(>1) :
-{
- Token t;
-}
-{
- AndExpression() ((t = <OR1> | t = <OR2>) { jjtThis.addOperatorToken(t); }
- AndExpression())*
-}
-
-void AndExpression() #AndExpression(>1) :
-{
- Token t;
-}
-{
- EqualityExpression() ((t = <AND1> | t = <AND2>) { jjtThis.addOperatorToken(t); }
- EqualityExpression())*
-}
-
-void EqualityExpression() #EqualityExpression(>1) :
-{
- Token t;
-}
-{
- RelationalExpression()
- ((t = <EQ1> | t = <EQ2> | t = <NEQ1> | t = <NEQ2>) { jjtThis.addOperatorToken(t); }
- RelationalExpression())*
-}
-
-void RelationalExpression() #RelationalExpression(>1) :
-{
- Token t;
-}
-{
- AddExpression()
- (
- (t = <LT1> | t = <LT2> | t = <GT1> | t = <GT2> | t = <GE1> | t = <GE2> | t = <LE1> | t = <LE2>) { jjtThis.addOperatorToken(t); }
- AddExpression()
- )*
-}
-
-void AddExpression() #AddExpression(>1) :
-{
- Token t;
-}
-{
- MultiplyExpression() ((t = <PLUS> | t = <MINUS>) { jjtThis.addOperatorToken(t); }
- MultiplyExpression())*
-}
-
-void MultiplyExpression() #MultiplyExpression(>1) :
-{
- Token t;
-}
-{
- UnaryExpression() (
- ( t = <MULTIPLY> | t = <DIVIDE1> | t = <DIVIDE2> | t = <MODULUS1> | t = <MODULUS2>) { jjtThis.addOperatorToken(t); }
- UnaryExpression()
- )*
-}
-
-void ChoiceExpression() : {}
-{
- OrExpression() <COND> OrExpression() <COLON> OrExpression()
-}
-
-void UnaryExpression() : {}
-{
- ((<NOT1> | <NOT2> | <MINUS> | <EMPTY>) UnaryExpression())
- | Value()
-
-}
-
-void Value() : {}
-{
- ValuePrefix() (ValueSuffix())*
-}
-
-void ValuePrefix() : {}
-{
- Literal() | (<LPAREN> Expression() <RPAREN>) | LOOKAHEAD(3) FunctionInvocation() | <IDENTIFIER>
-}
-
-void ValueSuffix() :
-{
- Token t = null;
-}
-{
- (<DOT> (t = <IDENTIFIER>)?) { jjtThis.setPropertyNameToken(t); }
- | (<LBRACKET> Expression() <RBRACKET>)
-}
-
-void FunctionInvocation() :
-{
- Token prefix = null, name = null;
-}
-{
- (prefix = <IDENTIFIER> <COLON>) { jjtThis.setFullFunctionName(prefix.image + ":"); }
- (name = <IDENTIFIER>)? {
- if(null != prefix && null != name)
- jjtThis.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtThis.setFullFunctionName(name.image);
- }
- (<LPAREN> Expression() (<COMMA> Expression())* try { (<RPAREN>) } catch (Exception e) {} )?
-}
-
-void Literal() : {}
-{
- <TRUE> | <FALSE> | <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <STRING_LITERAL> | <NULL>
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java deleted file mode 100644 index 5c01bae7fd..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java +++ /dev/null @@ -1,1158 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParser.java */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class JSPELParser/*@bgen(jjtree)*/implements JSPELParserTreeConstants, JSPELParserConstants {/*@bgen(jjtree)*/ - protected JJTJSPELParserState jjtree = new JJTJSPELParserState(); - void jjtreeOpenNodeScope(Node n) - { - ((SimpleNode)n).setFirstToken(getToken(1)); - } - - void jjtreeCloseNodeScope(Node n) - { - ((SimpleNode)n).setLastToken(getToken(0)); - } - - public static JSPELParser createParser(java.lang.String input) { - java.io.StringReader reader = new java.io.StringReader(input); - return new JSPELParser(reader); - } - - public void ReInit(java.lang.String input) { - java.io.StringReader reader = new java.io.StringReader(input); - ReInit(reader); - } - - final public ASTExpression Expression() throws ParseException { - /*@bgen(jjtree) Expression */ - ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - if (jj_2_1(2147483647)) { - ChoiceExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - case STRING_LITERAL: - case TRUE: - case FALSE: - case NULL: - case LPAREN: - case MINUS: - case NOT1: - case NOT2: - case EMPTY: - case IDENTIFIER: - OrExpression(); - break; - default: - jj_la1[0] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtreeCloseNodeScope(jjtn000); - {if (true) return jjtn000;} - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - throw new Error("Missing return statement in function"); - } - - final public void OrExpression() throws ParseException { - /*@bgen(jjtree) #OrExpression(> 1) */ - ASTOrExpression jjtn000 = new ASTOrExpression(JJTOREXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - AndExpression(); - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case OR1: - case OR2: - - break; - default: - jj_la1[1] = jj_gen; - break label_1; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case OR1: - t = jj_consume_token(OR1); - break; - case OR2: - t = jj_consume_token(OR2); - break; - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.addOperatorToken(t); - AndExpression(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void AndExpression() throws ParseException { - /*@bgen(jjtree) #AndExpression(> 1) */ - ASTAndExpression jjtn000 = new ASTAndExpression(JJTANDEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - EqualityExpression(); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AND1: - case AND2: - - break; - default: - jj_la1[3] = jj_gen; - break label_2; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AND1: - t = jj_consume_token(AND1); - break; - case AND2: - t = jj_consume_token(AND2); - break; - default: - jj_la1[4] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.addOperatorToken(t); - EqualityExpression(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void EqualityExpression() throws ParseException { - /*@bgen(jjtree) #EqualityExpression(> 1) */ - ASTEqualityExpression jjtn000 = new ASTEqualityExpression(JJTEQUALITYEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - RelationalExpression(); - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ1: - case EQ2: - case NEQ1: - case NEQ2: - - break; - default: - jj_la1[5] = jj_gen; - break label_3; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ1: - t = jj_consume_token(EQ1); - break; - case EQ2: - t = jj_consume_token(EQ2); - break; - case NEQ1: - t = jj_consume_token(NEQ1); - break; - case NEQ2: - t = jj_consume_token(NEQ2); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.addOperatorToken(t); - RelationalExpression(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void RelationalExpression() throws ParseException { - /*@bgen(jjtree) #RelationalExpression(> 1) */ - ASTRelationalExpression jjtn000 = new ASTRelationalExpression(JJTRELATIONALEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - AddExpression(); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case GT1: - case GT2: - case LT1: - case LT2: - case LE1: - case LE2: - case GE1: - case GE2: - - break; - default: - jj_la1[7] = jj_gen; - break label_4; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LT1: - t = jj_consume_token(LT1); - break; - case LT2: - t = jj_consume_token(LT2); - break; - case GT1: - t = jj_consume_token(GT1); - break; - case GT2: - t = jj_consume_token(GT2); - break; - case GE1: - t = jj_consume_token(GE1); - break; - case GE2: - t = jj_consume_token(GE2); - break; - case LE1: - t = jj_consume_token(LE1); - break; - case LE2: - t = jj_consume_token(LE2); - break; - default: - jj_la1[8] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.addOperatorToken(t); - AddExpression(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void AddExpression() throws ParseException { - /*@bgen(jjtree) #AddExpression(> 1) */ - ASTAddExpression jjtn000 = new ASTAddExpression(JJTADDEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - MultiplyExpression(); - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PLUS: - case MINUS: - - break; - default: - jj_la1[9] = jj_gen; - break label_5; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PLUS: - t = jj_consume_token(PLUS); - break; - case MINUS: - t = jj_consume_token(MINUS); - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.addOperatorToken(t); - MultiplyExpression(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void MultiplyExpression() throws ParseException { - /*@bgen(jjtree) #MultiplyExpression(> 1) */ - ASTMultiplyExpression jjtn000 = new ASTMultiplyExpression(JJTMULTIPLYEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t; - try { - UnaryExpression(); - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MULTIPLY: - case DIVIDE1: - case DIVIDE2: - case MODULUS1: - case MODULUS2: - - break; - default: - jj_la1[11] = jj_gen; - break label_6; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MULTIPLY: - t = jj_consume_token(MULTIPLY); - break; - case DIVIDE1: - t = jj_consume_token(DIVIDE1); - break; - case DIVIDE2: - t = jj_consume_token(DIVIDE2); - break; - case MODULUS1: - t = jj_consume_token(MODULUS1); - break; - case MODULUS2: - t = jj_consume_token(MODULUS2); - break; - default: - jj_la1[12] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.addOperatorToken(t); - UnaryExpression(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void ChoiceExpression() throws ParseException { - /*@bgen(jjtree) ChoiceExpression */ - ASTChoiceExpression jjtn000 = new ASTChoiceExpression(JJTCHOICEEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - OrExpression(); - jj_consume_token(COND); - OrExpression(); - jj_consume_token(COLON); - OrExpression(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void UnaryExpression() throws ParseException { - /*@bgen(jjtree) UnaryExpression */ - ASTUnaryExpression jjtn000 = new ASTUnaryExpression(JJTUNARYEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MINUS: - case NOT1: - case NOT2: - case EMPTY: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT1: - jj_consume_token(NOT1); - break; - case NOT2: - jj_consume_token(NOT2); - break; - case MINUS: - jj_consume_token(MINUS); - break; - case EMPTY: - jj_consume_token(EMPTY); - break; - default: - jj_la1[13] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - UnaryExpression(); - break; - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - case STRING_LITERAL: - case TRUE: - case FALSE: - case NULL: - case LPAREN: - case IDENTIFIER: - Value(); - break; - default: - jj_la1[14] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void Value() throws ParseException { - /*@bgen(jjtree) Value */ - ASTValue jjtn000 = new ASTValue(JJTVALUE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - ValuePrefix(); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOT: - case LBRACKET: - - break; - default: - jj_la1[15] = jj_gen; - break label_7; - } - ValueSuffix(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void ValuePrefix() throws ParseException { - /*@bgen(jjtree) ValuePrefix */ - ASTValuePrefix jjtn000 = new ASTValuePrefix(JJTVALUEPREFIX); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - case STRING_LITERAL: - case TRUE: - case FALSE: - case NULL: - Literal(); - break; - case LPAREN: - jj_consume_token(LPAREN); - Expression(); - jj_consume_token(RPAREN); - break; - default: - jj_la1[16] = jj_gen; - if (jj_2_2(3)) { - FunctionInvocation(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - jj_consume_token(IDENTIFIER); - break; - default: - jj_la1[17] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void ValueSuffix() throws ParseException { - /*@bgen(jjtree) ValueSuffix */ - ASTValueSuffix jjtn000 = new ASTValueSuffix(JJTVALUESUFFIX); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token t = null; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOT: - jj_consume_token(DOT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - t = jj_consume_token(IDENTIFIER); - break; - default: - jj_la1[18] = jj_gen; - - } - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtreeCloseNodeScope(jjtn000); - jjtn000.setPropertyNameToken(t); - break; - case LBRACKET: - jj_consume_token(LBRACKET); - Expression(); - jj_consume_token(RBRACKET); - break; - default: - jj_la1[19] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void FunctionInvocation() throws ParseException { - /*@bgen(jjtree) FunctionInvocation */ - ASTFunctionInvocation jjtn000 = new ASTFunctionInvocation(JJTFUNCTIONINVOCATION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000);Token prefix = null, name = null; - try { - prefix = jj_consume_token(IDENTIFIER); - jj_consume_token(COLON); - jjtn000.setFullFunctionName(prefix.image + ":"); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - name = jj_consume_token(IDENTIFIER); - break; - default: - jj_la1[20] = jj_gen; - - } - if(null != prefix && null != name) - jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image)); - else if(null != name) - jjtn000.setFullFunctionName(name.image); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LPAREN: - jj_consume_token(LPAREN); - Expression(); - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - - break; - default: - jj_la1[21] = jj_gen; - break label_8; - } - jj_consume_token(COMMA); - Expression(); - } - try { - jj_consume_token(RPAREN); - } catch (Exception e) { - - } - break; - default: - jj_la1[22] = jj_gen; - - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final public void Literal() throws ParseException { - /*@bgen(jjtree) Literal */ - ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - jjtreeOpenNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case TRUE: - jj_consume_token(TRUE); - break; - case FALSE: - jj_consume_token(FALSE); - break; - case INTEGER_LITERAL: - jj_consume_token(INTEGER_LITERAL); - break; - case FLOATING_POINT_LITERAL: - jj_consume_token(FLOATING_POINT_LITERAL); - break; - case STRING_LITERAL: - jj_consume_token(STRING_LITERAL); - break; - case NULL: - jj_consume_token(NULL); - break; - default: - jj_la1[23] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - jjtreeCloseNodeScope(jjtn000); - } - } - } - - final private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - final private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_2(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(1, xla); } - } - - final private boolean jj_3R_10() { - if (jj_scan_token(LPAREN)) return true; - return false; - } - - final private boolean jj_3R_9() { - if (jj_scan_token(IDENTIFIER)) return true; - if (jj_scan_token(COLON)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(47)) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_10()) jj_scanpos = xsp; - return false; - } - - final private boolean jj_3_2() { - if (jj_3R_9()) return true; - return false; - } - - final private boolean jj_3_1() { - if (jj_scan_token(COND)) return true; - return false; - } - - public JSPELParserTokenManager token_source; - SimpleCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - public boolean lookingAhead = false; -// private boolean jj_semLA; - private int jj_gen; - final private int[] jj_la1 = new int[24]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static { - jj_la1_0(); - jj_la1_1(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0x4001d60,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0xf3c000,0xf3c000,0x0,0x0,0x0,0x0,0x0,0x4001d60,0x40002000,0x4001d60,0x0,0x0,0x40002000,0x0,0x10000000,0x4000000,0x1d60,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0xa182,0x1800,0x1800,0x600,0x600,0x0,0x0,0x0,0x0,0x3,0x3,0x7c,0x7c,0x2182,0xa182,0x0,0x0,0x8000,0x8000,0x0,0x8000,0x0,0x0,0x0,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[2]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - public JSPELParser(java.io.InputStream stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new JSPELParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 24; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.InputStream stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 24; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public JSPELParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new JSPELParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 24; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 24; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public JSPELParser(JSPELParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 24; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(JSPELParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 24; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { - private static final long serialVersionUID = 1L; - } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - final private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = lookingAhead ? jj_scanpos : token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.Vector jj_expentries = new java.util.Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - boolean exists = false; - for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { - int[] oldentry = (int[])(e.nextElement()); - if (oldentry.length == jj_expentry.length) { - exists = true; - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; - } - } - if (exists) break; - } - } - if (!exists) jj_expentries.addElement(jj_expentry); - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[51]; - for (int i = 0; i < 51; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 24; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<<j)) != 0) { - la1tokens[j] = true; - } - if ((jj_la1_1[i] & (1<<j)) != 0) { - la1tokens[32+j] = true; - } - } - } - } - for (int i = 0; i < 51; i++) { - if (la1tokens[i]) { - jj_expentry = new int[1]; - jj_expentry[0] = i; - jj_expentries.addElement(jj_expentry); - } - } - jj_endpos = 0; - jj_rescan_token(); - jj_add_error_token(0, 0); - int[][] exptokseq = new int[jj_expentries.size()][]; - for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = (int[])jj_expentries.elementAt(i); - } - return new ParseException(token, exptokseq, tokenImage); - } - - final public void enable_tracing() { - } - - final public void disable_tracing() { - } - - final private void jj_rescan_token() { - jj_rescan = true; - for (int i = 0; i < 2; i++) { - JJCalls p = jj_2_rtns[i]; - do { - if (p.gen > jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - } - } - p = p.next; - } while (p != null); - } - jj_rescan = false; - } - - final private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java deleted file mode 100644 index 1f4e3ad908..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParserConstants.java */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public interface JSPELParserConstants { - - int EOF = 0; - int INTEGER_LITERAL = 5; - int FLOATING_POINT_LITERAL = 6; - int EXPONENT = 7; - int STRING_LITERAL = 8; - int BADLY_ESCAPED_STRING_LITERAL = 9; - int TRUE = 10; - int FALSE = 11; - int NULL = 12; - int DOT = 13; - int GT1 = 14; - int GT2 = 15; - int LT1 = 16; - int LT2 = 17; - int EQ1 = 18; - int EQ2 = 19; - int LE1 = 20; - int LE2 = 21; - int GE1 = 22; - int GE2 = 23; - int NEQ1 = 24; - int NEQ2 = 25; - int LPAREN = 26; - int RPAREN = 27; - int COMMA = 28; - int COLON = 29; - int LBRACKET = 30; - int RBRACKET = 31; - int PLUS = 32; - int MINUS = 33; - int MULTIPLY = 34; - int DIVIDE1 = 35; - int DIVIDE2 = 36; - int MODULUS1 = 37; - int MODULUS2 = 38; - int NOT1 = 39; - int NOT2 = 40; - int AND1 = 41; - int AND2 = 42; - int OR1 = 43; - int OR2 = 44; - int EMPTY = 45; - int COND = 46; - int IDENTIFIER = 47; - int IMPL_OBJ_START = 48; - int LETTER = 49; - int DIGIT = 50; - - int DEFAULT = 0; - - String[] tokenImage = { - "<EOF>", - "\" \"", - "\"\\t\"", - "\"\\n\"", - "\"\\r\"", - "<INTEGER_LITERAL>", - "<FLOATING_POINT_LITERAL>", - "<EXPONENT>", - "<STRING_LITERAL>", - "<BADLY_ESCAPED_STRING_LITERAL>", - "\"true\"", - "\"false\"", - "\"null\"", - "\".\"", - "\">\"", - "\"gt\"", - "\"<\"", - "\"lt\"", - "\"==\"", - "\"eq\"", - "\"<=\"", - "\"le\"", - "\">=\"", - "\"ge\"", - "\"!=\"", - "\"ne\"", - "\"(\"", - "\")\"", - "\",\"", - "\":\"", - "\"[\"", - "\"]\"", - "\"+\"", - "\"-\"", - "\"*\"", - "\"/\"", - "\"div\"", - "\"%\"", - "\"mod\"", - "\"not\"", - "\"!\"", - "\"and\"", - "\"&&\"", - "\"or\"", - "\"||\"", - "\"empty\"", - "\"?\"", - "<IDENTIFIER>", - "\"#\"", - "<LETTER>", - "<DIGIT>", - }; - -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java deleted file mode 100644 index cc1e711d94..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java +++ /dev/null @@ -1,855 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParserTokenManager.java */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class JSPELParserTokenManager implements JSPELParserConstants -{ - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - case 0: - if ((active0 & 0x2ad002aa9c00L) != 0L) - { - jjmatchedKind = 47; - return 6; - } - if ((active0 & 0x2000L) != 0L) - return 1; - return -1; - case 1: - if ((active0 & 0x22d000001c00L) != 0L) - { - jjmatchedKind = 47; - jjmatchedPos = 1; - return 6; - } - if ((active0 & 0x80002aa8000L) != 0L) - return 6; - return -1; - case 2: - if ((active0 & 0x200000001c00L) != 0L) - { - jjmatchedKind = 47; - jjmatchedPos = 2; - return 6; - } - if ((active0 & 0x2d000000000L) != 0L) - return 6; - return -1; - case 3: - if ((active0 & 0x200000000800L) != 0L) - { - jjmatchedKind = 47; - jjmatchedPos = 3; - return 6; - } - if ((active0 & 0x1400L) != 0L) - return 6; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 33: - jjmatchedKind = 40; - return jjMoveStringLiteralDfa1_0(0x1000000L); - case 37: - return jjStopAtPos(0, 37); - case 38: - return jjMoveStringLiteralDfa1_0(0x40000000000L); - case 40: - return jjStopAtPos(0, 26); - case 41: - return jjStopAtPos(0, 27); - case 42: - return jjStopAtPos(0, 34); - case 43: - return jjStopAtPos(0, 32); - case 44: - return jjStopAtPos(0, 28); - case 45: - return jjStopAtPos(0, 33); - case 46: - return jjStartNfaWithStates_0(0, 13, 1); - case 47: - return jjStopAtPos(0, 35); - case 58: - return jjStopAtPos(0, 29); - case 60: - jjmatchedKind = 16; - return jjMoveStringLiteralDfa1_0(0x100000L); - case 61: - return jjMoveStringLiteralDfa1_0(0x40000L); - case 62: - jjmatchedKind = 14; - return jjMoveStringLiteralDfa1_0(0x400000L); - case 63: - return jjStopAtPos(0, 46); - case 91: - return jjStopAtPos(0, 30); - case 93: - return jjStopAtPos(0, 31); - case 97: - return jjMoveStringLiteralDfa1_0(0x20000000000L); - case 100: - return jjMoveStringLiteralDfa1_0(0x1000000000L); - case 101: - return jjMoveStringLiteralDfa1_0(0x200000080000L); - case 102: - return jjMoveStringLiteralDfa1_0(0x800L); - case 103: - return jjMoveStringLiteralDfa1_0(0x808000L); - case 108: - return jjMoveStringLiteralDfa1_0(0x220000L); - case 109: - return jjMoveStringLiteralDfa1_0(0x4000000000L); - case 110: - return jjMoveStringLiteralDfa1_0(0x8002001000L); - case 111: - return jjMoveStringLiteralDfa1_0(0x80000000000L); - case 116: - return jjMoveStringLiteralDfa1_0(0x400L); - case 124: - return jjMoveStringLiteralDfa1_0(0x100000000000L); - default : - return jjMoveNfa_0(0, 0); - } -} -private final int jjMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0); - return 1; - } - switch(curChar) - { - case 38: - if ((active0 & 0x40000000000L) != 0L) - return jjStopAtPos(1, 42); - break; - case 61: - if ((active0 & 0x40000L) != 0L) - return jjStopAtPos(1, 18); - else if ((active0 & 0x100000L) != 0L) - return jjStopAtPos(1, 20); - else if ((active0 & 0x400000L) != 0L) - return jjStopAtPos(1, 22); - else if ((active0 & 0x1000000L) != 0L) - return jjStopAtPos(1, 24); - break; - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x800L); - case 101: - if ((active0 & 0x200000L) != 0L) - return jjStartNfaWithStates_0(1, 21, 6); - else if ((active0 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(1, 23, 6); - else if ((active0 & 0x2000000L) != 0L) - return jjStartNfaWithStates_0(1, 25, 6); - break; - case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L); - case 109: - return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L); - case 110: - return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L); - case 111: - return jjMoveStringLiteralDfa2_0(active0, 0xc000000000L); - case 113: - if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(1, 19, 6); - break; - case 114: - if ((active0 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(1, 43, 6); - return jjMoveStringLiteralDfa2_0(active0, 0x400L); - case 116: - if ((active0 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(1, 15, 6); - else if ((active0 & 0x20000L) != 0L) - return jjStartNfaWithStates_0(1, 17, 6); - break; - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x1000L); - case 124: - if ((active0 & 0x100000000000L) != 0L) - return jjStopAtPos(1, 44); - break; - default : - break; - } - return jjStartNfa_0(0, active0); -} -private final int jjMoveStringLiteralDfa2_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(0, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0); - return 2; - } - switch(curChar) - { - case 100: - if ((active0 & 0x4000000000L) != 0L) - return jjStartNfaWithStates_0(2, 38, 6); - else if ((active0 & 0x20000000000L) != 0L) - return jjStartNfaWithStates_0(2, 41, 6); - break; - case 108: - return jjMoveStringLiteralDfa3_0(active0, 0x1800L); - case 112: - return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L); - case 116: - if ((active0 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(2, 39, 6); - break; - case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x400L); - case 118: - if ((active0 & 0x1000000000L) != 0L) - return jjStartNfaWithStates_0(2, 36, 6); - break; - default : - break; - } - return jjStartNfa_0(1, active0); -} -private final int jjMoveStringLiteralDfa3_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(1, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0); - return 3; - } - switch(curChar) - { - case 101: - if ((active0 & 0x400L) != 0L) - return jjStartNfaWithStates_0(3, 10, 6); - break; - case 108: - if ((active0 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(3, 12, 6); - break; - case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x800L); - case 116: - return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L); - default : - break; - } - return jjStartNfa_0(2, active0); -} -private final int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0); - return 4; - } - switch(curChar) - { - case 101: - if ((active0 & 0x800L) != 0L) - return jjStartNfaWithStates_0(4, 11, 6); - break; - case 121: - if ((active0 & 0x200000000000L) != 0L) - return jjStartNfaWithStates_0(4, 45, 6); - break; - default : - break; - } - return jjStartNfa_0(3, active0); -} -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -//private final void jjCheckNAddStates(int start) -//{ -// jjCheckNAdd(jjnextStates[start]); -// jjCheckNAdd(jjnextStates[start + 1]); -//} -static final long[] jjbitVec0 = { - 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L -}; -static final long[] jjbitVec2 = { - 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL -}; -static final long[] jjbitVec3 = { - 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -static final long[] jjbitVec4 = { - 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L -}; -static final long[] jjbitVec5 = { - 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L -}; -static final long[] jjbitVec6 = { - 0x3fffffffffffL, 0x0L, 0x0L, 0x0L -}; -static final long[] jjbitVec7 = { - 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -static final long[] jjbitVec8 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private final int jjMoveNfa_0(int startState, int curPos) -{ - int startsAt = 0; - jjnewStateCnt = 35; - int i = 1; - jjstateSet[0] = startState; - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - // MatchLoop: - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x3ff000000000000L & l) != 0L) - { - if (kind > 5) - kind = 5; - jjCheckNAddStates(0, 4); - } - else if ((0x1800000000L & l) != 0L) - { - if (kind > 47) - kind = 47; - jjCheckNAdd(6); - } - else if (curChar == 39) - jjCheckNAddStates(5, 9); - else if (curChar == 34) - jjCheckNAddStates(10, 14); - else if (curChar == 46) - jjCheckNAdd(1); - break; - case 1: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 6) - kind = 6; - jjCheckNAddTwoStates(1, 2); - break; - case 3: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(4); - break; - case 4: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 6) - kind = 6; - jjCheckNAdd(4); - break; - case 5: - if ((0x1800000000L & l) == 0L) - break; - if (kind > 47) - kind = 47; - jjCheckNAdd(6); - break; - case 6: - if ((0x3ff001000000000L & l) == 0L) - break; - if (kind > 47) - kind = 47; - jjCheckNAdd(6); - break; - case 7: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 5) - kind = 5; - jjCheckNAddStates(0, 4); - break; - case 8: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 5) - kind = 5; - jjCheckNAdd(8); - break; - case 9: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(9, 10); - break; - case 10: - if (curChar != 46) - break; - if (kind > 6) - kind = 6; - jjCheckNAddTwoStates(11, 12); - break; - case 11: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 6) - kind = 6; - jjCheckNAddTwoStates(11, 12); - break; - case 13: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(14); - break; - case 14: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 6) - kind = 6; - jjCheckNAdd(14); - break; - case 15: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(15, 16); - break; - case 17: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(18); - break; - case 18: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 6) - kind = 6; - jjCheckNAdd(18); - break; - case 19: - if (curChar == 34) - jjCheckNAddStates(10, 14); - break; - case 20: - if ((0xfffffffbffffffffL & l) != 0L) - jjCheckNAddStates(15, 17); - break; - case 22: - if (curChar == 34) - jjCheckNAddStates(15, 17); - break; - case 23: - if (curChar == 34 && kind > 8) - kind = 8; - break; - case 24: - if ((0xfffffffbffffffffL & l) != 0L) - jjCheckNAddTwoStates(24, 25); - break; - case 26: - if ((0xfffffffbffffffffL & l) != 0L && kind > 9) - kind = 9; - break; - case 27: - if (curChar == 39) - jjCheckNAddStates(5, 9); - break; - case 28: - if ((0xffffff7fffffffffL & l) != 0L) - jjCheckNAddStates(18, 20); - break; - case 30: - if (curChar == 39) - jjCheckNAddStates(18, 20); - break; - case 31: - if (curChar == 39 && kind > 8) - kind = 8; - break; - case 32: - if ((0xffffff7fffffffffL & l) != 0L) - jjCheckNAddTwoStates(32, 33); - break; - case 34: - if ((0xffffff7fffffffffL & l) != 0L && kind > 9) - kind = 9; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - //MatchLoop: - do - { - switch(jjstateSet[--i]) - { - case 0: - case 6: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 47) - kind = 47; - jjCheckNAdd(6); - break; - case 2: - if ((0x2000000020L & l) != 0L) - jjAddStates(21, 22); - break; - case 12: - if ((0x2000000020L & l) != 0L) - jjAddStates(23, 24); - break; - case 16: - if ((0x2000000020L & l) != 0L) - jjAddStates(25, 26); - break; - case 20: - if ((0xffffffffefffffffL & l) != 0L) - jjCheckNAddStates(15, 17); - break; - case 21: - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 22; - break; - case 22: - if (curChar == 92) - jjCheckNAddStates(15, 17); - break; - case 24: - if ((0xffffffffefffffffL & l) != 0L) - jjAddStates(27, 28); - break; - case 25: - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 26; - break; - case 26: - case 34: - if ((0xffffffffefffffffL & l) != 0L && kind > 9) - kind = 9; - break; - case 28: - if ((0xffffffffefffffffL & l) != 0L) - jjCheckNAddStates(18, 20); - break; - case 29: - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 30; - break; - case 30: - if (curChar == 92) - jjCheckNAddStates(18, 20); - break; - case 32: - if ((0xffffffffefffffffL & l) != 0L) - jjAddStates(29, 30); - break; - case 33: - if (curChar == 92) - jjstateSet[jjnewStateCnt++] = 34; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int hiByte = curChar >> 8; - int i1 = hiByte >> 6; - long l1 = 1L << (hiByte & 077); - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - //MatchLoop: - do - { - switch(jjstateSet[--i]) - { - case 0: - case 6: - if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) - break; - if (kind > 47) - kind = 47; - jjCheckNAdd(6); - break; - case 20: - if (jjCanMove_1(hiByte, i1, i2, l1, l2)) - jjAddStates(15, 17); - break; - case 24: - if (jjCanMove_1(hiByte, i1, i2, l1, l2)) - jjAddStates(27, 28); - break; - case 26: - case 34: - if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 9) - kind = 9; - break; - case 28: - if (jjCanMove_1(hiByte, i1, i2, l1, l2)) - jjAddStates(18, 20); - break; - case 32: - if (jjCanMove_1(hiByte, i1, i2, l1, l2)) - jjAddStates(29, 30); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { - 8, 9, 10, 15, 16, 28, 29, 31, 32, 33, 20, 21, 23, 24, 25, 20, - 21, 23, 28, 29, 31, 3, 4, 13, 14, 17, 18, 24, 25, 32, 33, -}; -private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) -{ - switch(hiByte) - { - case 0: - return ((jjbitVec2[i2] & l2) != 0L); - case 48: - return ((jjbitVec3[i2] & l2) != 0L); - case 49: - return ((jjbitVec4[i2] & l2) != 0L); - case 51: - return ((jjbitVec5[i2] & l2) != 0L); - case 61: - return ((jjbitVec6[i2] & l2) != 0L); - default : - if ((jjbitVec0[i1] & l1) != 0L) - return true; - return false; - } -} -private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) -{ - switch(hiByte) - { - case 0: - return ((jjbitVec8[i2] & l2) != 0L); - default : - if ((jjbitVec7[i1] & l1) != 0L) - return true; - return false; - } -} -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, null, null, "\164\162\165\145", -"\146\141\154\163\145", "\156\165\154\154", "\56", "\76", "\147\164", "\74", "\154\164", "\75\75", -"\145\161", "\74\75", "\154\145", "\76\75", "\147\145", "\41\75", "\156\145", "\50", -"\51", "\54", "\72", "\133", "\135", "\53", "\55", "\52", "\57", "\144\151\166", -"\45", "\155\157\144", "\156\157\164", "\41", "\141\156\144", "\46\46", "\157\162", -"\174\174", "\145\155\160\164\171", "\77", null, null, null, null, }; -public static final String[] lexStateNames = { - "DEFAULT", -}; -static final long[] jjtoToken = { - 0xffffffffff61L, -}; -static final long[] jjtoSkip = { - 0x1eL, -}; -protected SimpleCharStream input_stream; -private final int[] jjrounds = new int[35]; -private final int[] jjstateSet = new int[70]; -protected char curChar; -public JSPELParserTokenManager(SimpleCharStream stream) -{ - if (SimpleCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} -public JSPELParserTokenManager(SimpleCharStream stream, int lexState) -{ - this(stream); - SwitchTo(lexState); -} -public void ReInit(SimpleCharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private final void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 35; i-- > 0;) - jjrounds[i] = 0x80000000; -} -public void ReInit(SimpleCharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} -public void SwitchTo(int lexState) -{ - if (lexState >= 1 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -protected Token jjFillToken() -{ - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; - String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -public Token getNextToken() -{ - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - return matchedToken; - } - - try { input_stream.backup(0); - while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) - curChar = input_stream.BeginToken(); - } - catch (java.io.IOException e1) { continue EOFLoop; } - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - return matchedToken; - } - else - { - continue EOFLoop; - } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } -} - -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java deleted file mode 100644 index 55a6e47482..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. JSPELParserTreeConstants.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public interface JSPELParserTreeConstants -{ - public int JJTEXPRESSION = 0; - public int JJTOREXPRESSION = 1; - public int JJTANDEXPRESSION = 2; - public int JJTEQUALITYEXPRESSION = 3; - public int JJTRELATIONALEXPRESSION = 4; - public int JJTADDEXPRESSION = 5; - public int JJTMULTIPLYEXPRESSION = 6; - public int JJTCHOICEEXPRESSION = 7; - public int JJTUNARYEXPRESSION = 8; - public int JJTVALUE = 9; - public int JJTVALUEPREFIX = 10; - public int JJTVALUESUFFIX = 11; - public int JJTFUNCTIONINVOCATION = 12; - public int JJTLITERAL = 13; - - - public String[] jjtNodeName = { - "Expression", - "OrExpression", - "AndExpression", - "EqualityExpression", - "RelationalExpression", - "AddExpression", - "MultiplyExpression", - "ChoiceExpression", - "UnaryExpression", - "Value", - "ValuePrefix", - "ValueSuffix", - "FunctionInvocation", - "Literal", - }; -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java deleted file mode 100644 index ffcf4941b8..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. JSPELParserVisitor.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public interface JSPELParserVisitor -{ - public Object visit(SimpleNode node, Object data); - public Object visit(ASTExpression node, Object data); - public Object visit(ASTOrExpression node, Object data); - public Object visit(ASTAndExpression node, Object data); - public Object visit(ASTEqualityExpression node, Object data); - public Object visit(ASTRelationalExpression node, Object data); - public Object visit(ASTAddExpression node, Object data); - public Object visit(ASTMultiplyExpression node, Object data); - public Object visit(ASTChoiceExpression node, Object data); - public Object visit(ASTUnaryExpression node, Object data); - public Object visit(ASTValue node, Object data); - public Object visit(ASTValuePrefix node, Object data); - public Object visit(ASTValueSuffix node, Object data); - public Object visit(ASTFunctionInvocation node, Object data); - public Object visit(ASTLiteral node, Object data); -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java deleted file mode 100644 index 8ba5eb304e..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.jface.text.Position; -import org.eclipse.jst.jsp.core.internal.JSPCoreMessages; -import org.eclipse.jst.jsp.core.jspel.ELProblem; -import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; -import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; - - -public class JSPELTranslator implements IJSPELTranslator { - /** - * JSP Expression Language Parser. - */ - private JSPELParser elParser = null; - - public List translateEL(String elText, String delim, - IStructuredDocumentRegion currentNode, int contentStart, - int contentLength, StringBuffer fUserELExpressions, - HashMap fUserELRanges, IStructuredDocument document) { - - ArrayList elProblems = new ArrayList(); - - try { - synchronized(this) { - if(null == elParser) { - elParser = JSPELParser.createParser(elText); - } else { - elParser.ReInit(elText); - } - - ASTExpression expression = elParser.Expression(); - ELGenerator gen = new ELGenerator(); - gen.generate(expression, currentNode, fUserELExpressions, fUserELRanges, document, currentNode, contentStart, contentLength); - } - } catch (ParseException e) { - Token curTok = e.currentToken; - int problemStartOffset; - int problemEndOffset; - Position pos = null; - problemStartOffset = contentStart + curTok.beginColumn; - problemEndOffset = contentStart + curTok.endColumn; - - pos = new Position(problemStartOffset, problemEndOffset - problemStartOffset + 1); - elProblems.add(new ELProblem(pos, e.getLocalizedMessage())); - } catch (TokenMgrError te) { - Position pos = new Position(contentStart, contentLength); - elProblems.add(new ELProblem(pos, JSPCoreMessages.JSPEL_Token)); - } - return elProblems; - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java deleted file mode 100644 index b8a186e4c4..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. Node.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -/* All AST nodes must implement this interface. It provides basic - machinery for constructing the parent and child relationships - between nodes. */ - -public interface Node { - - /** This method is called after the node has been made the current - node. It indicates that child nodes can now be added to it. */ - public void jjtOpen(); - - /** This method is called after all the child nodes have been - added. */ - public void jjtClose(); - - /** This pair of methods are used to inform the node of its - parent. */ - public void jjtSetParent(Node n); - public Node jjtGetParent(); - - /** This method tells the node to add its argument to the node's - list of children. */ - public void jjtAddChild(Node n, int i); - - /** This method returns a child node. The children are numbered - from zero, left to right. */ - public Node jjtGetChild(int i); - - /** Return the number of children the node has. */ - public int jjtGetNumChildren(); - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data); -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java deleted file mode 100644 index ecd5087075..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java +++ /dev/null @@ -1,208 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * Default <code>serialVersionUID</code> - */ - private static final long serialVersionUID = 1L; - -/** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: <result of getMessage> - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - String expected = ""; - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected += tokenImage[expectedTokenSequences[i][j]] + " "; - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected += "..."; - } - expected += eol + " "; - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected; - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java deleted file mode 100644 index 8021b4b992..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java +++ /dev/null @@ -1,412 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 3.0 */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ - -public class SimpleCharStream -{ - public static final boolean staticFlag = false; - int bufsize; - int available; - int tokenBegin; - public int bufpos = -1; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int inBuf = 0; - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos += (bufsize - tokenBegin)); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - maxNextCharInd = (bufpos -= tokenBegin); - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - - bufsize += 2048; - available = bufsize; - tokenBegin = 0; - } - - protected void FillBuff() throws java.io.IOException - { - if (maxNextCharInd == available) - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = maxNextCharInd = 0; - available = tokenBegin; - } - else if (tokenBegin < 0) - bufpos = maxNextCharInd = 0; - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - int i; - try { - if ((i = inputStream.read(buffer, maxNextCharInd, - available - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - --bufpos; - backup(0); - if (tokenBegin == -1) - tokenBegin = bufpos; - throw e; - } - } - - public char BeginToken() throws java.io.IOException - { - tokenBegin = -1; - char c = readChar(); - tokenBegin = bufpos; - - return c; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (8 - (column & 07)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - if (++bufpos >= maxNextCharInd) - FillBuff(); - - char c = buffer[bufpos]; - - UpdateLineColumn(c); - return (c); - } - - /** - * @deprecated - * @see #getEndColumn - */ - - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - - public int getLine() { - return bufline[bufpos]; - } - - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - public int getEndLine() { - return bufline[bufpos]; - } - - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - public int getBeginLine() { - return bufline[tokenBegin]; - } - - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - - public SimpleCharStream(java.io.Reader dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - bufpos = -1; - } - - public void ReInit(java.io.Reader dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public SimpleCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - public void Done() - { - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java deleted file mode 100644 index aac473f95a..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JJTree: Do not edit this line. SimpleNode.java */ - -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class SimpleNode implements Node { - protected Node parent; - protected Node[] children; - protected int id; - protected JSPELParser parser; - protected Token firstToken; - protected Token lastToken; - - public SimpleNode(int i) { - id = i; - } - - public SimpleNode(JSPELParser p, int i) { - this(i); - parser = p; - } - - public void jjtOpen() { - } - - public void jjtClose() { - } - - public void jjtSetParent(Node n) { parent = n; } - public Node jjtGetParent() { return parent; } - - public void jjtAddChild(Node n, int i) { - if (children == null) { - children = new Node[i + 1]; - } else if (i >= children.length) { - Node c[] = new Node[i + 1]; - System.arraycopy(children, 0, c, 0, children.length); - children = c; - } - children[i] = n; - } - - public Node jjtGetChild(int i) { - return children[i]; - } - - public int jjtGetNumChildren() { - return (children == null) ? 0 : children.length; - } - - /** Accept the visitor. **/ - public Object jjtAccept(JSPELParserVisitor visitor, Object data) { - return visitor.visit(this, data); - } - - /** Accept the visitor. **/ - public Object childrenAccept(JSPELParserVisitor visitor, Object data) { - if (children != null) { - for (int i = 0; i < children.length; ++i) { - children[i].jjtAccept(visitor, data); - } - } - return data; - } - - /* You can override these two methods in subclasses of SimpleNode to - customize the way the node appears when the tree is dumped. If - your output uses more than one line you should override - toString(String), otherwise overriding toString() is probably all - you need to do. */ - - public String toString() { return JSPELParserTreeConstants.jjtNodeName[id]; } - public String toString(String prefix) { return prefix + toString(); } - - /* Override this method if you want to customize how the node dumps - out its children. */ - - public void dump(String prefix) { - System.out.println(toString(prefix)); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - SimpleNode n = (SimpleNode)children[i]; - if (n != null) { - n.dump(prefix + " "); - } - } - } - } - - public Token getFirstToken() { - return firstToken; - } - - public void setFirstToken(Token firstToken) { - this.firstToken = firstToken; - } - - public Token getLastToken() { - return lastToken; - } - - public void setLastToken(Token lastToken) { - this.lastToken = lastToken; - } -} - diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java deleted file mode 100644 index 7159820f62..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java deleted file mode 100644 index 1a53dc2638..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 BEA Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * BEA Systems - initial implementation - * - *******************************************************************************/ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ -package org.eclipse.jst.jsp.core.internal.java.jspel; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * Default <code>serialVersionUID</code> - */ - private static final long serialVersionUID = 1L; - -/** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed deleted file mode 100644 index 1aa5e62fec..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/sed
-
-#
-# The SSE generally uses compiler setting to turn most warnings into errors.
-# This is a little problematic for JavaCC generated files. We don't want
-# to distribute a customized version of JavaCC nor is there any "template"
-# mechanism. So, this simple sed script goes through the generated token
-# manager and fixes a few things. If JavaCC changes the generated code,
-# it's likely that this script will no longer do the right thing. Ditto with
-# any version of JavaCC besides 3.2. Also, there's no guarantee that this
-# script will even work with an arbitrary JavaCC grammar. It's only been tested
-# with the current JSP EL grammar.
-#
-# Author: Ted A. Carroll (tcarroll@bea.com)
-#
-
-s/static private final class LookaheadSuccess extends java.lang.Error { }/static private final class LookaheadSuccess extends java.lang.Error { \n private static final long serialVersionUID = 1L; \n }/g
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed deleted file mode 100644 index 5c1dea401e..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/sed
-
-#
-# The SSE generally uses compiler setting to turn most warnings into errors.
-# This is a little problematic for JavaCC generated files. We don't want
-# to distribute a customized version of JavaCC nor is there any "template"
-# mechanism. So, this simple sed script goes through the generated token
-# manager and fixes a few things. If JavaCC changes the generated code,
-# it's likely that this script will no longer do the right thing. Ditto with
-# any version of JavaCC besides 3.2. Also, there's no guarantee that this
-# script will even work with an arbitrary JavaCC grammar. It's only been tested
-# with the current JSP EL grammar.
-#
-# Author: Ted A. Carroll (tcarroll@bea.com)
-#
-
-s/(int)(curChar >> 8)/curChar >> 8/g
-
-/^public Token getNextToken()/, /EOFLoop/{
- /int kind;/ {d}
- /Token specialToken = null;/{d}
-}
-
-/^private final int jjMoveNfa_0(int startState, int curPos)/, /for(;;)/{
- s/int j, kind = 0x7fffffff;/int kind = 0x7fffffff;/g
- /int\[\] nextStates;/{d}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh deleted file mode 100644 index b3d5aaa43c..0000000000 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/sh
-
-# Set JAVACC_HOME to the installation directory of javacc 3.2
-$JAVACC_HOME/bin/jjtree.bat JSPEL.jjt
-$JAVACC_HOME/bin/javacc.bat JSPEL.jj
-sed -f fixtm.sed -i.bak JSPELParserTokenManager.java
-diff -w JSPELParserTokenManager.java JSPELParserTokenManager.java.bak
-sed -f fixparser.sed -i.bak JSPELParser.java
-diff -w JSPELParser.java JSPELParser.java.bak
|