← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/fix-unversioned-modules into lp:zorba

 

Chris Hillery has proposed merging lp:~zorba-coders/zorba/fix-unversioned-modules into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)
  Dennis Knochenwefel (dennis-knochenwefel)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fix-unversioned-modules/+merge/90598
-- 
The attached diff has been truncated due to its size.
https://code.launchpad.net/~zorba-coders/zorba/fix-unversioned-modules/+merge/90598
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'CMakeConfiguration.txt'
--- CMakeConfiguration.txt	2012-01-11 17:30:25 +0000
+++ CMakeConfiguration.txt	2012-01-29 09:51:27 +0000
@@ -152,6 +152,9 @@
 SET(ZORBA_WITH_BIG_INTEGER OFF CACHE BOOL "enable arbitrary precision integers")
 MESSAGE(STATUS "ZORBA_WITH_BIG_INTEGER:               " ${ZORBA_WITH_BIG_INTEGER})
 
+SET(ZORBA_WITH_JSON ON CACHE BOOL "enable integrated JSON support")
+MESSAGE(STATUS "ZORBA_WITH_JSON:                      " ${ZORBA_WITH_JSON})
+
 IF (ZORBA_SUPPRESS_SWIG)
   SET (no_swig ON)
 ELSE (ZORBA_SUPPRESS_SWIG)

