commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r587008 - in /commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser: JEXLNode.java VisitorAdapter.java
Date Mon, 22 Oct 2007 06:35:32 GMT
Author: dion
Date: Sun Oct 21 23:35:25 2007
New Revision: 587008

URL: http://svn.apache.org/viewvc?rev=587008&view=rev
Log:
Add Node for all JEXL parsing
Add VisitorAdapter

Added:
    commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/JEXLNode.java
    commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/VisitorAdapter.java

Added: commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/JEXLNode.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/JEXLNode.java?rev=587008&view=auto
==============================================================================
--- commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/JEXLNode.java
(added)
+++ commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/JEXLNode.java
Sun Oct 21 23:35:25 2007
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.jexl.parser;
+
+
+/**
+ * Base class for parser nodes - holds an 'image' of the token for later use.
+ */
+class JEXLNode {
+
+    /**
+     * Create the interpreter with the default settings.
+     */
+    public JEXLNode() {
+    }
+
+    /** token value. */
+    public String image;
+}
\ No newline at end of file

Added: commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/VisitorAdapter.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/VisitorAdapter.java?rev=587008&view=auto
==============================================================================
--- commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/VisitorAdapter.java
(added)
+++ commons/proper/jexl/branches/2.0/src/java/org/apache/commons/jexl/parser/VisitorAdapter.java
Sun Oct 21 23:35:25 2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License") you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.jexl.parser;
+
+public class VisitorAdapter implements ParserVisitor {
+  public Object visit(SimpleNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTJexlScript node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTBlock node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTEmptyFunction node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTSizeFunction node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTIdentifier node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTExpression node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTAssignment node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTOrNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTAndNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTBitwiseOrNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTBitwiseXorNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTBitwiseAndNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTEQNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTNENode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTLTNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTGTNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTLENode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTGENode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTAddNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTSubtractNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTMulNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTDivNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTModNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTUnaryMinusNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTBitwiseComplNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTNotNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTNullLiteral node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTTrueNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTFalseNode node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTIntegerLiteral node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTFloatLiteral node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTStringLiteral node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTExpressionExpression node, Object data) { node.dump(" ");return
node.childrenAccept(this, data); }
+  public Object visit(ASTStatementExpression node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTReferenceExpression node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTIfStatement node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTWhileStatement node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTForeachStatement node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTMapLiteral node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTMapEntry node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTMethod node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTArrayAccess node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTSizeMethod node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+  public Object visit(ASTReference node, Object data) { node.dump(" ");return node.childrenAccept(this,
data); }
+}
\ No newline at end of file



Mime
View raw message