]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Added FOTree argument to constructor. Removed commented-out code.
authorPeter Bernard West <pbwest@apache.org>
Sun, 15 Sep 2002 05:38:16 +0000 (05:38 +0000)
committerPeter Bernard West <pbwest@apache.org>
Sun, 15 Sep 2002 05:38:16 +0000 (05:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195187 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/expr/PropertyParser.java

index 2169a92172ee6d3cb2c1e5477e452c07cb41668f..f758fe5af0a19d8022d553813bf2f72ab90b199b 100644 (file)
@@ -10,6 +10,7 @@ package org.apache.fop.fo.expr;
 import org.apache.fop.fo.PropertyConsts;
 import org.apache.fop.fo.Properties;
 import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOTree;
 import org.apache.fop.fo.expr.SystemFontFunction;
 
 import org.apache.fop.fo.expr.PropertyValue;
@@ -52,23 +53,12 @@ public class PropertyParser extends PropertyTokenizer {
     private static final String tag = "$Name$";
     private static final String revision = "$Revision$";
 
-    /**
-     * This is an attempt to ensure that the restriction on the application of
-     * from-parent() and from-nearest-specified-value() functions to shorthand
-     * properties (Section 5.10.4 Property Value Functions) is maintained.
-     * I.e. if a shorthand property is the subject of one of these functions,
-     * ist is valid only if "...the expression only consists of the
-     * [from-parent or from-nearest-specified-value] function with an argument
-     * matching the property being computed..."
-     */
-    //private int elementsSeen = 0;
-    /**
-     * Used in conjunction with <i>elementsSeen</i>.
-     */
-    //private String restrictedValueFunctSeen = null;
+    /** The FO tree which has initiated this parser */
+    private FOTree foTree;
 
-    public PropertyParser() {
+    public PropertyParser(FOTree foTree) {
         super();
+        this.foTree = foTree;
     }
 
     /**
@@ -314,10 +304,6 @@ public class PropertyParser extends PropertyTokenizer {
      */
     private PropertyValue parsePrimaryExpr() throws PropertyException {
         PropertyValue prop;
-        //if (restrictedValueFunctSeen != null)
-        //throw new PropertyException
-        //(restrictedValueFunctSeen
-        //+ " already seen with shorthand argument");
         switch (currentToken) {
         case LPAR:
             next();
@@ -325,7 +311,6 @@ public class PropertyParser extends PropertyTokenizer {
             expectRpar();
             // Do this here, rather than breaking, because expectRpar()
             // consumes the right parenthesis and calls next().
-            //elementsSeen++;
             return prop;
 
         case LITERAL:
@@ -576,14 +561,12 @@ public class PropertyParser extends PropertyTokenizer {
             else
                 throw new PropertyException("no such function: "
                                             + currentTokenValue);
-            //elementsSeen++;
             return prop;
         }
         default:
             throw new PropertyException("syntax error");
         }
         next();
-        //elementsSeen++;
         return prop;
     }