=== modified file 'ChangeLog'
--- ChangeLog	2012-01-26 22:26:04 +0000
+++ ChangeLog	2012-01-29 09:51:27 +0000
@@ -29,9 +29,14 @@
   * Added API method Item::getNamespaceBindings().
   * Added API method StaticContext::getNamespaceBindings() (see bug #905035)
   * Deprecated StaticContext:getNamespaceURIByPrefix()
+<<<<<<< TREE
   * Fixed bug #918211 (xqueryx fulltext w3c conformance generation)
   * Fixed bug #918157 (Add XQFTTS to validation queue)
+=======
+  * Fixed bug with unversioned modules with C++ external functions
+>>>>>>> MERGE-SOURCE
 
+	
 version 2.1
 
 New Features:

=== added file 'NOTICE.txt'
--- NOTICE.txt	1970-01-01 00:00:00 +0000
+++ NOTICE.txt	2012-01-29 09:51:27 +0000
@@ -0,0 +1,740 @@
+-----------
+Zorba 2.1.0
+-----------
+
+(Note: This file is generated automatically from NOTICE.xml.
+Please do not modify this file directly.)
+
+
+
+
+Apache 2
+
+      Copyright 2006-2011 The FLWOR Foundation
+
+      See LICENSE.txt for license information.
+
+      ------------------------
+      This product includes software developed at
+      The FLWOR Foundation (http://www.flworfound.org/).
+
+      ------------------------
+      Portions of this software were developed at the Systems
+      Group of the ETH Zurich, Switzerland.
+    
+
+Other files used by this project:
+----------------------------------------------------
+
+src/zorbatypes/m_apm.h
+src/zorbatypes/mapm/
+
+Copyright: 1999-2007 Michael C. Ring
+Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
+
+      This software is Freeware.
+
+      Permission to use, copy, and distribute this software and its
+      documentation for any purpose with or without fee is hereby granted,
+      provided that the above copyright notice appear in all copies and
+      that both that copyright notice and this permission notice appear
+      in supporting documentation.
+
+      Permission to modify the software is granted. Permission to distribute
+      the modified code is granted. Modifications are to be distributed by
+      using the file 'license.txt' as a template to modify the file header.
+      'license.txt' is available in the official MAPM distribution.
+
+      To distribute modified source code, insert the file 'license.txt'
+      at the top of all modified source code files and edit accordingly.
+
+      This software is provided "as is" without express or implied warranty.
+    
+----------------------------------------------------
+
+src/zorbamisc/config/stdint.h
+
+Copyright: 2006 Alexander Chemeris
+
+
+      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 name of the author may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
+    
+----------------------------------------------------
+
+src/zorbautils/stemmer/
+
+Copyright: 2001 Dr. Martin Porter
+
+
+      All the software given out on this Snowball site is covered by the BSD
+      License (see http://www.opensource.org/licenses/bsd-license.html), with
+      Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
+      Copyright (c) 2002, Richard Boulton.
+
+      Essentially, all this means is that you can do what you like with the code,
+      except claim another Copyright for it, or claim that it is issued under a
+      different license. The software is also issued without warranties, which
+      means that if anyone suffers through its use, they cannot come back and sue
+      you. You also have to alert anyone to whom you give the Snowball software to
+      the fact that it is covered by the BSD license.
+
+      We have not bothered to insert the licensing arrangement into the text of
+      the Snowball software.
+    
+----------------------------------------------------
+
+src/util/less.h
+
+Copyright: 1998 Paul J. Lucas
+
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are met:
+
+      o  Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+
+      o  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.
+
+      o  The name of the author may not be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+      AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.
+    
+----------------------------------------------------
+
+src/util/auto_vector.h (has been modified)
+
+Copyright: 2003 Reliable Software
+
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are met:
+
+      o  Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+
+      o  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.
+
+      o  The name of the author may not be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+      AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.
+    
+----------------------------------------------------
+
+cmake_modules/FindBoost.cmake
+
+Copyright: 
+      2006-2008 Andreas Schneider <mail@xxxxxxxxxxxx>
+      2007      Wengo
+      2007      Mike Jackson
+      2008      Andreas Pakulat <apaku@xxxxxx>
+    
+
+
+      Redistribution AND use is allowed according to the terms of the New BSD license.
+      For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+    
+----------------------------------------------------
+
+cmake_modules/FindJNI.cmake
+cmake_modules/FindPythonLibs.cmake
+cmake_modules/FindSWIG.cmake
+
+Copyright: 2001-2009 Kitware, Inc.
+
+
+      Distributed under the OSI-approved BSD License (the "License");
+      see accompanying file Copyright.txt for details.
+
+      This software is distributed WITHOUT ANY WARRANTY; without even the
+      implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+      See the License for more information.
+
+      CMake - Cross Platform Makefile Generator
+      Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+      All rights reserved.
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions
+      are met:
+
+      * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+      * 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.
+
+      * Neither the names of Kitware, Inc., the Insight Software Consortium,
+      nor the names of their contributors may be used to endorse or promote
+      products derived from this software without specific prior written
+      permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+      "AS IS" AND ANY EXPRESS 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 COPYRIGHT
+      HOLDER OR 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.
+
+      ------------------------------------------------------------------------------
+
+      The above copyright and license notice applies to distributions of
+      CMake in source and binary form.  Some source files contain additional
+      notices of original copyright by their contributors; see each source
+      for details.  Third-party software packages supplied with CMake under
+      compatible licenses provide their own copyright notices documented in
+      corresponding subdirectories.
+
+      ------------------------------------------------------------------------------
+
+      CMake was initially developed by Kitware with the following sponsorship:
+
+      * National Library of Medicine at the National Institutes of Health
+      as part of the Insight Segmentation and Registration Toolkit (ITK).
+
+      * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
+      Visualization Initiative.
+
+      * National Alliance for Medical Image Computing (NAMIC) is funded by the
+      National Institutes of Health through the NIH Roadmap for Medical Research,
+      Grant U54 EB005149.
+
+      * Kitware, Inc.
+    
+----------------------------------------------------
+
+/xml.xsd
+
+Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
+
+
+      All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+      W3C Software Notice and License
+
+      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
+
+      License
+
+      By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
+
+      Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
+      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+      •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
+      •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
+
+      Disclaimers
+
+      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+      The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+    
+----------------------------------------------------
+
+schemas/xslt-xquery-serialization.xsd
+
+Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
+
+
+      All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+      W3C Software Notice and License
+
+      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
+
+      License
+
+      By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
+
+      Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
+      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+      •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
+      •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
+
+      Disclaimers
+
+      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+      The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+    
+----------------------------------------------------
+
+modules/w3c/xpath-functions.xsd
+
+Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
+
+
+      All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+      W3C Software Notice and License
+
+      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
+
+      License
+
+      By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
+
+      Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
+      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+      •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
+      •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
+
+      Disclaimers
+
+      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+      The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+    
+----------------------------------------------------
+
+include/xqc.h
+
+Copyright: 2008, Matthias Brantner, John Snelson
+
+
+      * All rights reserved.
+      *
+      * Redistribution and use in source and binary forms, with or without
+      * modification, are permitted provided that the following conditions are met:
+      *
+      *     * Redistributions of source code must retain the above copyright notice,
+      *       this list of conditions and the following disclaimer.
+      *     * 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.
+      *     * Neither the name of the developers nor the names of contributors may be
+      *       used to endorse or promote products derived from this software without
+      *       specific prior written permission.
+      *
+      * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+      * AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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.
+    
+----------------------------------------------------
+
+modules/functx/functx.xq
+
+Copyright: 2007 Datypic
+
+
+      : This library is free software; you can redistribute it and/or
+      : modify it under the terms of the GNU Lesser General Public
+      : License as published by the Free Software Foundation; either
+      : version 2.1 of the License.
+
+      : This library is distributed in the hope that it will be useful,
+      : but WITHOUT ANY WARRANTY; without even the implied warranty of
+      : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      : Lesser General Public License for more details.
+
+      : You should have received a copy of the GNU Lesser General Public
+      : License along with this library; if not, write to the Free Software
+      : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+    
+----------------------------------------------------
+
+src/compiler/parser/FlexLexer.h
+
+Copyright: 1993 The Regents of the University of California
+
+
+      // All rights reserved.
+      //
+      // This code is derived from software contributed to Berkeley by
+      // Kent Williams and Tom Epperly.
+      //
+      //  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.
+
+      //  Neither the name of the University nor the names of its contributors
+      //  may be used to endorse or promote products derived from this software
+      //  without specific prior written permission.
+
+      //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+      //  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+      //  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+      //  PURPOSE.
+    
+----------------------------------------------------
+
+src/diagnostics/StackWalker.cpp
+src/diagnostics/StackWalker.h
+
+Copyright: 2005 Jochen Kalmbach 
+
+
+      Under BSD License: http://www.opensource.org/licenses/bsd-license.php
+    
+----------------------------------------------------
+
+src/util/singleton.h
+src/util/threads.h
+
+Copyright: 2001 Andrei Alexandrescu
+
+
+      This code accompanies the book:
+      Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+          Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+      Permission to use, copy, modify, distribute and sell this software for any
+          purpose is hereby granted without fee, provided that the above copyright
+          notice appear in all copies and that both that copyright notice and this
+          permission notice appear in supporting documentation.
+      The author or Addison-Wesley Longman make no representations about the
+          suitability of this software for any purpose. It is provided "as is"
+          without express or implied warranty.
+    
+
+External libraries used by this project:
+----------------------------------------------------
+
+Name: LIBXML2
+Preferred version: 2.2.16 or higher
+Is mandatory: true
+Website: http://xmlsoft.org/
+License: MIT
+Copyright: 1998-2002 Daniel Veillard.  All Rights Reserved.
+External notice: 
+
+      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+      Except as contained in this notice, the name of Daniel Veillard shall not
+      be used in advertising or otherwise to promote the sale, use or other deal-
+      ings in this Software without prior written authorization from him.
+    
+----------------------------------------------------
+
+Name: LIBXSLT
+Preferred version: 1.1.26
+Is mandatory: false
+Website: http://xmlsoft.org/XSLT/
+License: MIT
+Copyright: 2001-2002 Daniel Veillard.  All Rights Reserved.
+External notice: 
+
+      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+      Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from him.
+
+    
+----------------------------------------------------
+
+Name: ICU4C
+Preferred version: 3.6 or higher
+Is mandatory: true
+Website: http://www.icu-project.org/
+License: ICU License
+Copyright: 1995-2011 International Business Machines Corporation and others 
+External notice: 
+
+      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
+
+      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+      Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
+    
+----------------------------------------------------
+
+Name: CURL
+Preferred version: above 7.12
+Is mandatory: false
+Website: http://curl.haxx.se/
+License: MIT/X derivate license
+Copyright: 1996 - 2011, Daniel Stenberg, <daniel@xxxxxxx>.
+External notice: 
+
+      All rights reserved.
+
+      Permission to use, copy, modify, and distribute this software for any purpose
+      with or without fee is hereby granted, provided that the above copyright
+      notice and this permission notice appear in all copies.
+
+      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+      NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+      DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+      OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+      OR OTHER DEALINGS IN THE SOFTWARE.
+
+      Except as contained in this notice, the name of a copyright holder shall not
+      be used in advertising or otherwise to promote the sale, use or other dealings
+      in this Software without prior written authorization of the copyright holder.
+    
+----------------------------------------------------
+
+Name: ICONV
+Preferred version: above 1.12
+Is mandatory: true
+Website: http://www.gnu.org/software/libiconv/
+License: LGPL
+Copyright: 1998, 2010 Free Software Foundation, Inc.
+External notice: 
+
+----------------------------------------------------
+
+Name: ZLIB
+Preferred version: 1.2.5
+Is mandatory: true
+Website: http://www.zlib.net/
+Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
+External notice: 
+
+      This software is provided 'as-is', without any express or implied
+      warranty.  In no event will the authors be held liable for any damages
+      arising from the use of this software.
+
+      Permission is granted to anyone to use this software for any purpose,
+      including commercial applications, and to alter it and redistribute it
+      freely, subject to the following restrictions:
+
+      1. The origin of this software must not be misrepresented; you must not
+      claim that you wrote the original software. If you use this software
+      in a product, an acknowledgment in the product documentation would be
+      appreciated but is not required.
+      2. Altered source versions must be plainly marked as such, and must not be
+      misrepresented as being the original software.
+      3. This notice may not be removed or altered from any source distribution.
+
+      Jean-loup Gailly jloup@xxxxxxxx
+      Mark Adler madler@xxxxxxxxxxxxxxxxxx
+    
+----------------------------------------------------
+
+Name: XERCES
+Preferred version: 2.8.0 or higher
+Is mandatory: true
+Website: http://xerces.apache.org/xerces-c/
+License: Apache 2
+Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
+External notice: 
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+----------------------------------------------------
+
+Name: BOOST (boost_filesystem)
+Preferred version: 1.32 or higher
+Is mandatory: false
+Website: http://www.boost.org/
+License: Boost Software License v1.0
+Copyright: 
+      Beman Dawes, David Abrahams, 1998-2005.
+      Rene Rivera 2004-2007
+    
+External notice: 
+
+      Permission is hereby granted, free of charge, to any person or organization
+      obtaining a copy of the software and accompanying documentation covered by
+      this license (the "Software") to use, reproduce, display, distribute,
+      execute, and transmit the Software, and to prepare derivative works of the
+      Software, and to permit third-parties to whom the Software is furnished to
+      do so, all subject to the following:
+
+      The copyright notices in the Software and this entire statement, including
+      the above license grant, this restriction and the following disclaimer,
+      must be included in all copies of the Software, in whole or in part, and
+      all derivative works of the Software, unless such copies or derivative
+      works are solely in the form of machine-executable object code generated by
+      a source language processor.
+
+      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+      FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+      SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+      FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+      ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+      DEALINGS IN THE SOFTWARE.
+    
+
+External applications used by this project:
+----------------------------------------------------
+
+Name: FLEX
+Preferred version: 2.5.33
+Is mandatory: false
+Website: http://flex.sourceforge.net/
+Copyright: 
+      2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
+      1990, 1997 The Regents of the University of California. All rights reserved.
+    
+External notice: 
+
+      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.
+      
+      Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+    
+----------------------------------------------------
+
+Name: BISON
+Preferred version: 2.4 or higher
+Is mandatory: false
+Website: http://www.gnu.org/software/bison/
+License: GPL
+Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+External notice: 
+
+----------------------------------------------------
+
+Name: DOXYGEN
+Preferred version: v1.7.4 
+Is mandatory: false
+Website: www.doxygen.org
+License: GPL
+Copyright: 1997-2011 by Dimitri van Heesch
+External notice: 
+
+      Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
+      No representations are made about the suitability of this software for any purpose. 
+      It is provided "as is" without express or implied warranty. 
+      See the GNU General Public License for more details.
+
+      Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
+    
+----------------------------------------------------
+
+Name: CMAKE
+Preferred version: 2.8.4
+Is mandatory: true
+Website: http://www.cmake.org/
+License: Creative Commons Attribution-NoDerivs 3.0 Unported License
+Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
+External notice: 
+
+      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+      Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+      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.
+
+      Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.
+    
+----------------------------------------------------
+
+Name: SWIG
+Preferred version: 2.0.4 or above
+Is mandatory: false
+Website: http://www.swig.org/
+License: GPL
+Copyright: 
+      1995-2011 The SWIG Developers
+      2005-2006 Arizona Board of Regents (University of Arizona).
+      1998-2005 University of Chicago.
+      1995-1998 The University of Utah and the Regents of the University of California
+    
+External notice: 
+
+      SWIG is free software: you can redistribute it and/or modify it
+      under the terms of the GNU General Public License as published by
+      the Free Software Foundation, either version 3 of the License, or
+      (at your option) any later version. See the LICENSE-GPL file for
+      the full terms of the GNU General Public license version 3.
+
+      Portions of SWIG are also licensed under the terms of the licenses
+      in the file LICENSE-UNIVERSITIES. You must observe the terms of
+      these licenses, as well as the terms of the GNU General Public License,
+      when you distribute SWIG.
+
+      The SWIG library and examples, under the Lib and Examples top level
+      directories, are distributed under the following terms:
+
+      You may copy, modify, distribute, and make derivative works based on
+      this software, in source code or object code form, without
+      restriction. If you distribute the software to others, you may do
+      so according to the terms of your choice. This software is offered as
+      is, without warranty of any kind.
+
+      See the COPYRIGHT file for a list of contributors to SWIG and their
+      copyright notices.
+    
\ No newline at end of file

=== removed file 'NOTICE.txt'
--- NOTICE.txt	2011-10-21 08:09:17 +0000
+++ NOTICE.txt	1970-01-01 00:00:00 +0000
@@ -1,740 +0,0 @@
------------
-Zorba 2.1.0
------------
-
-(Note: This file is generated automatically from NOTICE.xml.
-Please do not modify this file directly.)
-
-
-
-
-Apache 2
-
-      Copyright 2006-2011 The FLWOR Foundation
-
-      See LICENSE.txt for license information.
-
-      ------------------------
-      This product includes software developed at
-      The FLWOR Foundation (http://www.flworfound.org/).
-
-      ------------------------
-      Portions of this software were developed at the Systems
-      Group of the ETH Zurich, Switzerland.
-    
-
-Other files used by this project:
-----------------------------------------------------
-
-src/zorbatypes/m_apm.h
-src/zorbatypes/mapm/
-
-Copyright: 1999-2007 Michael C. Ring
-Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
-
-      This software is Freeware.
-
-      Permission to use, copy, and distribute this software and its
-      documentation for any purpose with or without fee is hereby granted,
-      provided that the above copyright notice appear in all copies and
-      that both that copyright notice and this permission notice appear
-      in supporting documentation.
-
-      Permission to modify the software is granted. Permission to distribute
-      the modified code is granted. Modifications are to be distributed by
-      using the file 'license.txt' as a template to modify the file header.
-      'license.txt' is available in the official MAPM distribution.
-
-      To distribute modified source code, insert the file 'license.txt'
-      at the top of all modified source code files and edit accordingly.
-
-      This software is provided "as is" without express or implied warranty.
-    
-----------------------------------------------------
-
-src/zorbamisc/config/stdint.h
-
-Copyright: 2006 Alexander Chemeris
-
-
-      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 name of the author may be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
-    
-----------------------------------------------------
-
-src/zorbautils/stemmer/
-
-Copyright: 2001 Dr. Martin Porter
-
-
-      All the software given out on this Snowball site is covered by the BSD
-      License (see http://www.opensource.org/licenses/bsd-license.html), with
-      Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
-      Copyright (c) 2002, Richard Boulton.
-
-      Essentially, all this means is that you can do what you like with the code,
-      except claim another Copyright for it, or claim that it is issued under a
-      different license. The software is also issued without warranties, which
-      means that if anyone suffers through its use, they cannot come back and sue
-      you. You also have to alert anyone to whom you give the Snowball software to
-      the fact that it is covered by the BSD license.
-
-      We have not bothered to insert the licensing arrangement into the text of
-      the Snowball software.
-    
-----------------------------------------------------
-
-src/util/less.h
-
-Copyright: 1998 Paul J. Lucas
-
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions are met:
-
-      o  Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-      o  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.
-
-      o  The name of the author may not be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-      AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.
-    
-----------------------------------------------------
-
-src/util/auto_vector.h (has been modified)
-
-Copyright: 2003 Reliable Software
-
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions are met:
-
-      o  Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-      o  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.
-
-      o  The name of the author may not be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-      AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.
-    
-----------------------------------------------------
-
-cmake_modules/FindBoost.cmake
-
-Copyright: 
-      2006-2008 Andreas Schneider <mail@xxxxxxxxxxxx>
-      2007      Wengo
-      2007      Mike Jackson
-      2008      Andreas Pakulat <apaku@xxxxxx>
-    
-
-
-      Redistribution AND use is allowed according to the terms of the New BSD license.
-      For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-    
-----------------------------------------------------
-
-cmake_modules/FindJNI.cmake
-cmake_modules/FindPythonLibs.cmake
-cmake_modules/FindSWIG.cmake
-
-Copyright: 2001-2009 Kitware, Inc.
-
-
-      Distributed under the OSI-approved BSD License (the "License");
-      see accompanying file Copyright.txt for details.
-
-      This software is distributed WITHOUT ANY WARRANTY; without even the
-      implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-      See the License for more information.
-
-      CMake - Cross Platform Makefile Generator
-      Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
-      All rights reserved.
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions
-      are met:
-
-      * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-      * 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.
-
-      * Neither the names of Kitware, Inc., the Insight Software Consortium,
-      nor the names of their contributors may be used to endorse or promote
-      products derived from this software without specific prior written
-      permission.
-
-      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-      "AS IS" AND ANY EXPRESS 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 COPYRIGHT
-      HOLDER OR 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.
-
-      ------------------------------------------------------------------------------
-
-      The above copyright and license notice applies to distributions of
-      CMake in source and binary form.  Some source files contain additional
-      notices of original copyright by their contributors; see each source
-      for details.  Third-party software packages supplied with CMake under
-      compatible licenses provide their own copyright notices documented in
-      corresponding subdirectories.
-
-      ------------------------------------------------------------------------------
-
-      CMake was initially developed by Kitware with the following sponsorship:
-
-      * National Library of Medicine at the National Institutes of Health
-      as part of the Insight Segmentation and Registration Toolkit (ITK).
-
-      * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
-      Visualization Initiative.
-
-      * National Alliance for Medical Image Computing (NAMIC) is funded by the
-      National Institutes of Health through the NIH Roadmap for Medical Research,
-      Grant U54 EB005149.
-
-      * Kitware, Inc.
-    
-----------------------------------------------------
-
-/xml.xsd
-
-Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
-
-
-      All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-      W3C Software Notice and License
-
-      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
-
-      License
-
-      By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
-
-      Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
-      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-      •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
-      •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
-
-      Disclaimers
-
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-      The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
-    
-----------------------------------------------------
-
-schemas/xslt-xquery-serialization.xsd
-
-Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
-
-
-      All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-      W3C Software Notice and License
-
-      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
-
-      License
-
-      By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
-
-      Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
-      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-      •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
-      •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
-
-      Disclaimers
-
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-      The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
-    
-----------------------------------------------------
-
-modules/w3c/xpath-functions.xsd
-
-Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
-
-
-      All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-      W3C Software Notice and License
-
-      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
-
-      License
-
-      By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
-
-      Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
-      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-      •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
-      •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
-
-      Disclaimers
-
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-      The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
-    
-----------------------------------------------------
-
-include/xqc.h
-
-Copyright: 2008, Matthias Brantner, John Snelson
-
-
-      * All rights reserved.
-      *
-      * Redistribution and use in source and binary forms, with or without
-      * modification, are permitted provided that the following conditions are met:
-      *
-      *     * Redistributions of source code must retain the above copyright notice,
-      *       this list of conditions and the following disclaimer.
-      *     * 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.
-      *     * Neither the name of the developers nor the names of contributors may be
-      *       used to endorse or promote products derived from this software without
-      *       specific prior written permission.
-      *
-      * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-      * AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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.
-    
-----------------------------------------------------
-
-modules/functx/functx.xq
-
-Copyright: 2007 Datypic
-
-
-      : This library is free software; you can redistribute it and/or
-      : modify it under the terms of the GNU Lesser General Public
-      : License as published by the Free Software Foundation; either
-      : version 2.1 of the License.
-
-      : This library is distributed in the hope that it will be useful,
-      : but WITHOUT ANY WARRANTY; without even the implied warranty of
-      : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-      : Lesser General Public License for more details.
-
-      : You should have received a copy of the GNU Lesser General Public
-      : License along with this library; if not, write to the Free Software
-      : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-    
-----------------------------------------------------
-
-src/compiler/parser/FlexLexer.h
-
-Copyright: 1993 The Regents of the University of California
-
-
-      // All rights reserved.
-      //
-      // This code is derived from software contributed to Berkeley by
-      // Kent Williams and Tom Epperly.
-      //
-      //  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.
-
-      //  Neither the name of the University nor the names of its contributors
-      //  may be used to endorse or promote products derived from this software
-      //  without specific prior written permission.
-
-      //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-      //  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-      //  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-      //  PURPOSE.
-    
-----------------------------------------------------
-
-src/diagnostics/StackWalker.cpp
-src/diagnostics/StackWalker.h
-
-Copyright: 2005 Jochen Kalmbach 
-
-
-      Under BSD License: http://www.opensource.org/licenses/bsd-license.php
-    
-----------------------------------------------------
-
-src/util/singleton.h
-src/util/threads.h
-
-Copyright: 2001 Andrei Alexandrescu
-
-
-      This code accompanies the book:
-      Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
-          Patterns Applied". Copyright (c) 2001. Addison-Wesley.
-      Permission to use, copy, modify, distribute and sell this software for any
-          purpose is hereby granted without fee, provided that the above copyright
-          notice appear in all copies and that both that copyright notice and this
-          permission notice appear in supporting documentation.
-      The author or Addison-Wesley Longman make no representations about the
-          suitability of this software for any purpose. It is provided "as is"
-          without express or implied warranty.
-    
-
-External libraries used by this project:
-----------------------------------------------------
-
-Name: LIBXML2
-Preferred version: 2.2.16 or higher
-Is mandatory: true
-Website: http://xmlsoft.org/
-License: MIT
-Copyright: 1998-2002 Daniel Veillard.  All Rights Reserved.
-External notice: 
-
-      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-      Except as contained in this notice, the name of Daniel Veillard shall not
-      be used in advertising or otherwise to promote the sale, use or other deal-
-      ings in this Software without prior written authorization from him.
-    
-----------------------------------------------------
-
-Name: LIBXSLT
-Preferred version: 1.1.26
-Is mandatory: false
-Website: http://xmlsoft.org/XSLT/
-License: MIT
-Copyright: 2001-2002 Daniel Veillard.  All Rights Reserved.
-External notice: 
-
-      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-      Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from him.
-
-    
-----------------------------------------------------
-
-Name: ICU4C
-Preferred version: 3.6 or higher
-Is mandatory: true
-Website: http://www.icu-project.org/
-License: ICU License
-Copyright: 1995-2011 International Business Machines Corporation and others 
-External notice: 
-
-      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
-
-      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-      Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
-    
-----------------------------------------------------
-
-Name: CURL
-Preferred version: above 7.12
-Is mandatory: false
-Website: http://curl.haxx.se/
-License: MIT/X derivate license
-Copyright: 1996 - 2011, Daniel Stenberg, <daniel@xxxxxxx>.
-External notice: 
-
-      All rights reserved.
-
-      Permission to use, copy, modify, and distribute this software for any purpose
-      with or without fee is hereby granted, provided that the above copyright
-      notice and this permission notice appear in all copies.
-
-      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
-      NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-      DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-      OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
-      OR OTHER DEALINGS IN THE SOFTWARE.
-
-      Except as contained in this notice, the name of a copyright holder shall not
-      be used in advertising or otherwise to promote the sale, use or other dealings
-      in this Software without prior written authorization of the copyright holder.
-    
-----------------------------------------------------
-
-Name: ICONV
-Preferred version: above 1.12
-Is mandatory: true
-Website: http://www.gnu.org/software/libiconv/
-License: LGPL
-Copyright: 1998, 2010 Free Software Foundation, Inc.
-External notice: 
-
-----------------------------------------------------
-
-Name: ZLIB
-Preferred version: 1.2.5
-Is mandatory: true
-Website: http://www.zlib.net/
-Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
-External notice: 
-
-      This software is provided 'as-is', without any express or implied
-      warranty.  In no event will the authors be held liable for any damages
-      arising from the use of this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute it
-      freely, subject to the following restrictions:
-
-      1. The origin of this software must not be misrepresented; you must not
-      claim that you wrote the original software. If you use this software
-      in a product, an acknowledgment in the product documentation would be
-      appreciated but is not required.
-      2. Altered source versions must be plainly marked as such, and must not be
-      misrepresented as being the original software.
-      3. This notice may not be removed or altered from any source distribution.
-
-      Jean-loup Gailly jloup@xxxxxxxx
-      Mark Adler madler@xxxxxxxxxxxxxxxxxx
-    
-----------------------------------------------------
-
-Name: XERCES
-Preferred version: 2.8.0 or higher
-Is mandatory: true
-Website: http://xerces.apache.org/xerces-c/
-License: Apache 2
-Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
-External notice: 
-
-      http://www.apache.org/licenses/LICENSE-2.0
-    
-----------------------------------------------------
-
-Name: BOOST (boost_filesystem)
-Preferred version: 1.32 or higher
-Is mandatory: false
-Website: http://www.boost.org/
-License: Boost Software License v1.0
-Copyright: 
-      Beman Dawes, David Abrahams, 1998-2005.
-      Rene Rivera 2004-2007
-    
-External notice: 
-
-      Permission is hereby granted, free of charge, to any person or organization
-      obtaining a copy of the software and accompanying documentation covered by
-      this license (the "Software") to use, reproduce, display, distribute,
-      execute, and transmit the Software, and to prepare derivative works of the
-      Software, and to permit third-parties to whom the Software is furnished to
-      do so, all subject to the following:
-
-      The copyright notices in the Software and this entire statement, including
-      the above license grant, this restriction and the following disclaimer,
-      must be included in all copies of the Software, in whole or in part, and
-      all derivative works of the Software, unless such copies or derivative
-      works are solely in the form of machine-executable object code generated by
-      a source language processor.
-
-      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-      FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-      SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-      FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-      ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-      DEALINGS IN THE SOFTWARE.
-    
-
-External applications used by this project:
-----------------------------------------------------
-
-Name: FLEX
-Preferred version: 2.5.33
-Is mandatory: false
-Website: http://flex.sourceforge.net/
-Copyright: 
-      2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
-      1990, 1997 The Regents of the University of California. All rights reserved.
-    
-External notice: 
-
-      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.
-      
-      Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-      THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-    
-----------------------------------------------------
-
-Name: BISON
-Preferred version: 2.4 or higher
-Is mandatory: false
-Website: http://www.gnu.org/software/bison/
-License: GPL
-Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-External notice: 
-
-----------------------------------------------------
-
-Name: DOXYGEN
-Preferred version: v1.7.4 
-Is mandatory: false
-Website: www.doxygen.org
-License: GPL
-Copyright: 1997-2011 by Dimitri van Heesch
-External notice: 
-
-      Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
-      No representations are made about the suitability of this software for any purpose. 
-      It is provided "as is" without express or implied warranty. 
-      See the GNU General Public License for more details.
-
-      Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
-    
-----------------------------------------------------
-
-Name: CMAKE
-Preferred version: 2.8.4
-Is mandatory: true
-Website: http://www.cmake.org/
-License: Creative Commons Attribution-NoDerivs 3.0 Unported License
-Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
-External notice: 
-
-      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-      Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-      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.
-
-      Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.
-    
-----------------------------------------------------
-
-Name: SWIG
-Preferred version: 2.0.4 or above
-Is mandatory: false
-Website: http://www.swig.org/
-License: GPL
-Copyright: 
-      1995-2011 The SWIG Developers
-      2005-2006 Arizona Board of Regents (University of Arizona).
-      1998-2005 University of Chicago.
-      1995-1998 The University of Utah and the Regents of the University of California
-    
-External notice: 
-
-      SWIG is free software: you can redistribute it and/or modify it
-      under the terms of the GNU General Public License as published by
-      the Free Software Foundation, either version 3 of the License, or
-      (at your option) any later version. See the LICENSE-GPL file for
-      the full terms of the GNU General Public license version 3.
-
-      Portions of SWIG are also licensed under the terms of the licenses
-      in the file LICENSE-UNIVERSITIES. You must observe the terms of
-      these licenses, as well as the terms of the GNU General Public License,
-      when you distribute SWIG.
-
-      The SWIG library and examples, under the Lib and Examples top level
-      directories, are distributed under the following terms:
-
-      You may copy, modify, distribute, and make derivative works based on
-      this software, in source code or object code form, without
-      restriction. If you distribute the software to others, you may do
-      so according to the terms of your choice. This software is offered as
-      is, without warranty of any kind.
-
-      See the COPYRIGHT file for a list of contributors to SWIG and their
-      copyright notices.
-    
\ No newline at end of file

=== modified file 'cmake_modules/ZorbaModule.cmake'
--- cmake_modules/ZorbaModule.cmake	2011-12-21 14:40:33 +0000
+++ cmake_modules/ZorbaModule.cmake	2012-01-29 09:51:27 +0000
@@ -250,6 +250,11 @@
     SET(module_lib_target "modlib${num_zorba_modules}_${module_name}")
     ADD_LIBRARY(${module_lib_target} SHARED ${SRC_FILES})
     GET_FILENAME_COMPONENT(module_filewe "${module_filename}" NAME_WE)
+    IF (MODULE_VERSION)
+      # If there's a version, insert it into the module library name
+      SET (module_filewe "${module_filewe}_${MODULE_VERSION}")
+    ENDIF (MODULE_VERSION)
+
     # It seems like it would be nice to set the VERSION and/or
     # SOVERSION target properties here. However: On Windows, it
     # doesn't seem to do anything (the .rc file configured above
@@ -260,7 +265,7 @@
     # target property isn't desirable.
     # FOLDER is to group IDE projects into folders.
     SET_TARGET_PROPERTIES (${module_lib_target} PROPERTIES
-      OUTPUT_NAME "${module_filewe}_${MODULE_VERSION}${SUFFIX}"
+      OUTPUT_NAME "${module_filewe}${SUFFIX}"
       ${target_type}_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module_name}.src"
       FOLDER "Modules"
     )

=== modified file 'include/zorba/config.h.cmake'
--- include/zorba/config.h.cmake	2012-01-11 17:30:25 +0000
+++ include/zorba/config.h.cmake	2012-01-29 09:51:27 +0000
@@ -152,6 +152,7 @@
 #cmakedefine ZORBA_WITH_BIG_INTEGER
 #cmakedefine ZORBA_WITH_DEBUGGER
 #cmakedefine ZORBA_WITH_FILE_ACCESS
+#cmakedefine ZORBA_WITH_JSON
 #cmakedefine ZORBA_WITH_LIBXML2_SAX
 
 // Zorba parser configuration

=== modified file 'include/zorba/diagnostic.h'
--- include/zorba/diagnostic.h	2011-07-01 16:07:54 +0000
+++ include/zorba/diagnostic.h	2012-01-29 09:51:27 +0000
@@ -239,7 +239,10 @@
   ZORBA_DEBUGGER,                       // Zorba Debugger
   ZORBA_OS,                             // Operating System
   ZORBA_SERIALIZATION,
-  ZORBA_STORE
+  ZORBA_STORE,
+
+  JSON_PARSER,
+  JSON_SERIALIZATION
 };
 
 /**

=== modified file 'include/zorba/identtypes.h'
--- include/zorba/identtypes.h	2011-09-21 14:49:55 +0000
+++ include/zorba/identtypes.h	2012-01-29 09:51:27 +0000
@@ -18,10 +18,14 @@
 
 #include <zorba/config.h>
 
-namespace zorba {
-class ZORBA_DLL_PUBLIC IdentTypes {
+namespace zorba 
+{
+
+class ZORBA_DLL_PUBLIC IdentTypes 
+{
 public:
-  typedef enum {
+  typedef enum 
+  {
     NAMED_TYPE,     // builtin atomic type
     ELEMENT_TYPE,
     ATTRIBUTE_TYPE,
@@ -30,12 +34,20 @@
     TEXT_TYPE,
     COMMENT_TYPE,
     ANY_NODE_TYPE, // node()
+#ifdef ZORBA_WITH_JSON
+    STRUCTURED_ITEM_TYPE,
+    JSON_ITEM_TYPE,
+    JSON_OBJECT_TYPE,
+    JSON_ARRAY_TYPE,
+    JSON_PAIR_TYPE,
+#endif
     ITEM_TYPE,     // item()
     EMPTY_TYPE,    // empty-sequence()
     INVALID_TYPE,
   } kind_t;
 
-  typedef enum {
+  typedef enum 
+  {
     QUANT_ONE,
     QUANT_QUESTION,
     QUANT_PLUS,

=== modified file 'include/zorba/options.h'
--- include/zorba/options.h	2012-01-11 17:30:25 +0000
+++ include/zorba/options.h	2012-01-29 09:51:27 +0000
@@ -83,7 +83,10 @@
   ZORBA_SERIALIZATION_METHOD_HTML,
   ZORBA_SERIALIZATION_METHOD_XHTML,
   ZORBA_SERIALIZATION_METHOD_TEXT,
-  ZORBA_SERIALIZATION_METHOD_BINARY
+  ZORBA_SERIALIZATION_METHOD_BINARY,
+#ifdef ZORBA_WITH_JSON
+  ZORBA_SERIALIZATION_METHOD_JSON,
+#endif
 } Zorba_serialization_method_t;
 
 

=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h	2011-12-21 14:40:33 +0000
+++ include/zorba/pregenerated/diagnostic_list.h	2012-01-29 09:51:27 +0000
@@ -504,6 +504,8 @@
 
 extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZAPI0042_ITERATOR_CLOSED;
 
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZAPI0043_CANNOT_SERIALIZE_JSON_ITEM;
+
 extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZAPI0070_INVALID_SERIALIZATION_METHOD_FOR_SAX;
 
 extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZAPI0080_CANNOT_RETRIEVE_NODE_REFERENCE;
@@ -746,6 +748,42 @@
 
 extern ZORBA_DLL_PUBLIC ZorbaErrorCode XSST0010;
 
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode JSDY0001;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode JSDY0002;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode JSDY0020;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode JSDY0040;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0001_ILLEGAL_CHARACTER;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0002_ILLEGAL_CODEPOINT;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0003_ILLEGAL_ESCAPE;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0004_ILLEGAL_LITERAL;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0005_ILLEGAL_NUMBER;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0006_UNEXPECTED_TOKEN;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJPE0007_UNTERMINATED_STRING;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0001_NOT_DOCUMENT_OR_ELEMENT_NODE;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0002_ELEMENT_MISSING_ATTRIBUTE;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0003_BAD_ATTRIBUTE_VALUE;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0004_BAD_ELEMENT;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0005_BAD_CHILD_ELEMENT;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0006_NO_ELEMENT_CHILD;
+
+extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZJSE0007_NO_TEXT_CHILD;
+
 } // namespace zerr
 
 namespace zwarn {

=== modified file 'include/zorba/store_consts.h'
--- include/zorba/store_consts.h	2011-06-14 17:26:33 +0000
+++ include/zorba/store_consts.h	2012-01-29 09:51:27 +0000
@@ -25,6 +25,13 @@
 {
  public:
 
+  enum NsScoping 
+  {
+    ALL_NAMESPACES,
+    ONLY_LOCAL_NAMESPACES,
+    ONLY_PARENT_NAMESPACES
+  };
+
   enum NodeKind
   {
     anyNode        = 0,
@@ -36,16 +43,10 @@
     commentNode    = 6
   };
 
-  enum NsScoping 
-  {
-    ALL_NAMESPACES,
-    ONLY_LOCAL_NAMESPACES,
-    ONLY_PARENT_NAMESPACES
-  };
-
   static std::string toString(NodeKind k)
   {
-    switch(k) {
+    switch(k) 
+    {
       case anyNode:
         return "anyNode";
 
@@ -71,6 +72,43 @@
         return "<unknown NodeKind>";
     }
   }
+
+
+#ifdef ZORBA_WITH_JSON
+
+  /* ATTENTION: the ordering of the enum values is important. Do NOT change it! */
+  enum JSONItemKind
+  {
+    jsonItem       = 0,
+    jsonObject     = 1,
+    jsonArray      = 2,
+    jsonPair       = 3
+  };
+
+
+  static std::string toString(JSONItemKind k)
+  {
+    switch(k) 
+    {
+      case jsonItem:
+        return "json-item";
+
+      case jsonObject:
+        return "object";
+
+      case jsonArray:
+        return "array";
+
+      case jsonPair:
+        return "pair";
+
+      default:
+        return "<unknown JSONItemKind>";
+    }
+  }
+
+#endif // ZORBA_WITH_JSON
+ 
 };
 
 } // namespace store

=== modified file 'include/zorba/typeident.h'
--- include/zorba/typeident.h	2011-06-14 17:26:33 +0000
+++ include/zorba/typeident.h	2012-01-29 09:51:27 +0000
@@ -64,45 +64,55 @@
         const String& localNameName,
         bool localNameWildcard,
         TypeIdentifier_t contentType,
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
+        IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
 
     static
     TypeIdentifier_t
     createDocumentType(
         TypeIdentifier_t contentType,
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
-
-    static
-    TypeIdentifier_t
-    createPIType(
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
-
-    static
-    TypeIdentifier_t
-    createTextType(
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
-
-    static
-    TypeIdentifier_t
-    createCommentType(
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
-
-    static
-    TypeIdentifier_t
-    createAnyNodeType(
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
-
-    static
-    TypeIdentifier_t
-    createItemType(
-        IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
-        );
+        IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createPIType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createTextType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createCommentType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createAnyNodeType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+#ifdef ZORBA_WITH_JSON
+    static
+    TypeIdentifier_t
+    createStructuredItemType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createJSONItemType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createJSONObjectType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createJSONArrayType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+
+    static
+    TypeIdentifier_t
+    createJSONPairType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
+#endif
+
+    static
+    TypeIdentifier_t
+    createItemType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
 
     static
     TypeIdentifier_t

=== modified file 'modules/com/zorba-xquery/www/modules/CMakeLists.txt'
--- modules/com/zorba-xquery/www/modules/CMakeLists.txt	2012-01-11 17:30:25 +0000
+++ modules/com/zorba-xquery/www/modules/CMakeLists.txt	2012-01-29 09:51:27 +0000
@@ -64,10 +64,14 @@
   URI "http://www.zorba-xquery.com/modules/xml";)
 DECLARE_ZORBA_MODULE(FILE xqdoc.xq VERSION 2.0
   URI "http://www.zorba-xquery.com/modules/xqdoc";)
+DECLARE_ZORBA_MODULE(FILE converters/json.xq VERSION 2.0
+  URI "http://www.zorba-xquery.com/modules/converters/json";)
 
 # Subdirectories
 DECLARE_ZORBA_MODULE(FILE converters/base64.xq VERSION 2.0
   URI "http://www.zorba-xquery.com/modules/converters/base64";)
+DECLARE_ZORBA_MODULE(FILE converters/json.xq VERSION 2.0
+  URI "http://www.zorba-xquery.com/modules/converters/json";)
 DECLARE_ZORBA_MODULE(FILE introspection/sctx.xq VERSION 2.0
   URI "http://www.zorba-xquery.com/modules/introspection/sctx";)
 DECLARE_ZORBA_MODULE(FILE xqdoc2xhtml/error.xq VERSION 2.0

=== added file 'modules/com/zorba-xquery/www/modules/converters/json-options.xsd'
--- modules/com/zorba-xquery/www/modules/converters/json-options.xsd	1970-01-01 00:00:00 +0000
+++ modules/com/zorba-xquery/www/modules/converters/json-options.xsd	2012-01-29 09:51:27 +0000
@@ -0,0 +1,47 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
+  xmlns:json="http://www.zorba-xquery.com/modules/converters/json-options";
+  targetNamespace="http://www.zorba-xquery.com/modules/converters/json-options";
+  elementFormDefault="qualified" attributeFormDefault="unqualified">
+<!--
+:: Copyright 2006-2008 The FLWOR Foundation.
+::
+:: Licensed 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.
+::
+-->
+
+
+  <xs:element name="options">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element name="json-param" minOccurs="1" maxOccurs="1">
+          <xs:complexType>
+            <xs:simpleContent>
+              <xs:extension base="xs:string">
+                <xs:attribute name="name" type="xs:string" use="required"/>
+                <xs:attribute name="value" use="required">
+                  <xs:simpleType>
+                    <xs:restriction base="xs:string">
+                      <xs:enumeration value="simple-json"/>
+                      <xs:enumeration value="json-ml"/>
+                    </xs:restriction>
+                  </xs:simpleType>
+                </xs:attribute>
+              <xs:attribute name="type" type="xs:string" use="optional"/>
+              </xs:extension>
+            </xs:simpleContent>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>

=== added file 'modules/com/zorba-xquery/www/modules/converters/json.xq'
--- modules/com/zorba-xquery/www/modules/converters/json.xq	1970-01-01 00:00:00 +0000
+++ modules/com/zorba-xquery/www/modules/converters/json.xq	2012-01-29 09:51:27 +0000
@@ -0,0 +1,231 @@
+xquery version "3.0";
+
+ (:
+  : Copyright 2006-2009 The FLWOR Foundation.
+  :
+  : Licensed 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.
+  :)
+
+ (:~
+  :
+  : <p>In order to enable JSON processing with XQuery, Zorba implements a set
+  : of functions that open XQuery developers the door to process JSON
+  : data. Specifically, this module provides two types of functions. Functions
+  : to:
+  : <ul>
+  :   <li>parse JSON and convert it to XDM and</li>
+  :   <li>serialize XDM in order to output JSON.</li>
+  : </ul>
+  : </p>
+  :
+  : <p>Both types of functions are available to parse and serialize two
+  : types of XDM-JSON mappings:<ul><li>the first mapping called in this document 
+  : <strong>simple XDM-JSON</strong> has been
+  : <a href="http://john.snelson.org.uk/parsing-json-into-xquery";>
+  : proposed by John Snelson</a></li><li>the second mapping is called 
+  : <a href="http://jsonml.org/";>JsonML</a></li></ul>In the following, we
+  : briefly describe both mappings.</p>
+  : 
+  : <h2>Simple XDM-JSON Mapping</h2>
+  : <ul><li>In order to process JSON with XQuery, Zorba implements a mapping between
+  : JSON and XML that was initially proposed by John Snelson in his article
+  : <a href="http://snelson.org.uk/archives/2008/02/parsing_json_in.php#more";
+  : target="_blank">Parsing JSON into XQuery</a></li></ul>
+  :
+  : <h2>JsonML Mapping</h2>
+  : <ul>
+  : <li><a href="http://jsonml.org"; target="_blank">JSonML</a> (JSON Markup Language)
+  : is an application of the JSON format.</li>
+  : <li>The purpose of JSonML is to provide a compact format for transporting
+  : XML-based markup as JSon. In contrast to the <strong>simple XDM-JSON</strong> mapping described above
+  : <strong>JsonML</strong> allows a lossless conversion back and forth.</li></ul>
+  :
+  : @author Sorin Nasoi
+  :
+  : @see <a href="http://john.snelson.org.uk/parsing-json-into-xquery";>Mapping proposed by John Snelson</a>
+  : @see <a href="http://jsonml.org"; target="_blank">JSonML</a>
+  : @project data processing/data converters
+  :
+  :)
+module namespace json = "http://www.zorba-xquery.com/modules/converters/json";;
+
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";;
+
+import schema namespace json-options = "http://www.zorba-xquery.com/modules/converters/json-options";;
+
+declare namespace err = "http://www.w3.org/2005/xqt-errors";;
+
+declare namespace ver = "http://www.zorba-xquery.com/options/versioning";;
+declare option ver:module-version "2.0";
+
+(:~
+ : This function parses a JSON string and returns an XDM instance according
+ : to either one of the mappings described above.
+ :
+ : @param $arg a sequence of valid JSON strings.
+ : @param $options a set of name and value pairs that provide options
+ :        to configure the JSON mapping process that have to be validated against the 
+ :        "http://www.zorba-xquery.com/modules/converters/json-options"; schema.
+ : @return  a sequence of nodes according to either one of the mappings described above.
+ : @error err:XQDY0027 if $options can not be validated against the json-options schema
+ : @error json:ParseError if the JSON string passed as parameter is not
+ :    valid JSON.
+ : @example test_json/Queries/converters/jansson/parse_json_02.xq
+ : @example test_json/Queries/converters/jansson/parse_json_ml_01.xq
+ :)
+declare function json:parse(
+  $arg as xs:string?,
+  $options as element(json-options:options)
+) as element(*, xs:untyped)*
+{
+  let $validated-options := if(schema:is-validated($options)) then
+                                $options
+                              else
+                                validate{$options} 
+  return
+    json:parse-internal($arg, $validated-options)
+};
+
+(:~
+ : This function parses a JSON string and returns an XDM instance according
+ : to simple XDM-JSON mapping described above.
+ :
+ : @param $arg a sequence of valid JSON strings.
+ : @return a sequence of nodes according to Simple XDM-JSON mapping described above.
+ : @error json:ParseError if the JSON string passed as parameter is not
+ :    valid JSON.
+ : @example test_json/Queries/converters/jansson/parse_json_11.xq
+ :)
+declare function json:parse(
+  $arg as xs:string?
+) as element(*, xs:untyped)*
+{
+  json:parse-internal($arg,
+    validate {
+      <options xmlns="http://www.zorba-xquery.com/modules/converters/json-options"; >
+        <json-param name="mapping" value="simple-json" />
+      </options>
+    }
+  )
+};
+
+(:~
+ : This function parses a JSON string and returns an XDM instance according
+ : to JsonML mapping described above.
+ :
+ : @param $arg a sequence of valid JSON strings.
+ : @return  a sequence of nodes according the JSON-ML mapping described above.
+ : @error json:ParseError if the JSON string passed as parameter is not
+ :    valid JSON.
+ : @example test_json/Queries/converters/jansson/parse_json_ml_05.xq
+ :)
+declare function json:parse-ml(
+  $arg as xs:string?
+) as element(*, xs:untyped)*
+{
+  json:parse-internal($arg,
+    validate {
+      <options xmlns="http://www.zorba-xquery.com/modules/converters/json-options"; >
+        <json-param name="mapping" value="json-ml" type="array"/>
+      </options>
+    }
+  )
+};
+
+declare %private function json:parse-internal(
+  $html as xs:string,
+  $options as item()?
+) as element()* external;
+
+
+(:~
+ : The serialize function takes a sequence of nodes as parameter and
+ : transforms each element into a valid JSON string according to one of the
+ : mappings described above.
+ :
+ : @param $xml a sequence of nodes.
+ : @param $options a set of name and value pairs that provide options
+ :        to configure the JSON mapping process that have to be validated against the 
+ :        "http://www.zorba-xquery.com/modules/converters/json-options"; schema.
+ : @return a JSON string.
+ : @error err:XQDY0027 if $options can not be validated against the json-options schema
+ : @error json:InvalidXDM if the input $xml is not a valid XDM
+ :  representation of JSON or JSON ML.
+ : @example test_json/Queries/converters/jansson/serialize_json_01.xq
+ : @example test_json/Queries/converters/jansson/serialize_json_ml_01.xq
+ :)
+declare function json:serialize(
+  $xml as item()*, 
+  $options as element(json-options:options) 
+) as xs:string
+{
+  let $validated-options := if(schema:is-validated($options)) then
+                              $options
+                            else
+                              validate{$options} 
+  return
+    json:serialize-internal($xml, $validated-options)
+};
+
+(:~
+ : The serialize function takes a sequence of nodes as parameter and
+ : transforms each element into a valid JSON string according to the
+ : Simple XDM-JSON mapping described above
+ :
+ : @param $xml a sequence of nodes.
+ : @return a JSON string.
+ : @error json:InvalidXDM if the input $xml is not a valid XDM
+ :  representation of JSON or JSON ML.
+ : @example test_json/Queries/converters/jansson/serialize_json_18.xq
+ :)
+declare function json:serialize(
+  $xml as item()* 
+) as xs:string
+{
+  json:serialize-internal($xml,
+    validate {
+      <options xmlns="http://www.zorba-xquery.com/modules/converters/json-options"; >
+        <json-param name="mapping" value="simple-json" />
+      </options>
+   }
+ )
+};
+
+(:~
+ : The serialize function takes a sequence of nodes as parameter and
+ : transforms each element into a valid JSON string according to the
+ : JsonML mapping described above.
+ :
+ : @param $xml a sequence of nodes.
+ : @return a JSON string.
+ : @error json:InvalidXDM if the input $xml is not a valid XDM
+ :  representation of JSON or JSON ML.
+ : @example test_json/Queries/converters/jansson/serialize_json_ml_04.xq
+ :)
+declare function json:serialize-ml(
+  $xml as item()* 
+) as xs:string
+{
+  json:serialize-internal($xml,
+    validate {
+      <options xmlns="http://www.zorba-xquery.com/modules/converters/json-options"; >
+       <json-param name="mapping" value="json-ml" type="array"/>
+      </options>
+   }
+ )
+};
+
+declare %private function json:serialize-internal(
+  $xml as item()*,
+  $options as item()?
+  ) as xs:string external;

=== modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq'
--- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq	2011-12-21 14:40:33 +0000
+++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq	2012-01-29 09:51:27 +0000
@@ -309,6 +309,10 @@
 
 (:~
 :)
+declare variable $zerr:ZAPI0043 as xs:QName := fn:QName($zerr:NS, "zerr:ZAPI0043");
+
+(:~
+:)
 declare variable $zerr:ZAPI0070 as xs:QName := fn:QName($zerr:NS, "zerr:ZAPI0070");
 
 (:~
@@ -784,4 +788,76 @@
 
 (:~
 :)
-declare variable $zerr:XSST0010 as xs:QName := fn:QName($zerr:NS, "zerr:XSST0010");
\ No newline at end of file
+declare variable $zerr:XSST0010 as xs:QName := fn:QName($zerr:NS, "zerr:XSST0010");
+
+(:~
+:)
+declare variable $zerr:JSDY0001 as xs:QName := fn:QName($zerr:NS, "zerr:JSDY0001");
+
+(:~
+:)
+declare variable $zerr:JSDY0002 as xs:QName := fn:QName($zerr:NS, "zerr:JSDY0002");
+
+
+declare variable $zerr:JSDY0020 as xs:QName := fn:QName($zerr:NS, "zerr:JSDY0020");
+
+(:~
+ :parser errors raised by the JSONIQLoader
+:)
+declare variable $zerr:JSDY0040 as xs:QName := fn:QName($zerr:NS, "zerr:JSDY0040");
+
+(:~
+:)
+declare variable $zerr:ZJPE0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0001");
+
+(:~
+:)
+declare variable $zerr:ZJPE0002 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0002");
+
+(:~
+:)
+declare variable $zerr:ZJPE0003 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0003");
+
+(:~
+:)
+declare variable $zerr:ZJPE0004 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0004");
+
+(:~
+:)
+declare variable $zerr:ZJPE0005 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0005");
+
+(:~
+:)
+declare variable $zerr:ZJPE0006 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0006");
+
+(:~
+:)
+declare variable $zerr:ZJPE0007 as xs:QName := fn:QName($zerr:NS, "zerr:ZJPE0007");
+
+(:~
+:)
+declare variable $zerr:ZJSE0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0001");
+
+(:~
+:)
+declare variable $zerr:ZJSE0002 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0002");
+
+(:~
+:)
+declare variable $zerr:ZJSE0003 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0003");
+
+(:~
+:)
+declare variable $zerr:ZJSE0004 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0004");
+
+(:~
+:)
+declare variable $zerr:ZJSE0005 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0005");
+
+(:~
+:)
+declare variable $zerr:ZJSE0006 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0006");
+
+(:~
+:)
+declare variable $zerr:ZJSE0007 as xs:QName := fn:QName($zerr:NS, "zerr:ZJSE0007");
\ No newline at end of file

=== modified file 'modules/org/CMakeLists.txt'
--- modules/org/CMakeLists.txt	2011-01-19 14:45:10 +0000
+++ modules/org/CMakeLists.txt	2012-01-29 09:51:27 +0000
@@ -12,3 +12,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ADD_SUBDIRECTORY(expath)
+ADD_SUBDIRECTORY(jsoniq)
+

=== added directory 'modules/org/jsoniq'
=== added file 'modules/org/jsoniq/CMakeLists.txt'
--- modules/org/jsoniq/CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ modules/org/jsoniq/CMakeLists.txt	2012-01-29 09:51:27 +0000
@@ -0,0 +1,15 @@
+# Copyright 2011 The FLWOR Foundation.
+# 
+# Licensed 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.
+
+ADD_SUBDIRECTORY(www)

=== added directory 'modules/org/jsoniq/www'
=== added file 'modules/org/jsoniq/www/CMakeLists.txt'
--- modules/org/jsoniq/www/CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ modules/org/jsoniq/www/CMakeLists.txt	2012-01-29 09:51:27 +0000
@@ -0,0 +1,19 @@
+# Copyright 2006-2008 The FLWOR Foundation.
+# 
+# Licensed 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.
+
+IF(ZORBA_WITH_JSON)
+  DECLARE_ZORBA_MODULE(FILE functions.xq VERSION 1.0
+    URI "http://www.jsoniq.org/functions";)
+ENDIF(ZORBA_WITH__JSON)
+

=== added file 'modules/org/jsoniq/www/functions.xq'
--- modules/org/jsoniq/www/functions.xq	1970-01-01 00:00:00 +0000
+++ modules/org/jsoniq/www/functions.xq	2012-01-29 09:51:27 +0000
@@ -0,0 +1,76 @@
+module namespace j = "http://www.jsoniq.org/functions";;
+
+declare namespace ver = "http://www.zorba-xquery.com/options/versioning";;
+declare option ver:module-version "1.0";
+
+(:~
+ :
+ : @param $a
+ : @return
+ :)
+declare function j:flatten($a as array()) as item()* external;
+
+(:~
+ :
+ : @param $j
+ : @return
+ :)
+declare function j:parse-json($j as xs:string) as json-item()? external;
+
+(:~
+ :
+ : @param $o
+ : @return
+ :)
+declare function j:names($o as object()) as xs:string* external;
+
+(:~
+ :
+ : @param $p
+ : @return
+ :)
+declare function j:name($p as pair()) as xs:string external;
+
+(:~
+ :
+ : @param $o
+ : @return
+ :)
+declare function j:pairs($o as object()) as pair()* external;
+
+(:~
+ :
+ : @param $o
+ : @param $n
+ : @return
+ :)
+declare function j:pair($o as object(), $n as xs:string) as pair()? external;
+
+(:~
+ :
+ : @param $o
+ : @param $n
+ : @return
+ :)
+declare function j:member($o as array(), $p as xs:integer) as item()? external;
+
+(:~
+ :
+ : @param $j
+ : @return
+ :)
+declare function j:size($j as json-item()) as item()* external;
+
+(:~
+ :
+ : @param $j
+ : @return
+ :)
+declare function j:values($j as json-item()) as item()* external;
+
+(:~
+ :
+ : @param $p
+ : @return
+ :)
+declare function j:value($p as pair()) as item() external;

=== modified file 'src/annotations/annotations.h'
--- src/annotations/annotations.h	2012-01-11 17:30:25 +0000
+++ src/annotations/annotations.h	2012-01-29 09:51:27 +0000
@@ -22,7 +22,7 @@
 
 #include "common/shared_types.h"
 
-#include "compiler/parsetree/parsenodes.h"
+//#include "compiler/parsetree/parsenodes.h"
 
 #include "zorbautils/hashmap_itemh.h"
 

=== modified file 'src/api/dynamiccontextimpl.cpp'
--- src/api/dynamiccontextimpl.cpp	2012-01-11 17:30:25 +0000
+++ src/api/dynamiccontextimpl.cpp	2012-01-29 09:51:27 +0000
@@ -429,7 +429,8 @@
     TypeManager* tm = theStaticContext->get_typemanager();
 
     xqtref_t lItemType = tm->create_named_type(lItem->getType(),
-                                               TypeConstants::QUANT_ONE);
+                                               TypeConstants::QUANT_ONE,
+                                               QueryLoc::null);
 
     if (!TypeOps::is_subtype(tm,
                              *lItemType,

=== modified file 'src/api/options.cpp'
--- src/api/options.cpp	2012-01-11 17:30:25 +0000
+++ src/api/options.cpp	2012-01-29 09:51:27 +0000
@@ -63,6 +63,10 @@
     else if (strcmp(value, "html") == 0) ser_method = ZORBA_SERIALIZATION_METHOD_HTML;
     else if (strcmp(value, "xhtml") == 0) ser_method = ZORBA_SERIALIZATION_METHOD_XHTML;
     else if (strcmp(value, "text") == 0) ser_method = ZORBA_SERIALIZATION_METHOD_TEXT;
+    else if (strcmp(value, "binary") == 0) ser_method = ZORBA_SERIALIZATION_METHOD_BINARY;
+#ifdef ZORBA_WITH_JSON
+    else if (strcmp(value, "json") == 0) ser_method = ZORBA_SERIALIZATION_METHOD_JSON;
+#endif
     else
     {
       ; // TODO signal errors for incorrect values?

=== modified file 'src/api/serialization/serializer.cpp'
--- src/api/serialization/serializer.cpp	2012-01-11 17:30:25 +0000
+++ src/api/serialization/serializer.cpp	2012-01-29 09:51:27 +0000
@@ -18,7 +18,7 @@
 #include <sstream>
 
 #include <zorba/zorba_string.h>
-
+#include <zorbamisc/ns_consts.h>
 #include "zorbatypes/numconversions.h"
 #include "diagnostics/xquery_diagnostics.h"
 #include "diagnostics/assert.h"
@@ -194,9 +194,15 @@
       const unsigned char* temp = chars;
       unicode::code_point cp = utf8::next_char(temp);
 
-      // raise an error iff (1) the serialization format is XML 1.0 and (2) the given character is an invalid XML 1.0 character
-      if (ser && ser->method == PARAMETER_VALUE_XML && ser->version == "1.0" && !xml::is_valid(cp))
+      // raise an error iff (1) the serialization format is XML 1.0 and 
+      // (2) the given character is an invalid XML 1.0 character
+      if (ser &&
+          ser->method == PARAMETER_VALUE_XML &&
+          ser->version == "1.0" &&
+          !xml::is_valid(cp))
+      {
         throw XQUERY_EXCEPTION( err::FOCH0001, ERROR_PARAMS( cp ) );
+      }
 
       if (cp >= 0x10000 && cp <= 0x10FFFF)
       {
@@ -393,6 +399,13 @@
 ********************************************************************************/
 void serializer::emitter::emit_item(store::Item* item)
 {
+#ifdef ZORBA_WITH_JSON
+  if (item->isJSONItem())
+  {
+    emit_json_item(item, 0);
+  }
+  else
+#endif /* ZORBA_WITH_JSON */
   if (item->isAtomic())
   {
     if (previous_item == PREVIOUS_ITEM_WAS_TEXT)
@@ -764,6 +777,15 @@
   return false;
 }
 
+/*******************************************************************************
+
+********************************************************************************/
+void serializer::emitter::emit_json_item(store::Item *item, int depth)
+{
+  // Default is to throw an exception, so we don't accidentally serialize
+  // JSON into HTML etc.
+  throw ZORBA_EXCEPTION(zerr::ZAPI0043_CANNOT_SERIALIZE_JSON_ITEM);
+}
 
 /*******************************************************************************
 
@@ -809,7 +831,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
-//  XML Emitter                                                               //
+//  XML/JSONiq Emitter                                                        //
 //                                                                            //
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -889,6 +911,123 @@
 }
 
 
+#ifdef ZORBA_WITH_JSON
+
+void serializer::xml_emitter::emit_json_item(store::Item* item, int depth)
+{
+  // This is called for any item within a JSON array or object, or for a
+  // top-level JSON array or object. So JSON rules for simple types may
+  // apply here.
+  if (item->isJSONObject()) {
+    emit_json_object(item, depth);
+  }
+  else if (item->isJSONArray()) {
+    emit_json_array(item, depth);
+  }
+  else if (item->isJSONPair()) {
+    emit_json_pair(item, depth);
+  }
+  else if (item->isAtomic()) {
+    // QQQ any easier/more direct way to determine simple type?
+    store::Item* type = item->getType();
+    if (!(type->getNamespace().compare(XML_SCHEMA_NS))) {
+      const zstring& tname = type->getLocalName();
+      if (tname == "string") {
+        // QQQ need to escape here
+        tr << '"' << item->getStringValue() << '"';
+      }
+      else if (tname == "double" || tname == "float") {
+        // QQQ need to check for NaN and Inf here
+        tr << item->getStringValue();
+      }
+      else if (tname == "decimal" || tname == "integer") {
+        // QQQ what about int? nonNegativeInteger? etc. Not explicitly
+        // mentioned by JSONiq spec...
+        tr << item->getStringValue();
+      }
+      else {
+        // QQQ output the "JSONiq value" object here
+        tr << "((unknown type " << tname << "))";
+      }
+    }
+  }
+}
+
+/*******************************************************************************
+
+********************************************************************************/
+void serializer::xml_emitter::emit_json_object(store::Item* obj, int depth)
+{
+  store::Item_t pair;
+  store::Iterator_t it = obj->getPairs();
+  it->open();
+  bool first = true;
+  if (ser->indent) {
+    tr << "{" <<ser->END_OF_LINE;
+  }
+  else {
+    tr << "{ ";
+  }
+  depth++;
+  while (it->next(pair)) {
+    if (first) {
+      first = false;
+    }
+    else {
+      tr << ", ";
+      if (ser->indent) {
+        tr << ser->END_OF_LINE;
+      }
+    }
+    if (ser->indent) {
+      emit_indentation(depth);
+    }
+    emit_json_pair(pair, depth);
+  }
+  if (ser->indent) {
+    tr << ser->END_OF_LINE;
+    emit_indentation(depth-1);
+    tr << "}";
+  }
+  else {
+    tr << " }";
+  }
+}
+
+/*******************************************************************************
+
+********************************************************************************/
+void serializer::xml_emitter::emit_json_array(store::Item* array, int depth)
+{
+  store::Item_t member;
+  store::Iterator_t it = array->getMembers();
+  it->open();
+  bool first = true;
+  tr << "[ ";
+  while (it->next(member)) {
+    if (first) {
+      first = false;
+    }
+    else {
+      tr << ", ";
+    }
+    emit_json_item(member, depth);
+  }
+  tr << " ]";
+}
+
+/*******************************************************************************
+
+********************************************************************************/
+void serializer::xml_emitter::emit_json_pair(store::Item* pair, int depth)
+{
+  emit_json_item(pair->getName(), depth);
+  tr << " : ";
+  emit_json_item(pair->getValue(), depth);
+}
+
+#endif /* ZORBA_WITH_JSON */
+
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
 //  HTML Emitter                                                              //
@@ -1401,6 +1540,11 @@
   }
 }
 
+void serializer::xhtml_emitter::emit_json_item(store::Item *item, int depth)
+{
+  // "Un-override" this method - XHTML doesn't support JSON
+  emitter::emit_json_item(item, depth);
+}
 
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
@@ -1893,7 +2037,6 @@
   }
 }
 
-
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
 //  Serializer                                                                //
@@ -2032,6 +2175,11 @@
       method = PARAMETER_VALUE_TEXT;
     else if (!strcmp(aValue, "binary"))
       method = PARAMETER_VALUE_BINARY;
+#ifdef ZORBA_WITH_JSON
+    else if (!strcmp(aValue, "json"))
+      // The default "XML" serializer is capable of outputting JSON
+      method = PARAMETER_VALUE_XML;
+#endif
     else
       throw XQUERY_EXCEPTION(
         err::SEPM0016, ERROR_PARAMS( aValue, aName, ZED( GoodValuesAreXMLEtc ) )

=== modified file 'src/api/serialization/serializer.h'
--- src/api/serialization/serializer.h	2011-11-11 07:44:01 +0000
+++ src/api/serialization/serializer.h	2012-01-29 09:51:27 +0000
@@ -270,6 +270,15 @@
      */
     void emit_indentation(int depth);
 
+#ifdef ZORBA_WITH_JSON
+    /**
+     * Outputs a JSON item. This method is called both for top-level JSON
+     * items as well as any items within a JSON object or array, so it may
+     * output simple typed values differently than standard XML serialization.
+     */
+    virtual void emit_json_item(store::Item* item, int depth);
+#endif /* ZORBA_WITH_JSON */
+
   protected:
     bool haveBinding(std::pair<zstring, zstring>& nsBinding) const;
 
@@ -305,7 +314,7 @@
 
   ///////////////////////////////////////////////////////////
   //                                                       //
-  //  class xml_emitter                                    //
+  //  class xml_emitter (for XML and JSONiq output)        //
   //                                                       //
   ///////////////////////////////////////////////////////////
 
@@ -317,6 +326,23 @@
     virtual void emit_declaration();
 
     virtual void emit_doctype(const zstring& elementName);
+
+#ifdef ZORBA_WITH_JSON
+
+    void emit_json_item(store::Item* item, int depth);
+
+  private:
+
+    void emit_json_object(store::Item* object, int depth);
+
+    void emit_json_array(store::Item* array, int depth);
+
+    void emit_json_pair(store::Item* pair, int depth);
+
+    void emit_json_value(store::Item* value, int depth);
+
+#endif /* ZORBA_WITH_JSON */
+
   };
 
 
@@ -332,6 +358,8 @@
     xhtml_emitter(serializer* the_serializer, transcoder& the_transcoder);
 
     virtual void emit_node(const store::Item* item, int depth);
+
+    virtual void emit_json_item(store::Item *item, int depth);
   };
 
 

=== modified file 'src/api/serializerimpl.cpp'
--- src/api/serializerimpl.cpp	2011-06-14 17:26:33 +0000
+++ src/api/serializerimpl.cpp	2012-01-29 09:51:27 +0000
@@ -119,6 +119,11 @@
     aInternalSerializer.setParameter("method", "text"); break;
   case ZORBA_SERIALIZATION_METHOD_BINARY:
     aInternalSerializer.setParameter("method", "binary"); break;
+#ifdef ZORBA_WITH_JSON
+  case ZORBA_SERIALIZATION_METHOD_JSON:
+    // The default Zorba "XML" serializer is capable of outputting JSON
+    aInternalSerializer.setParameter("method", "xml"); break;
+#endif
   }
 
   switch (aSerializerOptions.byte_order_mark)

=== modified file 'src/api/typeidentimpl.cpp'
--- src/api/typeidentimpl.cpp	2011-09-15 11:46:01 +0000
+++ src/api/typeidentimpl.cpp	2012-01-29 09:51:27 +0000
@@ -23,13 +23,14 @@
 namespace zorba {
 
 TypeIdentifier::TypeIdentifier()
-    : m_kind(IdentTypes::INVALID_TYPE),
-    m_quantifier(IdentTypes::QUANT_ONE),
-    m_uri(""),
-    m_uriWildcard(false),
-    m_localName(""),
-    m_localNameWildcard(false),
-    m_contentType()
+  :
+  m_kind(IdentTypes::INVALID_TYPE),
+  m_quantifier(IdentTypes::QUANT_ONE),
+  m_uri(""),
+  m_uriWildcard(false),
+  m_localName(""),
+  m_localNameWildcard(false),
+  m_contentType()
 {
 }
 
@@ -188,6 +189,59 @@
 }
 
 
+#ifdef ZORBA_WITH_JSON
+
+TypeIdentifier_t TypeIdentifier::createStructuredItemType(IdentTypes::quantifier_t q)
+{
+  TypeIdentifier_t ti(new TypeIdentifier());
+  ti->m_kind = IdentTypes::STRUCTURED_ITEM_TYPE;
+  ti->m_quantifier = q;
+
+  return ti;
+}
+
+
+TypeIdentifier_t TypeIdentifier::createJSONItemType(IdentTypes::quantifier_t q)
+{
+  TypeIdentifier_t ti(new TypeIdentifier());
+  ti->m_kind = IdentTypes::JSON_ITEM_TYPE;
+  ti->m_quantifier = q;
+
+  return ti;
+}
+
+
+TypeIdentifier_t TypeIdentifier::createJSONObjectType(IdentTypes::quantifier_t q)
+{
+  TypeIdentifier_t ti(new TypeIdentifier());
+  ti->m_kind = IdentTypes::JSON_OBJECT_TYPE;
+  ti->m_quantifier = q;
+
+  return ti;
+}
+
+
+TypeIdentifier_t TypeIdentifier::createJSONArrayType(IdentTypes::quantifier_t q)
+{
+  TypeIdentifier_t ti(new TypeIdentifier());
+  ti->m_kind = IdentTypes::JSON_ARRAY_TYPE;
+  ti->m_quantifier = q;
+
+  return ti;
+}
+
+
+TypeIdentifier_t TypeIdentifier::createJSONPairType(IdentTypes::quantifier_t q)
+{
+  TypeIdentifier_t ti(new TypeIdentifier());
+  ti->m_kind = IdentTypes::JSON_PAIR_TYPE;
+  ti->m_quantifier = q;
+
+  return ti;
+}
+#endif
+
+
 TypeIdentifier_t TypeIdentifier::createItemType(IdentTypes::quantifier_t quantifier)
 {
   TypeIdentifier_t ti(new TypeIdentifier());

=== modified file 'src/compiler/codegen/plan_visitor.cpp'
--- src/compiler/codegen/plan_visitor.cpp	2012-01-11 17:30:25 +0000
+++ src/compiler/codegen/plan_visitor.cpp	2012-01-29 09:51:27 +0000
@@ -38,6 +38,7 @@
 #include "compiler/expression/flwor_expr.h"
 #include "compiler/expression/fo_expr.h"
 #include "compiler/expression/script_exprs.h"
+#include "compiler/expression/json_exprs.h"
 #include "compiler/expression/update_exprs.h"
 #ifndef ZORBA_NO_FULL_TEXT
 #include "compiler/expression/ft_expr.h"
@@ -57,10 +58,12 @@
 #include "runtime/visitors/printer_visitor_api.h"
 #include "runtime/visitors/iterprinter.h"
 #include "runtime/sequences/SequencesImpl.h"
+#include "runtime/sequences/sequences.h"
 #include "runtime/core/sequencetypes.h"
 #include "runtime/core/item_iterator.h"
 #include "runtime/core/var_iterators.h"
 #include "runtime/core/constructors.h"
+#include "runtime/json/json_constructors.h"
 #include "runtime/core/apply_updates.h"
 #include "runtime/core/path_iterators.h"
 #include "runtime/core/nodeid_iterators.h"
@@ -2781,10 +2784,13 @@
     axisItep->setDocTestKind(v.getDocTestKind());
     axisItep->setNodeKind(v.getNodeKind());
     axisItep->setQName(v.getQName());
-    store::Item *typeName = v.getTypeName();
+    store::Item* typeName = v.getTypeName();
     if (typeName != NULL) 
     {
-      axisItep->setType(sctx->get_typemanager()->create_named_type(typeName));
+      axisItep->setType(sctx->get_typemanager()->
+                        create_named_type(typeName,
+                                          TypeConstants::QUANT_ONE,
+                                          qloc));
     }
     axisItep->setNilledAllowed(v.getNilledAllowed());
   }
@@ -2985,25 +2991,26 @@
 {
   CODEGEN_TRACE_OUT("");
 
-  PlanIter_t content = pop_itstack ();
+  PlanIter_t content = pop_itstack();
 
   bool isRoot = false;
   theEnclosedContextStack.pop();
   expr* e = plan_visitor_ns::pop_stack(theConstructorsStack);
   ZORBA_ASSERT(e = &v);
+
   if (theConstructorsStack.empty() || is_enclosed_expr(theConstructorsStack.top()))
   {
     isRoot = true;
   }
 
-  switch (v.get_type ())
+  switch (v.get_type())
   {
   case text_expr::text_constructor:
-    push_itstack (new TextIterator(sctx, qloc, content, isRoot));
+    push_itstack(new TextIterator(sctx, qloc, content, isRoot));
     break;
 
   case text_expr::comment_constructor:
-    push_itstack (new CommentIterator (sctx, qloc, content, isRoot));
+    push_itstack(new CommentIterator(sctx, qloc, content, isRoot));
     break;
 
   default:
@@ -3042,6 +3049,103 @@
 }
 
 
+#ifdef ZORBA_WITH_JSON
+
+/*******************************************************************************
+
+  JSON Constructors
+
+********************************************************************************/
+bool begin_visit(json_pair_expr& v)
+{
+  CODEGEN_TRACE_IN("");
+  return true;
+}
+
+
+void end_visit(json_pair_expr& v)
+{
+  CODEGEN_TRACE_OUT("");
+
+  PlanIter_t valueIter = pop_itstack();
+  PlanIter_t nameIter = pop_itstack();
+
+  push_itstack(new JSONPairIterator(sctx, qloc, nameIter, valueIter, true));
+}
+
+
+bool begin_visit(json_object_expr& v)
+{
+  CODEGEN_TRACE_IN("");
+  return true;
+}
+
+
+void end_visit(json_object_expr& v)
+{
+  CODEGEN_TRACE_OUT("");
+
+  std::vector<PlanIter_t> inputs;
+
+  expr* inputExpr = v.get_expr();
+
+  if (inputExpr != NULL)
+  {
+    PlanIter_t inputIter = pop_itstack();
+
+    if (dynamic_cast<FnConcatIterator*>(inputIter.getp()) != NULL)
+    {
+      inputs = static_cast<FnConcatIterator*>(inputIter.getp())->getChildren();
+    }
+    else
+    {
+      inputs.push_back(inputIter);
+    }
+  }
+
+  bool copyInput = true;
+
+  push_itstack(new JSONObjectIterator(sctx, qloc, inputs, copyInput));
+}
+
+
+bool begin_visit(json_array_expr& v)
+{
+  CODEGEN_TRACE_IN("");
+  return true;
+}
+
+
+void end_visit(json_array_expr& v)
+{
+  CODEGEN_TRACE_OUT("");
+
+  std::vector<PlanIter_t> inputs;
+
+  expr* inputExpr = v.get_expr();
+
+  if (inputExpr != NULL)
+  {
+    PlanIter_t inputIter = pop_itstack();
+
+    if (dynamic_cast<FnConcatIterator*>(inputIter.getp()) != NULL)
+    {
+      inputs = static_cast<FnConcatIterator*>(inputIter.getp())->getChildren();
+    }
+    else
+    {
+      inputs.push_back(inputIter);
+    }
+  }
+
+  bool copyInput = true;
+
+  push_itstack(new JSONArrayIterator(sctx, qloc, inputs, copyInput));
+}
+
+#endif // ZORBA_WITH_JSON
+
+
 bool begin_visit(const_expr& v)
 {
   CODEGEN_TRACE_IN("");

=== modified file 'src/compiler/expression/CMakeLists.txt'
--- src/compiler/expression/CMakeLists.txt	2011-06-14 14:21:49 +0000
+++ src/compiler/expression/CMakeLists.txt	2012-01-29 09:51:27 +0000
@@ -18,6 +18,7 @@
     expr_type.cpp
     expr.cpp
     expr_put.cpp
+    json_exprs.cpp
     var_expr.cpp
     path_expr.cpp
     flwor_expr.cpp

=== modified file 'src/compiler/expression/abstract_expr_visitor.h'
--- src/compiler/expression/abstract_expr_visitor.h	2011-11-17 16:32:04 +0000
+++ src/compiler/expression/abstract_expr_visitor.h	2012-01-29 09:51:27 +0000
@@ -50,6 +50,14 @@
   EXPR_VISITOR_METHODS (const_expr);
   EXPR_VISITOR_METHODS (doc_expr);
   EXPR_VISITOR_METHODS (elem_expr);
+  EXPR_VISITOR_METHODS (pi_expr);
+  EXPR_VISITOR_METHODS (text_expr);
+#ifdef ZORBA_WITH_JSON
+  EXPR_VISITOR_METHODS (json_pair_expr);
+  EXPR_VISITOR_METHODS (json_object_expr);
+  EXPR_VISITOR_METHODS (json_array_expr);
+#endif
+
   EXPR_VISITOR_METHODS (expr);
   EXPR_VISITOR_METHODS (extension_expr);
   EXPR_VISITOR_METHODS (flwor_expr);
@@ -63,10 +71,9 @@
   EXPR_VISITOR_METHODS (name_cast_expr);
   EXPR_VISITOR_METHODS (order_expr);
   EXPR_VISITOR_METHODS (order_modifier);
-  EXPR_VISITOR_METHODS (pi_expr);
+
   EXPR_VISITOR_METHODS (promote_expr);
   EXPR_VISITOR_METHODS (relpath_expr);
-  EXPR_VISITOR_METHODS (text_expr);
   EXPR_VISITOR_METHODS (treat_expr);
   EXPR_VISITOR_METHODS (validate_expr);
   EXPR_VISITOR_METHODS (var_expr);

=== modified file 'src/compiler/expression/expr.cpp'
--- src/compiler/expression/expr.cpp	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr.cpp	2012-01-29 09:51:27 +0000
@@ -497,7 +497,7 @@
 
 bool cast_expr::is_optional() const 
 {
-  return TypeOps::quantifier(*theTargetType) == TypeConstants::QUANT_QUESTION; 
+  return theTargetType->get_quantifier() == TypeConstants::QUANT_QUESTION; 
 }
 
 
@@ -622,7 +622,7 @@
 
 bool castable_expr::is_optional() const 
 {
-  return TypeOps::quantifier(*theTargetType) == TypeConstants::QUANT_QUESTION; 
+  return theTargetType->get_quantifier() == TypeConstants::QUANT_QUESTION; 
 }
 
 
@@ -1512,10 +1512,9 @@
     const QueryLoc& loc,
     expr_t aChild)
   :
-  expr(sctx, loc, aChild->get_expr_kind()),
+  expr(sctx, loc, function_trace_expr_kind),
   theExpr(aChild)
 {
-  theKind = function_trace_expr_kind;
   bool modified;
   compute_return_type(false, &modified);
   compute_scripting_kind();
@@ -1524,10 +1523,9 @@
 
 function_trace_expr::function_trace_expr(expr_t aExpr)
   :
-  expr(aExpr->get_sctx(), aExpr->get_loc(), aExpr->get_expr_kind()),
+  expr(aExpr->get_sctx(), aExpr->get_loc(), function_trace_expr_kind),
   theExpr(aExpr)
 {
-  theKind = function_trace_expr_kind;
   bool modified;
   compute_return_type(false, &modified);
   compute_scripting_kind();

=== modified file 'src/compiler/expression/expr.h'
--- src/compiler/expression/expr.h	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr.h	2012-01-29 09:51:27 +0000
@@ -372,6 +372,12 @@
      - F(I) = error
 
   4. Put F(I) in the output sequence.
+
+  theFnQName:
+  -----------
+  Stores the QName of the function, if the promote expr is used to cast the
+  function's body to its result type
+  
 ********************************************************************************/
 class promote_expr : public cast_base_expr
 {

=== removed file 'src/compiler/expression/expr_annotations.cpp'
--- src/compiler/expression/expr_annotations.cpp	2011-11-17 16:32:04 +0000
+++ src/compiler/expression/expr_annotations.cpp	1970-01-01 00:00:00 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- * 
- * Licensed 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.
- */
-#include "compiler/expression/expr_annotations.h"
-#include "compiler/expression/expr.h"
-#include "functions/function.h"
-
-namespace zorba {
-
-
-bool ExpressionPropertyComputer::returnsDuplicateNodes(expr *e)
-{
-  return true;
-}
-
-
-bool ExpressionPropertyComputer::returnsDescendantNodes(expr *e)
-{
-  switch(e->get_expr_kind()) {
-    case relpath_expr_kind:
-      {
-        relpath_expr *re = static_cast<relpath_expr *>(e);
-        uint32_t numSteps = re->size();
-        for(uint32_t i = 0; i < numSteps; ++i) {
-          expr *rec = &*(*re)[i];
-          axis_step_expr *axis = dynamic_cast<axis_step_expr *>(rec);
-          if (axis != NULL) {
-            if (axis->getAxis() == axis_kind_descendant
-              || axis->getAxis() == axis_kind_descendant_or_self) {
-              return true;
-            }
-          } else {
-            return returnsDescendantNodes(rec);
-          }
-        }
-      }
-      break;
-
-    default:
-      for(expr_iterator i = e->expr_begin(); !i.done(); ++i) {
-        if (*i != NULL) {
-          if (returnsDescendantNodes(*i)) {
-            return true;
-          }
-        }
-      }
-      break;
-  }
-  return false;
-}
-
-
-bool ExpressionPropertyComputer::returnsAncestorNodes(expr *e)
-{
-  return true;
-}
-
-}
-/* vim:set et sw=2 ts=2: */

=== removed file 'src/compiler/expression/expr_annotations.h'
--- src/compiler/expression/expr_annotations.h	2011-06-14 17:26:33 +0000
+++ src/compiler/expression/expr_annotations.h	1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- * 
- * Licensed 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.
- */
-#pragma once
-#ifndef ZORBA_EXPR_ANNOTATIONS_H
-#define ZORBA_EXPR_ANNOTATIONS_H
-
-#include <set>
-#include "compiler/expression/expr_base.h"
-
-namespace zorba {
-
-class ExpressionPropertyComputer {
-  public:
-    bool returnsDuplicateNodes(expr *e);
-    bool returnsAncestorNodes(expr *e);
-    bool returnsDescendantNodes(expr *e);
-};
-
-#if 0 // Fix before using!! 
-class SourceFinder {
-  public:
-    typedef std::set<expr *> sources_t;
-
-    SourceFinder() { }
-    ~SourceFinder() { }
-
-    void reset() { m_sources.clear(); }
-    void findSources(expr *e);
-    const sources_t& getSources() const;
-
-  private:
-    sources_t m_sources;
-
-    void findSourcesInChildren(expr *e);
-};
-#endif
-
-}
-
-#endif /* ZORBA_EXPR_ANNOTATIONS_H */
-/* vim:set et sw=2 ts=2: */

=== modified file 'src/compiler/expression/expr_base.cpp'
--- src/compiler/expression/expr_base.cpp	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr_base.cpp	2012-01-29 09:51:27 +0000
@@ -1039,6 +1039,11 @@
   case attr_expr_kind:
   case text_expr_kind:
   case pi_expr_kind:
+#ifdef ZORBA_WITH_JSON
+  case json_pair_expr_kind:
+  case json_object_expr_kind:
+  case json_array_expr_kind:
+#endif
   {
     return !contains_expr(e);
   }

=== modified file 'src/compiler/expression/expr_base.h'
--- src/compiler/expression/expr_base.h	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr_base.h	2012-01-29 09:51:27 +0000
@@ -109,6 +109,12 @@
   wrapper_expr_kind,
   function_trace_expr_kind,
 
+#ifdef ZORBA_WITH_JSON
+  json_pair_expr_kind,
+  json_object_expr_kind,
+  json_array_expr_kind,
+#endif
+
   unknown_expr_kind
 };
 

=== modified file 'src/compiler/expression/expr_classes.h'
--- src/compiler/expression/expr_classes.h	2011-11-17 16:32:04 +0000
+++ src/compiler/expression/expr_classes.h	2012-01-29 09:51:27 +0000
@@ -70,5 +70,11 @@
   class debugger_expr;
   class function_trace_expr;
   class wrapper_expr;
+
+#ifdef ZORBA_WITH_JSON
+  class json_pair_expr;
+  class json_object_expr;
+  class json_array_expr;
+#endif
 }
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/compiler/expression/expr_iter.cpp'
--- src/compiler/expression/expr_iter.cpp	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr_iter.cpp	2012-01-29 09:51:27 +0000
@@ -22,6 +22,7 @@
 #include "compiler/expression/path_expr.h"
 #include "compiler/expression/fo_expr.h"
 #include "compiler/expression/script_exprs.h"
+#include "compiler/expression/json_exprs.h"
 #include "compiler/expression/update_exprs.h"
 #include "compiler/expression/flwor_expr.h"
 #include "compiler/expression/function_item_expr.h"
@@ -380,6 +381,45 @@
     break;
   }
 
+#ifdef ZORBA_WITH_JSON
+  case json_pair_expr_kind:
+  {
+    json_pair_expr* e = static_cast<json_pair_expr*>(theExpr);
+
+    EXPR_ITER_BEGIN();
+
+    EXPR_ITER_NEXT(e->theNameExpr);
+    EXPR_ITER_NEXT(e->theValueExpr);
+
+    EXPR_ITER_END();
+    break;
+  }
+
+  case json_object_expr_kind:
+  {
+    json_object_expr* e = static_cast<json_object_expr*>(theExpr);
+
+    EXPR_ITER_BEGIN();
+
+    EXPR_ITER_NEXT(e->theContentExpr);
+
+    EXPR_ITER_END();
+    break;
+  }
+
+  case json_array_expr_kind:
+  {
+    json_array_expr* e = static_cast<json_array_expr*>(theExpr);
+
+    EXPR_ITER_BEGIN();
+
+    EXPR_ITER_NEXT(e->theContentExpr);
+
+    EXPR_ITER_END();
+    break;
+  }
+#endif
+
   case if_expr_kind:
   {
     if_expr* ifExpr = static_cast<if_expr*>(theExpr);

=== modified file 'src/compiler/expression/expr_put.cpp'
--- src/compiler/expression/expr_put.cpp	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr_put.cpp	2012-01-29 09:51:27 +0000
@@ -30,6 +30,7 @@
 #include "compiler/expression/expr.h"
 #include "compiler/expression/fo_expr.h"
 #include "compiler/expression/script_exprs.h"
+#include "compiler/expression/json_exprs.h"
 #include "compiler/expression/update_exprs.h"
 #ifndef ZORBA_NO_FULL_TEXT
 #include "compiler/expression/ft_expr.h"
@@ -795,7 +796,7 @@
   BEGIN_PUT(attr_expr);
 
   theQNameExpr->put(os);
-  PUT_SUB( "=", theValueExpr );
+  PUT_SUB("=", theValueExpr);
 
   END_PUT();
 }
@@ -803,21 +804,50 @@
 
 ostream& text_expr::put(ostream& os) const
 {
-  BEGIN_PUT( text_expr );
+  BEGIN_PUT(text_expr);
   theContentExpr->put(os);
   END_PUT();
 }
 
-ostream& pi_expr::put( ostream& os) const
-{
-  BEGIN_PUT( pi_expr );
-  PUT_SUB( "TARGET", theTargetExpr );
-  PUT_SUB( "CONTENT", theContentExpr );
-  END_PUT();
-}
-
-
-ostream& insert_expr::put( ostream& os) const
+ostream& pi_expr::put(ostream& os) const
+{
+  BEGIN_PUT(pi_expr);
+  PUT_SUB("TARGET", theTargetExpr);
+  PUT_SUB("CONTENT", theContentExpr);
+  END_PUT();
+}
+
+
+#ifdef ZORBA_WITH_JSON
+ostream& json_pair_expr::put(ostream& os) const
+{
+  BEGIN_PUT(json_pair_expr);
+  PUT_SUB("NAME", theNameExpr);
+  PUT_SUB("VALUE", theValueExpr);
+  END_PUT();
+}
+
+
+ostream& json_object_expr::put(ostream& os) const
+{
+  BEGIN_PUT(json_object_expr);
+  if (theContentExpr)
+    theContentExpr->put(os);
+  END_PUT();
+}
+
+
+ostream& json_array_expr::put(ostream& os) const
+{
+  BEGIN_PUT(json_array_expr);
+  if (theContentExpr)
+    theContentExpr->put(os);
+  END_PUT();
+}
+#endif
+
+
+ostream& insert_expr::put(ostream& os) const
 {
   BEGIN_PUT( insert_expr );
   theSourceExpr->put(os);
@@ -825,14 +855,14 @@
   END_PUT();
 }
 
-ostream& delete_expr::put( ostream& os) const
+ostream& delete_expr::put(ostream& os) const
 {
   BEGIN_PUT( delete_expr );
   theTargetExpr->put(os);
   END_PUT();
 }
 
-ostream& replace_expr::put( ostream& os) const
+ostream& replace_expr::put(ostream& os) const
 {
   BEGIN_PUT( replace_expr );
   theTargetExpr->put(os);

=== modified file 'src/compiler/expression/expr_type.cpp'
--- src/compiler/expression/expr_type.cpp	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/expr_type.cpp	2012-01-29 09:51:27 +0000
@@ -243,8 +243,7 @@
     {
       xqtref_t sourceType = e->theSteps[0]->get_return_type();
 
-      if (TypeOps::is_empty(get_type_manager(), *sourceType) ||
-          TypeOps::is_none(get_type_manager(), *sourceType))
+      if (sourceType->is_empty() || sourceType->is_none())
       {
         newType = sourceType;
       }
@@ -256,7 +255,7 @@
       {
         xqtref_t stepType = sourceType;
 
-        for (ulong i = 1; i < e->size(); ++i)
+        for (csize i = 1; i < e->size(); ++i) 
         {
           const axis_step_expr* axisStep = e->theSteps[i].cast<axis_step_expr>();
 
@@ -384,8 +383,8 @@
     xqtref_t target_ptype = TypeOps::prime_type(tm, *e->theTargetType);
 
     TypeConstants::quantifier_t q =
-    TypeOps::intersect_quant(TypeOps::quantifier(*input_type),
-                             TypeOps::quantifier(*e->theTargetType));
+    TypeOps::intersect_quant(input_type->get_quantifier(),
+                             e->theTargetType->get_quantifier());
 
     if (TypeOps::is_subtype(tm, *input_ptype, *target_ptype, get_loc()))
     {
@@ -407,8 +406,8 @@
     xqtref_t target_ptype = TypeOps::prime_type(tm, *e->theTargetType);
 
     TypeConstants::quantifier_t q =
-    TypeOps::intersect_quant(TypeOps::quantifier(*in_type),
-                             TypeOps::quantifier(*e->theTargetType));
+    TypeOps::intersect_quant(in_type->get_quantifier(),
+                             e->theTargetType->get_quantifier());
 
     if (TypeOps::is_subtype(tm, *in_ptype, *target_ptype, get_loc()))
     {
@@ -465,13 +464,14 @@
 
   case doc_expr_kind:
   {
-    doc_expr* e = static_cast<doc_expr*>(this);
+    xqtref_t contentType =
+      (theSctx->construction_mode() == StaticContextConsts::cons_preserve ?
+       rtm.ANY_TYPE : 
+       rtm.UNTYPED_TYPE);
 
     newType = tm->create_node_type(store::StoreConsts::documentNode,
                                    NULL,
-                                   (e->theContent == NULL ?
-                                    NULL :
-                                    e->theContent->get_return_type()),
+                                   contentType,
                                    TypeConstants::QUANT_ONE,
                                    false,
                                    false);
@@ -480,14 +480,14 @@
 
   case elem_expr_kind:
   {
-    xqtref_t typeName =
+    xqtref_t contentType =
       (theSctx->construction_mode() == StaticContextConsts::cons_preserve ?
        rtm.ANY_TYPE :
        rtm.UNTYPED_TYPE);
 
     newType = tm->create_node_type(store::StoreConsts::elementNode,
                                    NULL,
-                                   typeName,
+                                   contentType,
                                    TypeConstants::QUANT_ONE,
                                    false,
                                    false);
@@ -496,13 +496,9 @@
 
   case attr_expr_kind:
   {
-    attr_expr* e = static_cast<attr_expr*>(this);
-
     newType = tm->create_node_type(store::StoreConsts::attributeNode,
                                    NULL,
-                                   (e->theValueExpr == NULL ?
-                                    NULL :
-                                    e->theValueExpr->get_return_type()),
+                                   rtm.UNTYPED_ATOMIC_TYPE_ONE,
                                    TypeConstants::QUANT_ONE,
                                    false,
                                    false);
@@ -523,10 +519,10 @@
     {
       xqtref_t t = e->get_text()->get_return_type();
 
-      if (TypeOps::is_empty(get_type_manager(), *t))
+      if (t->is_empty())
         newType = t;
 
-      else if (TypeOps::type_min_cnt(tm, *t) == 0)
+      else if (t->min_card() == 0)
         q = TypeConstants::QUANT_QUESTION;
 
       nodeKind = store::StoreConsts::textNode;
@@ -563,6 +559,26 @@
     break;
   }
 
+#ifdef ZORBA_WITH_JSON
+  case json_pair_expr_kind:
+  {
+    newType = rtm.JSON_PAIR_TYPE_ONE;
+    break;
+  }
+
+  case json_object_expr_kind:
+  {
+    newType = rtm.JSON_OBJECT_TYPE_ONE;
+    break;
+  }
+
+  case json_array_expr_kind:
+  {
+    newType = rtm.JSON_ARRAY_TYPE_ONE;
+    break;
+  }
+#endif
+
   case const_expr_kind:
   {
     const_expr* e = static_cast<const_expr*>(this);

=== modified file 'src/compiler/expression/expr_visitor.h'
--- src/compiler/expression/expr_visitor.h	2011-11-17 16:32:04 +0000
+++ src/compiler/expression/expr_visitor.h	2012-01-29 09:51:27 +0000
@@ -69,6 +69,12 @@
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( text_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( pi_expr );
 
+#ifdef ZORBA_WITH_JSON
+  DECL_EXPR_VISITOR_VISIT_MEM_FNS( json_pair_expr );
+  DECL_EXPR_VISITOR_VISIT_MEM_FNS( json_object_expr );
+  DECL_EXPR_VISITOR_VISIT_MEM_FNS( json_array_expr );
+#endif
+
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( trycatch_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( function_item_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( dynamic_function_invocation_expr );

=== modified file 'src/compiler/expression/flwor_expr.cpp'
--- src/compiler/expression/flwor_expr.cpp	2011-12-21 14:40:33 +0000
+++ src/compiler/expression/flwor_expr.cpp	2012-01-29 09:51:27 +0000
@@ -175,7 +175,7 @@
     xqtref_t declaredType = varExpr->get_type();
     if (declaredType != NULL)
     {
-      if (TypeOps::is_empty(tm, *declaredType))
+      if (declaredType->is_empty())
         RAISE_ERROR(err::XPTY0004, loc,
         ERROR_PARAMS(ZED(BadType_23o), "empty-sequence"));
 

=== added file 'src/compiler/expression/json_exprs.cpp'
--- src/compiler/expression/json_exprs.cpp	1970-01-01 00:00:00 +0000
+++ src/compiler/expression/json_exprs.cpp	2012-01-29 09:51:27 +0000
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ * 
+ * Licensed 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.
+ */
+
+#include "compiler/expression/json_exprs.h"
+#include "compiler/expression/expr_visitor.h"
+
+#ifdef ZORBA_WITH_JSON
+
+namespace zorba 
+{
+
+SERIALIZABLE_CLASS_VERSIONS(json_pair_expr)
+END_SERIALIZABLE_CLASS_VERSIONS(json_pair_expr)
+
+SERIALIZABLE_CLASS_VERSIONS(json_object_expr)
+END_SERIALIZABLE_CLASS_VERSIONS(json_object_expr)
+
+SERIALIZABLE_CLASS_VERSIONS(json_array_expr)
+END_SERIALIZABLE_CLASS_VERSIONS(json_array_expr)
+
+DEF_EXPR_ACCEPT(json_pair_expr)
+DEF_EXPR_ACCEPT(json_object_expr)
+DEF_EXPR_ACCEPT(json_array_expr)
+
+
+/*******************************************************************************
+ JSONPairConstructor ::= AdditiveExpr (":" AdditiveExpr)?
+********************************************************************************/
+json_pair_expr::json_pair_expr(
+    static_context* sctx,
+    const QueryLoc& loc,
+    const expr_t& name,
+    const expr_t& value)
+  :
+  expr(sctx, loc, json_pair_expr_kind),
+  theNameExpr(name),
+  theValueExpr(value)
+{
+  compute_scripting_kind();
+}
+
+
+void json_pair_expr::serialize(::zorba::serialization::Archiver& ar)
+{
+  serialize_baseclass(ar, (expr*)this);
+  ar & theNameExpr;
+  ar & theValueExpr;
+}
+
+
+void json_pair_expr::compute_scripting_kind() 
+{
+  checkNonUpdating(theNameExpr);
+  checkNonUpdating(theValueExpr);
+
+  short nameExprKind = theNameExpr->get_scripting_detail();
+  short valueExprKind =  theValueExpr->get_scripting_detail();
+
+  theScriptingKind = (nameExprKind | valueExprKind);
+
+  theScriptingKind &= ~VACUOUS_EXPR;
+
+  if (is_sequential())
+    theScriptingKind &= ~SIMPLE_EXPR;
+}
+
+
+expr_t json_pair_expr::clone(substitution_t& subst) const
+{
+  return new json_pair_expr(theSctx,
+                            get_loc(),
+                            theNameExpr->clone(subst),
+                            theValueExpr->clone(subst));
+}
+
+
+/*******************************************************************************
+ JSONObjectConstructor ::= "{" Expr? "}"
+********************************************************************************/
+json_object_expr::json_object_expr(
+    static_context* sctx,
+    const QueryLoc& loc,
+    const expr_t& content)
+  :
+  expr(sctx, loc, json_object_expr_kind),
+  theContentExpr(content)
+{
+  compute_scripting_kind();
+}
+
+
+void json_object_expr::serialize(::zorba::serialization::Archiver& ar)
+{
+  serialize_baseclass(ar, (expr*)this);
+  ar & theContentExpr;
+}
+
+
+void json_object_expr::compute_scripting_kind() 
+{
+  if (theContentExpr)
+  {
+    checkNonUpdating(theContentExpr);
+
+    theScriptingKind = theContentExpr->get_scripting_detail();
+
+    theScriptingKind &= ~VACUOUS_EXPR;
+  }
+  else
+  {
+    theScriptingKind = SIMPLE_EXPR;
+  }
+}
+
+
+expr_t json_object_expr::clone(substitution_t& subst) const
+{
+  return new json_object_expr(theSctx,
+                              get_loc(),
+                              (theContentExpr ?
+                               theContentExpr->clone(subst) :
+                               NULL));
+}
+
+
+/*******************************************************************************
+ JSONArrayConstructor ::= "[" Expr? "]"
+********************************************************************************/
+json_array_expr::json_array_expr(
+    static_context* sctx,
+    const QueryLoc& loc,
+    const expr_t& content)
+  :
+  expr(sctx, loc, json_array_expr_kind),
+  theContentExpr(content)
+{
+  compute_scripting_kind();
+}
+
+
+void json_array_expr::serialize(::zorba::serialization::Archiver& ar)
+{
+  serialize_baseclass(ar, (expr*)this);
+  ar & theContentExpr;
+}
+
+
+void json_array_expr::compute_scripting_kind() 
+{
+  if (theContentExpr)
+  {
+    checkNonUpdating(theContentExpr);
+
+    theScriptingKind = theContentExpr->get_scripting_detail();
+
+    theScriptingKind &= ~VACUOUS_EXPR;
+  }
+  else
+  {
+    theScriptingKind = SIMPLE_EXPR;
+  }
+}
+
+
+expr_t json_array_expr::clone(substitution_t& subst) const
+{
+  return new json_array_expr(theSctx,
+                             get_loc(),
+                             theContentExpr->clone(subst));
+}
+
+
+}
+
+#endif // ZORBA_WITH_JSON
+

=== added file 'src/compiler/expression/json_exprs.h'
--- src/compiler/expression/json_exprs.h	1970-01-01 00:00:00 +0000
+++ src/compiler/expression/json_exprs.h	2012-01-29 09:51:27 +0000
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ * 
+ * Licensed 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.
+ */
+#pragma once
+#ifndef ZORBA_COMPILER_JSON_EXPRS
+#define ZORBA_COMPILER_JSON_EXPRS
+
+#include <string>
+#include <vector>
+
+#include <zorba/store_consts.h>
+
+#include "compiler/expression/expr_base.h"
+
+#ifdef ZORBA_WITH_JSON
+
+
+namespace zorba 
+{
+
+
+/*******************************************************************************
+  JSONPairConstructor ::= AdditiveExpr (":" AdditiveExpr)?
+********************************************************************************/
+class json_pair_expr : public expr 
+{
+  friend class ExprIterator;
+
+protected:
+  expr_t       theNameExpr;
+  expr_t       theValueExpr;
+
+public:
+  SERIALIZABLE_CLASS(json_pair_expr)
+  SERIALIZABLE_CLASS_CONSTRUCTOR2(json_pair_expr, expr)
+  void serialize(::zorba::serialization::Archiver& ar);
+
+public:
+  json_pair_expr(
+      static_context* sctx,
+      const QueryLoc& loc,
+      const expr_t& name,
+      const expr_t& value);
+
+  expr* get_name_expr() const { return theNameExpr.getp(); }
+
+  expr* get_value_expr() const { return theValueExpr.getp(); }
+
+  void compute_scripting_kind();
+
+  expr_t clone(substitution_t& s) const;
+
+  void accept(expr_visitor&);
+
+	std::ostream& put(std::ostream&) const;
+};
+
+
+/*******************************************************************************
+ JSONObjectConstructor ::= "{" Expr? "}"
+********************************************************************************/
+class json_object_expr : public expr 
+{
+  friend class ExprIterator;
+
+protected:
+  expr_t  theContentExpr;
+
+public:
+  SERIALIZABLE_CLASS(json_object_expr)
+  SERIALIZABLE_CLASS_CONSTRUCTOR2(json_object_expr, expr)
+  void serialize(::zorba::serialization::Archiver& ar);
+
+public:
+  json_object_expr(
+      static_context* sctx,
+      const QueryLoc& loc,
+      const expr_t& content);
+
+  expr* get_expr() const { return theContentExpr.getp(); }
+
+  void compute_scripting_kind();
+
+  expr_t clone(substitution_t& s) const;
+
+  void accept(expr_visitor&);
+
+	std::ostream& put(std::ostream&) const;
+};
+
+
+/*******************************************************************************
+ JSONArrayConstructor ::= "[" Expr? "]"
+********************************************************************************/
+class json_array_expr : public expr 
+{
+  friend class ExprIterator;
+
+protected:
+  expr_t  theContentExpr;
+
+public:
+  SERIALIZABLE_CLASS(json_array_expr)
+  SERIALIZABLE_CLASS_CONSTRUCTOR2(json_array_expr, expr)
+  void serialize(::zorba::serialization::Archiver& ar);
+
+public:
+  json_array_expr(
+      static_context* sctx,
+      const QueryLoc& loc,
+      const expr_t& content);
+
+  expr* get_expr() const { return theContentExpr.getp(); }
+
+  void compute_scripting_kind();
+
+  expr_t clone(substitution_t& s) const;
+
+  void accept(expr_visitor&);
+
+	std::ostream& put(std::ostream&) const;
+};
+
+
+}
+
+#endif // ZORBA_WITH_JSON
+
+#endif
+
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */
+/* vim:set et sw=2 ts=2: */

=== modified file 'src/compiler/expression/script_exprs.h'
--- src/compiler/expression/script_exprs.h	2012-01-11 17:30:25 +0000
+++ src/compiler/expression/script_exprs.h	2012-01-29 09:51:27 +0000
@@ -17,24 +17,10 @@
 #ifndef ZORBA_COMPILER_SCRIPT_EXPRS
 #define ZORBA_COMPILER_SCRIPT_EXPRS
 
-#include <string>
 #include <vector>
 
-#include <zorba/store_consts.h>
-
 #include "compiler/expression/expr_base.h"
 
-#include "zorbautils/checked_vector.h"
-
-#include "zorbatypes/schema_types.h"
-
-#include "diagnostics/xquery_diagnostics.h"
-
-#include "context/static_context.h"
-
-#include "types/typeimpl.h"
-
-#include "store/api/item.h"
 
 namespace zorba 
 {

=== modified file 'src/compiler/parser/xquery_parser.cpp'
--- src/compiler/parser/xquery_parser.cpp	2011-08-19 22:45:54 +0000
+++ src/compiler/parser/xquery_parser.cpp	2012-01-29 09:51:27 +0000
@@ -38,7 +38,7 @@
 /* First part of user declarations.  */
 
 /* Line 311 of lalr1.cc  */
-#line 87 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 87 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 
 
 #include "common/common.h"
@@ -75,7 +75,7 @@
 
 
 /* Line 311 of lalr1.cc  */
-#line 79 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 79 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 
 
 #include "xquery_parser.hpp"
@@ -83,7 +83,7 @@
 /* User implementation prologue.  */
 
 /* Line 317 of lalr1.cc  */
-#line 876 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 899 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 
 // HACK to trigger rchandle release: rchandles are freed when refcount == 0
 // (not <= 0); but Bison never increments the refcount, so we do it manually...
@@ -95,7 +95,7 @@
 }
 
 /* Line 317 of lalr1.cc  */
-#line 976 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1022 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 
 #include "compiler/parser/xquery_scanner.h"
 
@@ -105,7 +105,7 @@
 
 
 /* Line 317 of lalr1.cc  */
-#line 109 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 109 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 
 #ifndef YY_
 # if YYENABLE_NLS
@@ -174,7 +174,7 @@
 namespace zorba {
 
 /* Line 380 of lalr1.cc  */
-#line 178 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 178 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 #if YYERROR_VERBOSE
 
   /* Return YYSTR after stripping away unnecessary quotes and
@@ -277,2414 +277,2486 @@
         case 109: /* "\"'DECIMAL'\"" */
 
 /* Line 480 of lalr1.cc  */
-#line 874 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 897 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->decval); };
 
 /* Line 480 of lalr1.cc  */
-#line 285 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 285 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 	break;
       case 123: /* "\"'DOUBLE'\"" */
 
 /* Line 480 of lalr1.cc  */
-#line 873 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 896 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->dval); };
 
 /* Line 480 of lalr1.cc  */
-#line 294 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 294 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 	break;
       case 148: /* "\"'INTEGER'\"" */
 
 /* Line 480 of lalr1.cc  */
-#line 872 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 895 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->ival); };
 
 /* Line 480 of lalr1.cc  */
-#line 303 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 326: /* "VersionDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 312 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 327: /* "MainModule" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 321 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 328: /* "LibraryModule" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 330 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 329: /* "ModuleDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 339 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 330: /* "SIND_DeclList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 348 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 331: /* "SIND_Decl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 357 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 332: /* "Setter" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 366 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 333: /* "BoundarySpaceDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 375 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 334: /* "DefaultCollationDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 384 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 335: /* "BaseURIDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 393 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 336: /* "ConstructionDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 402 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 337: /* "OrderingModeDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 411 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 338: /* "EmptyOrderDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 420 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 339: /* "CopyNamespacesDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 429 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 340: /* "Import" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 438 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 341: /* "SchemaImport" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 447 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 342: /* "URILiteralList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 456 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 343: /* "SchemaPrefix" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 465 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 344: /* "ModuleImport" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 474 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 345: /* "NamespaceDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 483 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 346: /* "DefaultNamespaceDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 492 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 347: /* "VFO_DeclList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 501 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 348: /* "VFO_Decl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 510 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 349: /* "DecimalFormatDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 519 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 350: /* "DecimalFormatParamList" */
-
-/* Line 480 of lalr1.cc  */
-#line 897 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 303 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 330: /* "VersionDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 312 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 331: /* "MainModule" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 321 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 332: /* "LibraryModule" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 330 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 333: /* "ModuleDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 339 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 334: /* "SIND_DeclList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 348 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 335: /* "SIND_Decl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 357 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 336: /* "Setter" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 366 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 337: /* "BoundarySpaceDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 375 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 338: /* "DefaultCollationDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 384 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 339: /* "BaseURIDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 393 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 340: /* "ConstructionDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 402 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 341: /* "OrderingModeDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 411 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 342: /* "EmptyOrderDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 420 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 343: /* "CopyNamespacesDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 429 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 344: /* "Import" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 438 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 345: /* "SchemaImport" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 447 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 346: /* "URILiteralList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 456 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 347: /* "SchemaPrefix" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 465 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 348: /* "ModuleImport" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 474 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 349: /* "NamespaceDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 483 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 350: /* "DefaultNamespaceDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 492 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 351: /* "VFO_DeclList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 501 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 352: /* "VFO_Decl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 510 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 353: /* "DecimalFormatDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 519 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 354: /* "DecimalFormatParamList" */
+
+/* Line 480 of lalr1.cc  */
+#line 923 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->vstrpair); };
 
 /* Line 480 of lalr1.cc  */
-#line 528 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 528 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 	break;
-      case 351: /* "DecimalFormatParam" */
+      case 355: /* "DecimalFormatParam" */
 
 /* Line 480 of lalr1.cc  */
-#line 897 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 923 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->strpair); };
 
 /* Line 480 of lalr1.cc  */
-#line 537 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 353: /* "OptionDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 546 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 354: /* "FTOptionDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 555 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 355: /* "CtxItemDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 564 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 356: /* "CtxItemDecl2" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 573 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 357: /* "CtxItemDecl3" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 582 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 358: /* "CtxItemDecl4" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 591 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 359: /* "VarDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 600 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 360: /* "VarNameAndType" */
-
-/* Line 480 of lalr1.cc  */
-#line 897 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 537 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 357: /* "OptionDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 546 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 358: /* "FTOptionDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 555 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 359: /* "CtxItemDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 564 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 360: /* "CtxItemDecl2" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 573 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 361: /* "CtxItemDecl3" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 582 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 362: /* "CtxItemDecl4" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 591 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 363: /* "VarDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 600 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 364: /* "VarNameAndType" */
+
+/* Line 480 of lalr1.cc  */
+#line 923 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->varnametype); };
 
 /* Line 480 of lalr1.cc  */
-#line 609 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 361: /* "AnnotationList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 618 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 362: /* "Annotation" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 627 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 363: /* "AnnotationLiteralList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 636 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 364: /* "FunctionDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 645 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 365: /* "FunctionDecl2" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 654 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 366: /* "FunctionDeclSimple" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 663 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 367: /* "FunctionDeclUpdating" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 672 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 368: /* "FunctionSig" */
-
-/* Line 480 of lalr1.cc  */
-#line 897 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 609 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 365: /* "AnnotationList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 618 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 366: /* "Annotation" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 627 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 367: /* "AnnotationLiteralList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 636 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 368: /* "FunctionDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 645 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 369: /* "FunctionDecl2" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 654 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 370: /* "FunctionDeclSimple" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 663 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 371: /* "FunctionDeclUpdating" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 672 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 372: /* "FunctionSig" */
+
+/* Line 480 of lalr1.cc  */
+#line 923 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->fnsig); };
 
 /* Line 480 of lalr1.cc  */
-#line 681 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 369: /* "ParamList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 690 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 370: /* "Param" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 699 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 371: /* "CollectionDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 708 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 373: /* "IndexDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 717 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 374: /* "IndexKeyList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 726 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 375: /* "IndexKeySpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 735 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 376: /* "IntegrityConstraintDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 744 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 377: /* "QueryBody" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 753 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 378: /* "StatementsAndOptionalExprTop" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 762 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 379: /* "StatementsAndOptionalExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 771 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 380: /* "StatementsAndExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 780 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 381: /* "Statements" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 789 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 382: /* "Statement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 798 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 383: /* "BlockStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 807 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 384: /* "BlockExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 816 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 385: /* "EnclosedStatementsAndOptionalExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 825 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 386: /* "VarDeclStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 834 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 389: /* "AssignStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 843 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 390: /* "ApplyStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 852 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 391: /* "ExitStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 861 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 392: /* "WhileStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 870 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 393: /* "FlowCtlStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 879 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 394: /* "FLWORStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 395: /* "ReturnStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 897 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 396: /* "IfStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 906 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 397: /* "TryStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 915 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 398: /* "CatchListStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 924 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 399: /* "CatchStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 933 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 400: /* "Expr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 942 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 401: /* "ExprSingle" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 951 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 402: /* "ExprSimple" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 960 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 403: /* "FLWORExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 969 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 404: /* "ReturnExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 978 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 407: /* "FLWORWinCond" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 987 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 408: /* "WindowClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 996 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 409: /* "CountClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1005 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 410: /* "ForLetWinClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1014 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 412: /* "FLWORClauseList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1023 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 413: /* "ForClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1032 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 414: /* "VarInDeclList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1041 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 415: /* "VarInDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1050 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 416: /* "PositionalVar" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1059 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 417: /* "FTScoreVar" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1068 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 418: /* "LetClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1077 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 419: /* "VarGetsDeclList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1086 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 420: /* "VarGetsDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1095 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 421: /* "WindowVarDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1104 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 422: /* "WindowVars" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1113 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 423: /* "WindowVars3" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1122 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 424: /* "WindowVars2" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1131 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 425: /* "WhereClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1140 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 426: /* "GroupByClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1149 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 427: /* "GroupSpecList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1158 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 428: /* "GroupSpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1167 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 429: /* "GroupCollationSpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1176 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 430: /* "OrderByClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1185 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 431: /* "OrderSpecList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1194 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 432: /* "OrderSpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1203 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 433: /* "OrderModifier" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1212 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 434: /* "OrderDirSpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1221 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 435: /* "OrderEmptySpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1230 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 436: /* "OrderCollationSpec" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1239 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 437: /* "QuantifiedExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1248 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 438: /* "QVarInDeclList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1257 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 439: /* "QVarInDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1266 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 440: /* "SwitchExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1275 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 441: /* "SwitchCaseClauseList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1284 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 442: /* "SwitchCaseClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1293 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 443: /* "SwitchCaseOperandList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1302 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 444: /* "SwitchStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1311 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 447: /* "TypeswitchExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1320 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 448: /* "TypeswitchStatement" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1329 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 449: /* "CaseClauseList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1338 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 450: /* "CaseClause" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1347 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 453: /* "IfExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1356 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 454: /* "OrExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1365 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 455: /* "AndExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1374 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 456: /* "ComparisonExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1383 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 458: /* "FTContainsExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1392 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 459: /* "opt_FTIgnoreOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1401 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 460: /* "RangeExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1410 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 461: /* "AdditiveExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1419 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 462: /* "MultiplicativeExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1428 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 463: /* "UnionExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1437 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 464: /* "IntersectExceptExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1446 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 465: /* "InstanceofExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1455 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 466: /* "TreatExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1464 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 467: /* "CastableExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1473 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 468: /* "CastExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1482 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 469: /* "UnaryExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1491 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 470: /* "SignList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1500 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 471: /* "ValueExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1509 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 472: /* "ValueComp" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1518 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 473: /* "NodeComp" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1527 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 474: /* "ValidateExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1536 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 475: /* "ExtensionExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1545 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 476: /* "Pragma_list" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1554 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 477: /* "Pragma" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1563 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 478: /* "PathExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1572 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 480: /* "RelativePathExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1581 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 481: /* "StepExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1590 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 482: /* "AxisStep" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1599 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 483: /* "ForwardStep" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1608 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 484: /* "ForwardAxis" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1617 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 485: /* "AbbrevForwardStep" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1626 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 486: /* "ReverseStep" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1635 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 487: /* "ReverseAxis" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1644 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 488: /* "NodeTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1653 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 489: /* "NameTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1662 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 490: /* "Wildcard" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1671 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 491: /* "FilterExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1680 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 492: /* "PredicateList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1689 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 493: /* "Predicate" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1698 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 494: /* "PrimaryExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1707 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 495: /* "Literal" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1716 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 496: /* "NumericLiteral" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1725 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 497: /* "VarRef" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1734 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 498: /* "ParenthesizedExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1743 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 499: /* "ContextItemExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1752 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 500: /* "OrderedExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1761 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 501: /* "UnorderedExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1770 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 502: /* "FunctionCall" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1779 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 503: /* "ArgList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1788 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 504: /* "Constructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1797 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 505: /* "DirectConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1806 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 506: /* "DirElemConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1815 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 507: /* "DirElemContentList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1824 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 508: /* "DirAttributeList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1833 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 509: /* "DirAttr" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1842 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 511: /* "DirAttributeValue" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1851 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 512: /* "opt_QuoteAttrContentList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1860 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 513: /* "QuoteAttrContentList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1869 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 514: /* "opt_AposAttrContentList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1878 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 515: /* "AposAttrContentList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1887 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 516: /* "QuoteAttrValueContent" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1896 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 517: /* "AposAttrValueContent" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1905 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 518: /* "DirElemContent" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1914 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 519: /* "CommonContent" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1923 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 520: /* "DirCommentConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1932 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 521: /* "DirPIConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1941 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 522: /* "CDataSection" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1950 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 523: /* "ComputedConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1959 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 524: /* "CompDocConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1968 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 525: /* "CompElemConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1977 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 526: /* "CompAttrConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1986 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 527: /* "CompTextConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 1995 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 528: /* "CompCommentConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2004 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 529: /* "CompPIConstructor" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2013 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 530: /* "SingleType" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2022 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 531: /* "TypeDeclaration" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2031 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 532: /* "SequenceType" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2040 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 533: /* "OccurrenceIndicator" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2049 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 534: /* "ItemType" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2058 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 535: /* "TypeList" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2067 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 536: /* "AtomicType" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2076 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 537: /* "KindTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2085 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 538: /* "AnyKindTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2094 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 539: /* "DocumentTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2103 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 540: /* "TextTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2112 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 541: /* "CommentTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2121 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 542: /* "PITest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2130 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 543: /* "AttributeTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2139 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 544: /* "SchemaAttributeTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2148 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 545: /* "ElementTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2157 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 546: /* "SchemaElementTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2166 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 547: /* "TypeName" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2175 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 548: /* "TypeName_WITH_HOOK" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2184 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 549: /* "StringLiteral" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2193 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 554: /* "AnyFunctionTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2202 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 555: /* "TypedFunctionTest" */
-
-/* Line 480 of lalr1.cc  */
-#line 888 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2211 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 558: /* "InsertExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2220 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 559: /* "DeleteExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2229 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 560: /* "ReplaceExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2238 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 561: /* "RenameExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2247 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 562: /* "TransformExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2256 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 563: /* "VarNameList" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2265 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 564: /* "VarNameDecl" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2274 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 565: /* "TryExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2283 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 566: /* "CatchListExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2292 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 567: /* "CatchExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2301 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 568: /* "BracedExpr" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2310 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 569: /* "NameTestList" */
-
-/* Line 480 of lalr1.cc  */
-#line 897 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 681 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 373: /* "ParamList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 690 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 374: /* "Param" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 699 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 375: /* "CollectionDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 708 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 377: /* "IndexDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 717 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 378: /* "IndexKeyList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 726 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 379: /* "IndexKeySpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 735 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 380: /* "IntegrityConstraintDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 744 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 381: /* "QueryBody" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 753 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 382: /* "StatementsAndOptionalExprTop" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 762 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 383: /* "StatementsAndOptionalExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 771 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 384: /* "StatementsAndExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 780 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 385: /* "Statements" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 789 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 386: /* "Statement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 798 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 387: /* "BlockStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 807 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 388: /* "BlockExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 816 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 389: /* "EnclosedStatementsAndOptionalExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 825 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 390: /* "VarDeclStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 834 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 393: /* "AssignStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 843 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 394: /* "ApplyStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 852 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 395: /* "ExitStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 861 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 396: /* "WhileStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 870 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 397: /* "FlowCtlStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 879 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 398: /* "FLWORStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 888 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 399: /* "ReturnStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 897 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 400: /* "IfStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 906 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 401: /* "TryStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 915 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 402: /* "CatchListStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 924 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 403: /* "CatchStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 933 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 404: /* "Expr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 942 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 405: /* "ExprSingle" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 951 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 406: /* "ExprSimple" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 960 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 407: /* "FLWORExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 969 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 408: /* "ReturnExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 978 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 411: /* "FLWORWinCond" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 987 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 412: /* "WindowClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 996 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 413: /* "CountClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1005 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 414: /* "ForLetWinClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1014 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 416: /* "FLWORClauseList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1023 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 417: /* "ForClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1032 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 418: /* "VarInDeclList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1041 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 419: /* "VarInDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1050 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 420: /* "PositionalVar" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1059 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 421: /* "FTScoreVar" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1068 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 422: /* "LetClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1077 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 423: /* "VarGetsDeclList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1086 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 424: /* "VarGetsDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1095 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 425: /* "WindowVarDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1104 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 426: /* "WindowVars" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1113 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 427: /* "WindowVars3" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1122 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 428: /* "WindowVars2" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1131 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 429: /* "WhereClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1140 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 430: /* "GroupByClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1149 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 431: /* "GroupSpecList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1158 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 432: /* "GroupSpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1167 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 433: /* "GroupCollationSpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1176 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 434: /* "OrderByClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1185 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 435: /* "OrderSpecList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1194 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 436: /* "OrderSpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1203 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 437: /* "OrderModifier" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1212 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 438: /* "OrderDirSpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1221 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 439: /* "OrderEmptySpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1230 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 440: /* "OrderCollationSpec" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1239 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 441: /* "QuantifiedExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1248 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 442: /* "QVarInDeclList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1257 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 443: /* "QVarInDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1266 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 444: /* "SwitchExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1275 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 445: /* "SwitchCaseClauseList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1284 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 446: /* "SwitchCaseClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1293 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 447: /* "SwitchCaseOperandList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1302 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 448: /* "SwitchStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1311 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 451: /* "TypeswitchExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1320 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 452: /* "TypeswitchStatement" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1329 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 453: /* "CaseClauseList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1338 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 454: /* "CaseClause" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1347 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 457: /* "IfExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1356 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 458: /* "OrExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1365 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 459: /* "AndExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1374 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 460: /* "ComparisonExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1383 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 462: /* "FTContainsExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1392 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 463: /* "opt_FTIgnoreOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1401 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 464: /* "RangeExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1410 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 465: /* "AdditiveExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1419 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 466: /* "MultiplicativeExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1428 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 467: /* "UnionExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1437 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 468: /* "IntersectExceptExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1446 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 469: /* "InstanceofExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1455 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 470: /* "TreatExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1464 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 471: /* "CastableExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1473 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 472: /* "CastExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1482 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 473: /* "UnaryExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1491 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 474: /* "SignList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1500 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 475: /* "ValueExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1509 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 476: /* "ValueComp" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1518 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 477: /* "NodeComp" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1527 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 478: /* "ValidateExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1536 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 479: /* "ExtensionExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1545 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 480: /* "Pragma_list" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1554 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 481: /* "Pragma" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1563 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 482: /* "PathExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1572 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 484: /* "RelativePathExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1581 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 485: /* "StepExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1590 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 486: /* "AxisStep" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1599 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 487: /* "ForwardStep" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1608 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 488: /* "ForwardAxis" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1617 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 489: /* "AbbrevForwardStep" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1626 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 490: /* "ReverseStep" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1635 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 491: /* "ReverseAxis" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1644 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 492: /* "NodeTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1653 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 493: /* "NameTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1662 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 494: /* "Wildcard" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1671 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 495: /* "FilterExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1680 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 496: /* "PredicateList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1689 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 497: /* "Predicate" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1698 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 498: /* "PrimaryExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1707 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 499: /* "Literal" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1716 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 500: /* "NumericLiteral" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1725 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 501: /* "VarRef" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1734 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 502: /* "ParenthesizedExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1743 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 503: /* "ContextItemExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1752 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 504: /* "OrderedExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1761 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 505: /* "UnorderedExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1770 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 506: /* "FunctionCall" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1779 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 507: /* "ArgList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1788 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 508: /* "Constructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1797 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 509: /* "DirectConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1806 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 510: /* "DirElemConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1815 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 511: /* "DirElemContentList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1824 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 512: /* "DirAttributeList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1833 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 513: /* "DirAttr" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1842 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 515: /* "DirAttributeValue" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1851 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 516: /* "opt_QuoteAttrContentList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1860 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 517: /* "QuoteAttrContentList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1869 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 518: /* "opt_AposAttrContentList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1878 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 519: /* "AposAttrContentList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1887 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 520: /* "QuoteAttrValueContent" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1896 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 521: /* "AposAttrValueContent" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1905 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 522: /* "DirElemContent" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1914 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 523: /* "CommonContent" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1923 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 524: /* "DirCommentConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1932 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 525: /* "DirPIConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1941 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 526: /* "CDataSection" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1950 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 527: /* "ComputedConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1959 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 528: /* "CompDocConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1968 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 529: /* "CompElemConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1977 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 530: /* "CompAttrConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1986 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 531: /* "CompTextConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 1995 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 532: /* "CompCommentConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2004 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 533: /* "CompPIConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2013 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 534: /* "SingleType" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2022 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 535: /* "TypeDeclaration" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2031 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 536: /* "SequenceType" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2040 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 537: /* "OccurrenceIndicator" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2049 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 538: /* "ItemType" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2058 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 539: /* "TypeList" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2067 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 540: /* "AtomicType" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2076 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 541: /* "KindTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2085 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 542: /* "AnyKindTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2094 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 543: /* "DocumentTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2103 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 544: /* "TextTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2112 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 545: /* "CommentTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2121 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 546: /* "PITest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2130 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 547: /* "AttributeTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2139 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 548: /* "SchemaAttributeTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2148 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 549: /* "ElementTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2157 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 550: /* "SchemaElementTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2166 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 551: /* "TypeName" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2175 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 552: /* "TypeName_WITH_HOOK" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2184 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 553: /* "StringLiteral" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2193 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 558: /* "AnyFunctionTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2202 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 559: /* "TypedFunctionTest" */
+
+/* Line 480 of lalr1.cc  */
+#line 911 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2211 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 562: /* "InsertExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2220 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 563: /* "DeleteExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2229 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 564: /* "ReplaceExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2238 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 565: /* "RenameExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2247 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 566: /* "TransformExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2256 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 567: /* "VarNameList" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2265 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 568: /* "VarNameDecl" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2274 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 569: /* "TryExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2283 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 570: /* "CatchListExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2292 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 571: /* "CatchExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2301 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 572: /* "BracedExpr" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2310 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 573: /* "NameTestList" */
+
+/* Line 480 of lalr1.cc  */
+#line 923 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 	{ delete (yyvaluep->name_test_list); };
 
 /* Line 480 of lalr1.cc  */
-#line 2319 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 570: /* "FTSelection" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2328 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 573: /* "FTOr" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2337 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 574: /* "FTAnd" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2346 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 575: /* "FTMildNot" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2355 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 576: /* "FTUnaryNot" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2364 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 577: /* "FTPrimaryWithOptions" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2373 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 578: /* "opt_FTMatchOptions" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2382 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 580: /* "FTWeight" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2391 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 581: /* "FTPrimary" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2400 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 582: /* "opt_FTTimes" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2409 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 583: /* "FTExtensionSelection" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2418 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 585: /* "FTWords" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2427 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 586: /* "FTWordsValue" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2436 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 588: /* "FTAnyallOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2445 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 591: /* "FTPosFilter" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2454 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 592: /* "FTOrder" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2463 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 593: /* "FTWindow" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2472 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 594: /* "FTDistance" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2481 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 595: /* "FTUnit" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2490 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 596: /* "FTMatchOptions" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2499 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 597: /* "FTMatchOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2508 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 598: /* "FTCaseOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2517 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 599: /* "FTDiacriticsOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2526 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 600: /* "FTExtensionOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2535 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 601: /* "FTStemOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2544 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 602: /* "FTThesaurusOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2553 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 606: /* "FTThesaurusID" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2562 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 609: /* "FTStopWordOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2571 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 610: /* "FTStopWords" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2580 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 614: /* "FTStopWordsInclExcl" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2589 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 615: /* "FTLanguageOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2598 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 616: /* "FTWildCardOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2607 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 617: /* "FTContent" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2616 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 618: /* "FTTimes" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2625 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 619: /* "FTRange" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2634 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 620: /* "FTScope" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2643 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 621: /* "FTBigUnit" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2652 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 622: /* "FTIgnoreOption" */
-
-/* Line 480 of lalr1.cc  */
-#line 891 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->node) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2661 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 625: /* "QNAME" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2670 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 626: /* "FUNCTION_NAME" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2679 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
-	break;
-      case 627: /* "EQNAME" */
-
-/* Line 480 of lalr1.cc  */
-#line 894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-	{ release_hack( (yyvaluep->expr) ); };
-
-/* Line 480 of lalr1.cc  */
-#line 2688 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 2319 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 574: /* "FTSelection" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2328 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 577: /* "FTOr" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2337 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 578: /* "FTAnd" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2346 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 579: /* "FTMildNot" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2355 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 580: /* "FTUnaryNot" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2364 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 581: /* "FTPrimaryWithOptions" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2373 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 582: /* "opt_FTMatchOptions" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2382 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 584: /* "FTWeight" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2391 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 585: /* "FTPrimary" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2400 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 586: /* "opt_FTTimes" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2409 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 587: /* "FTExtensionSelection" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2418 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 589: /* "FTWords" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2427 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 590: /* "FTWordsValue" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2436 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 592: /* "FTAnyallOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2445 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 595: /* "FTPosFilter" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2454 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 596: /* "FTOrder" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2463 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 597: /* "FTWindow" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2472 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 598: /* "FTDistance" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2481 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 599: /* "FTUnit" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2490 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 600: /* "FTMatchOptions" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2499 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 601: /* "FTMatchOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2508 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 602: /* "FTCaseOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2517 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 603: /* "FTDiacriticsOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2526 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 604: /* "FTExtensionOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2535 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 605: /* "FTStemOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2544 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 606: /* "FTThesaurusOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2553 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 610: /* "FTThesaurusID" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2562 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 613: /* "FTStopWordOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2571 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 614: /* "FTStopWords" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2580 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 618: /* "FTStopWordsInclExcl" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2589 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 619: /* "FTLanguageOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2598 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 620: /* "FTWildCardOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2607 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 621: /* "FTContent" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2616 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 622: /* "FTTimes" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2625 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 623: /* "FTRange" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2634 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 624: /* "FTScope" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2643 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 625: /* "FTBigUnit" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2652 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 626: /* "FTIgnoreOption" */
+
+/* Line 480 of lalr1.cc  */
+#line 914 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->node) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2661 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 627: /* "JSONConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2670 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 628: /* "JSONComputedPairConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2679 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 629: /* "JSONComputedObjectConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2688 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 630: /* "JSONComputedArrayConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2697 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 631: /* "JSONDirectArrayConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2706 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 632: /* "JSONDirectObjectConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2715 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 633: /* "JSONDirectObjectContent" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2724 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 634: /* "JSONDirectPairConstructor" */
+
+/* Line 480 of lalr1.cc  */
+#line 917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2733 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 642: /* "QNAME" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2742 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 643: /* "FUNCTION_NAME" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2751 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
+	break;
+      case 644: /* "EQNAME" */
+
+/* Line 480 of lalr1.cc  */
+#line 920 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+	{ release_hack( (yyvaluep->expr) ); };
+
+/* Line 480 of lalr1.cc  */
+#line 2760 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 	break;
 
 	default:
@@ -2763,13 +2835,13 @@
     /* User initialization code.  */
     
 /* Line 553 of lalr1.cc  */
-#line 140 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 140 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
 {
     yylloc.begin.filename = yylloc.end.filename = &(driver.theFilename2);
 }
 
 /* Line 553 of lalr1.cc  */
-#line 2773 "/home/mbrantner/zorba/trunk/build/src/compiler/parser/xquery_parser.cpp"
+#line 2845 "/home/markos/zorba/repo/jsoniq/build/src/compiler/parser/xquery_parser.cpp"
 
     /* Initialize the stacks.  The initial state will be pushed in
        yynewstate, since the latter expects the semantical and the
@@ -2888,7 +2960,7 @@
 	  case 3:
 
 /* Line 678 of lalr1.cc  */
-#line 994 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1040 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
         (yyval.node) = (yysemantic_stack_[(2) - (2)].node);
       }
@@ -2897,7 +2969,7 @@
   case 4:
 
 /* Line 678 of lalr1.cc  */
-#line 1003 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1049 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
         (yyval.node) = NULL; YYABORT;
       }
@@ -2906,7 +2978,7 @@
   case 5:
 
 /* Line 678 of lalr1.cc  */
-#line 1012 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1058 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
       driver.set_expr( (yyval.node) );
@@ -2916,7 +2988,7 @@
   case 6:
 
 /* Line 678 of lalr1.cc  */
-#line 1018 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1064 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       MainModule* mm = dynamic_cast<MainModule*>((yysemantic_stack_[(2) - (2)].node));
       mm->set_version_decl( static_cast<VersionDecl*>((yysemantic_stack_[(2) - (1)].node)) );
@@ -2928,7 +3000,7 @@
   case 7:
 
 /* Line 678 of lalr1.cc  */
-#line 1026 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1072 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
       driver.set_expr( (yyval.node) );
@@ -2938,7 +3010,7 @@
   case 8:
 
 /* Line 678 of lalr1.cc  */
-#line 1032 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1078 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       LibraryModule* lm = dynamic_cast<LibraryModule*>((yysemantic_stack_[(2) - (2)].node));
       lm->set_version_decl( static_cast<VersionDecl*>((yysemantic_stack_[(2) - (1)].node)) );
@@ -2950,7 +3022,7 @@
   case 9:
 
 /* Line 678 of lalr1.cc  */
-#line 1043 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1089 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VersionDecl( LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (3)].sval)), "utf-8" );
     }
@@ -2959,7 +3031,7 @@
   case 10:
 
 /* Line 678 of lalr1.cc  */
-#line 1048 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1094 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VersionDecl( LOC((yyloc)), SYMTAB((yysemantic_stack_[(6) - (3)].sval)), SYMTAB((yysemantic_stack_[(6) - (5)].sval)) );
     }
@@ -2968,7 +3040,7 @@
   case 11:
 
 /* Line 678 of lalr1.cc  */
-#line 1056 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1102 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Prolog* prolog = new Prolog(LOC((yyloc)), static_cast<SIND_DeclList*>((yysemantic_stack_[(3) - (1)].node)), NULL);
 
@@ -2979,7 +3051,7 @@
   case 12:
 
 /* Line 678 of lalr1.cc  */
-#line 1063 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1109 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Prolog* prolog = new Prolog(LOC((yyloc)), NULL, static_cast<VFO_DeclList*>((yysemantic_stack_[(3) - (1)].node)));
 
@@ -2990,7 +3062,7 @@
   case 13:
 
 /* Line 678 of lalr1.cc  */
-#line 1070 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1116 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Prolog* prolog = new Prolog(LOC((yyloc)),
                                   static_cast<SIND_DeclList*>((yysemantic_stack_[(5) - (1)].node)),
@@ -3003,7 +3075,7 @@
   case 14:
 
 /* Line 678 of lalr1.cc  */
-#line 1079 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1125 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new MainModule( LOC((yyloc)), static_cast<QueryBody*>((yysemantic_stack_[(1) - (1)].expr)), NULL );
     }
@@ -3012,7 +3084,7 @@
   case 15:
 
 /* Line 678 of lalr1.cc  */
-#line 1086 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1132 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node); (yyval.node) = (yysemantic_stack_[(3) - (3)].expr); // to prevent the Bison warning
       (yylocation_stack_[(3) - (1)]).step();
@@ -3024,7 +3096,7 @@
   case 16:
 
 /* Line 678 of lalr1.cc  */
-#line 1094 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1140 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node); (yyval.node) = (yysemantic_stack_[(3) - (3)].expr); // to prevent the Bison warning
       (yylocation_stack_[(3) - (1)]).step();
@@ -3036,7 +3108,7 @@
   case 17:
 
 /* Line 678 of lalr1.cc  */
-#line 1102 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1148 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(5) - (1)].node); (yyval.node) = (yysemantic_stack_[(5) - (3)].node); (yyval.node) = (yysemantic_stack_[(5) - (5)].expr); // to prevent the Bison warning
       (yylocation_stack_[(5) - (3)]).step();
@@ -3048,7 +3120,7 @@
   case 18:
 
 /* Line 678 of lalr1.cc  */
-#line 1110 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1156 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(5) - (1)].node); (yyval.node) = (yysemantic_stack_[(5) - (3)].node); (yyval.node) = (yysemantic_stack_[(5) - (5)].expr); // to prevent the Bison warning
       (yylocation_stack_[(5) - (1)]).step();
@@ -3060,7 +3132,7 @@
   case 19:
 
 /* Line 678 of lalr1.cc  */
-#line 1121 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1167 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new LibraryModule(LOC((yyloc)), static_cast<ModuleDecl*>((yysemantic_stack_[(1) - (1)].node)), NULL);
     }
@@ -3069,7 +3141,7 @@
   case 20:
 
 /* Line 678 of lalr1.cc  */
-#line 1126 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1172 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Prolog* prolog = new Prolog(LOC((yyloc)), static_cast<SIND_DeclList*>((yysemantic_stack_[(3) - (2)].node)), NULL);
 
@@ -3080,7 +3152,7 @@
   case 21:
 
 /* Line 678 of lalr1.cc  */
-#line 1133 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1179 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Prolog* prolog = new Prolog(LOC((yyloc)), NULL, static_cast<VFO_DeclList*>((yysemantic_stack_[(3) - (2)].node)));
 
@@ -3091,7 +3163,7 @@
   case 22:
 
 /* Line 678 of lalr1.cc  */
-#line 1140 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1186 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Prolog* prolog = new Prolog(LOC((yyloc)),
                                   static_cast<SIND_DeclList*>((yysemantic_stack_[(5) - (2)].node)),
@@ -3104,7 +3176,7 @@
   case 23:
 
 /* Line 678 of lalr1.cc  */
-#line 1152 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1198 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ModuleDecl( LOC((yyloc)), SYMTAB((yysemantic_stack_[(6) - (3)].sval)), SYMTAB((yysemantic_stack_[(6) - (5)].sval)) );
 
@@ -3115,7 +3187,7 @@
   case 24:
 
 /* Line 678 of lalr1.cc  */
-#line 1162 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1208 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SIND_DeclList *sdl = new SIND_DeclList( LOC((yyloc)) );
       sdl->push_back( (yysemantic_stack_[(1) - (1)].node) );
@@ -3126,7 +3198,7 @@
   case 25:
 
 /* Line 678 of lalr1.cc  */
-#line 1169 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1215 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       ((SIND_DeclList*)(yysemantic_stack_[(3) - (1)].node))->push_back( (yysemantic_stack_[(3) - (3)].node) );
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node);
@@ -3136,7 +3208,7 @@
   case 26:
 
 /* Line 678 of lalr1.cc  */
-#line 1176 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1222 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       // error
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node); (yyval.node) = (yysemantic_stack_[(3) - (3)].node); // to prevent the Bison warning
@@ -3149,7 +3221,7 @@
   case 40:
 
 /* Line 678 of lalr1.cc  */
-#line 1211 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1257 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new BoundarySpaceDecl(LOC((yyloc)), StaticContextConsts::preserve_space);
     }
@@ -3158,7 +3230,7 @@
   case 41:
 
 /* Line 678 of lalr1.cc  */
-#line 1216 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1262 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new BoundarySpaceDecl(LOC((yyloc)), StaticContextConsts::strip_space);
     }
@@ -3167,7 +3239,7 @@
   case 42:
 
 /* Line 678 of lalr1.cc  */
-#line 1224 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1270 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new DefaultCollationDecl( LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (4)].sval)) );
     }
@@ -3176,7 +3248,7 @@
   case 43:
 
 /* Line 678 of lalr1.cc  */
-#line 1232 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1278 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new BaseURIDecl( LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (3)].sval)) );
     }
@@ -3185,7 +3257,7 @@
   case 44:
 
 /* Line 678 of lalr1.cc  */
-#line 1240 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1286 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ConstructionDecl(LOC((yyloc)), StaticContextConsts::cons_preserve);
     }
@@ -3194,7 +3266,7 @@
   case 45:
 
 /* Line 678 of lalr1.cc  */
-#line 1245 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1291 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ConstructionDecl(LOC((yyloc)), StaticContextConsts::cons_strip);
     }
@@ -3203,7 +3275,7 @@
   case 46:
 
 /* Line 678 of lalr1.cc  */
-#line 1253 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1299 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new OrderingModeDecl(LOC((yyloc)), StaticContextConsts::ordered);
     }
@@ -3212,7 +3284,7 @@
   case 47:
 
 /* Line 678 of lalr1.cc  */
-#line 1258 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1304 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new OrderingModeDecl(LOC((yyloc)), StaticContextConsts::unordered);
     }
@@ -3221,7 +3293,7 @@
   case 48:
 
 /* Line 678 of lalr1.cc  */
-#line 1266 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1312 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new EmptyOrderDecl(LOC((yyloc)), StaticContextConsts::empty_greatest);
     }
@@ -3230,7 +3302,7 @@
   case 49:
 
 /* Line 678 of lalr1.cc  */
-#line 1271 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1317 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new EmptyOrderDecl(LOC((yyloc)), StaticContextConsts::empty_least);
     }
@@ -3239,7 +3311,7 @@
   case 50:
 
 /* Line 678 of lalr1.cc  */
-#line 1279 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1325 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CopyNamespacesDecl(LOC((yyloc)),
                                   StaticContextConsts::preserve_ns,
@@ -3250,7 +3322,7 @@
   case 51:
 
 /* Line 678 of lalr1.cc  */
-#line 1286 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1332 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CopyNamespacesDecl(LOC((yyloc)),
                                   StaticContextConsts::preserve_ns,
@@ -3261,7 +3333,7 @@
   case 52:
 
 /* Line 678 of lalr1.cc  */
-#line 1293 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1339 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CopyNamespacesDecl(LOC((yyloc)),
                                   StaticContextConsts::no_preserve_ns,
@@ -3272,7 +3344,7 @@
   case 53:
 
 /* Line 678 of lalr1.cc  */
-#line 1300 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1346 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CopyNamespacesDecl(LOC((yyloc)),
                                   StaticContextConsts::no_preserve_ns,
@@ -3283,7 +3355,7 @@
   case 56:
 
 /* Line 678 of lalr1.cc  */
-#line 1315 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1361 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yyval.node); // to prevent the Bison warning
       error((yylocation_stack_[(3) - (2)]), "syntax error, \"import\" should be followed by either \"schema\" or \"module\".");
@@ -3294,7 +3366,7 @@
   case 57:
 
 /* Line 678 of lalr1.cc  */
-#line 1325 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1371 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SchemaImport( LOC((yyloc)), NULL, SYMTAB((yysemantic_stack_[(3) - (3)].sval)), NULL );
     }
@@ -3303,7 +3375,7 @@
   case 58:
 
 /* Line 678 of lalr1.cc  */
-#line 1330 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1376 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SchemaImport(LOC((yyloc)),
                             dynamic_cast<SchemaPrefix*>((yysemantic_stack_[(4) - (3)].node)),
@@ -3315,7 +3387,7 @@
   case 59:
 
 /* Line 678 of lalr1.cc  */
-#line 1338 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1384 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SchemaImport(LOC((yyloc)),
                             NULL,
@@ -3327,7 +3399,7 @@
   case 60:
 
 /* Line 678 of lalr1.cc  */
-#line 1346 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1392 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SchemaImport(LOC((yyloc)),
                             dynamic_cast<SchemaPrefix*>((yysemantic_stack_[(6) - (3)].node)),
@@ -3339,7 +3411,7 @@
   case 61:
 
 /* Line 678 of lalr1.cc  */
-#line 1357 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1403 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       URILiteralList *ull = new URILiteralList( LOC((yyloc)));
       ull->push_back( SYMTAB((yysemantic_stack_[(1) - (1)].sval)) );
@@ -3350,7 +3422,7 @@
   case 62:
 
 /* Line 678 of lalr1.cc  */
-#line 1364 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1410 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       if ( URILiteralList *ull = dynamic_cast<URILiteralList*>((yysemantic_stack_[(3) - (1)].node)) )
         ull->push_back( SYMTAB((yysemantic_stack_[(3) - (3)].sval)) );
@@ -3362,7 +3434,7 @@
   case 63:
 
 /* Line 678 of lalr1.cc  */
-#line 1375 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1421 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SchemaPrefix( LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (2)].sval)) );
     }
@@ -3371,7 +3443,7 @@
   case 64:
 
 /* Line 678 of lalr1.cc  */
-#line 1380 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1426 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SchemaPrefix( LOC((yyloc)), true );
     }
