xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mor...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Predicate.java xpath.lex
Date Tue, 04 Dec 2001 10:27:45 GMT
morten      01/12/04 02:27:45

  Modified:    java/src/org/apache/xalan/xsltc/compiler Predicate.java
                        xpath.lex
  Log:
  
  
  Revision  Changes    Path
  1.20      +11 -2     xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Predicate.java
  
  Index: Predicate.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Predicate.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Predicate.java	2001/11/29 11:33:09	1.19
  +++ Predicate.java	2001/12/04 10:27:45	1.20
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Predicate.java,v 1.19 2001/11/29 11:33:09 morten Exp $
  + * @(#)$Id: Predicate.java,v 1.20 2001/12/04 10:27:45 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -204,10 +204,19 @@
   		}
   		else if (parent instanceof FilterExpr) {
   		    FilterExpr filter = (FilterExpr)parent;
  +		    Expression fexp = filter.getExpr();
   
  -		    if (filter.getExpr() instanceof KeyCall)
  +		    if (fexp instanceof KeyCall)
   			_canOptimize = false;
  +		    else if (fexp instanceof VariableRefBase)
  +			_canOptimize = false;
  +		    else if (fexp instanceof ParentLocationPath)
  +			_canOptimize = false;
  +		    else if (fexp instanceof UnionPathExpr)
  +			_canOptimize = false;
   		    else if (_exp.hasPositionCall() && _exp.hasLastCall())
  +			_canOptimize = false;
  +		    else if (filter.getParent() instanceof FilterParentPath)
   			_canOptimize = false;
   		    if (_canOptimize)
   			_nthPositionFilter = true;
  
  
  
  1.5       +15 -15    xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.lex
  
  Index: xpath.lex
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.lex,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- xpath.lex	2001/11/09 15:14:21	1.4
  +++ xpath.lex	2001/12/04 10:27:45	1.5
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: xpath.lex,v 1.4 2001/11/09 15:14:21 tmiller Exp $
  + * @(#)$Id: xpath.lex,v 1.5 2001/12/04 10:27:45 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -91,7 +91,7 @@
   "-"                      { return new Symbol(sym.MINUS); }
   "div"                    { return new Symbol(sym.DIV); }
   "mod"                    { return new Symbol(sym.MOD); }
  -"::"                     { return new Symbol(sym.DCOLON); }
  +":"                     { return new Symbol(sym.DCOLON); }
   ","                      { return new Symbol(sym.COMMA); }
   "@"                      { return new Symbol(sym.ATSIGN); }
   ".."                     { return new Symbol(sym.DDOT); }
  @@ -117,19 +117,19 @@
   "processing-instruction"+[ \t\r\n\f]+"()" { return new Symbol(sym.PI); }
   "or"                     { return new Symbol(sym.OR); }
   "and"                    { return new Symbol(sym.AND); }
  -"child"                  { return new Symbol(sym.CHILD); }
  -"attribute"              { return new Symbol(sym.ATTRIBUTE); }
  -"ancestor"               { return new Symbol(sym.ANCESTOR); }
  -"ancestor-or-self"       { return new Symbol(sym.ANCESTORORSELF); }
  -"descendant"             { return new Symbol(sym.DESCENDANT); }
  -"descendant-or-self"     { return new Symbol(sym.DESCENDANTORSELF); }
  -"following"              { return new Symbol(sym.FOLLOWING); }
  -"following-sibling"      { return new Symbol(sym.FOLLOWINGSIBLING); }
  -"namespace"              { return new Symbol(sym.NAMESPACE); }
  -"parent"                 { return new Symbol(sym.PARENT); }
  -"preceding"              { return new Symbol(sym.PRECEDING); }
  -"preceding-sibling"      { return new Symbol(sym.PRECEDINGSIBLING); }
  -"self"                   { return new Symbol(sym.SELF); }
  +"child:"                { return new Symbol(sym.CHILD); }
  +"attribute:"            { return new Symbol(sym.ATTRIBUTE); }
  +"ancestor:"             { return new Symbol(sym.ANCESTOR); }
  +"ancestor-or-self:"     { return new Symbol(sym.ANCESTORORSELF); }
  +"descendant:"           { return new Symbol(sym.DESCENDANT); }
  +"descendant-or-self:"   { return new Symbol(sym.DESCENDANTORSELF); }
  +"following:"            { return new Symbol(sym.FOLLOWING); }
  +"following-sibling:"    { return new Symbol(sym.FOLLOWINGSIBLING); }
  +"namespace:"            { return new Symbol(sym.NAMESPACE); }
  +"parent:"               { return new Symbol(sym.PARENT); }
  +"preceding:"            { return new Symbol(sym.PRECEDING); }
  +"preceding-sibling:"    { return new Symbol(sym.PRECEDINGSIBLING); }
  +"self:"                 { return new Symbol(sym.SELF); }
   "["                      { return new Symbol(sym.LBRACK); }
   "]"                      { return new Symbol(sym.RBRACK); }
   "("                      { return new Symbol(sym.LPAREN); }
  
  
  

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


Mime
View raw message