You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2002/09/15 07:38:16 UTC

cvs commit: xml-fop/src/org/apache/fop/fo/expr PropertyParser.java

pbwest      2002/09/14 22:38:16

  Modified:    src/org/apache/fop/fo/expr Tag: FOP_0-20-0_Alt-Design
                        PropertyParser.java
  Log:
  Added FOTree argument to constructor.  Removed commented-out code.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.8   +7 -24     xml-fop/src/org/apache/fop/fo/expr/PropertyParser.java
  
  Index: PropertyParser.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/expr/PropertyParser.java,v
  retrieving revision 1.5.2.7
  retrieving revision 1.5.2.8
  diff -u -r1.5.2.7 -r1.5.2.8
  --- PropertyParser.java	27 Aug 2002 15:23:30 -0000	1.5.2.7
  +++ PropertyParser.java	15 Sep 2002 05:38:16 -0000	1.5.2.8
  @@ -10,6 +10,7 @@
   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 @@
       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 @@
        */
       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 @@
               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 @@
               else
                   throw new PropertyException("no such function: "
                                               + currentTokenValue);
  -            //elementsSeen++;
               return prop;
           }
           default:
               throw new PropertyException("syntax error");
           }
           next();
  -        //elementsSeen++;
           return prop;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org