@@ -3380,7 +3452,7 @@
   case 65:
 
 /* Line 678 of lalr1.cc  */
-#line 1388 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1434 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ModuleImport(LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (3)].sval)), NULL);
 
@@ -3391,7 +3463,7 @@
   case 66:
 
 /* Line 678 of lalr1.cc  */
-#line 1395 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1441 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ModuleImport(LOC((yyloc)), SYMTAB((yysemantic_stack_[(6) - (4)].sval)), SYMTAB((yysemantic_stack_[(6) - (6)].sval)), NULL);
 
@@ -3402,7 +3474,7 @@
   case 67:
 
 /* Line 678 of lalr1.cc  */
-#line 1402 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1448 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ModuleImport(LOC((yyloc)),
                             SYMTAB((yysemantic_stack_[(5) - (3)].sval)),
@@ -3415,7 +3487,7 @@
   case 68:
 
 /* Line 678 of lalr1.cc  */
-#line 1411 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1457 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ModuleImport(LOC((yyloc)),
                             SYMTAB((yysemantic_stack_[(8) - (4)].sval)),
@@ -3429,7 +3501,7 @@
   case 69:
 
 /* Line 678 of lalr1.cc  */
-#line 1424 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1470 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new NamespaceDecl( LOC((yyloc)), SYMTAB((yysemantic_stack_[(5) - (3)].sval)), SYMTAB((yysemantic_stack_[(5) - (5)].sval)) );
     }
