You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mo...@apache.org on 2001/10/17 12:45:07 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup xpath.lex

morten      01/10/17 03:45:07

  Modified:    java/src/org/apache/xalan/xsltc/compiler xpath.cup xpath.lex
  Log:
  Added 4 symbols to the lexiographical analyser (xpath.lex) to recognise
  name-tests with whitespace between the NCName and the "()" brackets.
  PR:		bugzilla 4208
  Obtained from:	n/a
  Submitted by:	morten@xml.apache.org
  Reviewed by:	morten@xml.apache.org
  
  Revision  Changes    Path
  1.25      +58 -7     xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup
  
  Index: xpath.cup
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- xpath.cup	2001/10/16 10:58:59	1.24
  +++ xpath.cup	2001/10/17 10:45:07	1.25
  @@ -1,15 +1,66 @@
   /*
  - * @(#)$Id: xpath.cup,v 1.24 2001/10/16 10:58:59 morten Exp $
  + * @(#)$Id: xpath.cup,v 1.25 2001/10/17 10:45:07 morten Exp $
    *
  - * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
  - * 
  - * This software is the proprietary information of Sun Microsystems, Inc.  
  - * Use is subject to license terms.
  - *  
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Xalan" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation and was
  + * originally based on software copyright (c) 2001, Sun
  + * Microsystems., http://www.sun.com.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + *
    * @author Jacek Ambroziak
    * @author Santiago Pericas-Geertsen
    * @author Morten Jorgensen
  - *  
  + * @author G. Todd Miller
  + *
    */
   
   package org.apache.xalan.xsltc.compiler;
  
  
  
  1.2       +66 -8     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xpath.lex	2001/04/17 18:51:55	1.1
  +++ xpath.lex	2001/10/17 10:45:07	1.2
  @@ -1,11 +1,65 @@
   /*
  - * @(#)$Id: xpath.lex,v 1.1 2001/04/17 18:51:55 sboag Exp $
  + * @(#)$Id: xpath.lex,v 1.2 2001/10/17 10:45:07 morten Exp $
    *
  - * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
  - * 
  - * This software is the proprietary information of Sun Microsystems, Inc.  
  - * Use is subject to license terms.
  - * 
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Xalan" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation and was
  + * originally based on software copyright (c) 2001, Sun
  + * Microsystems., http://www.sun.com.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + *
  + * @author Jacek Ambroziak
  + * @author Santiago Pericas-Geertsen
  + * @author Morten Jorgensen
  + *
    */
   
   package org.apache.xalan.xsltc.compiler;
  @@ -53,9 +107,13 @@
   "id"                     { return new Symbol(sym.ID); }
   "key"                    { return new Symbol(sym.KEY); }
   "text()"                 { return new Symbol(sym.TEXT); }
  +"text"+[ \t\r\n\f]+"()"  { return new Symbol(sym.TEXT); }
   "node()"                 { return new Symbol(sym.NODE); }
  -"comment()"              { return new Symbol(sym.COMMENT); }
  -"processing-instruction()" { return new Symbol(sym.PI); }
  +"node"+[ \t\r\n\f]+"()"  { return new Symbol(sym.NODE); }
  +"comment()"                 { return new Symbol(sym.COMMENT); }
  +"comment"+[ \t\r\n\f]+"()"  { return new Symbol(sym.COMMENT); }
  +"processing-instruction()"                { return new Symbol(sym.PI); }
  +"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); }
  
  
  

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