@@ -3438,7 +3510,7 @@
   case 70:
 
 /* Line 678 of lalr1.cc  */
-#line 1432 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1478 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new DefaultNamespaceDecl(LOC((yyloc)),
                                     ParseConstants::ns_element_default,
@@ -3449,7 +3521,7 @@
   case 71:
 
 /* Line 678 of lalr1.cc  */
-#line 1439 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1485 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new DefaultNamespaceDecl(LOC((yyloc)),
                                     ParseConstants::ns_function_default,
@@ -3460,7 +3532,7 @@
   case 72:
 
 /* Line 678 of lalr1.cc  */
-#line 1449 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1495 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VFO_DeclList *vdl = new VFO_DeclList( LOC((yyloc)));
       vdl->push_back( (yysemantic_stack_[(1) - (1)].node) );
@@ -3471,7 +3543,7 @@
   case 73:
 
 /* Line 678 of lalr1.cc  */
-#line 1456 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1502 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       ((VFO_DeclList*)(yysemantic_stack_[(3) - (1)].node))->push_back( (yysemantic_stack_[(3) - (3)].node) );
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node);
@@ -3481,7 +3553,7 @@
   case 74:
 
 /* Line 678 of lalr1.cc  */
-#line 1463 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1509 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node); (yyval.node) = (yysemantic_stack_[(3) - (3)].node); // to prevent the Bison warning
       (yylocation_stack_[(3) - (1)]).step();
@@ -3493,7 +3565,7 @@
   case 83:
 
 /* Line 678 of lalr1.cc  */
-#line 1486 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1532 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new DecimalFormatNode(LOC((yyloc)), (yysemantic_stack_[(4) - (4)].vstrpair));
       delete (yysemantic_stack_[(4) - (4)].vstrpair);
@@ -3503,7 +3575,7 @@
   case 84:
 
 /* Line 678 of lalr1.cc  */
-#line 1492 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1538 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new DecimalFormatNode(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)), (yysemantic_stack_[(4) - (4)].vstrpair));
       delete (yysemantic_stack_[(4) - (4)].vstrpair);
@@ -3513,7 +3585,7 @@
   case 85:
 
 /* Line 678 of lalr1.cc  */
-#line 1501 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1547 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.vstrpair) = new vector<string_pair_t>();
       (yyval.vstrpair)->push_back( *(yysemantic_stack_[(1) - (1)].strpair) );
@@ -3524,7 +3596,7 @@
   case 86:
 
 /* Line 678 of lalr1.cc  */
-#line 1508 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1554 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yysemantic_stack_[(2) - (1)].vstrpair)->push_back( *(yysemantic_stack_[(2) - (2)].strpair) );
       delete (yysemantic_stack_[(2) - (2)].strpair);
@@ -3535,7 +3607,7 @@
   case 87:
 
 /* Line 678 of lalr1.cc  */
-#line 1518 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1564 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       StringLiteral *sl = static_cast<StringLiteral*>((yysemantic_stack_[(3) - (3)].expr));
       (yyval.strpair) = new string_pair_t( (yysemantic_stack_[(3) - (1)].strval), sl->get_strval().str() );
@@ -3546,77 +3618,77 @@
   case 88:
 
 /* Line 678 of lalr1.cc  */
-#line 1527 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1573 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "decimal-separator"; }
     break;
 
   case 89:
 
 /* Line 678 of lalr1.cc  */
-#line 1528 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1574 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "digit"; }
     break;
 
   case 90:
 
 /* Line 678 of lalr1.cc  */
-#line 1529 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1575 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "grouping-separator"; }
     break;
 
   case 91:
 
 /* Line 678 of lalr1.cc  */
-#line 1530 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1576 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "infinty"; }
     break;
 
   case 92:
 
 /* Line 678 of lalr1.cc  */
-#line 1531 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1577 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "minus-sign"; }
     break;
 
   case 93:
 
 /* Line 678 of lalr1.cc  */
-#line 1532 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1578 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "NaN"; }
     break;
 
   case 94:
 
 /* Line 678 of lalr1.cc  */
-#line 1533 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1579 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "pattern-separator"; }
     break;
 
   case 95:
 
 /* Line 678 of lalr1.cc  */
-#line 1534 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1580 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "percent"; }
     break;
 
   case 96:
 
 /* Line 678 of lalr1.cc  */
-#line 1535 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1581 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "per-mille"; }
     break;
 
   case 97:
 
 /* Line 678 of lalr1.cc  */
-#line 1536 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1582 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     { (yyval.strval) = "zero-digit"; }
     break;
 
   case 98:
 
 /* Line 678 of lalr1.cc  */
-#line 1542 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1588 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new OptionDecl(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)), SYMTAB((yysemantic_stack_[(4) - (4)].sval)));
     }
@@ -3625,7 +3697,7 @@
   case 99:
 
 /* Line 678 of lalr1.cc  */
-#line 1550 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1596 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FTOptionDecl( LOC((yyloc)), dynamic_cast<FTMatchOptions*>((yysemantic_stack_[(3) - (3)].node)) );
     }
@@ -3634,7 +3706,7 @@
   case 100:
 
 /* Line 678 of lalr1.cc  */
-#line 1558 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1604 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(4) - (4)].node);
     }
@@ -3643,7 +3715,7 @@
   case 101:
 
 /* Line 678 of lalr1.cc  */
-#line 1566 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1612 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CtxItemDecl* d = dynamic_cast<CtxItemDecl*>((yysemantic_stack_[(3) - (3)].node));
       d->theType = (yysemantic_stack_[(3) - (2)].node);
@@ -3654,7 +3726,7 @@
   case 102:
 
 /* Line 678 of lalr1.cc  */
-#line 1573 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1619 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
     }
@@ -3663,7 +3735,7 @@
   case 103:
 
 /* Line 678 of lalr1.cc  */
-#line 1581 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1627 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CtxItemDecl* d = dynamic_cast<CtxItemDecl*>((yysemantic_stack_[(1) - (1)].node));
       d->theIsExternal = false;
@@ -3674,7 +3746,7 @@
   case 104:
 
 /* Line 678 of lalr1.cc  */
-#line 1588 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1634 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CtxItemDecl(LOC((yyloc)), NULL);
     }
@@ -3683,7 +3755,7 @@
   case 105:
 
 /* Line 678 of lalr1.cc  */
-#line 1593 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1639 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(2) - (2)].node);
     }
@@ -3692,7 +3764,7 @@
   case 106:
 
 /* Line 678 of lalr1.cc  */
-#line 1601 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1647 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CtxItemDecl(LOC((yyloc)), (yysemantic_stack_[(2) - (2)].expr));
     }
@@ -3701,7 +3773,7 @@
   case 107:
 
 /* Line 678 of lalr1.cc  */
-#line 1609 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1655 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       std::auto_ptr<VarNameAndType> nt(dynamic_cast<VarNameAndType *>((yysemantic_stack_[(4) - (2)].varnametype)));
 
@@ -3720,7 +3792,7 @@
   case 108:
 
 /* Line 678 of lalr1.cc  */
-#line 1624 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1670 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       std::auto_ptr<VarNameAndType> nt(dynamic_cast<VarNameAndType *>((yysemantic_stack_[(3) - (2)].varnametype)));
 
@@ -3739,7 +3811,7 @@
   case 109:
 
 /* Line 678 of lalr1.cc  */
-#line 1639 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1685 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       std::auto_ptr<VarNameAndType> nt(dynamic_cast<VarNameAndType *>((yysemantic_stack_[(5) - (2)].varnametype)));
 
@@ -3758,7 +3830,7 @@
   case 110:
 
 /* Line 678 of lalr1.cc  */
-#line 1657 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1703 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.varnametype) = new VarNameAndType(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)), NULL, NULL);
     }
@@ -3767,7 +3839,7 @@
   case 111:
 
 /* Line 678 of lalr1.cc  */
-#line 1662 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1708 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.varnametype) = new VarNameAndType(LOC((yyloc)),
                               static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)),
@@ -3779,7 +3851,7 @@
   case 112:
 
 /* Line 678 of lalr1.cc  */
-#line 1670 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1716 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.varnametype) = new VarNameAndType(LOC((yyloc)),
                               static_cast<QName*>((yysemantic_stack_[(4) - (4)].expr)),
@@ -3791,7 +3863,7 @@
   case 113:
 
 /* Line 678 of lalr1.cc  */
-#line 1678 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1724 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.varnametype) = new VarNameAndType(LOC((yyloc)),
                               static_cast<QName*>((yysemantic_stack_[(5) - (4)].expr)),
@@ -3803,7 +3875,7 @@
   case 114:
 
 /* Line 678 of lalr1.cc  */
-#line 1689 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1735 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AnnotationListParsenode(LOC((yyloc)), static_cast<AnnotationParsenode*>((yysemantic_stack_[(1) - (1)].node)));
     }
@@ -3812,7 +3884,7 @@
   case 115:
 
 /* Line 678 of lalr1.cc  */
-#line 1694 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1740 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       static_cast<AnnotationListParsenode*>((yysemantic_stack_[(2) - (1)].node))->push_back(static_cast<AnnotationParsenode*>((yysemantic_stack_[(2) - (2)].node)));
       (yyval.node) = (yysemantic_stack_[(2) - (1)].node);
@@ -3822,7 +3894,7 @@
   case 116:
 
 /* Line 678 of lalr1.cc  */
-#line 1703 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1749 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AnnotationParsenode(LOC((yyloc)), new QName(LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval))), NULL);
     }
@@ -3831,7 +3903,7 @@
   case 117:
 
 /* Line 678 of lalr1.cc  */
-#line 1708 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1754 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AnnotationParsenode(LOC((yyloc)),
                                    new QName(LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (1)].sval))),
@@ -3842,7 +3914,7 @@
   case 118:
 
 /* Line 678 of lalr1.cc  */
-#line 1715 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1761 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AnnotationParsenode(LOC((yyloc)), new QName(LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)), true), NULL);
     }
@@ -3851,7 +3923,7 @@
   case 119:
 
 /* Line 678 of lalr1.cc  */
-#line 1720 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1766 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AnnotationParsenode(LOC((yyloc)),
                                    new QName(LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (1)].sval)), true),
@@ -3862,7 +3934,7 @@
   case 120:
 
 /* Line 678 of lalr1.cc  */
-#line 1730 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1776 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AnnotationLiteralListParsenode(LOC((yyloc)), (yysemantic_stack_[(1) - (1)].expr));
     }
@@ -3871,7 +3943,7 @@
   case 121:
 
 /* Line 678 of lalr1.cc  */
-#line 1735 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1781 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       static_cast<AnnotationLiteralListParsenode*>((yysemantic_stack_[(3) - (1)].node))->push_back((yysemantic_stack_[(3) - (3)].expr));
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node);
@@ -3881,7 +3953,7 @@
   case 122:
 
 /* Line 678 of lalr1.cc  */
-#line 1744 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1790 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       static_cast<FunctionDecl*>((yysemantic_stack_[(2) - (2)].node))->setComment( SYMTAB((yysemantic_stack_[(2) - (1)].sval)) );
       (yyval.node) = (yysemantic_stack_[(2) - (2)].node);
@@ -3891,7 +3963,7 @@
   case 123:
 
 /* Line 678 of lalr1.cc  */
-#line 1750 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1796 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       FunctionDecl* fdecl = static_cast<FunctionDecl*>((yysemantic_stack_[(3) - (3)].node));
 
@@ -3905,7 +3977,7 @@
   case 124:
 
 /* Line 678 of lalr1.cc  */
-#line 1763 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1809 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
     }
@@ -3914,7 +3986,7 @@
   case 125:
 
 /* Line 678 of lalr1.cc  */
-#line 1768 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1814 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
     }
@@ -3923,7 +3995,7 @@
   case 126:
 
 /* Line 678 of lalr1.cc  */
-#line 1776 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1822 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FunctionDecl(LOC((yyloc)),
                             static_cast<QName*>((yysemantic_stack_[(4) - (2)].expr)),
@@ -3939,7 +4011,7 @@
   case 127:
 
 /* Line 678 of lalr1.cc  */
-#line 1787 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1833 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FunctionDecl(LOC ((yyloc)),
                             static_cast<QName*>((yysemantic_stack_[(4) - (2)].expr)),
@@ -3955,7 +4027,7 @@
   case 128:
 
 /* Line 678 of lalr1.cc  */
-#line 1802 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1848 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FunctionDecl(LOC ((yyloc)),
                             static_cast<QName*>((yysemantic_stack_[(5) - (3)].expr)),
@@ -3971,7 +4043,7 @@
   case 129:
 
 /* Line 678 of lalr1.cc  */
-#line 1814 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1860 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FunctionDecl(LOC((yyloc)),
                             static_cast<QName*>((yysemantic_stack_[(5) - (3)].expr)),
@@ -3987,7 +4059,7 @@
   case 130:
 
 /* Line 678 of lalr1.cc  */
-#line 1829 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1875 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.fnsig) = new FunctionSig(NULL);
     }
@@ -3996,7 +4068,7 @@
   case 131:
 
 /* Line 678 of lalr1.cc  */
-#line 1834 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1880 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.fnsig) = new FunctionSig(dynamic_cast<ParamList*>((yysemantic_stack_[(3) - (2)].node)));
     }
@@ -4005,7 +4077,7 @@
   case 132:
 
 /* Line 678 of lalr1.cc  */
-#line 1839 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1885 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.fnsig) = new FunctionSig(NULL, dynamic_cast<SequenceType*>((yysemantic_stack_[(4) - (4)].node)));
     }
@@ -4014,7 +4086,7 @@
   case 133:
 
 /* Line 678 of lalr1.cc  */
-#line 1844 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1890 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.fnsig) = new FunctionSig(dynamic_cast<ParamList*>((yysemantic_stack_[(5) - (2)].node)), dynamic_cast<SequenceType*>((yysemantic_stack_[(5) - (5)].node)));
     }
@@ -4023,7 +4095,7 @@
   case 134:
 
 /* Line 678 of lalr1.cc  */
-#line 1852 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1898 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       ParamList *pl = new ParamList( LOC((yyloc)) );
       pl->push_back( dynamic_cast<Param*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -4034,7 +4106,7 @@
   case 135:
 
 /* Line 678 of lalr1.cc  */
-#line 1859 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1905 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       if ( ParamList *pl = dynamic_cast<ParamList*>((yysemantic_stack_[(3) - (1)].node)) )
         pl->push_back( dynamic_cast<Param*>((yysemantic_stack_[(3) - (3)].node)) );
@@ -4046,7 +4118,7 @@
   case 136:
 
 /* Line 678 of lalr1.cc  */
-#line 1870 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1916 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new Param(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(2) - (2)].expr)), NULL);
     }
@@ -4055,7 +4127,7 @@
   case 137:
 
 /* Line 678 of lalr1.cc  */
-#line 1875 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1921 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new Param(LOC((yyloc)),
                      static_cast<QName*>((yysemantic_stack_[(3) - (2)].expr)),
@@ -4066,7 +4138,7 @@
   case 138:
 
 /* Line 678 of lalr1.cc  */
-#line 1885 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1931 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CollectionDecl( LOC((yyloc)),
                               static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)),
@@ -4078,7 +4150,7 @@
   case 139:
 
 /* Line 678 of lalr1.cc  */
-#line 1892 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1938 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CollectionDecl( LOC((yyloc)),
                               static_cast<QName*>((yysemantic_stack_[(5) - (3)].expr)),
@@ -4090,7 +4162,7 @@
   case 140:
 
 /* Line 678 of lalr1.cc  */
-#line 1899 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1945 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CollectionDecl( LOC((yyloc)),
                                static_cast<QName*>((yysemantic_stack_[(4) - (4)].expr)),
@@ -4102,7 +4174,7 @@
   case 141:
 
 /* Line 678 of lalr1.cc  */
-#line 1906 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1952 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CollectionDecl( LOC((yyloc)),
                                static_cast<QName*>((yysemantic_stack_[(6) - (4)].expr)),
@@ -4114,7 +4186,7 @@
   case 142:
 
 /* Line 678 of lalr1.cc  */
-#line 1916 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1962 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = static_cast<parsenode*>(new SequenceType(LOC((yyloc)), (yysemantic_stack_[(1) - (1)].node), NULL));
     }
@@ -4123,7 +4195,7 @@
   case 143:
 
 /* Line 678 of lalr1.cc  */
-#line 1920 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1966 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = static_cast<parsenode*>(new SequenceType(LOC((yyloc)),
                                                     (yysemantic_stack_[(2) - (1)].node),
@@ -4134,7 +4206,7 @@
   case 144:
 
 /* Line 678 of lalr1.cc  */
-#line 1930 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1976 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AST_IndexDecl(LOC((yyloc)),
                              static_cast<QName*>((yysemantic_stack_[(8) - (3)].expr)),
@@ -4147,7 +4219,7 @@
   case 145:
 
 /* Line 678 of lalr1.cc  */
-#line 1938 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1984 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new AST_IndexDecl(LOC((yyloc)),
                              static_cast<QName*>((yysemantic_stack_[(9) - (4)].expr)),
@@ -4160,7 +4232,7 @@
   case 146:
 
 /* Line 678 of lalr1.cc  */
-#line 1949 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 1995 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       IndexKeyList* keyList = new IndexKeyList(LOC((yyloc)));
       keyList->addKeySpec(dynamic_cast<IndexKeySpec*>((yysemantic_stack_[(1) - (1)].node)));
@@ -4171,7 +4243,7 @@
   case 147:
 
 /* Line 678 of lalr1.cc  */
-#line 1955 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2001 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       dynamic_cast<IndexKeyList*>((yysemantic_stack_[(3) - (1)].node))->addKeySpec(dynamic_cast<IndexKeySpec*>((yysemantic_stack_[(3) - (3)].node)));
       (yyval.node) = (yysemantic_stack_[(3) - (1)].node);
@@ -4181,7 +4253,7 @@
   case 148:
 
 /* Line 678 of lalr1.cc  */
-#line 1964 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2010 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new IndexKeySpec(LOC((yyloc)), (yysemantic_stack_[(1) - (1)].expr), NULL, NULL);
     }
@@ -4190,7 +4262,7 @@
   case 149:
 
 /* Line 678 of lalr1.cc  */
-#line 1969 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2015 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new IndexKeySpec(LOC((yyloc)),
                             (yysemantic_stack_[(2) - (1)].expr),
@@ -4202,7 +4274,7 @@
   case 150:
 
 /* Line 678 of lalr1.cc  */
-#line 1976 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2022 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new IndexKeySpec(LOC((yyloc)),
                             (yysemantic_stack_[(2) - (1)].expr),
@@ -4214,7 +4286,7 @@
   case 151:
 
 /* Line 678 of lalr1.cc  */
-#line 1983 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2029 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new IndexKeySpec(LOC((yyloc)),
                             (yysemantic_stack_[(3) - (1)].expr),
@@ -4226,7 +4298,7 @@
   case 152:
 
 /* Line 678 of lalr1.cc  */
-#line 1995 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2041 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ICCollSimpleCheck(LOC((yyloc)),
                                  static_cast<QName*>((yysemantic_stack_[(11) - (4)].expr)),
@@ -4239,7 +4311,7 @@
   case 153:
 
 /* Line 678 of lalr1.cc  */
-#line 2005 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2051 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ICCollUniqueKeyCheck(LOC((yyloc)),
                                     static_cast<QName*>((yysemantic_stack_[(14) - (4)].expr)),
@@ -4252,7 +4324,7 @@
   case 154:
 
 /* Line 678 of lalr1.cc  */
-#line 2015 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2061 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ICCollForeachNode(LOC((yyloc)),
                                  static_cast<QName*>((yysemantic_stack_[(13) - (4)].expr)),
@@ -4265,7 +4337,7 @@
   case 155:
 
 /* Line 678 of lalr1.cc  */
-#line 2026 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2072 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ICForeignKey( LOC((yyloc)),
                             static_cast<QName*>((yysemantic_stack_[(22) - (4)].expr)),
@@ -4281,7 +4353,7 @@
   case 156:
 
 /* Line 678 of lalr1.cc  */
-#line 2042 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2088 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       if ((yysemantic_stack_[(1) - (1)].expr) == NULL)
       {
@@ -4302,7 +4374,7 @@
   case 157:
 
 /* Line 678 of lalr1.cc  */
-#line 2062 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2108 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -4311,7 +4383,7 @@
   case 158:
 
 /* Line 678 of lalr1.cc  */
-#line 2067 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2112 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -4320,7 +4392,7 @@
   case 159:
 
 /* Line 678 of lalr1.cc  */
-#line 2071 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2116 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) =  NULL;
     }
@@ -4329,7 +4401,7 @@
   case 160:
 
 /* Line 678 of lalr1.cc  */
-#line 2079 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2124 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -4338,7 +4410,7 @@
   case 161:
 
 /* Line 678 of lalr1.cc  */
-#line 2084 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2128 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -4347,7 +4419,7 @@
   case 162:
 
 /* Line 678 of lalr1.cc  */
-#line 2088 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2132 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) =  new BlockBody(LOC((yyloc)));
     }
@@ -4356,7 +4428,7 @@
   case 163:
 
 /* Line 678 of lalr1.cc  */
-#line 2096 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2140 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -4365,7 +4437,7 @@
   case 164:
 
 /* Line 678 of lalr1.cc  */
-#line 2101 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2145 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       BlockBody* blk = static_cast<BlockBody*>((yysemantic_stack_[(2) - (1)].expr));
 
@@ -4378,7 +4450,7 @@
   case 165:
 
 /* Line 678 of lalr1.cc  */
-#line 2113 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2157 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       BlockBody* blk = new BlockBody(LOC((yyloc)));
       blk->add((yysemantic_stack_[(1) - (1)].expr));
@@ -4389,7 +4461,7 @@
   case 166:
 
 /* Line 678 of lalr1.cc  */
-#line 2120 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2164 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       BlockBody* blk = static_cast<BlockBody*>((yysemantic_stack_[(2) - (1)].expr));
 
@@ -4402,7 +4474,7 @@
   case 179:
 
 /* Line 678 of lalr1.cc  */
-#line 2149 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2193 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr);
     }
@@ -4411,7 +4483,7 @@
   case 180:
 
 /* Line 678 of lalr1.cc  */
-#line 2154 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2198 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new BlockBody(LOC((yyloc)));
     }
@@ -4420,7 +4492,7 @@
   case 181:
 
 /* Line 678 of lalr1.cc  */
-#line 2162 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2206 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       if (dynamic_cast<BlockBody*>((yysemantic_stack_[(3) - (2)].expr)) == NULL)
       {
@@ -4438,7 +4510,7 @@
   case 182:
 
 /* Line 678 of lalr1.cc  */
-#line 2179 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2223 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr);
     }
@@ -4447,7 +4519,7 @@
   case 183:
 
 /* Line 678 of lalr1.cc  */
-#line 2187 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2231 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(2) - (1)].expr);
     }
@@ -4456,7 +4528,7 @@
   case 184:
 
 /* Line 678 of lalr1.cc  */
-#line 2195 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2239 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDeclStmt* vdecl = static_cast<VarDeclStmt*>((yysemantic_stack_[(3) - (1)].expr));
       vdecl->add((yysemantic_stack_[(3) - (3)].node));
@@ -4467,7 +4539,7 @@
   case 185:
 
 /* Line 678 of lalr1.cc  */
-#line 2202 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2246 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDeclStmt* vdecl = new VarDeclStmt(LOC((yyloc)), NULL);
       vdecl->add((yysemantic_stack_[(2) - (2)].node));
@@ -4478,7 +4550,7 @@
   case 186:
 
 /* Line 678 of lalr1.cc  */
-#line 2209 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2253 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDeclStmt* vdecl = new VarDeclStmt(LOC((yyloc)), static_cast<AnnotationListParsenode*>((yysemantic_stack_[(3) - (1)].node)));
       vdecl->add((yysemantic_stack_[(3) - (3)].node));
@@ -4489,7 +4561,7 @@
   case 187:
 
 /* Line 678 of lalr1.cc  */
-#line 2219 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2263 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDecl* vd = new VarDecl(LOC((yyloc)),
                                 static_cast<QName*>((yysemantic_stack_[(2) - (2)].expr)),
@@ -4506,7 +4578,7 @@
   case 188:
 
 /* Line 678 of lalr1.cc  */
-#line 2231 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2275 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDecl* vd = new VarDecl(LOC((yyloc)),
                                 static_cast<QName*>((yysemantic_stack_[(3) - (2)].expr)),
@@ -4524,7 +4596,7 @@
   case 189:
 
 /* Line 678 of lalr1.cc  */
-#line 2244 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2288 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDecl* vd = new VarDecl(LOC((yyloc)),
                                 static_cast<QName*>((yysemantic_stack_[(4) - (2)].expr)),
@@ -4541,7 +4613,7 @@
   case 190:
 
 /* Line 678 of lalr1.cc  */
-#line 2256 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2300 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarDecl* vd = new VarDecl(LOC((yyloc)),
                                 static_cast<QName*>((yysemantic_stack_[(5) - (2)].expr)),
@@ -4558,7 +4630,7 @@
   case 191:
 
 /* Line 678 of lalr1.cc  */
-#line 2272 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2316 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new AssignExpr(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(5) - (2)].expr)), (yysemantic_stack_[(5) - (4)].expr));
     }
@@ -4567,7 +4639,7 @@
   case 192:
 
 /* Line 678 of lalr1.cc  */
-#line 2280 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2324 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new ApplyExpr(LOC((yyloc)), (yysemantic_stack_[(2) - (1)].expr));
     }
@@ -4576,7 +4648,7 @@
   case 193:
 
 /* Line 678 of lalr1.cc  */
-#line 2288 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2332 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new ExitExpr(LOC((yyloc)), (yysemantic_stack_[(4) - (3)].expr));
     }
@@ -4585,7 +4657,7 @@
   case 194:
 
 /* Line 678 of lalr1.cc  */
-#line 2296 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2340 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       BlockBody* bb = dynamic_cast<BlockBody *>((yysemantic_stack_[(5) - (5)].expr));
       if (bb == NULL)
@@ -4601,7 +4673,7 @@
   case 195:
 
 /* Line 678 of lalr1.cc  */
-#line 2311 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2355 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new FlowCtlStatement(LOC((yyloc)), FlowCtlStatement::BREAK);
     }
@@ -4610,7 +4682,7 @@
   case 196:
 
 /* Line 678 of lalr1.cc  */
-#line 2316 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2360 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new FlowCtlStatement( LOC((yyloc)), FlowCtlStatement::CONTINUE );
     }
@@ -4619,7 +4691,7 @@
   case 197:
 
 /* Line 678 of lalr1.cc  */
-#line 2324 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2368 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       ReturnExpr* re = dynamic_cast<ReturnExpr*>((yysemantic_stack_[(2) - (2)].expr));
       (yyval.expr) = new FLWORExpr(LOC((yyloc)),
@@ -4634,7 +4706,7 @@
   case 198:
 
 /* Line 678 of lalr1.cc  */
-#line 2338 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2382 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       exprnode* retExpr = (yysemantic_stack_[(2) - (2)].expr);
 
@@ -4652,7 +4724,7 @@
   case 199:
 
 /* Line 678 of lalr1.cc  */
-#line 2355 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2399 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       exprnode* thenExpr = (yysemantic_stack_[(8) - (6)].expr);
       exprnode* elseExpr = (yysemantic_stack_[(8) - (8)].expr);
@@ -4678,7 +4750,7 @@
   case 200:
 
 /* Line 678 of lalr1.cc  */
-#line 2380 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2424 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new TryExpr(LOC((yyloc)), (yysemantic_stack_[(3) - (2)].expr), (yysemantic_stack_[(3) - (3)].expr));
     }
@@ -4687,7 +4759,7 @@
   case 201:
 
 /* Line 678 of lalr1.cc  */
-#line 2388 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2432 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CatchListExpr* cle = new CatchListExpr( LOC((yyloc)) );
       cle->push_back( static_cast<CatchExpr*>((yysemantic_stack_[(1) - (1)].expr)) );
@@ -4698,7 +4770,7 @@
   case 202:
 
 /* Line 678 of lalr1.cc  */
-#line 2395 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2439 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CatchListExpr *cle = dynamic_cast<CatchListExpr*>((yysemantic_stack_[(2) - (1)].expr));
       if ( cle )
@@ -4710,7 +4782,7 @@
   case 203:
 
 /* Line 678 of lalr1.cc  */
-#line 2406 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2450 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
        (yyval.expr) = new CatchExpr(LOC((yyloc)), *(yysemantic_stack_[(3) - (2)].name_test_list), (yysemantic_stack_[(3) - (3)].expr));
        delete (yysemantic_stack_[(3) - (2)].name_test_list);
@@ -4720,7 +4792,7 @@
   case 204:
 
 /* Line 678 of lalr1.cc  */
-#line 2416 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2460 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -4729,7 +4801,7 @@
   case 205:
 
 /* Line 678 of lalr1.cc  */
-#line 2421 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2465 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       Expr* expr = dynamic_cast<Expr*>((yysemantic_stack_[(3) - (1)].expr));
       if ( !expr )
@@ -4745,7 +4817,7 @@
   case 219:
 
 /* Line 678 of lalr1.cc  */
-#line 2459 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2503 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       ReturnExpr *re = dynamic_cast<ReturnExpr*>((yysemantic_stack_[(2) - (2)].expr));
       (yyval.expr) = new FLWORExpr(LOC((yyloc)),
@@ -4760,7 +4832,7 @@
   case 220:
 
 /* Line 678 of lalr1.cc  */
-#line 2473 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2517 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new ReturnExpr( LOC((yyloc)), (yysemantic_stack_[(2) - (2)].expr) );
     }
@@ -4769,7 +4841,7 @@
   case 221:
 
 /* Line 678 of lalr1.cc  */
-#line 2481 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2525 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.strval) = parser::the_sliding;
     }
@@ -4778,7 +4850,7 @@
   case 222:
 
 /* Line 678 of lalr1.cc  */
-#line 2486 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2530 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.strval) = parser::the_tumbling;
     }
@@ -4787,7 +4859,7 @@
   case 223:
 
 /* Line 678 of lalr1.cc  */
-#line 2494 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2538 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.strval) = parser::the_start;
     }
@@ -4796,7 +4868,7 @@
   case 224:
 
 /* Line 678 of lalr1.cc  */
-#line 2499 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2543 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.strval) = parser::the_end;
     }
@@ -4805,7 +4877,7 @@
   case 225:
 
 /* Line 678 of lalr1.cc  */
-#line 2504 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2548 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
     (yyval.strval) = parser::the_only_end;
   }
@@ -4814,7 +4886,7 @@
   case 226:
 
 /* Line 678 of lalr1.cc  */
-#line 2512 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2556 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FLWORWinCond(LOC((yyloc)),
                             dynamic_cast<WindowVars*>((yysemantic_stack_[(4) - (2)].node)),
@@ -4827,7 +4899,7 @@
   case 227:
 
 /* Line 678 of lalr1.cc  */
-#line 2521 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2565 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FLWORWinCond(LOC((yyloc)),
                             NULL,
@@ -4840,7 +4912,7 @@
   case 228:
 
 /* Line 678 of lalr1.cc  */
-#line 2533 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2577 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowClause (LOC ((yyloc)),
                              ((yysemantic_stack_[(5) - (2)].strval) == parser::the_tumbling ?
@@ -4855,7 +4927,7 @@
   case 229:
 
 /* Line 678 of lalr1.cc  */
-#line 2543 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2587 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowClause (LOC ((yyloc)),
                              ((yysemantic_stack_[(4) - (2)].strval) == parser::the_tumbling ?
@@ -4869,7 +4941,7 @@
   case 230:
 
 /* Line 678 of lalr1.cc  */
-#line 2556 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2600 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CountClause(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)));
     }
@@ -4878,7 +4950,7 @@
   case 239:
 
 /* Line 678 of lalr1.cc  */
-#line 2580 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2624 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       FLWORClauseList *fcl = new FLWORClauseList( LOC((yyloc)) );
       fcl->push_back( dynamic_cast<FLWORClause*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -4889,7 +4961,7 @@
   case 240:
 
 /* Line 678 of lalr1.cc  */
-#line 2587 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2631 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       FLWORClauseList *fcl = dynamic_cast<FLWORClauseList*>((yysemantic_stack_[(2) - (1)].node));
       fcl->push_back( dynamic_cast<FLWORClause*>((yysemantic_stack_[(2) - (2)].node)) );
@@ -4900,7 +4972,7 @@
   case 241:
 
 /* Line 678 of lalr1.cc  */
-#line 2597 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2641 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new ForClause(LOC((yyloc)), dynamic_cast<VarInDeclList*>((yysemantic_stack_[(3) - (3)].node)));
     }
@@ -4909,7 +4981,7 @@
   case 242:
 
 /* Line 678 of lalr1.cc  */
-#line 2605 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2649 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       VarInDeclList *vdl = new VarInDeclList( LOC((yyloc)) );
       vdl->push_back( dynamic_cast<VarInDecl*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -4920,7 +4992,7 @@
   case 243:
 
 /* Line 678 of lalr1.cc  */
-#line 2612 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2656 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       if ( VarInDeclList *vdl = dynamic_cast<VarInDeclList*>((yysemantic_stack_[(4) - (1)].node)) )
         vdl->push_back( dynamic_cast<VarInDecl*>((yysemantic_stack_[(4) - (4)].node)) );
@@ -4931,7 +5003,7 @@
   case 244:
 
 /* Line 678 of lalr1.cc  */
-#line 2622 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2666 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(3) - (1)].expr)),
@@ -4946,7 +5018,7 @@
   case 245:
 
 /* Line 678 of lalr1.cc  */
-#line 2632 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2676 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(5) - (1)].expr)),
@@ -4961,7 +5033,7 @@
   case 246:
 
 /* Line 678 of lalr1.cc  */
-#line 2642 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2686 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(4) - (1)].expr)),
@@ -4976,7 +5048,7 @@
   case 247:
 
 /* Line 678 of lalr1.cc  */
-#line 2652 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2696 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(6) - (1)].expr)),
@@ -4991,7 +5063,7 @@
   case 248:
 
 /* Line 678 of lalr1.cc  */
-#line 2662 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2706 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(4) - (1)].expr)),
@@ -5006,7 +5078,7 @@
   case 249:
 
 /* Line 678 of lalr1.cc  */
-#line 2672 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2716 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(6) - (1)].expr)),
@@ -5021,7 +5093,7 @@
   case 250:
 
 /* Line 678 of lalr1.cc  */
-#line 2682 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2726 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(5) - (1)].expr)),
@@ -5036,7 +5108,7 @@
   case 251:
 
 /* Line 678 of lalr1.cc  */
-#line 2692 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2736 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(7) - (1)].expr)),
@@ -5051,7 +5123,7 @@
   case 252:
 
 /* Line 678 of lalr1.cc  */
-#line 2703 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2747 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(4) - (1)].expr)),
@@ -5065,7 +5137,7 @@
   case 253:
 
 /* Line 678 of lalr1.cc  */
-#line 2712 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2756 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(5) - (1)].expr)),
@@ -5080,7 +5152,7 @@
   case 254:
 
 /* Line 678 of lalr1.cc  */
-#line 2722 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2766 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC ((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(5) - (1)].expr)),
@@ -5095,7 +5167,7 @@
   case 255:
 
 /* Line 678 of lalr1.cc  */
-#line 2732 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2776 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarInDecl(LOC ((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(6) - (1)].expr)),
@@ -5110,7 +5182,7 @@
   case 256:
 
 /* Line 678 of lalr1.cc  */
-#line 2748 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2792 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new PositionalVar(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)));
     }
@@ -5119,7 +5191,7 @@
   case 257:
 
 /* Line 678 of lalr1.cc  */
-#line 2757 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2801 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new FTScoreVar(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)));
     }
@@ -5128,7 +5200,7 @@
   case 258:
 
 /* Line 678 of lalr1.cc  */
-#line 2766 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2810 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new LetClause( LOC((yyloc)), dynamic_cast<VarGetsDeclList*>((yysemantic_stack_[(2) - (2)].node)) );
         }
@@ -5137,7 +5209,7 @@
   case 259:
 
 /* Line 678 of lalr1.cc  */
-#line 2774 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2818 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             VarGetsDeclList *vgdl = new VarGetsDeclList( LOC((yyloc)) );
             vgdl->push_back( dynamic_cast<VarGetsDecl*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -5148,7 +5220,7 @@
   case 260:
 
 /* Line 678 of lalr1.cc  */
-#line 2780 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2824 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             if( VarGetsDeclList *vgdl = dynamic_cast<VarGetsDeclList*>((yysemantic_stack_[(3) - (1)].node)) )
                 vgdl->push_back( dynamic_cast<VarGetsDecl*>((yysemantic_stack_[(3) - (3)].node)) );
@@ -5159,7 +5231,7 @@
   case 261:
 
 /* Line 678 of lalr1.cc  */
-#line 2792 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2836 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarGetsDecl(LOC ((yyloc)),
                            static_cast<QName*>((yysemantic_stack_[(4) - (2)].expr)),
@@ -5172,7 +5244,7 @@
   case 262:
 
 /* Line 678 of lalr1.cc  */
-#line 2800 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2844 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarGetsDecl(LOC ((yyloc)),
                            static_cast<QName*>((yysemantic_stack_[(5) - (2)].expr)),
@@ -5185,7 +5257,7 @@
   case 263:
 
 /* Line 678 of lalr1.cc  */
-#line 2810 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2854 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarGetsDecl(LOC ((yyloc)),
                            dynamic_cast<FTScoreVar*>((yysemantic_stack_[(3) - (1)].node))->get_var_name(),
@@ -5198,7 +5270,7 @@
   case 264:
 
 /* Line 678 of lalr1.cc  */
-#line 2818 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2862 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new VarGetsDecl(LOC ((yyloc)),
                            static_cast<QName*>((yysemantic_stack_[(6) - (2)].expr)),
@@ -5211,7 +5283,7 @@
   case 265:
 
 /* Line 678 of lalr1.cc  */
-#line 2830 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2874 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVarDecl(LOC ((yyloc)),
                              static_cast<QName*>((yysemantic_stack_[(4) - (2)].expr)),
@@ -5222,7 +5294,7 @@
   case 266:
 
 /* Line 678 of lalr1.cc  */
-#line 2836 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2880 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVarDecl(LOC ((yyloc)),
                              static_cast<QName*>((yysemantic_stack_[(5) - (2)].expr)),
@@ -5234,7 +5306,7 @@
   case 268:
 
 /* Line 678 of lalr1.cc  */
-#line 2849 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2893 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVars(LOC((yyloc)), NULL, static_cast<QName*>((yysemantic_stack_[(2) - (2)].expr)), NULL, NULL);
     }
@@ -5243,7 +5315,7 @@
   case 269:
 
 /* Line 678 of lalr1.cc  */
-#line 2853 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2897 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(3) - (3)].node);
       dynamic_cast<WindowVars *>((yyval.node))->set_curr(static_cast<QName*>((yysemantic_stack_[(3) - (2)].expr)));
@@ -5253,7 +5325,7 @@
   case 270:
 
 /* Line 678 of lalr1.cc  */
-#line 2861 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2905 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVars(LOC((yyloc)), dynamic_cast<PositionalVar*>((yysemantic_stack_[(1) - (1)].node)), NULL, NULL, NULL);
     }
@@ -5262,7 +5334,7 @@
   case 271:
 
 /* Line 678 of lalr1.cc  */
-#line 2865 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2909 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = (yysemantic_stack_[(2) - (2)].node);
       dynamic_cast<WindowVars *>((yyval.node))->set_posvar(dynamic_cast<PositionalVar*>((yysemantic_stack_[(2) - (1)].node)));
@@ -5272,7 +5344,7 @@
   case 273:
 
 /* Line 678 of lalr1.cc  */
-#line 2874 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2918 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVars(LOC((yyloc)), NULL, NULL, static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)), static_cast<QName*>((yysemantic_stack_[(6) - (6)].expr)));
     }
@@ -5281,7 +5353,7 @@
   case 274:
 
 /* Line 678 of lalr1.cc  */
-#line 2878 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2922 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVars(LOC((yyloc)), NULL, NULL, NULL, static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)));
     }
@@ -5290,7 +5362,7 @@
   case 275:
 
 /* Line 678 of lalr1.cc  */
-#line 2882 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2926 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WindowVars(LOC((yyloc)), NULL, NULL, static_cast<QName*>((yysemantic_stack_[(3) - (3)].expr)), NULL);
     }
@@ -5299,7 +5371,7 @@
   case 276:
 
 /* Line 678 of lalr1.cc  */
-#line 2892 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2936 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new WhereClause(LOC ((yyloc)), (yysemantic_stack_[(2) - (2)].expr));
     }
@@ -5308,7 +5380,7 @@
   case 277:
 
 /* Line 678 of lalr1.cc  */
-#line 2900 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2944 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new GroupByClause(LOC((yyloc)), dynamic_cast<GroupSpecList*>((yysemantic_stack_[(3) - (3)].node)));
     }
@@ -5317,7 +5389,7 @@
   case 278:
 
 /* Line 678 of lalr1.cc  */
-#line 2907 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2951 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             GroupSpecList *gsl = new GroupSpecList( LOC((yyloc)) );
             gsl->push_back( dynamic_cast<GroupSpec*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -5328,7 +5400,7 @@
   case 279:
 
 /* Line 678 of lalr1.cc  */
-#line 2913 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2957 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             GroupSpecList *gsl = dynamic_cast<GroupSpecList*>((yysemantic_stack_[(3) - (1)].node));
             if ( gsl )
@@ -5340,7 +5412,7 @@
   case 280:
 
 /* Line 678 of lalr1.cc  */
-#line 2924 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2968 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new GroupSpec(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(2) - (2)].expr)), NULL);
     }
@@ -5349,7 +5421,7 @@
   case 281:
 
 /* Line 678 of lalr1.cc  */
-#line 2928 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2972 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new GroupSpec(LOC((yyloc)),
                          static_cast<QName*>((yysemantic_stack_[(3) - (2)].expr)),
@@ -5360,7 +5432,7 @@
   case 282:
 
 /* Line 678 of lalr1.cc  */
-#line 2937 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2981 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new GroupCollationSpec( LOC((yyloc)), SYMTAB((yysemantic_stack_[(2) - (2)].sval)) );
         }
@@ -5369,7 +5441,7 @@
   case 283:
 
 /* Line 678 of lalr1.cc  */
-#line 2945 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2989 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderByClause(
                 LOC((yyloc)), dynamic_cast<OrderSpecList*>((yysemantic_stack_[(3) - (3)].node))
@@ -5380,7 +5452,7 @@
   case 284:
 
 /* Line 678 of lalr1.cc  */
-#line 2951 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 2995 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderByClause(
                 LOC((yyloc)), dynamic_cast<OrderSpecList*>((yysemantic_stack_[(4) - (4)].node)), true
@@ -5391,7 +5463,7 @@
   case 285:
 
 /* Line 678 of lalr1.cc  */
-#line 2961 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3005 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             OrderSpecList *osl = new OrderSpecList( LOC((yyloc)) );
             osl->push_back( dynamic_cast<OrderSpec*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -5402,7 +5474,7 @@
   case 286:
 
 /* Line 678 of lalr1.cc  */
-#line 2967 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3011 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             if ( OrderSpecList* osl = dynamic_cast<OrderSpecList*>((yysemantic_stack_[(3) - (1)].node)) )
                 osl->push_back( dynamic_cast<OrderSpec*>((yysemantic_stack_[(3) - (3)].node)) );
@@ -5413,7 +5485,7 @@
   case 287:
 
 /* Line 678 of lalr1.cc  */
-#line 2977 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3021 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderSpec( LOC((yyloc)), (yysemantic_stack_[(1) - (1)].expr), NULL );
         }
@@ -5422,7 +5494,7 @@
   case 288:
 
 /* Line 678 of lalr1.cc  */
-#line 2981 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3025 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderSpec(
                 LOC((yyloc)), (yysemantic_stack_[(2) - (1)].expr), dynamic_cast<OrderModifierPN*>((yysemantic_stack_[(2) - (2)].node))
@@ -5433,7 +5505,7 @@
   case 289:
 
 /* Line 678 of lalr1.cc  */
-#line 2991 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3035 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)), dynamic_cast<OrderDirSpec*>((yysemantic_stack_[(1) - (1)].node)), NULL, NULL
@@ -5444,7 +5516,7 @@
   case 290:
 
 /* Line 678 of lalr1.cc  */
-#line 2997 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3041 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)), NULL, dynamic_cast<OrderEmptySpec*>((yysemantic_stack_[(1) - (1)].node)), NULL
@@ -5455,7 +5527,7 @@
   case 291:
 
 /* Line 678 of lalr1.cc  */
-#line 3003 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3047 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)), NULL, NULL, dynamic_cast<OrderCollationSpec*>((yysemantic_stack_[(1) - (1)].node))
@@ -5466,7 +5538,7 @@
   case 292:
 
 /* Line 678 of lalr1.cc  */
-#line 3009 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3053 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)),
@@ -5480,7 +5552,7 @@
   case 293:
 
 /* Line 678 of lalr1.cc  */
-#line 3018 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3062 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)),
@@ -5494,7 +5566,7 @@
   case 294:
 
 /* Line 678 of lalr1.cc  */
-#line 3027 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3071 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)),
@@ -5508,7 +5580,7 @@
   case 295:
 
 /* Line 678 of lalr1.cc  */
-#line 3036 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3080 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderModifierPN(
                 LOC((yyloc)),
@@ -5522,7 +5594,7 @@
   case 296:
 
 /* Line 678 of lalr1.cc  */
-#line 3049 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3093 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderDirSpec( LOC((yyloc)), ParseConstants::dir_ascending );
         }
@@ -5531,7 +5603,7 @@
   case 297:
 
 /* Line 678 of lalr1.cc  */
-#line 3053 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3097 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderDirSpec( LOC((yyloc)), ParseConstants::dir_descending );
         }
@@ -5540,7 +5612,7 @@
   case 298:
 
 /* Line 678 of lalr1.cc  */
-#line 3061 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3105 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderEmptySpec(
                 LOC((yyloc)), StaticContextConsts::empty_greatest
@@ -5551,7 +5623,7 @@
   case 299:
 
 /* Line 678 of lalr1.cc  */
-#line 3067 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3111 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderEmptySpec(
                 LOC((yyloc)), StaticContextConsts::empty_least
@@ -5562,7 +5634,7 @@
   case 300:
 
 /* Line 678 of lalr1.cc  */
-#line 3077 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3121 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OrderCollationSpec( LOC((yyloc)), SYMTAB((yysemantic_stack_[(2) - (2)].sval)) );
         }
@@ -5571,7 +5643,7 @@
   case 301:
 
 /* Line 678 of lalr1.cc  */
-#line 3085 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3129 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new QuantifiedExpr(
                 LOC((yyloc)),
@@ -5585,7 +5657,7 @@
   case 302:
 
 /* Line 678 of lalr1.cc  */
-#line 3094 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3138 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new QuantifiedExpr(
                 LOC((yyloc)),
@@ -5599,7 +5671,7 @@
   case 303:
 
 /* Line 678 of lalr1.cc  */
-#line 3107 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3151 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       QVarInDeclList *qvidl = new QVarInDeclList( LOC((yyloc)) );
       qvidl->push_back( dynamic_cast<QVarInDecl*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -5611,7 +5683,7 @@
   case 304:
 
 /* Line 678 of lalr1.cc  */
-#line 3114 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3158 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       QVarInDeclList *qvidl = dynamic_cast<QVarInDeclList*>((yysemantic_stack_[(4) - (1)].node));
       qvidl->push_back( dynamic_cast<QVarInDecl*>((yysemantic_stack_[(4) - (4)].node)) );
@@ -5622,7 +5694,7 @@
   case 305:
 
 /* Line 678 of lalr1.cc  */
-#line 3126 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3170 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new QVarInDecl(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (1)].expr)), (yysemantic_stack_[(3) - (3)].expr));
     }
@@ -5631,7 +5703,7 @@
   case 306:
 
 /* Line 678 of lalr1.cc  */
-#line 3130 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3174 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new QVarInDecl(LOC((yyloc)),
                           static_cast<QName*>((yysemantic_stack_[(4) - (1)].expr)),
@@ -5643,7 +5715,7 @@
   case 307:
 
 /* Line 678 of lalr1.cc  */
-#line 3142 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3186 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new SwitchExpr(LOC((yyloc)), (yysemantic_stack_[(8) - (3)].expr), static_cast<SwitchCaseClauseList*>((yysemantic_stack_[(8) - (5)].node)), (yysemantic_stack_[(8) - (8)].expr));
     }
@@ -5652,7 +5724,7 @@
   case 308:
 
 /* Line 678 of lalr1.cc  */
-#line 3149 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3193 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SwitchCaseClauseList* scc_list_p = new SwitchCaseClauseList(LOC((yyloc)));
       scc_list_p->push_back(static_cast<SwitchCaseClause*>((yysemantic_stack_[(1) - (1)].node)));
@@ -5663,7 +5735,7 @@
   case 309:
 
 /* Line 678 of lalr1.cc  */
-#line 3155 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3199 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SwitchCaseClauseList* scc_list_p = static_cast<SwitchCaseClauseList*>((yysemantic_stack_[(2) - (1)].node));
       scc_list_p->push_back(static_cast<SwitchCaseClause*>((yysemantic_stack_[(2) - (2)].node)));
@@ -5674,7 +5746,7 @@
   case 310:
 
 /* Line 678 of lalr1.cc  */
-#line 3164 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3208 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SwitchCaseClause(LOC((yyloc)), dynamic_cast<SwitchCaseOperandList*>((yysemantic_stack_[(3) - (1)].node)), (yysemantic_stack_[(3) - (3)].expr));
     }
@@ -5683,7 +5755,7 @@
   case 311:
 
 /* Line 678 of lalr1.cc  */
-#line 3171 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3215 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SwitchCaseOperandList* sco_list_p = new SwitchCaseOperandList(LOC((yyloc)));
       sco_list_p->push_back((yysemantic_stack_[(2) - (2)].expr));
@@ -5694,7 +5766,7 @@
   case 312:
 
 /* Line 678 of lalr1.cc  */
-#line 3177 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3221 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SwitchCaseOperandList* sco_list_p = static_cast<SwitchCaseOperandList*>((yysemantic_stack_[(3) - (1)].node));
       sco_list_p->push_back((yysemantic_stack_[(3) - (3)].expr));
@@ -5705,7 +5777,7 @@
   case 313:
 
 /* Line 678 of lalr1.cc  */
-#line 3188 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3232 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new SwitchExpr(LOC((yyloc)), (yysemantic_stack_[(8) - (3)].expr), static_cast<SwitchCaseClauseList*>((yysemantic_stack_[(8) - (5)].node)), (yysemantic_stack_[(8) - (8)].expr));
     }
@@ -5714,7 +5786,7 @@
   case 314:
 
 /* Line 678 of lalr1.cc  */
-#line 3195 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3239 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SwitchCaseClauseList* scc_list_p = new SwitchCaseClauseList(LOC((yyloc)));
       scc_list_p->push_back(static_cast<SwitchCaseClause*>((yysemantic_stack_[(1) - (1)].node)));
@@ -5725,7 +5797,7 @@
   case 315:
 
 /* Line 678 of lalr1.cc  */
-#line 3201 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3245 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       SwitchCaseClauseList* scc_list_p = static_cast<SwitchCaseClauseList*>((yysemantic_stack_[(2) - (1)].node));
       scc_list_p->push_back(static_cast<SwitchCaseClause*>((yysemantic_stack_[(2) - (2)].node)));
@@ -5736,7 +5808,7 @@
   case 316:
 
 /* Line 678 of lalr1.cc  */
-#line 3210 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3254 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new SwitchCaseClause(LOC((yyloc)), dynamic_cast<SwitchCaseOperandList*>((yysemantic_stack_[(3) - (1)].node)), (yysemantic_stack_[(3) - (3)].expr));
     }
@@ -5745,7 +5817,7 @@
   case 317:
 
 /* Line 678 of lalr1.cc  */
-#line 3219 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3263 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new TypeswitchExpr(LOC((yyloc)),
                               (yysemantic_stack_[(8) - (3)].expr),
@@ -5757,7 +5829,7 @@
   case 318:
 
 /* Line 678 of lalr1.cc  */
-#line 3226 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3270 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new TypeswitchExpr(LOC ((yyloc)),
                               (yysemantic_stack_[(10) - (3)].expr),
@@ -5770,7 +5842,7 @@
   case 319:
 
 /* Line 678 of lalr1.cc  */
-#line 3237 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3281 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new TypeswitchExpr(LOC((yyloc)),
                               (yysemantic_stack_[(8) - (3)].expr),
@@ -5782,7 +5854,7 @@
   case 320:
 
 /* Line 678 of lalr1.cc  */
-#line 3244 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3288 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new TypeswitchExpr(LOC ((yyloc)),
                               (yysemantic_stack_[(10) - (3)].expr),
@@ -5795,7 +5867,7 @@
   case 321:
 
 /* Line 678 of lalr1.cc  */
-#line 3256 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3300 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CaseClauseList* cc_list_p = new CaseClauseList(LOC ((yyloc)));
       cc_list_p->push_back(dynamic_cast<CaseClause*>((yysemantic_stack_[(1) - (1)].node)));
@@ -5806,7 +5878,7 @@
   case 322:
 
 /* Line 678 of lalr1.cc  */
-#line 3262 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3306 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CaseClauseList* cc_list_p = dynamic_cast<CaseClauseList*>((yysemantic_stack_[(2) - (1)].node));
       cc_list_p->push_back(dynamic_cast<CaseClause*>((yysemantic_stack_[(2) - (2)].node)));
@@ -5817,7 +5889,7 @@
   case 323:
 
 /* Line 678 of lalr1.cc  */
-#line 3274 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3318 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CaseClause(LOC ((yyloc)),
                           dynamic_cast<SequenceType*>((yysemantic_stack_[(4) - (2)].node)),
@@ -5828,7 +5900,7 @@
   case 324:
 
 /* Line 678 of lalr1.cc  */
-#line 3280 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3324 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CaseClause(LOC ((yyloc)),
                           static_cast<QName*>((yysemantic_stack_[(7) - (3)].expr)),
@@ -5840,7 +5912,7 @@
   case 325:
 
 /* Line 678 of lalr1.cc  */
-#line 3291 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3335 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CaseClauseList* cc_list_p = new CaseClauseList(LOC ((yyloc)));
       cc_list_p->push_back(dynamic_cast<CaseClause*>((yysemantic_stack_[(1) - (1)].node)));
@@ -5851,7 +5923,7 @@
   case 326:
 
 /* Line 678 of lalr1.cc  */
-#line 3297 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3341 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       CaseClauseList* cc_list_p = dynamic_cast<CaseClauseList*>((yysemantic_stack_[(2) - (1)].node));
       cc_list_p->push_back(dynamic_cast<CaseClause*>((yysemantic_stack_[(2) - (2)].node)));
@@ -5862,7 +5934,7 @@
   case 327:
 
 /* Line 678 of lalr1.cc  */
-#line 3308 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3352 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CaseClause(LOC ((yyloc)),
                           dynamic_cast<SequenceType*>((yysemantic_stack_[(4) - (2)].node)),
@@ -5873,7 +5945,7 @@
   case 328:
 
 /* Line 678 of lalr1.cc  */
-#line 3314 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3358 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new CaseClause(LOC ((yyloc)),
                           static_cast<QName*>((yysemantic_stack_[(7) - (3)].expr)),
@@ -5885,7 +5957,7 @@
   case 329:
 
 /* Line 678 of lalr1.cc  */
-#line 3325 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3369 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new IfExpr(LOC ((yyloc)), (yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (6)].expr), (yysemantic_stack_[(8) - (8)].expr));
     }
@@ -5894,7 +5966,7 @@
   case 330:
 
 /* Line 678 of lalr1.cc  */
-#line 3334 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3378 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -5903,7 +5975,7 @@
   case 331:
 
 /* Line 678 of lalr1.cc  */
-#line 3338 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3382 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new OrExpr( LOC((yyloc)), (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
     }
@@ -5912,7 +5984,7 @@
   case 332:
 
 /* Line 678 of lalr1.cc  */
-#line 3347 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3391 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -5921,7 +5993,7 @@
   case 333:
 
 /* Line 678 of lalr1.cc  */
-#line 3351 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3395 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AndExpr( LOC((yyloc)), (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
         }
@@ -5930,7 +6002,7 @@
   case 334:
 
 /* Line 678 of lalr1.cc  */
-#line 3359 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3403 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -5939,7 +6011,7 @@
   case 335:
 
 /* Line 678 of lalr1.cc  */
-#line 3363 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3407 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             /*  ::=  "eq" | "ne" | "lt" | "le" | "gt" | "ge" */
             (yyval.expr) = new ComparisonExpr(
@@ -5954,7 +6026,7 @@
   case 336:
 
 /* Line 678 of lalr1.cc  */
-#line 3373 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3417 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             /*  ::=  "is" | "<<" | ">>" */
             (yyval.expr) = new ComparisonExpr(
@@ -5966,7 +6038,7 @@
   case 337:
 
 /* Line 678 of lalr1.cc  */
-#line 3380 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3424 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ComparisonExpr(
                 LOC((yyloc)),
@@ -5980,7 +6052,7 @@
   case 338:
 
 /* Line 678 of lalr1.cc  */
-#line 3389 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3433 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ComparisonExpr(
                 LOC((yyloc)),
@@ -5994,7 +6066,7 @@
   case 339:
 
 /* Line 678 of lalr1.cc  */
-#line 3398 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3442 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             /* this call is needed */
             driver.lexer->interpretAsLessThan();
@@ -6004,7 +6076,7 @@
   case 340:
 
 /* Line 678 of lalr1.cc  */
-#line 3403 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3447 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ComparisonExpr(
                 LOC((yyloc)),
@@ -6018,7 +6090,7 @@
   case 341:
 
 /* Line 678 of lalr1.cc  */
-#line 3412 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3456 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ComparisonExpr(
                 LOC((yyloc)),
@@ -6032,7 +6104,7 @@
   case 342:
 
 /* Line 678 of lalr1.cc  */
-#line 3421 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3465 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ComparisonExpr(
                 LOC((yyloc)),
@@ -6046,7 +6118,7 @@
   case 343:
 
 /* Line 678 of lalr1.cc  */
-#line 3430 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3474 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ComparisonExpr(
                 LOC((yyloc)),
@@ -6060,7 +6132,7 @@
   case 344:
 
 /* Line 678 of lalr1.cc  */
-#line 3443 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3487 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6069,7 +6141,7 @@
   case 345:
 
 /* Line 678 of lalr1.cc  */
-#line 3447 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3491 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new FTContainsExpr(
                 LOC((yyloc)),
@@ -6083,7 +6155,7 @@
   case 346:
 
 /* Line 678 of lalr1.cc  */
-#line 3459 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3503 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = NULL;
         }
@@ -6092,7 +6164,7 @@
   case 347:
 
 /* Line 678 of lalr1.cc  */
-#line 3463 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3507 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -6101,7 +6173,7 @@
   case 348:
 
 /* Line 678 of lalr1.cc  */
-#line 3470 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3514 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6110,7 +6182,7 @@
   case 349:
 
 /* Line 678 of lalr1.cc  */
-#line 3474 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3518 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new RangeExpr( LOC((yyloc)), (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
         }
@@ -6119,7 +6191,7 @@
   case 350:
 
 /* Line 678 of lalr1.cc  */
-#line 3483 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3526 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6128,7 +6200,7 @@
   case 351:
 
 /* Line 678 of lalr1.cc  */
-#line 3487 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3530 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AdditiveExpr( LOC((yyloc)), ParseConstants::op_plus, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
         }
@@ -6137,7 +6209,7 @@
   case 352:
 
 /* Line 678 of lalr1.cc  */
-#line 3491 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3534 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AdditiveExpr( LOC((yyloc)), ParseConstants::op_minus, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
         }
@@ -6146,7 +6218,7 @@
   case 353:
 
 /* Line 678 of lalr1.cc  */
-#line 3500 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3542 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6155,7 +6227,7 @@
   case 354:
 
 /* Line 678 of lalr1.cc  */
-#line 3504 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3546 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new MultiplicativeExpr(
                 LOC((yyloc)), ParseConstants::op_mul, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)
@@ -6166,7 +6238,7 @@
   case 355:
 
 /* Line 678 of lalr1.cc  */
-#line 3510 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3552 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new MultiplicativeExpr(
                 LOC((yyloc)), ParseConstants::op_div, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)
@@ -6177,7 +6249,7 @@
   case 356:
 
 /* Line 678 of lalr1.cc  */
-#line 3516 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3558 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new MultiplicativeExpr(
                 LOC((yyloc)), ParseConstants::op_idiv, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)
@@ -6188,7 +6260,7 @@
   case 357:
 
 /* Line 678 of lalr1.cc  */
-#line 3522 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3564 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new MultiplicativeExpr(
                 LOC((yyloc)), ParseConstants::op_mod, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)
@@ -6199,7 +6271,7 @@
   case 358:
 
 /* Line 678 of lalr1.cc  */
-#line 3533 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3574 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6208,7 +6280,7 @@
   case 359:
 
 /* Line 678 of lalr1.cc  */
-#line 3537 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3578 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new UnionExpr( LOC((yyloc)), (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
         }
@@ -6217,7 +6289,7 @@
   case 360:
 
 /* Line 678 of lalr1.cc  */
-#line 3541 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3582 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new UnionExpr( LOC((yyloc)), (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr) );
         }
@@ -6226,7 +6298,7 @@
   case 361:
 
 /* Line 678 of lalr1.cc  */
-#line 3549 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3590 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6235,7 +6307,7 @@
   case 362:
 
 /* Line 678 of lalr1.cc  */
-#line 3553 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3594 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new IntersectExceptExpr(
                 LOC((yyloc)), ParseConstants::op_intersect, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)
@@ -6246,7 +6318,7 @@
   case 363:
 
 /* Line 678 of lalr1.cc  */
-#line 3559 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3600 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new IntersectExceptExpr(
                 LOC((yyloc)), ParseConstants::op_except, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr)
@@ -6257,7 +6329,7 @@
   case 364:
 
 /* Line 678 of lalr1.cc  */
-#line 3569 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3610 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6266,7 +6338,7 @@
   case 365:
 
 /* Line 678 of lalr1.cc  */
-#line 3573 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3614 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new InstanceofExpr(
                 LOC((yyloc)), (yysemantic_stack_[(4) - (1)].expr), dynamic_cast<SequenceType*>((yysemantic_stack_[(4) - (4)].node))
@@ -6277,7 +6349,7 @@
   case 366:
 
 /* Line 678 of lalr1.cc  */
-#line 3583 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3624 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6286,7 +6358,7 @@
   case 367:
 
 /* Line 678 of lalr1.cc  */
-#line 3587 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3628 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new TreatExpr(
                 LOC((yyloc)), (yysemantic_stack_[(4) - (1)].expr), dynamic_cast<SequenceType*>((yysemantic_stack_[(4) - (4)].node))
@@ -6297,7 +6369,7 @@
   case 368:
 
 /* Line 678 of lalr1.cc  */
-#line 3597 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3638 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6306,7 +6378,7 @@
   case 369:
 
 /* Line 678 of lalr1.cc  */
-#line 3601 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3642 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CastableExpr(
                 LOC((yyloc)), (yysemantic_stack_[(4) - (1)].expr), dynamic_cast<SingleType*>((yysemantic_stack_[(4) - (4)].node))
@@ -6317,7 +6389,7 @@
   case 370:
 
 /* Line 678 of lalr1.cc  */
-#line 3611 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3652 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6326,7 +6398,7 @@
   case 371:
 
 /* Line 678 of lalr1.cc  */
-#line 3615 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3656 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CastExpr(
                 LOC((yyloc)), (yysemantic_stack_[(4) - (1)].expr), dynamic_cast<SingleType*>((yysemantic_stack_[(4) - (4)].node))
@@ -6337,7 +6409,7 @@
   case 372:
 
 /* Line 678 of lalr1.cc  */
-#line 3625 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3666 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6346,7 +6418,7 @@
   case 373:
 
 /* Line 678 of lalr1.cc  */
-#line 3629 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3670 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new UnaryExpr( LOC((yyloc)), dynamic_cast<SignList*>((yysemantic_stack_[(2) - (1)].node)), (yysemantic_stack_[(2) - (2)].expr) );
         }
@@ -6355,7 +6427,7 @@
   case 374:
 
 /* Line 678 of lalr1.cc  */
-#line 3637 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3678 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SignList( LOC((yyloc)), true );
         }
@@ -6364,7 +6436,7 @@
   case 375:
 
 /* Line 678 of lalr1.cc  */
-#line 3641 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3682 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SignList( LOC((yyloc)), false );
         }
@@ -6373,7 +6445,7 @@
   case 376:
 
 /* Line 678 of lalr1.cc  */
-#line 3645 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3686 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(2) - (1)].node);
         }
@@ -6382,7 +6454,7 @@
   case 377:
 
 /* Line 678 of lalr1.cc  */
-#line 3649 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3690 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             if ( SignList *sl = dynamic_cast<SignList*>((yysemantic_stack_[(2) - (1)].node)) )
                 sl->negate();
@@ -6393,7 +6465,7 @@
   case 378:
 
 /* Line 678 of lalr1.cc  */
-#line 3659 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3700 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6402,7 +6474,7 @@
   case 379:
 
 /* Line 678 of lalr1.cc  */
-#line 3663 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3704 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6411,7 +6483,7 @@
   case 380:
 
 /* Line 678 of lalr1.cc  */
-#line 3667 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3708 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -6420,7 +6492,7 @@
   case 381:
 
 /* Line 678 of lalr1.cc  */
-#line 3675 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3716 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ValueComp( LOC((yyloc)), ParseConstants::op_val_eq );
         }
@@ -6429,7 +6501,7 @@
   case 382:
 
 /* Line 678 of lalr1.cc  */
-#line 3679 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3720 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ValueComp( LOC((yyloc)), ParseConstants::op_val_ne );
         }
@@ -6438,7 +6510,7 @@
   case 383:
 
 /* Line 678 of lalr1.cc  */
-#line 3683 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3724 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ValueComp( LOC((yyloc)), ParseConstants::op_val_lt );
         }
@@ -6447,7 +6519,7 @@
   case 384:
 
 /* Line 678 of lalr1.cc  */
-#line 3687 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3728 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ValueComp( LOC((yyloc)), ParseConstants::op_val_le );
         }
@@ -6456,7 +6528,7 @@
   case 385:
 
 /* Line 678 of lalr1.cc  */
-#line 3691 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3732 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ValueComp( LOC((yyloc)), ParseConstants::op_val_gt );
         }
@@ -6465,7 +6537,7 @@
   case 386:
 
 /* Line 678 of lalr1.cc  */
-#line 3695 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3736 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ValueComp( LOC((yyloc)), ParseConstants::op_val_ge );
         }
@@ -6474,7 +6546,7 @@
   case 387:
 
 /* Line 678 of lalr1.cc  */
-#line 3703 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3744 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new NodeComp( LOC((yyloc)), ParseConstants::op_is );
         }
@@ -6483,7 +6555,7 @@
   case 388:
 
 /* Line 678 of lalr1.cc  */
-#line 3707 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3748 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new NodeComp( LOC((yyloc)), ParseConstants::op_precedes );
         }
@@ -6492,7 +6564,7 @@
   case 389:
 
 /* Line 678 of lalr1.cc  */
-#line 3711 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3752 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new NodeComp( LOC((yyloc)), ParseConstants::op_follows );
         }
@@ -6501,7 +6573,7 @@
   case 390:
 
 /* Line 678 of lalr1.cc  */
-#line 3719 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3760 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ValidateExpr( LOC((yyloc)), "strict", (yysemantic_stack_[(4) - (3)].expr) );
         }
@@ -6510,7 +6582,7 @@
   case 391:
 
 /* Line 678 of lalr1.cc  */
-#line 3723 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3764 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ValidateExpr( LOC((yyloc)), "lax", (yysemantic_stack_[(5) - (4)].expr) );
         }
@@ -6519,7 +6591,7 @@
   case 392:
 
 /* Line 678 of lalr1.cc  */
-#line 3727 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3768 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ValidateExpr( LOC((yyloc)), "strict", (yysemantic_stack_[(5) - (4)].expr) );
         }
@@ -6528,7 +6600,7 @@
   case 393:
 
 /* Line 678 of lalr1.cc  */
-#line 3731 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3772 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ValidateExpr(
                 LOC((yyloc)), dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (3)].node))->get_name(), (yysemantic_stack_[(6) - (5)].expr)
@@ -6540,7 +6612,7 @@
   case 394:
 
 /* Line 678 of lalr1.cc  */
-#line 3742 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3783 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ExtensionExpr(
                 LOC((yyloc)), dynamic_cast<PragmaList*>((yysemantic_stack_[(3) - (1)].node)), NULL
@@ -6551,7 +6623,7 @@
   case 395:
 
 /* Line 678 of lalr1.cc  */
-#line 3748 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3789 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ExtensionExpr(
                 LOC((yyloc)), dynamic_cast<PragmaList*>((yysemantic_stack_[(4) - (1)].node)), (yysemantic_stack_[(4) - (3)].expr)
@@ -6562,7 +6634,7 @@
   case 396:
 
 /* Line 678 of lalr1.cc  */
-#line 3758 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3799 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             PragmaList *pl = new PragmaList( LOC((yyloc)) );
             pl->push_back( dynamic_cast<Pragma*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -6573,7 +6645,7 @@
   case 397:
 
 /* Line 678 of lalr1.cc  */
-#line 3764 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3805 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             if ( PragmaList *pl = dynamic_cast<PragmaList*>((yysemantic_stack_[(2) - (1)].node)) )
                 pl->push_back( dynamic_cast<Pragma*>((yysemantic_stack_[(2) - (2)].node)) );
@@ -6584,7 +6656,7 @@
   case 398:
 
 /* Line 678 of lalr1.cc  */
-#line 3774 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3815 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new Pragma( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (2)].expr)), SYMTAB((yysemantic_stack_[(3) - (3)].sval)) );
         }
@@ -6593,7 +6665,7 @@
   case 399:
 
 /* Line 678 of lalr1.cc  */
-#line 3778 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3819 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new Pragma( LOC((yyloc)), new QName( LOC((yyloc)), SYMTAB((yysemantic_stack_[(2) - (2)].sval)) ), "" );
         }
@@ -6602,7 +6674,7 @@
   case 400:
 
 /* Line 678 of lalr1.cc  */
-#line 3782 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3823 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new Pragma( LOC((yyloc)), new QName( LOC((yyloc)), SYMTAB((yysemantic_stack_[(2) - (2)].sval)), true ), "" );
         }
@@ -6611,7 +6683,7 @@
   case 401:
 
 /* Line 678 of lalr1.cc  */
-#line 3820 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3861 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new PathExpr(LOC((yyloc)), ParseConstants::path_leading_lone_slash, NULL);
     }
@@ -6620,7 +6692,7 @@
   case 402:
 
 /* Line 678 of lalr1.cc  */
-#line 3824 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3865 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       RelativePathExpr* rpe;
 
@@ -6635,7 +6707,7 @@
   case 403:
 
 /* Line 678 of lalr1.cc  */
-#line 3834 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3875 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       RelativePathExpr* rpe;
 
@@ -6650,7 +6722,7 @@
   case 404:
 
 /* Line 678 of lalr1.cc  */
-#line 3844 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3885 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       RelativePathExpr* rpe = dynamic_cast<RelativePathExpr*>((yysemantic_stack_[(1) - (1)].expr));
       (yyval.expr) = (!rpe ?
@@ -6662,7 +6734,7 @@
   case 405:
 
 /* Line 678 of lalr1.cc  */
-#line 3857 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3898 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = NULL;
     }
@@ -6671,7 +6743,7 @@
   case 406:
 
 /* Line 678 of lalr1.cc  */
-#line 3866 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3907 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       AxisStep* as = dynamic_cast<AxisStep*>((yysemantic_stack_[(1) - (1)].expr));
       (yyval.expr) = (as ?
@@ -6686,7 +6758,7 @@
   case 407:
 
 /* Line 678 of lalr1.cc  */
-#line 3876 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3917 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new RelativePathExpr(LOC((yyloc)), ParseConstants::st_slash, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
     }
@@ -6695,7 +6767,7 @@
   case 408:
 
 /* Line 678 of lalr1.cc  */
-#line 3880 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3921 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new RelativePathExpr(LOC((yyloc)), ParseConstants::st_slashslash, (yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
     }
@@ -6704,7 +6776,7 @@
   case 409:
 
 /* Line 678 of lalr1.cc  */
-#line 3889 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3930 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -6713,7 +6785,7 @@
   case 410:
 
 /* Line 678 of lalr1.cc  */
-#line 3893 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3934 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -6722,7 +6794,7 @@
   case 411:
 
 /* Line 678 of lalr1.cc  */
-#line 3902 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3943 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AxisStep(
                 LOC((yyloc)), dynamic_cast<ForwardStep*>((yysemantic_stack_[(1) - (1)].node)), NULL
@@ -6733,7 +6805,7 @@
   case 412:
 
 /* Line 678 of lalr1.cc  */
-#line 3908 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3949 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AxisStep(
                 LOC((yyloc)),
@@ -6746,7 +6818,7 @@
   case 413:
 
 /* Line 678 of lalr1.cc  */
-#line 3916 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3957 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AxisStep(
                 LOC((yyloc)), dynamic_cast<ReverseStep*>((yysemantic_stack_[(1) - (1)].node)), NULL
@@ -6757,7 +6829,7 @@
   case 414:
 
 /* Line 678 of lalr1.cc  */
-#line 3922 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3963 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new AxisStep(
                 LOC((yyloc)),
@@ -6770,7 +6842,7 @@
   case 415:
 
 /* Line 678 of lalr1.cc  */
-#line 3934 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3975 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardStep(
                 LOC((yyloc)), dynamic_cast<ForwardAxis*>((yysemantic_stack_[(2) - (1)].node)), (yysemantic_stack_[(2) - (2)].node)
@@ -6781,7 +6853,7 @@
   case 416:
 
 /* Line 678 of lalr1.cc  */
-#line 3940 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3981 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardStep(
                 LOC((yyloc)), dynamic_cast<AbbrevForwardStep*>((yysemantic_stack_[(1) - (1)].node))
@@ -6792,7 +6864,7 @@
   case 417:
 
 /* Line 678 of lalr1.cc  */
-#line 3950 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3991 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis( LOC((yyloc)), ParseConstants::axis_child );
         }
@@ -6801,7 +6873,7 @@
   case 418:
 
 /* Line 678 of lalr1.cc  */
-#line 3954 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3995 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis( LOC((yyloc)), ParseConstants::axis_descendant);
         }
@@ -6810,7 +6882,7 @@
   case 419:
 
 /* Line 678 of lalr1.cc  */
-#line 3958 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 3999 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis( LOC((yyloc)), ParseConstants::axis_attribute );
         }
@@ -6819,7 +6891,7 @@
   case 420:
 
 /* Line 678 of lalr1.cc  */
-#line 3962 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4003 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis( LOC((yyloc)), ParseConstants::axis_self );
         }
@@ -6828,7 +6900,7 @@
   case 421:
 
 /* Line 678 of lalr1.cc  */
-#line 3966 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4007 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis(
                 LOC((yyloc)), ParseConstants::axis_descendant_or_self
@@ -6839,7 +6911,7 @@
   case 422:
 
 /* Line 678 of lalr1.cc  */
-#line 3972 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4013 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis(
                 LOC((yyloc)), ParseConstants::axis_following_sibling
@@ -6850,7 +6922,7 @@
   case 423:
 
 /* Line 678 of lalr1.cc  */
-#line 3978 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4019 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ForwardAxis( LOC((yyloc)), ParseConstants::axis_following );
         }
@@ -6859,7 +6931,7 @@
   case 424:
 
 /* Line 678 of lalr1.cc  */
-#line 3986 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4027 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AbbrevForwardStep( LOC((yyloc)), (yysemantic_stack_[(1) - (1)].node), false );
         }
@@ -6868,7 +6940,7 @@
   case 425:
 
 /* Line 678 of lalr1.cc  */
-#line 3990 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4031 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AbbrevForwardStep( LOC((yyloc)), (yysemantic_stack_[(2) - (2)].node), true );
         }
@@ -6877,7 +6949,7 @@
   case 426:
 
 /* Line 678 of lalr1.cc  */
-#line 3998 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4039 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ReverseStep( LOC((yyloc)), dynamic_cast<ReverseAxis*>((yysemantic_stack_[(2) - (1)].node)), (yysemantic_stack_[(2) - (2)].node) );
         }
@@ -6886,7 +6958,7 @@
   case 427:
 
 /* Line 678 of lalr1.cc  */
-#line 4002 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4043 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             ReverseAxis *ra = new ReverseAxis(
                 LOC((yyloc)), ParseConstants::axis_parent
@@ -6898,7 +6970,7 @@
   case 428:
 
 /* Line 678 of lalr1.cc  */
-#line 4013 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4054 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ReverseAxis( LOC((yyloc)), ParseConstants::axis_parent );
         }
@@ -6907,7 +6979,7 @@
   case 429:
 
 /* Line 678 of lalr1.cc  */
-#line 4017 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4058 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ReverseAxis( LOC((yyloc)), ParseConstants::axis_ancestor );
         }
@@ -6916,7 +6988,7 @@
   case 430:
 
 /* Line 678 of lalr1.cc  */
-#line 4021 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4062 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ReverseAxis(
                 LOC((yyloc)), ParseConstants::axis_preceding_sibling
@@ -6927,7 +6999,7 @@
   case 431:
 
 /* Line 678 of lalr1.cc  */
-#line 4027 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4068 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ReverseAxis( LOC((yyloc)), ParseConstants::axis_preceding );
         }
@@ -6936,7 +7008,7 @@
   case 432:
 
 /* Line 678 of lalr1.cc  */
-#line 4031 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4072 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ReverseAxis(
                 LOC((yyloc)), ParseConstants::axis_ancestor_or_self
@@ -6947,7 +7019,7 @@
   case 433:
 
 /* Line 678 of lalr1.cc  */
-#line 4045 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4086 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -6956,7 +7028,7 @@
   case 434:
 
 /* Line 678 of lalr1.cc  */
-#line 4049 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4090 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -6965,7 +7037,7 @@
   case 435:
 
 /* Line 678 of lalr1.cc  */
-#line 4057 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4098 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new NameTest( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(1) - (1)].expr)) );
         }
@@ -6974,7 +7046,7 @@
   case 436:
 
 /* Line 678 of lalr1.cc  */
-#line 4061 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4102 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new NameTest( LOC((yyloc)), dynamic_cast<Wildcard*>((yysemantic_stack_[(1) - (1)].node)) );
         }
@@ -6983,7 +7055,7 @@
   case 437:
 
 /* Line 678 of lalr1.cc  */
-#line 4071 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4112 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new Wildcard(LOC((yyloc)), "", "", ParseConstants::wild_all, false);
     }
@@ -6992,7 +7064,7 @@
   case 438:
 
 /* Line 678 of lalr1.cc  */
-#line 4075 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4116 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new Wildcard(LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)), "", ParseConstants::wild_elem, false);
     }
@@ -7001,7 +7073,7 @@
   case 439:
 
 /* Line 678 of lalr1.cc  */
-#line 4079 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4120 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new Wildcard(LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)), "", ParseConstants::wild_elem, true);
     }
@@ -7010,7 +7082,7 @@
   case 440:
 
 /* Line 678 of lalr1.cc  */
-#line 4083 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4124 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.node) = new Wildcard(LOC((yyloc)), "", SYMTAB((yysemantic_stack_[(1) - (1)].sval)), ParseConstants::wild_prefix, false);
     }
@@ -7019,7 +7091,7 @@
   case 441:
 
 /* Line 678 of lalr1.cc  */
-#line 4092 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4133 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
        (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
      }
@@ -7028,7 +7100,7 @@
   case 442:
 
 /* Line 678 of lalr1.cc  */
-#line 4096 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4137 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
        (yyval.expr) = new FilterExpr(LOC((yyloc)), (yysemantic_stack_[(2) - (1)].expr), dynamic_cast<PredicateList*>((yysemantic_stack_[(2) - (2)].node)));
      }
@@ -7037,7 +7109,7 @@
   case 443:
 
 /* Line 678 of lalr1.cc  */
-#line 4100 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4141 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
        (yyval.expr) = new DynamicFunctionInvocation(LOC ((yyloc)), (yysemantic_stack_[(3) - (1)].expr));
      }
@@ -7046,7 +7118,7 @@
   case 444:
 
 /* Line 678 of lalr1.cc  */
-#line 4104 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4145 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
        (yyval.expr) = new DynamicFunctionInvocation(LOC ((yyloc)), (yysemantic_stack_[(4) - (1)].expr), dynamic_cast<ArgList*>((yysemantic_stack_[(4) - (3)].node)));
      }
@@ -7055,7 +7127,7 @@
   case 445:
 
 /* Line 678 of lalr1.cc  */
-#line 4112 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4153 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             PredicateList *pl = new PredicateList( LOC((yyloc)) );
             pl->push_back( dynamic_cast<exprnode*>((yysemantic_stack_[(1) - (1)].expr)) );
@@ -7066,7 +7138,7 @@
   case 446:
 
 /* Line 678 of lalr1.cc  */
-#line 4118 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4159 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             if ( PredicateList *pl = dynamic_cast<PredicateList*>((yysemantic_stack_[(2) - (1)].node)) )
                 pl->push_back( dynamic_cast<exprnode*>((yysemantic_stack_[(2) - (2)].expr)) );
@@ -7077,7 +7149,7 @@
   case 447:
 
 /* Line 678 of lalr1.cc  */
-#line 4128 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4169 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(3) - (2)].expr);
         }
@@ -7086,7 +7158,7 @@
   case 448:
 
 /* Line 678 of lalr1.cc  */
-#line 4136 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4177 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7095,7 +7167,7 @@
   case 449:
 
 /* Line 678 of lalr1.cc  */
-#line 4140 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4181 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7104,7 +7176,7 @@
   case 450:
 
 /* Line 678 of lalr1.cc  */
-#line 4144 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4185 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7113,7 +7185,7 @@
   case 451:
 
 /* Line 678 of lalr1.cc  */
-#line 4148 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4189 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7122,7 +7194,7 @@
   case 452:
 
 /* Line 678 of lalr1.cc  */
-#line 4152 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4193 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7131,7 +7203,7 @@
   case 453:
 
 /* Line 678 of lalr1.cc  */
-#line 4156 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4197 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7140,7 +7212,7 @@
   case 454:
 
 /* Line 678 of lalr1.cc  */
-#line 4160 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4201 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7149,7 +7221,7 @@
   case 455:
 
 /* Line 678 of lalr1.cc  */
-#line 4164 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4205 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7158,7 +7230,7 @@
   case 456:
 
 /* Line 678 of lalr1.cc  */
-#line 4168 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4209 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7167,7 +7239,7 @@
   case 457:
 
 /* Line 678 of lalr1.cc  */
-#line 4178 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4213 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7176,16 +7248,16 @@
   case 458:
 
 /* Line 678 of lalr1.cc  */
-#line 4186 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4217 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
+          (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
     break;
 
   case 459:
 
 /* Line 678 of lalr1.cc  */
-#line 4190 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4225 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7194,7 +7266,16 @@
   case 460:
 
 /* Line 678 of lalr1.cc  */
-#line 4198 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4229 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
+        }
+    break;
+
+  case 461:
+
+/* Line 678 of lalr1.cc  */
+#line 4237 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = NumericLiteral::new_literal(
                 LOC((yyloc)), ParseConstants::num_decimal, *(yysemantic_stack_[(1) - (1)].decval)
@@ -7203,10 +7284,10 @@
         }
     break;
 
-  case 461:
+  case 462:
 
 /* Line 678 of lalr1.cc  */
-#line 4205 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4244 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = NumericLiteral::new_literal(
                 LOC((yyloc)), ParseConstants::num_integer, *(yysemantic_stack_[(1) - (1)].ival)
@@ -7215,10 +7296,10 @@
         }
     break;
 
-  case 462:
+  case 463:
 
 /* Line 678 of lalr1.cc  */
-#line 4212 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4251 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = NumericLiteral::new_literal(
                 LOC((yyloc)), ParseConstants::num_double, *(yysemantic_stack_[(1) - (1)].dval)
@@ -7227,73 +7308,73 @@
         }
     break;
 
-  case 463:
+  case 464:
 
 /* Line 678 of lalr1.cc  */
-#line 4223 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4262 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new VarRef(LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(2) - (2)].expr)));
         }
     break;
 
-  case 464:
+  case 465:
 
 /* Line 678 of lalr1.cc  */
-#line 4231 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4270 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ParenthesizedExpr( LOC((yyloc)), NULL);
         }
     break;
 
-  case 465:
+  case 466:
 
 /* Line 678 of lalr1.cc  */
-#line 4235 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4274 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ParenthesizedExpr( LOC((yyloc)), (yysemantic_stack_[(3) - (2)].expr) );
         }
     break;
 
-  case 466:
+  case 467:
 
 /* Line 678 of lalr1.cc  */
-#line 4243 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4282 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new ContextItemExpr( LOC((yyloc)) );
         }
     break;
 
-  case 467:
+  case 468:
 
 /* Line 678 of lalr1.cc  */
-#line 4251 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4290 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new OrderedExpr( LOC((yyloc)), (yysemantic_stack_[(4) - (3)].expr) );
         }
     break;
 
-  case 468:
+  case 469:
 
 /* Line 678 of lalr1.cc  */
-#line 4259 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4298 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new UnorderedExpr( LOC((yyloc)), (yysemantic_stack_[(4) - (3)].expr) );
         }
     break;
 
-  case 469:
+  case 470:
 
 /* Line 678 of lalr1.cc  */
-#line 4313 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4352 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new FunctionCall( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(3) - (1)].expr)), NULL );
         }
     break;
 
-  case 470:
+  case 471:
 
 /* Line 678 of lalr1.cc  */
-#line 4317 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4356 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new FunctionCall(
                 LOC((yyloc)),
@@ -7303,10 +7384,10 @@
         }
     break;
 
-  case 471:
+  case 472:
 
 /* Line 678 of lalr1.cc  */
-#line 4330 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4369 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             ArgList *al = new ArgList( LOC((yyloc)) );
             al->push_back( (yysemantic_stack_[(1) - (1)].expr) );
@@ -7314,10 +7395,10 @@
         }
     break;
 
-  case 472:
+  case 473:
 
 /* Line 678 of lalr1.cc  */
-#line 4336 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4375 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             if ( ArgList *al = dynamic_cast<ArgList*>((yysemantic_stack_[(3) - (1)].node)) )
                 al->push_back( (yysemantic_stack_[(3) - (3)].expr) );
@@ -7325,19 +7406,10 @@
         }
     break;
 
-  case 473:
-
-/* Line 678 of lalr1.cc  */
-#line 4346 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
-        }
-    break;
-
   case 474:
 
 /* Line 678 of lalr1.cc  */
-#line 4350 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4385 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7346,7 +7418,7 @@
   case 475:
 
 /* Line 678 of lalr1.cc  */
-#line 4358 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4389 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7355,7 +7427,7 @@
   case 476:
 
 /* Line 678 of lalr1.cc  */
-#line 4362 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4397 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7364,7 +7436,7 @@
   case 477:
 
 /* Line 678 of lalr1.cc  */
-#line 4366 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4401 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
         }
@@ -7373,7 +7445,16 @@
   case 478:
 
 /* Line 678 of lalr1.cc  */
-#line 4374 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4405 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
+        }
+    break;
+
+  case 479:
+
+/* Line 678 of lalr1.cc  */
+#line 4413 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemConstructor(
                 LOC((yyloc)),
@@ -7385,10 +7466,10 @@
         }
     break;
 
-  case 479:
+  case 480:
 
 /* Line 678 of lalr1.cc  */
-#line 4384 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4423 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemConstructor(
                 LOC((yyloc)),
@@ -7400,10 +7481,10 @@
         }
     break;
 
-  case 480:
+  case 481:
 
 /* Line 678 of lalr1.cc  */
-#line 4394 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4433 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemConstructor(
                 LOC((yyloc)),
@@ -7415,10 +7496,10 @@
         }
     break;
 
-  case 481:
+  case 482:
 
 /* Line 678 of lalr1.cc  */
-#line 4404 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4443 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemConstructor(
                 LOC((yyloc)),
@@ -7430,10 +7511,10 @@
         }
     break;
 
-  case 482:
+  case 483:
 
 /* Line 678 of lalr1.cc  */
-#line 4414 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4453 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemConstructor(
                 LOC((yyloc)),
@@ -7445,10 +7526,10 @@
         }
     break;
 
-  case 483:
+  case 484:
 
 /* Line 678 of lalr1.cc  */
-#line 4424 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4463 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemConstructor(
                 LOC((yyloc)),
@@ -7460,10 +7541,10 @@
         }
     break;
 
-  case 484:
+  case 485:
 
 /* Line 678 of lalr1.cc  */
-#line 4439 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4478 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             DirElemContentList *decl = new DirElemContentList( LOC((yyloc)) );
             decl->push_back( dynamic_cast<DirElemContent*>((yysemantic_stack_[(1) - (1)].expr)) );
@@ -7471,10 +7552,10 @@
         }
     break;
 
-  case 485:
+  case 486:
 
 /* Line 678 of lalr1.cc  */
-#line 4445 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4484 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             DirElemContentList *decl = dynamic_cast<DirElemContentList*>((yysemantic_stack_[(2) - (1)].node));
             if ( decl )
@@ -7483,10 +7564,10 @@
         }
     break;
 
-  case 486:
+  case 487:
 
 /* Line 678 of lalr1.cc  */
-#line 4456 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4495 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             DirAttributeList *dal = new DirAttributeList( LOC((yyloc)) );
             dal->push_back( dynamic_cast<DirAttr*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -7494,10 +7575,10 @@
         }
     break;
 
-  case 487:
+  case 488:
 
 /* Line 678 of lalr1.cc  */
-#line 4462 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4501 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             DirAttributeList *dal = dynamic_cast<DirAttributeList*>((yysemantic_stack_[(2) - (1)].node));
             if ( dal )
@@ -7506,10 +7587,10 @@
         }
     break;
 
-  case 488:
+  case 489:
 
 /* Line 678 of lalr1.cc  */
-#line 4473 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4512 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new DirAttr(
                 LOC((yyloc)),
@@ -7519,48 +7600,48 @@
         }
     break;
 
-  case 491:
+  case 492:
 
 /* Line 678 of lalr1.cc  */
-#line 4490 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4529 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new DirAttributeValue( LOC((yyloc)),
                                 dynamic_cast<QuoteAttrContentList*>((yysemantic_stack_[(3) - (2)].node)));
         }
     break;
 
-  case 492:
+  case 493:
 
 /* Line 678 of lalr1.cc  */
-#line 4495 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4534 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new DirAttributeValue( LOC((yyloc)),
                                 dynamic_cast<AposAttrContentList*>((yysemantic_stack_[(3) - (2)].node)));
         }
     break;
 
-  case 493:
+  case 494:
 
 /* Line 678 of lalr1.cc  */
-#line 4504 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4543 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new QuoteAttrContentList( LOC((yyloc)) );
         }
     break;
 
-  case 494:
-
-/* Line 678 of lalr1.cc  */
-#line 4508 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
-        }
-    break;
-
   case 495:
 
 /* Line 678 of lalr1.cc  */
-#line 4515 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4547 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 496:
+
+/* Line 678 of lalr1.cc  */
+#line 4554 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             QuoteAttrContentList *qacl = new QuoteAttrContentList( LOC((yyloc)) );
             qacl->push_back( new QuoteAttrValueContent( LOC((yyloc)), "\"" ) );
@@ -7568,10 +7649,10 @@
         }
     break;
 
-  case 496:
+  case 497:
 
 /* Line 678 of lalr1.cc  */
-#line 4521 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4560 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             QuoteAttrContentList *qacl = new QuoteAttrContentList( LOC((yyloc)) );
             qacl->push_back( dynamic_cast<QuoteAttrValueContent*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -7579,10 +7660,10 @@
         }
     break;
 
-  case 497:
+  case 498:
 
 /* Line 678 of lalr1.cc  */
-#line 4527 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4566 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             QuoteAttrContentList *qacl =
                 dynamic_cast<QuoteAttrContentList*>((yysemantic_stack_[(2) - (1)].node));
@@ -7592,10 +7673,10 @@
         }
     break;
 
-  case 498:
+  case 499:
 
 /* Line 678 of lalr1.cc  */
-#line 4535 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4574 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             QuoteAttrContentList *qacl =
                 dynamic_cast<QuoteAttrContentList*>((yysemantic_stack_[(2) - (1)].node));
@@ -7605,28 +7686,28 @@
         }
     break;
 
-  case 499:
+  case 500:
 
 /* Line 678 of lalr1.cc  */
-#line 4547 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4586 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AposAttrContentList( LOC((yyloc)) );
         }
     break;
 
-  case 500:
-
-/* Line 678 of lalr1.cc  */
-#line 4551 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
-        }
-    break;
-
   case 501:
 
 /* Line 678 of lalr1.cc  */
-#line 4558 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4590 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 502:
+
+/* Line 678 of lalr1.cc  */
+#line 4597 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             AposAttrContentList *aacl = new AposAttrContentList( LOC((yyloc)) );
             aacl->push_back( new AposAttrValueContent( LOC((yyloc)),"'") );
@@ -7634,10 +7715,10 @@
         }
     break;
 
-  case 502:
+  case 503:
 
 /* Line 678 of lalr1.cc  */
-#line 4564 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4603 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             AposAttrContentList *aacl = new AposAttrContentList( LOC((yyloc)) );
             aacl->push_back( dynamic_cast<AposAttrValueContent*>((yysemantic_stack_[(1) - (1)].node)) );
@@ -7645,10 +7726,10 @@
         }
     break;
 
-  case 503:
+  case 504:
 
 /* Line 678 of lalr1.cc  */
-#line 4570 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4609 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             AposAttrContentList *aacl = dynamic_cast<AposAttrContentList*>((yysemantic_stack_[(2) - (1)].node));
             if (aacl)
@@ -7657,10 +7738,10 @@
         }
     break;
 
-  case 504:
+  case 505:
 
 /* Line 678 of lalr1.cc  */
-#line 4577 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4616 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             AposAttrContentList *aacl = dynamic_cast<AposAttrContentList*>((yysemantic_stack_[(2) - (1)].node));
             if ( aacl )
@@ -7669,19 +7750,19 @@
         }
     break;
 
-  case 505:
+  case 506:
 
 /* Line 678 of lalr1.cc  */
-#line 4588 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4627 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new QuoteAttrValueContent( LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)) );
         }
     break;
 
-  case 506:
+  case 507:
 
 /* Line 678 of lalr1.cc  */
-#line 4592 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4631 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new QuoteAttrValueContent(
                 LOC((yyloc)), dynamic_cast<CommonContent*>((yysemantic_stack_[(1) - (1)].expr))
@@ -7689,19 +7770,19 @@
         }
     break;
 
-  case 507:
+  case 508:
 
 /* Line 678 of lalr1.cc  */
-#line 4602 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4641 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AposAttrValueContent( LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)) );
         }
     break;
 
-  case 508:
+  case 509:
 
 /* Line 678 of lalr1.cc  */
-#line 4606 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4645 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AposAttrValueContent(
                 LOC((yyloc)), dynamic_cast<CommonContent*>((yysemantic_stack_[(1) - (1)].expr))
@@ -7709,48 +7790,48 @@
         }
     break;
 
-  case 509:
+  case 510:
 
 /* Line 678 of lalr1.cc  */
-#line 4616 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4655 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemContent( LOC((yyloc)), (yysemantic_stack_[(1) - (1)].expr) );
         }
     break;
 
-  case 510:
+  case 511:
 
 /* Line 678 of lalr1.cc  */
-#line 4620 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4659 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new DirElemContent( LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)) );
         }
     break;
 
-  case 511:
+  case 512:
 
 /* Line 678 of lalr1.cc  */
-#line 4624 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4663 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             rchandle<CDataSection> cdata_h = dynamic_cast<CDataSection*>((yysemantic_stack_[(1) - (1)].expr));
             (yyval.expr) = new DirElemContent( LOC((yyloc)), cdata_h );
         }
     break;
 
-  case 512:
+  case 513:
 
 /* Line 678 of lalr1.cc  */
-#line 4629 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4668 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             rchandle<CommonContent> cont_h = dynamic_cast<CommonContent*>((yysemantic_stack_[(1) - (1)].expr));
             (yyval.expr) = new DirElemContent( LOC((yyloc)), cont_h );
         }
     break;
 
-  case 513:
+  case 514:
 
 /* Line 678 of lalr1.cc  */
-#line 4638 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4677 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CommonContent(
                 LOC((yyloc)), ParseConstants::cont_charref, SYMTAB((yysemantic_stack_[(1) - (1)].sval))
@@ -7758,10 +7839,10 @@
         }
     break;
 
-  case 514:
+  case 515:
 
 /* Line 678 of lalr1.cc  */
-#line 4644 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4683 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CommonContent(
                 LOC((yyloc)), ParseConstants::cont_escape_lbrace
@@ -7769,10 +7850,10 @@
         }
     break;
 
-  case 515:
+  case 516:
 
 /* Line 678 of lalr1.cc  */
-#line 4650 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4689 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CommonContent(
                 LOC((yyloc)), ParseConstants::cont_escape_rbrace
@@ -7780,73 +7861,64 @@
         }
     break;
 
-  case 516:
+  case 517:
 
 /* Line 678 of lalr1.cc  */
-#line 4656 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4695 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CommonContent(LOC((yyloc)), new EnclosedExpr(LOC((yyloc)), (yysemantic_stack_[(3) - (2)].expr)));
         }
     break;
 
-  case 517:
+  case 518:
 
 /* Line 678 of lalr1.cc  */
-#line 4664 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4703 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new DirCommentConstructor( LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (2)].sval)) );
     }
     break;
 
-  case 518:
+  case 519:
 
 /* Line 678 of lalr1.cc  */
-#line 4669 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4708 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new DirCommentConstructor( LOC((yyloc)), "" );
     }
     break;
 
-  case 519:
+  case 520:
 
 /* Line 678 of lalr1.cc  */
-#line 4677 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4716 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new DirPIConstructor( LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (2)].sval)) );
     }
     break;
 
-  case 520:
+  case 521:
 
 /* Line 678 of lalr1.cc  */
-#line 4682 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4721 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new DirPIConstructor( LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (2)].sval)), SYMTAB((yysemantic_stack_[(3) - (3)].sval)) );
     }
     break;
 
-  case 521:
+  case 522:
 
 /* Line 678 of lalr1.cc  */
-#line 4690 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4729 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = new CDataSection( LOC((yyloc)),SYMTAB((yysemantic_stack_[(2) - (2)].sval)) );
     }
     break;
 
-  case 522:
-
-/* Line 678 of lalr1.cc  */
-#line 4698 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-      (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
-    }
-    break;
-
   case 523:
 
 /* Line 678 of lalr1.cc  */
-#line 4703 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4737 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -7855,7 +7927,7 @@
   case 524:
 
 /* Line 678 of lalr1.cc  */
-#line 4708 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4742 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -7864,7 +7936,7 @@
   case 525:
 
 /* Line 678 of lalr1.cc  */
-#line 4713 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4747 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -7873,7 +7945,7 @@
   case 526:
 
 /* Line 678 of lalr1.cc  */
-#line 4718 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4752 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -7882,7 +7954,7 @@
   case 527:
 
 /* Line 678 of lalr1.cc  */
-#line 4723 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4757 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
       (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
     }
@@ -7891,88 +7963,97 @@
   case 528:
 
 /* Line 678 of lalr1.cc  */
-#line 4732 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4762 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+      (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
+    }
+    break;
+
+  case 529:
+
+/* Line 678 of lalr1.cc  */
+#line 4771 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompDocConstructor( LOC((yyloc)), (yysemantic_stack_[(4) - (3)].expr) );
         }
     break;
 
-  case 529:
+  case 530:
 
 /* Line 678 of lalr1.cc  */
-#line 4740 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4779 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompElemConstructor(LOC((yyloc)), new QName(LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (1)].sval))), (yysemantic_stack_[(3) - (2)].expr));
         }
     break;
 
-  case 530:
+  case 531:
 
 /* Line 678 of lalr1.cc  */
-#line 4744 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4783 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompElemConstructor( LOC((yyloc)), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].expr) );
         }
     break;
 
-  case 531:
+  case 532:
 
 /* Line 678 of lalr1.cc  */
-#line 4761 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4800 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           (yyval.expr) = new CompAttrConstructor( LOC((yyloc)), new QName(LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (1)].sval))), (yysemantic_stack_[(3) - (2)].expr) );
         }
     break;
 
-  case 532:
+  case 533:
 
 /* Line 678 of lalr1.cc  */
-#line 4765 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4804 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompAttrConstructor( LOC((yyloc)), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].expr) );
         }
     break;
 
-  case 533:
+  case 534:
 
 /* Line 678 of lalr1.cc  */
-#line 4773 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4812 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompTextConstructor( LOC((yyloc)), (yysemantic_stack_[(4) - (3)].expr) );
         }
     break;
 
-  case 534:
+  case 535:
 
 /* Line 678 of lalr1.cc  */
-#line 4781 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4820 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompCommentConstructor( LOC((yyloc)), (yysemantic_stack_[(4) - (3)].expr) );
         }
     break;
 
-  case 535:
+  case 536:
 
 /* Line 678 of lalr1.cc  */
-#line 4789 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4828 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompPIConstructor( LOC((yyloc)), SYMTAB((yysemantic_stack_[(3) - (1)].sval)), (yysemantic_stack_[(3) - (2)].expr) );
         }
     break;
 
-  case 536:
+  case 537:
 
 /* Line 678 of lalr1.cc  */
-#line 4793 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4832 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.expr) = new CompPIConstructor( LOC((yyloc)), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].expr) );
         }
     break;
 
-  case 537:
+  case 538:
 
 /* Line 678 of lalr1.cc  */
-#line 4801 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4840 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SingleType(
                 LOC((yyloc)), dynamic_cast<AtomicType*>((yysemantic_stack_[(1) - (1)].node)), false
@@ -7980,10 +8061,10 @@
         }
     break;
 
-  case 538:
+  case 539:
 
 /* Line 678 of lalr1.cc  */
-#line 4807 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4846 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SingleType(
                 LOC((yyloc)), dynamic_cast<AtomicType*>((yysemantic_stack_[(2) - (1)].node)), true
@@ -7991,46 +8072,46 @@
         }
     break;
 
-  case 539:
+  case 540:
 
 /* Line 678 of lalr1.cc  */
-#line 4817 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4856 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(2) - (2)].node);
         }
     break;
 
-  case 540:
+  case 541:
 
 /* Line 678 of lalr1.cc  */
-#line 4825 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4864 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SequenceType( LOC((yyloc)), (yysemantic_stack_[(1) - (1)].node), NULL );
         }
     break;
 
-  case 541:
+  case 542:
 
 /* Line 678 of lalr1.cc  */
-#line 4829 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4868 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SequenceType(LOC((yyloc)), (yysemantic_stack_[(2) - (1)].node), dynamic_cast<OccurrenceIndicator*>((yysemantic_stack_[(2) - (2)].node)));
         }
     break;
 
-  case 542:
+  case 543:
 
 /* Line 678 of lalr1.cc  */
-#line 4833 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4872 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new SequenceType( LOC((yyloc)), NULL, NULL );
         }
     break;
 
-  case 543:
+  case 544:
 
 /* Line 678 of lalr1.cc  */
-#line 4868 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4907 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OccurrenceIndicator(
                 LOC((yyloc)), ParseConstants::occurs_optionally
@@ -8038,10 +8119,10 @@
         }
     break;
 
-  case 544:
+  case 545:
 
 /* Line 678 of lalr1.cc  */
-#line 4874 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4913 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OccurrenceIndicator(
                 LOC((yyloc)), ParseConstants::occurs_zero_or_more
@@ -8049,10 +8130,10 @@
         }
     break;
 
-  case 545:
+  case 546:
 
 /* Line 678 of lalr1.cc  */
-#line 4880 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4919 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new OccurrenceIndicator(
                 LOC((yyloc)), ParseConstants::occurs_one_or_more
@@ -8060,19 +8141,10 @@
         }
     break;
 
-  case 546:
-
-/* Line 678 of lalr1.cc  */
-#line 4890 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
-        }
-    break;
-
   case 547:
 
 /* Line 678 of lalr1.cc  */
-#line 4894 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4929 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8081,25 +8153,25 @@
   case 548:
 
 /* Line 678 of lalr1.cc  */
-#line 4898 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4933 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 549:
+
+/* Line 678 of lalr1.cc  */
+#line 4937 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ItemType( LOC((yyloc)),true );
         }
     break;
 
-  case 549:
-
-/* Line 678 of lalr1.cc  */
-#line 4902 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
-        }
-    break;
-
   case 550:
 
 /* Line 678 of lalr1.cc  */
-#line 4906 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4941 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8108,7 +8180,25 @@
   case 551:
 
 /* Line 678 of lalr1.cc  */
-#line 4913 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4945 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 552:
+
+/* Line 678 of lalr1.cc  */
+#line 4949 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 553:
+
+/* Line 678 of lalr1.cc  */
+#line 4956 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           TypeList* aTypeList = new TypeList(LOC ((yyloc)));
           aTypeList->push_back(dynamic_cast<SequenceType *>((yysemantic_stack_[(1) - (1)].node)));
@@ -8116,10 +8206,10 @@
         }
     break;
 
-  case 552:
+  case 554:
 
 /* Line 678 of lalr1.cc  */
-#line 4919 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4962 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
           TypeList* aTypeList = dynamic_cast<TypeList *>((yysemantic_stack_[(3) - (1)].node));
           aTypeList->push_back(dynamic_cast<SequenceType *>((yysemantic_stack_[(3) - (3)].node)));
@@ -8127,37 +8217,19 @@
         }
     break;
 
-  case 553:
+  case 555:
 
 /* Line 678 of lalr1.cc  */
-#line 4929 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4972 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AtomicType( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(1) - (1)].expr)) );
         }
     break;
 
-  case 554:
-
-/* Line 678 of lalr1.cc  */
-#line 4937 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
-        }
-    break;
-
-  case 555:
-
-/* Line 678 of lalr1.cc  */
-#line 4941 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
-        }
-    break;
-
   case 556:
 
 /* Line 678 of lalr1.cc  */
-#line 4945 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4980 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8166,7 +8238,7 @@
   case 557:
 
 /* Line 678 of lalr1.cc  */
-#line 4949 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4984 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8175,7 +8247,7 @@
   case 558:
 
 /* Line 678 of lalr1.cc  */
-#line 4953 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4988 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8184,7 +8256,7 @@
   case 559:
 
 /* Line 678 of lalr1.cc  */
-#line 4957 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4992 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8193,7 +8265,7 @@
   case 560:
 
 /* Line 678 of lalr1.cc  */
-#line 4961 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 4996 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8202,7 +8274,7 @@
   case 561:
 
 /* Line 678 of lalr1.cc  */
-#line 4965 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5000 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8211,7 +8283,7 @@
   case 562:
 
 /* Line 678 of lalr1.cc  */
-#line 4969 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5004 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
         }
@@ -8220,34 +8292,52 @@
   case 563:
 
 /* Line 678 of lalr1.cc  */
-#line 4977 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5008 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 564:
+
+/* Line 678 of lalr1.cc  */
+#line 5012 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
+    {
+            (yyval.node) = (yysemantic_stack_[(1) - (1)].node);
+        }
+    break;
+
+  case 565:
+
+/* Line 678 of lalr1.cc  */
+#line 5020 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AnyKindTest( LOC((yyloc)) );
         }
     break;
 
-  case 564:
+  case 566:
 
 /* Line 678 of lalr1.cc  */
-#line 4985 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5028 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new DocumentTest( LOC((yyloc)) );
         }
     break;
 
-  case 565:
+  case 567:
 
 /* Line 678 of lalr1.cc  */
-#line 4989 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5032 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new DocumentTest( LOC((yyloc)), dynamic_cast<ElementTest*>((yysemantic_stack_[(4) - (3)].node)) );
         }
     break;
 
-  case 566:
+  case 568:
 
 /* Line 678 of lalr1.cc  */
-#line 4993 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5036 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new DocumentTest(
                 LOC((yyloc)), dynamic_cast<SchemaElementTest*>((yysemantic_stack_[(4) - (3)].node))
@@ -8255,98 +8345,78 @@
         }
     break;
 
-  case 567:
+  case 569:
 
 /* Line 678 of lalr1.cc  */
-#line 5003 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5046 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new TextTest( LOC((yyloc)) );
         }
     break;
 
-  case 568:
+  case 570:
 
 /* Line 678 of lalr1.cc  */
-#line 5011 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5054 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new CommentTest( LOC((yyloc)));
         }
     break;
 
-  case 569:
+  case 571:
 
 /* Line 678 of lalr1.cc  */
-#line 5019 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5062 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new PITest( LOC((yyloc)), "" );
         }
     break;
 
-  case 570:
-
-/* Line 678 of lalr1.cc  */
-#line 5023 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = new PITest( LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (3)].sval)) );
-        }
-    break;
-
-  case 571:
-
-/* Line 678 of lalr1.cc  */
-#line 5027 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
-    {
-            (yyval.node) = new PITest( LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (3)].sval)) );
-        }
-    break;
-
   case 572:
 
 /* Line 678 of lalr1.cc  */
-#line 5035 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5066 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new AttributeTest( LOC((yyloc)), NULL, NULL );
+            (yyval.node) = new PITest( LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (3)].sval)) );
         }
     break;
 
   case 573:
 
 /* Line 678 of lalr1.cc  */
-#line 5039 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5070 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new AttributeTest(
-                LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)), NULL
-            );
+            (yyval.node) = new PITest( LOC((yyloc)), SYMTAB((yysemantic_stack_[(4) - (3)].sval)) );
         }
     break;
 
   case 574:
 
 /* Line 678 of lalr1.cc  */
-#line 5045 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5078 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new AttributeTest(
-                LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)), dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node))
-            );
+            (yyval.node) = new AttributeTest( LOC((yyloc)), NULL, NULL );
         }
     break;
 
   case 575:
 
 /* Line 678 of lalr1.cc  */
-#line 5051 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5082 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new AttributeTest( LOC((yyloc)), NULL, NULL );
+            (yyval.node) = new AttributeTest(
+                LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)), NULL
+            );
         }
     break;
 
   case 576:
 
 /* Line 678 of lalr1.cc  */
-#line 5055 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5088 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new AttributeTest(
-                LOC((yyloc)), NULL, dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node))
+                LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)), dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node))
             );
         }
     break;
@@ -8354,56 +8424,48 @@
   case 577:
 
 /* Line 678 of lalr1.cc  */
-#line 5065 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5094 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new SchemaAttributeTest( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)) );
+            (yyval.node) = new AttributeTest( LOC((yyloc)), NULL, NULL );
         }
     break;
 
   case 578:
 
 /* Line 678 of lalr1.cc  */
-#line 5073 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5098 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new ElementTest( LOC((yyloc)), NULL, NULL, true );
+            (yyval.node) = new AttributeTest(
+                LOC((yyloc)), NULL, dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node))
+            );
         }
     break;
 
   case 579:
 
 /* Line 678 of lalr1.cc  */
-#line 5077 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5108 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new ElementTest(
-                LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)), NULL, true
-            );
+            (yyval.node) = new SchemaAttributeTest( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)) );
         }
     break;
 
   case 580:
 
 /* Line 678 of lalr1.cc  */
-#line 5083 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5116 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new ElementTest(
-                LOC((yyloc)),
-                static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)),
-                dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)),
-                false
-            );
+            (yyval.node) = new ElementTest( LOC((yyloc)), NULL, NULL, true );
         }
     break;
 
   case 581:
 
 /* Line 678 of lalr1.cc  */
-#line 5092 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5120 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ElementTest(
-                LOC((yyloc)),
-                static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)),
-                dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)),
-                true
+                LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)), NULL, true
             );
         }
     break;
@@ -8411,10 +8473,13 @@
   case 582:
 
 /* Line 678 of lalr1.cc  */
-#line 5101 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5126 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ElementTest(
-                LOC((yyloc)), NULL, NULL, true
+                LOC((yyloc)),
+                static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)),
+                dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)),
+                false
             );
         }
     break;
@@ -8422,10 +8487,13 @@
   case 583:
 
 /* Line 678 of lalr1.cc  */
-#line 5107 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5135 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ElementTest(
-                LOC((yyloc)), NULL, dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)), false
+                LOC((yyloc)),
+                static_cast<QName*>((yysemantic_stack_[(6) - (3)].expr)),
+                dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)),
+                true
             );
         }
     break;
@@ -8433,10 +8501,10 @@
   case 584:
 
 /* Line 678 of lalr1.cc  */
-#line 5113 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5144 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
             (yyval.node) = new ElementTest(
-                LOC((yyloc)), NULL, dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)), true
+                LOC((yyloc)), NULL, NULL, true
             );
         }
     break;
@@ -8444,70 +8512,92 @@
   case 585:
 
 /* Line 678 of lalr1.cc  */
-#line 5123 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5150 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new SchemaElementTest( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)) );
+            (yyval.node) = new ElementTest(
+                LOC((yyloc)), NULL, dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)), false
+            );
         }
     break;
 
   case 586:
 
 /* Line 678 of lalr1.cc  */
-#line 5140 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5156 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new TypeName( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(1) - (1)].expr)) );
+            (yyval.node) = new ElementTest(
+                LOC((yyloc)), NULL, dynamic_cast<TypeName*>((yysemantic_stack_[(6) - (5)].node)), true
+            );
         }
     break;
 
   case 587:
 
 /* Line 678 of lalr1.cc  */
-#line 5147 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5166 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.node) = new TypeName( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(2) - (1)].expr)), true );
+            (yyval.node) = new SchemaElementTest( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(4) - (3)].expr)) );
         }
     break;
 
   case 588:
 
 /* Line 678 of lalr1.cc  */
-#line 5162 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5183 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-            (yyval.expr) = new StringLiteral( LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)) );
+            (yyval.node) = new TypeName( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(1) - (1)].expr)) );
         }
     break;
 
   case 589:
 
 /* Line 678 of lalr1.cc  */
-#line 5198 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5190 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-      (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
-    }
+            (yyval.node) = new TypeName( LOC((yyloc)), static_cast<QName*>((yysemantic_stack_[(2) - (1)].expr)), true );
+        }
     break;
 
   case 590:
 
 /* Line 678 of lalr1.cc  */
-#line 5202 "/home/mbrantner/zorba/trunk/core/src/compiler/parser/xquery_parser.y"
+#line 5205 "/home/markos/zorba/repo/jsoniq/src/compiler/parser/xquery_parser.y"
     {
-      (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
-    }
+            (yyval.expr) = new StringLiteral( LOC((yyloc)), SYMTAB((yysemantic_stack_[(1) - (1)].sval)) );
+        }
     break;
 
   case 591:
 
 /* Line 678 of lalr1.cc  */
-#line 5210 "/hom

Follow ups