changeset 47393:82b49fe76dec

Merge
author prr
date Thu, 19 Oct 2017 10:54:40 -0700
parents ec9f4dda4018 92f08900cb3c
children c28e2522ac81
files
diffstat 302 files changed, 4172 insertions(+), 4229 deletions(-) [+]
line wrap: on
line diff
--- a/make/BuildNashorn.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/BuildNashorn.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -69,17 +69,12 @@
 NASHORN_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules/jdk.scripting.nashorn
 NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
 
-ifeq ($(BOOT_JDK_MODULAR), true)
-  NASGEN_OPTIONS := \
-      -cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
-      --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
-      --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
-      --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
-      #
-else
-  NASGEN_OPTIONS := \
-      -Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes
-endif
+NASGEN_OPTIONS := \
+    -cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
+    --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
+    --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
+    --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
+    #
 
 # Copy classes to final classes dir and run nasgen to modify classes in jdk.nashorn.internal.objects package
 $(NASGEN_RUN_FILE): $(BUILD_NASGEN) $(jdk.scripting.nashorn)
--- a/make/CompileInterimLangtools.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/CompileInterimLangtools.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -30,39 +30,63 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 include SetupJavaCompilers.gmk
+include Modules.gmk
+
+################################################################################
+# Generate interim versions of the module-info.java files for the interim
+# langtools modules. Each interim module has ".interim" added as suffix to the
+# original module name.
+
+INTERIM_MODULEINFO_PATTERN := \
+    $(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), -e 's/$m\([,; ]\)/$m.interim\1/g')
+
+$(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
+    $(TOPDIR)/src/%/share/classes/module-info.java
+	$(call LogInfo, Generating module-info.java for $*.interim)
+	$(call MakeDir, $(@D))
+	$(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
+
+TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
+    $(INTERIM_LANGTOOLS_MODULES))
 
 ################################################################################
 # Setup the rules to build interim langtools, which is compiled by the boot
-# javac and can be run on the boot jdk. This will be used to compile
-# the rest of the product. Each module is compiled separately to allow a modular
-# boot jdk to override system classes using -Xoverride:.
+# javac and can be run on the boot jdk. This will be used to compile the rest of
+# the product. Each module is compiled separately because a multi module setup
+# would require the source files to be copied into directories named after the
+# actual interim modules.
 
 # Param 1 - Name of module to compile
-# Param 2 - Name of modules to depend on
 define SetupInterimModule
-  $$(eval $$(call SetupJavaCompilation,BUILD_INTERIM_$(strip $1), \
+  $$(eval $$(call SetupJavaCompilation, BUILD_$1.interim, \
       SETUP := BOOT_JAVAC, \
       DISABLE_SJAVAC := true, \
-      SRC := $(TOPDIR)/src/$(strip $1)/share/classes \
-          $$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)), \
-      EXCLUDES := sun com/sun/tools/jdeps com/sun/tools/javap \
-          com/sun/tools/jdeprscan, \
-      EXCLUDE_FILES := module-info.java JavacToolProvider.java \
-	  JavadocToolProvider.java Standard.java, \
+      SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
+          $$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
+          $(TOPDIR)/src/$1/share/classes, \
+      EXCLUDES := sun, \
+      EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
+          Standard.java, \
+      EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
       COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
-      BIN := $(BUILDTOOLS_OUTPUTDIR)/override_modules/$(strip $1), \
-      ADD_JAVAC_FLAGS := -Xbootclasspath/p:$$(call PathList, \
-          $$(foreach m, $2, $(BUILDTOOLS_OUTPUTDIR)/override_modules/$$m)), \
+      BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_modules/$1.interim, \
+      ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_modules \
+          $$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
+          -Xlint:-module, \
   ))
 
-  $$(BUILD_INTERIM_$(strip $1)): $$(foreach m, $2, $$(BUILD_INTERIM_$(strip $$m)))
+  $1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
+      $$(INTERIM_LANGTOOLS_BASE_MODULES), $$(call FindTransitiveDepsForModule, $1)))
 
-  TARGETS += $$(BUILD_INTERIM_$(strip $1))
+  $$(BUILD_$1.interim): $$(foreach d, $$($1_DEPS_INTERIM), $$(BUILD_$$d))
+
+  TARGETS += $$(BUILD_$1.interim)
 endef
 
-$(eval $(call SetupInterimModule, java.compiler))
-$(eval $(call SetupInterimModule, jdk.compiler, java.compiler))
-$(eval $(call SetupInterimModule, jdk.jdeps, jdk.compiler java.compiler))
-$(eval $(call SetupInterimModule, jdk.javadoc, java.compiler jdk.compiler))
+$(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), \
+  $(eval $(call SetupInterimModule,$m)) \
+)
+
+################################################################################
 
 all: $(TARGETS)
--- a/make/CompileInterimRmic.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/CompileInterimRmic.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,25 @@
 include JavaCompilation.gmk
 include SetupJavaCompilers.gmk
 
-##########################################################################################
+################################################################################
+# Generate interim versions of the module-info.java files for the interim
+# langtools modules. Each interim module has ".interim" added as suffix to the
+# original module name.
+
+INTERIM_MODULEINFO_PATTERN := \
+    $(foreach m, $(INTERIM_RMIC_BASE_MODULES), -e 's/$m\([,; ]\)/$m.interim\1/g') \
+    -e '/ToolProvider[,; ]/d'
+
+$(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
+    $(TOPDIR)/src/%/share/classes/module-info.java
+	$(call LogInfo, Generating module-info.java for $*.interim)
+	$(call MakeDir, $(@D))
+	$(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
+
+TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
+    $(INTERIM_RMIC_MODULES))
+
+################################################################################
 
 RMIC_PKGS := \
     sun/rmi/rmic \
@@ -41,14 +59,23 @@
     sun/tools/util \
     #
 
-$(eval $(call SetupJavaCompilation,BUILD_INTERIM_RMIC, \
+$(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
     SETUP := GENERATE_OLDBYTECODE, \
     SRC := $(TOPDIR)/src/jdk.rmic/share/classes, \
-    EXCLUDE_FILES := module-info.java, \
+    EXCLUDE_FILES := $(TOPDIR)/src/jdk.rmic/share/classes/module-info.java, \
+    EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/jdk.rmic.interim/module-info.java, \
     INCLUDES := $(RMIC_PKGS), \
-    BIN := $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.rmic, \
-    COPY := .properties))
+    BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_modules/jdk.rmic.interim, \
+    COPY := .properties, \
+    ADD_JAVAC_FLAGS := \
+        --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_modules \
+        --add-modules java.corba \
+        --add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
+        $(INTERIM_RMIC_ADD_EXPORTS), \
+))
+
+TARGETS += $(BUILD_jdk.rmic.interim)
 
 ##########################################################################################
 
-all: $(BUILD_INTERIM_RMIC)
+all: $(TARGETS)
--- a/make/CompileToolsJdk.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/CompileToolsJdk.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -42,13 +42,22 @@
     $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \
     #
 
-$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
+$(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
     SETUP := GENERATE_OLDBYTECODE, \
     SRC := $(BUILD_TOOLS_SRC_DIRS), \
-    EXCLUDES := build/tools/deps \
-                build/tools/docs \
-                build/tools/jigsaw, \
-    BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes))
+    EXCLUDES := \
+        build/tools/deps \
+        build/tools/docs \
+        build/tools/jigsaw \
+        , \
+    BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
+    ADD_JAVAC_FLAGS := \
+        --add-modules java.xml.bind \
+        --add-exports java.desktop/sun.awt=ALL-UNNAMED \
+        --add-exports java.xml.bind/javax.xml.bind.annotation=ALL-UNNAMED \
+        --add-exports java.base/sun.text=ALL-UNNAMED \
+        , \
+))
 
 TARGETS += $(BUILD_TOOLS_JDK)
 
--- a/make/JrtfsJar.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/JrtfsJar.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
     #
 
 $(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
-    SETUP := GENERATE_OLDBYTECODE, \
+    SETUP := GENERATE_8_BYTECODE, \
     SRC := $(TOPDIR)/src/java.base/share/classes, \
     EXCLUDE_FILES := module-info.java, \
     INCLUDES := $(JIMAGE_PKGS), \
--- a/make/Main.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/Main.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -122,6 +122,8 @@
   $(foreach m, $(GENSRC_MODULES), $(eval $m-gensrc: $m-gensrc-src))
 
   LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
+  INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
+      $(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
   CORBA_GENSRC_TARGETS := $(filter $(addsuffix -%, $(CORBA_MODULES)), $(GENSRC_TARGETS))
   HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
   JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
@@ -602,7 +604,7 @@
 else
   $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
 
-  interim-langtools: $(LANGTOOLS_GENSRC_TARGETS)
+  interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
 
   buildtools-jdk: interim-langtools interim-cldrconverter
 
--- a/make/ToolsJdk.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/ToolsJdk.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -40,12 +40,8 @@
 
 ################################################################################
 
-ifeq ($(BOOT_JDK_MODULAR), true)
-  COMPILEFONTCONFIG_ADD_EXPORTS := --add-exports java.desktop/sun.awt=ALL-UNNAMED
-endif
-
 TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
-    $(COMPILEFONTCONFIG_ADD_EXPORTS) \
+    --add-exports java.desktop/sun.awt=ALL-UNNAMED \
     build.tools.compilefontconfig.CompileFontConfig
 
 TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
@@ -95,13 +91,8 @@
 TOOL_SPP = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.spp.Spp
 
 # Nimbus is used somewhere in the swing build.
-
-ifeq ($(BOOT_JDK_MODULAR), true)
-  COMPILENIMBUS_ADD_MODS := --add-modules java.xml.bind
-endif
-
 TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
-    $(COMPILENIMBUS_ADD_MODS) \
+    --add-modules java.xml.bind \
     build.tools.generatenimbus.Generator
 
 TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
--- a/make/autoconf/boot-jdk.m4	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/autoconf/boot-jdk.m4	Thu Oct 19 10:54:40 2017 -0700
@@ -77,10 +77,10 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`]
+          [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`]
           if test "x$FOUND_CORRECT_VERSION" = x; then
             AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
-            AC_MSG_NOTICE([(Your Boot JDK must be version 8, 9 or 10)])
+            AC_MSG_NOTICE([(Your Boot JDK must be version 9 or 10)])
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -301,20 +301,11 @@
 
   # Finally, set some other options...
 
-  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
-  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
+  # When compiling code to be executed by the Boot JDK, force compatibility with the
+  # oldest supported bootjdk.
+  BOOT_JDK_SOURCETARGET="-source 9 -target 9"
   AC_SUBST(BOOT_JDK_SOURCETARGET)
 
-  AC_MSG_CHECKING([if Boot JDK supports modules])
-  if "$JAVA" --list-modules > /dev/null 2>&1; then
-    AC_MSG_RESULT([yes])
-    BOOT_JDK_MODULAR="true"
-  else
-    AC_MSG_RESULT([no])
-    BOOT_JDK_MODULAR="false"
-  fi
-  AC_SUBST(BOOT_JDK_MODULAR)
-
   AC_SUBST(JAVAC_FLAGS)
 
   # Check if the boot jdk is 32 or 64 bit
--- a/make/autoconf/bootcycle-spec.gmk.in	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/autoconf/bootcycle-spec.gmk.in	Thu Oct 19 10:54:40 2017 -0700
@@ -25,8 +25,6 @@
 
 # Support for building boot cycle builds
 
-BOOT_JDK_MODULAR := true
-
 # First include the real base spec.gmk file
 include @SPEC@
 
--- a/make/autoconf/flags.m4	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/autoconf/flags.m4	Thu Oct 19 10:54:40 2017 -0700
@@ -1279,7 +1279,7 @@
       $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -xarch=sparc"
     fi
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
+    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
     $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_XLC"
     $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_XLC"
     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
--- a/make/autoconf/generated-configure.sh	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/autoconf/generated-configure.sh	Thu Oct 19 10:54:40 2017 -0700
@@ -878,7 +878,6 @@
 JLINK
 JMOD
 JAVAC_FLAGS
-BOOT_JDK_MODULAR
 BOOT_JDK_SOURCETARGET
 JARSIGNER
 JAR
@@ -5115,7 +5114,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1508136203
+DATE_WHEN_GENERATED=1508415370
 
 ###############################################################################
 #
@@ -25660,12 +25659,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -25862,12 +25861,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -26052,12 +26051,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -26241,12 +26240,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -26430,12 +26429,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -26610,12 +26609,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -26941,12 +26940,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -27272,12 +27271,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -27490,12 +27489,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -27673,12 +27672,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -27884,12 +27883,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -28067,12 +28066,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -28278,12 +28277,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -28461,12 +28460,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -28672,12 +28671,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -28855,12 +28854,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -29053,12 +29052,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -29234,12 +29233,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -29433,12 +29432,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -29614,12 +29613,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -29812,12 +29811,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -29993,12 +29992,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -30192,12 +30191,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -30373,12 +30372,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -30553,12 +30552,12 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"|(1\.[89]\.)'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8, 9 or 10)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8, 9 or 10)" >&6;}
+            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
+$as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
             BOOT_JDK_FOUND=no
           else
             # We're done! :-)
@@ -31448,21 +31447,9 @@
 
   # Finally, set some other options...
 
-  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
-  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
-$as_echo_n "checking if Boot JDK supports modules... " >&6; }
-  if "$JAVA" --list-modules > /dev/null 2>&1; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    BOOT_JDK_MODULAR="true"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    BOOT_JDK_MODULAR="false"
-  fi
+  # When compiling code to be executed by the Boot JDK, force compatibility with the
+  # oldest supported bootjdk.
+  BOOT_JDK_SOURCETARGET="-source 9 -target 9"
 
 
 
@@ -52028,7 +52015,7 @@
       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
     fi
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
+    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
@@ -52909,7 +52896,7 @@
       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
     fi
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
+    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
--- a/make/autoconf/spec.gmk.in	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/autoconf/spec.gmk.in	Thu Oct 19 10:54:40 2017 -0700
@@ -561,38 +561,35 @@
 BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
 BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
 
-# Use ?= as this can be overridden from bootcycle-spec.gmk
-BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@
+# Interim langtools and rmic modules and arguments
+INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.jdeps jdk.javadoc
+INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES))
+INTERIM_LANGTOOLS_ADD_EXPORTS := \
+    --add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \
+    --add-exports java.base/jdk.internal.util.jar=jdk.jdeps.interim \
+    --add-exports java.base/jdk.internal.misc=jdk.jdeps.interim \
+    #
+INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
+    $(INTERIM_LANGTOOLS_MODULES))))
+INTERIM_LANGTOOLS_ARGS := \
+    --limit-modules java.base,jdk.zipfs,$(INTERIM_LANGTOOLS_MODULES_COMMA) \
+    --add-modules $(INTERIM_LANGTOOLS_MODULES_COMMA) \
+    --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_modules \
+    $(INTERIM_LANGTOOLS_ADD_EXPORTS) \
+    #
+JAVAC_MAIN_CLASS = -m jdk.compiler.interim/com.sun.tools.javac.Main
+JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
 
-INTERIM_LANGTOOLS_OVERRIDE_MODULES := java.compiler jdk.compiler \
-    jdk.jdeps jdk.javadoc
-INTERIM_RMIC_OVERRIDE_MODULES := jdk.rmic
-ifeq ($(BOOT_JDK_MODULAR), true)
-  INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = $(foreach m, \
-      $(INTERIM_LANGTOOLS_OVERRIDE_MODULES), \
-      --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m)
-  INTERIM_RMIC_OVERRIDE_MODULES_ARGS = $(foreach m, \
-      $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \
-      $(INTERIM_RMIC_OVERRIDE_MODULES), \
-      --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m)
-  INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS)
-  JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main
-  JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main
-else
-  INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = \
-      -Xbootclasspath/p:$(call PathList, \
-          $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
-              $(INTERIM_LANGTOOLS_OVERRIDE_MODULES)))
-  INTERIM_RMIC_OVERRIDE_MODULES_ARGS = \
-      -Xbootclasspath/p:$(call PathList, \
-          $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
-              $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \
-              $(INTERIM_RMIC_OVERRIDE_MODULES)))
-  INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS) \
-      -cp $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.compiler
-  JAVAC_MAIN_CLASS = com.sun.tools.javac.Main
-  JAVADOC_MAIN_CLASS = jdk.javadoc.internal.tool.Main
-endif
+INTERIM_RMIC_BASE_MODULES := jdk.rmic
+INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES))
+INTERIM_RMIC_ADD_EXPORTS := \
+    --add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
+    #
+INTERIM_RMIC_ARGS := --limit-modules java.base,jdk.compiler,jdk.javadoc,java.corba \
+    --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_modules \
+    $(INTERIM_RMIC_ADD_EXPORTS) \
+    #
+
 # You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
 # Use = assignment to be able to override in bootcycle-spec.gmk
 NEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
--- a/make/common/JavaCompilation.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/common/JavaCompilation.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -166,6 +166,8 @@
 #   INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
 #   EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
 #       "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
+#   EXTRA_FILES:=List of extra source files to include in compilation. Can be used to
+#       specify files that need to be generated by other rules first.
 #   HEADERS:=path to directory where all generated c-headers are written.
 #   DEPENDS:=Extra dependecy
 #   DISABLE_SJAVAC:=Explicitly disable the use of sjavac for this compilation unit.
@@ -203,16 +205,23 @@
     $1_MODULE_SUBDIR := /$$($1_MODULE)
   endif
 
-  # Make sure the dirs exist.
-  $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory >$$d<)))
+  # Make sure the dirs exist, or that one of the EXTRA_FILES, that may not
+  # exist yet, is in it.
+  $$(foreach d, $$($1_SRC), \
+    $$(if $$(wildcard $$d), , \
+      $$(if $$(filter $$d%, $$($1_EXTRA_FILES)), , \
+        $$(error SRC specified to SetupJavaCompilation $1 contains missing directory >$$d<) \
+      ) \
+    ) \
+  )
   $$(call MakeDir,$$($1_BIN))
   # Add all source roots to the find cache since we are likely going to run find
   # on these more than once. The cache will only be updated if necessary.
-  $$(eval $$(call FillCacheFind,$$($1_SRC)))
+  $$(eval $$(call FillCacheFind, $$($1_SRC)))
   # Find all files in the source trees. Preserve order of source roots so that
   # the first version in case of multiple instances of the same file is selected.
   # CacheFind does not preserve order so need to call it for each root.
-  $1_ALL_SRCS += $$(foreach s, $$($1_SRC), $$(call CacheFind, $$(s)))
+  $1_ALL_SRCS += $$($1_EXTRA_FILES) $$(foreach s, $$($1_SRC), $$(call CacheFind, $$s))
   # Extract the java files.
   $1_SRCS := $$(filter %.java, $$($1_ALL_SRCS))
 
@@ -235,7 +244,7 @@
     $1_SRCS := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_SRCS))
   endif
   ifneq ($$($1_INCLUDE_PATTERN), )
-    $1_SRCS := $$(filter $$($1_INCLUDE_PATTERN), $$($1_SRCS))
+    $1_SRCS := $$(filter $$($1_INCLUDE_PATTERN) $$($1_EXTRA_FILES), $$($1_SRCS))
   endif
 
   ifneq ($$($1_KEEP_DUPS), true)
--- a/make/common/MakeBase.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/common/MakeBase.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -689,8 +689,9 @@
     ifneq ($$(FIND_CACHE_NEW_DIRS), )
       # Remove any trailing slash from dirs in the cache dir list
       FIND_CACHE_DIRS += $$(patsubst %/,%, $$(FIND_CACHE_NEW_DIRS))
-      FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $$(FIND_CACHE_NEW_DIRS) \
-          \( -type f -o -type l \) $2 | $(TR) ' ' '?'))
+      FIND_CACHE := $$(sort $$(FIND_CACHE) \
+          $$(shell $(FIND) $$(wildcard $$(FIND_CACHE_NEW_DIRS)) \
+              \( -type f -o -type l \) $2 | $(TR) ' ' '?'))
     endif
   endef
 
@@ -706,7 +707,7 @@
   # Param 2 - (optional) specialization. Normally "-a \( ... \)" expression.
   define CacheFind
     $(if $(filter-out $(addsuffix /%,- $(FIND_CACHE_DIRS)) $(FIND_CACHE_DIRS),$1), \
-      $(if $(wildcard $1), $(shell $(FIND) $1 \( -type f -o -type l \) $2 \
+      $(if $(wildcard $1), $(shell $(FIND) $(wildcard $1) \( -type f -o -type l \) $2 \
           | $(TR) ' ' '?')), \
       $(filter $(addsuffix /%,$(patsubst %/,%,$1)) $1,$(FIND_CACHE)))
   endef
@@ -716,7 +717,9 @@
   # Param 1 - Dirs to find in
   # Param 2 - (optional) specialization. Normally "-a \( ... \)" expression.
   define CacheFind
-    $(shell $(FIND) $1 \( -type f -o -type l \) $2 | $(TR) ' ' '?')
+    $(if $(wildcard $1, \
+      $(shell $(FIND) $(wildcard $1) \( -type f -o -type l \) $2 | $(TR) ' ' '?') \
+    )
   endef
 endif
 
--- a/make/common/SetupJavaCompilers.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/common/SetupJavaCompilers.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -95,4 +95,15 @@
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
+# Use boot javac to generate JDK 8 compatible class files explicitly
+$(eval $(call SetupJavaCompiler,GENERATE_8_BYTECODE, \
+    JAVAC := $(JAVAC), \
+    FLAGS := \
+        $(JAVA_TOOL_FLAGS_SMALL) \
+        --release 8 \
+        -XDignore.symbol.file=true -g \
+        -Xlint:all -Werror, \
+    DISABLE_SJAVAC := true, \
+))
+
 endif # _SETUP_GMK
--- a/make/conf/jib-profiles.js	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/conf/jib-profiles.js	Thu Oct 19 10:54:40 2017 -0700
@@ -381,24 +381,10 @@
         };
     };
 
-    var boot_jdk_revision = "8";
-    var boot_jdk_subdirpart = "1.8.0";
-    // JDK 8 does not work on sparc M7 cpus, need a newer update when building
-    // on such hardware.
-    if (input.build_cpu == "sparcv9") {
-       var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
-       if (cpu_brand.trim().match('SPARC-.[78]')) {
-           boot_jdk_revision = "8u20";
-           boot_jdk_subdirpart = "1.8.0_20";
-       }
-    }
-    common.boot_jdk_revision = boot_jdk_revision;
-    common.boot_jdk_subdirpart = boot_jdk_subdirpart;
-    common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk"
-        + common.boot_jdk_subdirpart
+    common.boot_jdk_version = "9";
+    common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk-"
+        + common.boot_jdk_version
         + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
-    common.boot_jdk_platform = input.build_os + "-"
-        + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
 
     return common;
 };
@@ -1027,15 +1013,18 @@
         ? input.target_os + "_x64"
         : input.target_platform);
 
+    var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
+        + "-" + input.build_cpu;
+
     var dependencies = {
 
         boot_jdk: {
-            server: "javare",
-            module: "jdk",
-            revision: common.boot_jdk_revision,
-            checksum_file: common.boot_jdk_platform + "/MD5_VALUES",
-            file: common.boot_jdk_platform + "/jdk-" + common.boot_jdk_revision
-                + "-" + common.boot_jdk_platform + ".tar.gz",
+            server: "jpg",
+            product: "jdk",
+            version: common.boot_jdk_version,
+            build_number: "181",
+            file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_"
+                + boot_jdk_platform + "_bin.tar.gz",
             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
             environment_path: common.boot_jdk_home + "/bin"
         },
--- a/make/gendata/Gendata-jdk.compiler.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/gendata/Gendata-jdk.compiler.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -41,23 +41,23 @@
 
 CT_DATA_DESCRIPTION ?= $(TOPDIR)/make/data/symbols/symbols
 
+COMPILECREATESYMBOLS_ADD_EXPORTS := \
+    --add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \
+    --add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \
+    --add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \
+    --add-exports jdk.compiler.interim/com.sun.tools.javac.jvm=ALL-UNNAMED \
+    --add-exports jdk.jdeps.interim/com.sun.tools.classfile=ALL-UNNAMED \
+    #
+
 $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
     SETUP := GENERATE_OLDBYTECODE, \
     SRC := $(TOPDIR)/make/langtools/src/classes, \
     INCLUDES := build/tools/symbolgenerator, \
-    ADD_JAVAC_FLAGS := -Xbootclasspath/p:"$(INTERIM_LANGTOOLS_JAR)", \
     BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
+    ADD_JAVAC_FLAGS := $(INTERIM_LANGTOOLS_ARGS) \
+        $(COMPILECREATESYMBOLS_ADD_EXPORTS), \
 ))
 
-ifeq ($(BOOT_JDK_MODULAR), true)
-  COMPILECREATESYMBOLS_ADD_EXPORTS := \
-      --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
-      --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
-      --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
-      --add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
-      --add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
-endif
-
 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
     $(COMPILE_CREATE_SYMBOLS) \
     $(wildcard $(TOPDIR)/make/data/symbols/*) \
--- a/make/gendata/GendataBreakIterator.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/gendata/GendataBreakIterator.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -60,19 +60,13 @@
         $(TEXT_PKG_LD)/BreakIteratorInfo_th.java, \
     BIN := $(BREAK_ITERATOR_CLASSES)/jdk.localedata))
 
-ifeq ($(BOOT_JDK_MODULAR), true)
-  BREAK_ITERATOR_BOOTCLASSPATH := \
-      --patch-module java.base=$(BREAK_ITERATOR_CLASSES)/java.base \
-      --patch-module jdk.localedata=$(BREAK_ITERATOR_CLASSES)/jdk.localedata \
-      --add-exports java.base/sun.text=ALL-UNNAMED \
-      --add-exports java.base/sun.text.resources=ALL-UNNAMED \
-      --add-exports jdk.localedata/sun.text.resources.ext=ALL-UNNAMED \
-      #
-else
-  BREAK_ITERATOR_BOOTCLASSPATH := -Xbootclasspath/p:$(call PathList, \
-      $(BREAK_ITERATOR_CLASSES)/java.base \
-      $(BREAK_ITERATOR_CLASSES)/jdk.localedata)
-endif
+BREAK_ITERATOR_BOOTCLASSPATH := \
+    --patch-module java.base=$(BREAK_ITERATOR_CLASSES)/java.base \
+    --patch-module jdk.localedata=$(BREAK_ITERATOR_CLASSES)/jdk.localedata \
+    --add-exports java.base/sun.text=ALL-UNNAMED \
+    --add-exports java.base/sun.text.resources=ALL-UNNAMED \
+    --add-exports jdk.localedata/sun.text.resources.ext=ALL-UNNAMED \
+    #
 
 # Generate data resource files.
 # input
--- a/make/langtools/src/classes/build/tools/symbolgenerator/TransitiveDependencies.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/langtools/src/classes/build/tools/symbolgenerator/TransitiveDependencies.java	Thu Oct 19 10:54:40 2017 -0700
@@ -39,6 +39,7 @@
 import javax.tools.ToolProvider;
 
 import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.api.JavacTool;
 import com.sun.tools.javac.code.Symbol.ModuleSymbol;
 
 /**
@@ -56,7 +57,7 @@
             return ;
         }
 
-        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        JavaCompiler compiler = JavacTool.create();
         List<String> options = Arrays.asList("-source", "10",
                                              "-target", "10",
                                              "-proc:only",
--- a/make/rmic/RmicCommon.gmk	Thu Oct 19 13:52:37 2017 +0530
+++ b/make/rmic/RmicCommon.gmk	Thu Oct 19 10:54:40 2017 -0700
@@ -31,13 +31,9 @@
 
 ################################################################################
 
-ifeq ($(BOOT_JDK_MODULAR), true)
-  RMIC_MAIN_CLASS := -m jdk.rmic/sun.rmi.rmic.Main
-else
-  RMIC_MAIN_CLASS := sun.rmi.rmic.Main
-endif
+RMIC_MAIN_CLASS := -m jdk.rmic.interim/sun.rmi.rmic.Main
 
-RMIC := $(JAVA_SMALL) $(INTERIM_RMIC_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS)
+RMIC := $(JAVA_SMALL) $(INTERIM_RMIC_ARGS) $(RMIC_MAIN_CLASS)
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
 # NOTE: If the smart javac dependency management is reintroduced, these classes
--- a/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,18 @@
 
 import java.io.IOException;
 import java.io.NotSerializableException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.net.URL;
+import java.util.List;
+
 import jdk.internal.misc.InnocuousThread;
+import sun.security.action.GetIntegerAction;
 
 /**
  * A class that implements a cache of idle Http connections for keep-alive
@@ -53,14 +61,14 @@
     static int result = -1;
     static int getMaxConnections() {
         if (result == -1) {
-            result = java.security.AccessController.doPrivileged(
-                new sun.security.action.GetIntegerAction("http.maxConnections",
-                                                         MAX_CONNECTIONS))
+            result = AccessController.doPrivileged(
+                new GetIntegerAction("http.maxConnections", MAX_CONNECTIONS))
                 .intValue();
-            if (result <= 0)
+            if (result <= 0) {
                 result = MAX_CONNECTIONS;
+            }
         }
-            return result;
+        return result;
     }
 
     static final int LIFETIME = 5000;
@@ -93,8 +101,7 @@
              * The robustness to get around this is in HttpClient.parseHTTP()
              */
             final KeepAliveCache cache = this;
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     keepAliveTimer = InnocuousThread.newSystemThread("Keep-Alive-Timer", cache);
                     keepAliveTimer.setDaemon(true);
@@ -110,8 +117,8 @@
 
         if (v == null) {
             int keepAliveTimeout = http.getKeepAliveTimeout();
-            v = new ClientVector(keepAliveTimeout > 0?
-                                 keepAliveTimeout*1000 : LIFETIME);
+            v = new ClientVector(keepAliveTimeout > 0 ?
+                                 keepAliveTimeout * 1000 : LIFETIME);
             v.put(http);
             super.put(key, v);
         } else {
@@ -120,12 +127,12 @@
     }
 
     /* remove an obsolete HttpClient from its VectorCache */
-    public synchronized void remove (HttpClient h, Object obj) {
+    public synchronized void remove(HttpClient h, Object obj) {
         KeepAliveKey key = new KeepAliveKey(h.url, obj);
         ClientVector v = super.get(key);
         if (v != null) {
             v.remove(h);
-            if (v.empty()) {
+            if (v.isEmpty()) {
                 removeVector(key);
             }
         }
@@ -142,7 +149,6 @@
      * Check to see if this URL has a cached HttpClient
      */
     public synchronized HttpClient get(URL url, Object obj) {
-
         KeepAliveKey key = new KeepAliveKey(url, obj);
         ClientVector v = super.get(key);
         if (v == null) { // nothing in cache yet
@@ -161,39 +167,27 @@
             try {
                 Thread.sleep(LIFETIME);
             } catch (InterruptedException e) {}
+
+            // Remove all outdated HttpClients.
             synchronized (this) {
-                /* Remove all unused HttpClients.  Starting from the
-                 * bottom of the stack (the least-recently used first).
-                 * REMIND: It'd be nice to not remove *all* connections
-                 * that aren't presently in use.  One could have been added
-                 * a second ago that's still perfectly valid, and we're
-                 * needlessly axing it.  But it's not clear how to do this
-                 * cleanly, and doing it right may be more trouble than it's
-                 * worth.
-                 */
-
                 long currentTime = System.currentTimeMillis();
-
-                ArrayList<KeepAliveKey> keysToRemove
-                    = new ArrayList<>();
+                List<KeepAliveKey> keysToRemove = new ArrayList<>();
 
                 for (KeepAliveKey key : keySet()) {
                     ClientVector v = get(key);
                     synchronized (v) {
-                        int i;
-
-                        for (i = 0; i < v.size(); i++) {
-                            KeepAliveEntry e = v.elementAt(i);
+                        KeepAliveEntry e = v.peek();
+                        while (e != null) {
                             if ((currentTime - e.idleStartTime) > v.nap) {
-                                HttpClient h = e.hc;
-                                h.closeServer();
+                                v.poll();
+                                e.hc.closeServer();
                             } else {
                                 break;
                             }
+                            e = v.peek();
                         }
-                        v.subList(0, i).clear();
 
-                        if (v.size() == 0) {
+                        if (v.isEmpty()) {
                             keysToRemove.add(key);
                         }
                     }
@@ -203,21 +197,19 @@
                     removeVector(key);
                 }
             }
-        } while (size() > 0);
-
-        return;
+        } while (!isEmpty());
     }
 
     /*
      * Do not serialize this class!
      */
-    private void writeObject(java.io.ObjectOutputStream stream)
-    throws IOException {
+    private void writeObject(ObjectOutputStream stream) throws IOException {
         throw new NotSerializableException();
     }
 
-    private void readObject(java.io.ObjectInputStream stream)
-    throws IOException, ClassNotFoundException {
+    private void readObject(ObjectInputStream stream)
+        throws IOException, ClassNotFoundException
+    {
         throw new NotSerializableException();
     }
 }
@@ -225,37 +217,33 @@
 /* FILO order for recycling HttpClients, should run in a thread
  * to time them out.  If > maxConns are in use, block.
  */
-
-
-class ClientVector extends java.util.Stack<KeepAliveEntry> {
+class ClientVector extends ArrayDeque<KeepAliveEntry> {
     private static final long serialVersionUID = -8680532108106489459L;
 
     // sleep time in milliseconds, before cache clear
     int nap;
 
-
-
-    ClientVector (int nap) {
+    ClientVector(int nap) {
         this.nap = nap;
     }
 
     synchronized HttpClient get() {
-        if (empty()) {
+        if (isEmpty()) {
             return null;
-        } else {
-            // Loop until we find a connection that has not timed out
-            HttpClient hc = null;
-            long currentTime = System.currentTimeMillis();
-            do {
-                KeepAliveEntry e = pop();
-                if ((currentTime - e.idleStartTime) > nap) {
-                    e.hc.closeServer();
-                } else {
-                    hc = e.hc;
-                }
-            } while ((hc== null) && (!empty()));
-            return hc;
         }
+
+        // Loop until we find a connection that has not timed out
+        HttpClient hc = null;
+        long currentTime = System.currentTimeMillis();
+        do {
+            KeepAliveEntry e = pop();
+            if ((currentTime - e.idleStartTime) > nap) {
+                e.hc.closeServer();
+            } else {
+                hc = e.hc;
+            }
+        } while ((hc == null) && (!isEmpty()));
+        return hc;
     }
 
     /* return a still valid, unused HttpClient */
@@ -267,21 +255,30 @@
         }
     }
 
+    /* remove an HttpClient */
+    synchronized boolean remove(HttpClient h) {
+        for (KeepAliveEntry curr : this) {
+            if (curr.hc == h) {
+                return super.remove(curr);
+            }
+        }
+        return false;
+    }
+
     /*
      * Do not serialize this class!
      */
-    private void writeObject(java.io.ObjectOutputStream stream)
-    throws IOException {
+    private void writeObject(ObjectOutputStream stream) throws IOException {
         throw new NotSerializableException();
     }
 
-    private void readObject(java.io.ObjectInputStream stream)
-    throws IOException, ClassNotFoundException {
+    private void readObject(ObjectInputStream stream)
+        throws IOException, ClassNotFoundException
+    {
         throw new NotSerializableException();
     }
 }
 
-
 class KeepAliveKey {
     private String      protocol = null;
     private String      host = null;
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.java	Thu Oct 19 10:54:40 2017 -0700
@@ -27,12 +27,14 @@
 import com.sun.org.apache.xml.internal.dtm.DTM;
 import com.sun.org.apache.xml.internal.security.utils.I18n;
 import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
+import com.sun.org.apache.xml.internal.utils.QName;
 import com.sun.org.apache.xpath.internal.NodeSetDTM;
 import com.sun.org.apache.xpath.internal.XPathContext;
 import com.sun.org.apache.xpath.internal.functions.Function;
 import com.sun.org.apache.xpath.internal.objects.XNodeSet;
 import com.sun.org.apache.xpath.internal.objects.XObject;
 import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
+import java.util.List;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
@@ -145,8 +147,7 @@
      * @param vars
      * @param globalsSize
      */
-    @SuppressWarnings("rawtypes")
-    public void fixupVariables(java.util.Vector vars, int globalsSize) {
+    public void fixupVariables(List<QName> vars, int globalsSize) {
         // do nothing
     }
 }
--- a/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -272,7 +272,7 @@
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
   /** The parse stack itself. */
-  protected Stack stack = new Stack();
+  protected Stack<Symbol> stack = new Stack<>();
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
@@ -322,7 +322,7 @@
   public abstract Symbol do_action(
     int       act_num,
     lr_parser parser,
-    Stack     stack,
+    Stack<Symbol>     stack,
     int       top)
     throws java.lang.Exception;
 
@@ -571,7 +571,7 @@
           /* current state is always on the top of the stack */
 
           /* look up action out of the current state with the current input */
-          act = get_action(((Symbol)stack.peek()).parse_state, cur_token.sym);
+          act = get_action((stack.peek()).parse_state, cur_token.sym);
 
           /* decode the action -- > 0 encodes shift */
           if (act > 0)
@@ -603,7 +603,7 @@
                 }
 
               /* look up the state to go to from the one popped back to */
-              act = get_reduce(((Symbol)stack.peek()).parse_state, lhs_sym_num);
+              act = get_reduce((stack.peek()).parse_state, lhs_sym_num);
 
               /* shift to that state */
               lhs_sym.parse_state = act;
@@ -626,7 +626,7 @@
                   /* just in case that wasn't fatal enough, end parse */
                   done_parsing();
                 } else {
-                  lhs_sym = (Symbol)stack.peek();
+                  lhs_sym = stack.peek();
                 }
             }
         }
@@ -661,8 +661,8 @@
       /* dump the stack */
       for (int i=0; i<stack.size(); i++)
         {
-          debug_message("Symbol: " + ((Symbol)stack.elementAt(i)).sym +
-                        " State: " + ((Symbol)stack.elementAt(i)).parse_state);
+          debug_message("Symbol: " + (stack.get(i)).sym +
+                        " State: " + (stack.get(i)).parse_state);
         }
       debug_message("==========================================");
     }
@@ -698,13 +698,13 @@
   /** Do debug output for stack state. [CSA]
    */
   public void debug_stack() {
-      StringBuffer sb=new StringBuffer("## STACK:");
+      StringBuilder sb=new StringBuilder("## STACK:");
       for (int i=0; i<stack.size(); i++) {
-          Symbol s = (Symbol) stack.elementAt(i);
+          Symbol s = stack.get(i);
           sb.append(" <state "+s.parse_state+", sym "+s.sym+">");
           if ((i%3)==2 || (i==(stack.size()-1))) {
               debug_message(sb.toString());
-              sb = new StringBuffer("         ");
+              sb = new StringBuilder("         ");
           }
       }
   }
@@ -762,7 +762,7 @@
           //debug_stack();
 
           /* look up action out of the current state with the current input */
-          act = get_action(((Symbol)stack.peek()).parse_state, cur_token.sym);
+          act = get_action((stack.peek()).parse_state, cur_token.sym);
 
           /* decode the action -- > 0 encodes shift */
           if (act > 0)
@@ -798,9 +798,9 @@
                 }
 
               /* look up the state to go to from the one popped back to */
-              act = get_reduce(((Symbol)stack.peek()).parse_state, lhs_sym_num);
+              act = get_reduce((stack.peek()).parse_state, lhs_sym_num);
               debug_message("# Reduce rule: top state " +
-                             ((Symbol)stack.peek()).parse_state +
+                             (stack.peek()).parse_state +
                              ", lhs sym " + lhs_sym_num + " -> state " + act);
 
               /* shift to that state */
@@ -826,7 +826,7 @@
                   /* just in case that wasn't fatal enough, end parse */
                   done_parsing();
                 } else {
-                  lhs_sym = (Symbol)stack.peek();
+                  lhs_sym = stack.peek();
                 }
             }
         }
@@ -916,7 +916,7 @@
   protected boolean shift_under_error()
     {
       /* is there a shift under error Symbol */
-      return get_action(((Symbol)stack.peek()).parse_state, error_sym()) > 0;
+      return get_action((stack.peek()).parse_state, error_sym()) > 0;
     }
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
@@ -936,8 +936,8 @@
       if (debug) debug_message("# Finding recovery state on stack");
 
       /* Remember the right-position of the top symbol on the stack */
-      int right_pos = ((Symbol)stack.peek()).right;
-      int left_pos  = ((Symbol)stack.peek()).left;
+      int right_pos = (stack.peek()).right;
+      int left_pos  = (stack.peek()).left;
 
       /* pop down until we can shift under error Symbol */
       while (!shift_under_error())
@@ -945,7 +945,7 @@
           /* pop the stack */
           if (debug)
             debug_message("# Pop stack by one, state was # " +
-                          ((Symbol)stack.peek()).parse_state);
+                          (stack.peek()).parse_state);
           left_pos = ((Symbol)stack.pop()).left;
           tos--;
 
@@ -958,11 +958,11 @@
         }
 
       /* state on top of the stack can shift under error, find the shift */
-      act = get_action(((Symbol)stack.peek()).parse_state, error_sym());
+      act = get_action((stack.peek()).parse_state, error_sym());
       if (debug)
         {
           debug_message("# Recover state found (#" +
-                        ((Symbol)stack.peek()).parse_state + ")");
+                        (stack.peek()).parse_state + ")");
           debug_message("# Shifting on error to state #" + (act-1));
         }
 
@@ -1145,7 +1145,7 @@
           debug_message("# Reparsing saved input with actions");
           debug_message("# Current Symbol is #" + cur_err_token().sym);
           debug_message("# Current state is #" +
-                        ((Symbol)stack.peek()).parse_state);
+                        (stack.peek()).parse_state);
         }
 
       /* continue until we accept or have read all lookahead input */
@@ -1155,7 +1155,7 @@
 
           /* look up action out of the current state with the current input */
           act =
-            get_action(((Symbol)stack.peek()).parse_state, cur_err_token().sym);
+            get_action((stack.peek()).parse_state, cur_err_token().sym);
 
           /* decode the action -- > 0 encodes shift */
           if (act > 0)
@@ -1205,7 +1205,7 @@
                 }
 
               /* look up the state to go to from the one popped back to */
-              act = get_reduce(((Symbol)stack.peek()).parse_state, lhs_sym_num);
+              act = get_reduce((stack.peek()).parse_state, lhs_sym_num);
 
               /* shift to that state */
               lhs_sym.parse_state = act;
@@ -1234,7 +1234,7 @@
   protected static short[][] unpackFromStrings(String[] sa)
     {
       // Concatanate initialization strings.
-      StringBuffer sb = new StringBuffer(sa[0]);
+      StringBuilder sb = new StringBuilder(sa[0]);
       for (int i=1; i<sa.length; i++)
         sb.append(sa[i]);
       int n=0; // location in initialization string
--- a/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/virtual_parse_stack.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/virtual_parse_stack.java	Thu Oct 19 10:54:40 2017 -0700
@@ -49,7 +49,7 @@
   /*-----------------------------------------------------------*/
 
   /** Constructor to build a virtual stack out of a real stack. */
-  public virtual_parse_stack(Stack shadowing_stack) throws java.lang.Exception
+  public virtual_parse_stack(Stack<Symbol> shadowing_stack) throws java.lang.Exception
     {
       /* sanity check */
       if (shadowing_stack == null)
@@ -58,7 +58,7 @@
 
       /* set up our internals */
       real_stack = shadowing_stack;
-      vstack     = new Stack();
+      vstack     = new Stack<>();
       real_next  = 0;
 
       /* get one element onto the virtual portion of the stack */
@@ -73,7 +73,7 @@
    *  the bottom of the virtual portion of the stack, but is always left
    *  unmodified.
    */
-  protected Stack real_stack;
+  protected Stack<Symbol> real_stack;
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
@@ -91,7 +91,7 @@
    *  on the virtual stack).  When this portion of the stack becomes empty we
    *  transfer elements from the underlying stack onto this stack.
    */
-  protected Stack vstack;
+  protected Stack<Integer> vstack;
 
   /*-----------------------------------------------------------*/
   /*--- General Methods ---------------------------------------*/
@@ -108,7 +108,7 @@
       if (real_next >= real_stack.size()) return;
 
       /* get a copy of the first Symbol we have not transfered */
-      stack_sym = (Symbol)real_stack.elementAt(real_stack.size()-1-real_next);
+      stack_sym = real_stack.get(real_stack.size()-1-real_next);
 
       /* record the transfer */
       real_next++;
@@ -136,7 +136,7 @@
         throw new Exception(
                   "Internal parser error: top() called on empty virtual stack");
 
-      return ((Integer)vstack.peek()).intValue();
+      return (vstack.peek());
     }
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -73,8 +73,8 @@
     private static final Class<?>[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
             NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR
     }; // Chapter 5.2
-    private static final Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below)
-    private static final Class<?>[] EXCS_STRING_RESOLUTION = new Class[0];
+    private static final Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class<?>[0]; // Chapter 5.3 (as below)
+    private static final Class<?>[] EXCS_STRING_RESOLUTION = new Class<?>[0];
     // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.)
     private static final Class<?>[] EXCS_ARRAY_EXCEPTION = {
             NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -43,7 +43,7 @@
      */
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.NULL_POINTER_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -43,7 +43,7 @@
      */
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.THROWABLE
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,7 +42,7 @@
      */
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,7 +42,7 @@
      */
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -39,7 +39,7 @@
 
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -38,7 +38,7 @@
 
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -38,7 +38,7 @@
 
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.NULL_POINTER_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -38,7 +38,7 @@
 
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.NULL_POINTER_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1165,7 +1166,7 @@
             if (attribute instanceof ParameterAnnotations) {
                 // Initialize param_annotations
                 if (!hasParameterAnnotations) {
-                    @SuppressWarnings("unchecked") // OK
+                    @SuppressWarnings({"rawtypes", "unchecked"})
                     final List<AnnotationEntryGen>[] parmList = new List[arg_types.length];
                     param_annotations = parmList;
                     for (int j = 0; j < arg_types.length; j++) {
@@ -1213,7 +1214,7 @@
             final AnnotationEntryGen annotation) {
         ensureExistingParameterAnnotationsUnpacked();
         if (!hasParameterAnnotations) {
-            @SuppressWarnings("unchecked") // OK
+            @SuppressWarnings({"rawtypes", "unchecked"})
             final List<AnnotationEntryGen>[] parmList = new List[arg_types.length];
             param_annotations = parmList;
             hasParameterAnnotations = true;
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,12 +21,11 @@
 
 package com.sun.org.apache.bcel.internal.generic;
 
+import com.sun.org.apache.bcel.internal.ExceptionConst;
+import com.sun.org.apache.bcel.internal.util.ByteSequence;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
-import com.sun.org.apache.bcel.internal.ExceptionConst;
-import com.sun.org.apache.bcel.internal.util.ByteSequence;
-
 /**
  * NEWARRAY -  Create new array of basic type (int, short, ...)
  * <PRE>Stack: ..., count -&gt; ..., arrayref</PRE>
@@ -107,7 +106,7 @@
 
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.NEGATIVE_ARRAY_SIZE_EXCEPTION
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -71,7 +71,7 @@
 
     @Override
     public Class<?>[] getExceptions() {
-        return new Class[] {
+        return new Class<?>[] {
             ExceptionConst.ILLEGAL_MONITOR_STATE
         };
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,9 +1,30 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
 package com.sun.org.apache.bcel.internal.util;
 
+import com.sun.org.apache.bcel.internal.Const;
+import com.sun.org.apache.bcel.internal.generic.ClassGenException;
+import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
+import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -13,11 +34,6 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import com.sun.org.apache.bcel.internal.Const;
-import com.sun.org.apache.bcel.internal.generic.ClassGenException;
-import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
-import com.sun.org.apache.bcel.internal.generic.InstructionList;
-
 /**
  * InstructionFinder is a tool to search for given instructions patterns, i.e.,
  * match sequences of instructions in an instruction list via regular
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java	Thu Oct 19 10:54:40 2017 -0700
@@ -62,7 +62,7 @@
      * @param state the state of the property
      * @param value the value of the property
      */
-    public void setValue(Enum property, State state, String value) {
+    public void setValue(Enum<?> property, State state, String value) {
         //only update if it shall override
         if (state.compareTo(states[property.ordinal()]) >= 0) {
             values[property.ordinal()] = value;
@@ -128,7 +128,7 @@
      * @param property the property
      * @return the value of the property
      */
-    public String getValue(Enum property) {
+    public String getValue(Enum<?> property) {
         return values[property.ordinal()];
     }
 
@@ -195,7 +195,7 @@
      * @param property the property
      * @param systemProperty the name of the system property
      */
-    void getSystemProperty(Enum property, String systemProperty) {
+    void getSystemProperty(Enum<?> property, String systemProperty) {
         try {
             String value = SecuritySupport.getSystemProperty(systemProperty);
             if (value != null) {
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * @LastModified: Sep 2017
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -124,7 +124,7 @@
     {
         ClassLoader cl = System.getSecurityManager()!=null ? null : findClassLoader();
         try{
-            Class providerClass = findProviderClass(className, cl, doFallback);
+            Class<?> providerClass = findProviderClass(className, cl, doFallback);
             Object instance = providerClass.getConstructor().newInstance();
             debugPrintln(()->"created new instance of " + providerClass +
                              " using ClassLoader: " + cl);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -43,8 +43,8 @@
     public void buildKeys(DOM document, DTMAxisIterator iterator,
                           SerializationHandler handler, int root)
         throws TransletException;
-    public void addAuxiliaryClass(Class auxClass);
-    public Class getAuxiliaryClass(String className);
+    public void addAuxiliaryClass(Class<?> auxClass);
+    public Class<?> getAuxiliaryClass(String className);
     public String[] getNamesArray();
     public String[] getUrisArray();
     public int[]    getTypesArray();
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -20,9 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Enumeration;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
@@ -38,7 +36,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.utils.XML11Char;
-import java.util.Iterator;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -119,10 +118,10 @@
         final int current = methodGen.getLocalIndex("current");
 
         // check if sorting nodes is required
-        final Vector<Sort> sortObjects = new Vector<>();
+        final List<Sort> sortObjects = new ArrayList<>();
         for (final SyntaxTreeNode child : getContents()) {
             if (child instanceof Sort) {
-                sortObjects.addElement((Sort)child);
+                sortObjects.add((Sort)child);
             }
         }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -34,10 +35,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.utils.XML11Char;
-import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Vector;
 
 
 /**
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,11 +24,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.StringTokenizer;
-import java.util.NoSuchElementException;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
@@ -41,6 +37,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import java.util.Iterator;
 import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
 
 /**
  * @author Jacek Ambroziak
@@ -86,7 +84,7 @@
           */
         String t = null;
         String lookahead = null;
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         int state = OUT_EXPR;
 
         while (tokenizer.hasMoreTokens()) {
@@ -220,7 +218,7 @@
     }
 
     public String toString() {
-        final StringBuffer buffer = new StringBuffer("AVT:[");
+        final StringBuilder buffer = new StringBuilder("AVT:[");
         final int count = elementCount();
         for (int i = 0; i < count; i++) {
             buffer.append(elementAt(i).toString());
@@ -252,7 +250,7 @@
             il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS)));
             il.append(DUP);
             il.append(new INVOKESPECIAL(initBuffer));
-            // StringBuffer is on the stack
+            // StringBuilder is on the stack
             final Iterator<SyntaxTreeNode> elements = elements();
             while (elements.hasNext()) {
                 final Expression exp = (Expression)elements.next();
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -83,11 +83,11 @@
                                               new MethodType(Type.Void,
                                                              tleft, tright));
         if (ptype != null) {
-            final Type arg1 = (Type) ptype.argsType().elementAt(0);
+            final Type arg1 = (Type) ptype.argsType().get(0);
             if (!arg1.identicalTo(tleft)) {
                 _left = new CastExpr(_left, arg1);
             }
-            final Type arg2 = (Type) ptype.argsType().elementAt(1);
+            final Type arg2 = (Type) ptype.argsType().get(1);
             if (!arg2.identicalTo(tright)) {
                 _right = new CastExpr(_right, arg1);
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,12 +21,11 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -36,7 +35,7 @@
 
     private Expression _arg = null;
 
-    public BooleanCall(QName fname, Vector arguments) {
+    public BooleanCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
         _arg = argument(0);
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -30,8 +31,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.utils.XML11Char;
-
-import java.util.Vector;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -205,11 +205,11 @@
     private void buildParameterList() {
         // Put the parameters from the called template into the array first.
         // This is to ensure the order of the parameters.
-        Vector<Param> defaultParams = _calleeTemplate.getParameters();
+        List<Param> defaultParams = _calleeTemplate.getParameters();
         int numParams = defaultParams.size();
         _parameters = new SyntaxTreeNode[numParams];
         for (int i = 0; i < numParams; i++) {
-            _parameters[i] = defaultParams.elementAt(i);
+            _parameters[i] = defaultParams.get(i);
         }
 
         // Replace a Param with a WithParam if they have the same name.
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,17 +21,16 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
+import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
-import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
+import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
-import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
+import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ObjectType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
-import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ObjectType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Santiago Pericas-Geertsen
@@ -52,7 +51,7 @@
     /**
      * Constructor.
      */
-    public CastCall(QName fname, Vector arguments) {
+    public CastCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,20 +21,19 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class CeilingCall extends FunctionCall {
-    public CeilingCall(QName fname, Vector arguments) {
+    public CeilingCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,9 +24,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Enumeration;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.GOTO;
 import com.sun.org.apache.bcel.internal.generic.IFEQ;
@@ -37,7 +35,11 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -61,7 +63,7 @@
      * <xsl:when> elements and default to the <xsl:otherwise> if present.
      */
     public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
-        final Vector whenElements = new Vector();
+        final List<SyntaxTreeNode> whenElements = new ArrayList<>();
         Otherwise otherwise = null;
         Iterator<SyntaxTreeNode> elements = elements();
 
@@ -74,7 +76,7 @@
             SyntaxTreeNode element = elements.next();
             // Add a When child element
             if (element instanceof When) {
-                whenElements.addElement(element);
+                whenElements.add(element);
             }
             // Add an Otherwise child element
             else if (element instanceof Otherwise) {
@@ -108,10 +110,10 @@
         // next element will hold a handle to the beginning of next
         // When/Otherwise if test on current When fails
         BranchHandle nextElement = null;
-        Vector exitHandles = new Vector();
+        List<InstructionHandle> exitHandles = new ArrayList<>();
         InstructionHandle exit = null;
 
-        Enumeration whens = whenElements.elements();
+        Enumeration<SyntaxTreeNode> whens = Collections.enumeration(whenElements);
         while (whens.hasMoreElements()) {
             final When when = (When)whens.nextElement();
             final Expression test = when.getTest();
@@ -142,7 +144,7 @@
             if (!when.ignore()) when.translateContents(classGen, methodGen);
 
             // goto exit after executing the body of when
-            exitHandles.addElement(il.append(new GOTO(null)));
+            exitHandles.add(il.append(new GOTO(null)));
             if (whens.hasMoreElements() || otherwise != null) {
                 nextElement = il.append(new GOTO(null));
                 test.backPatchFalseList(nextElement);
@@ -160,7 +162,7 @@
         }
 
         // now that end is known set targets of exit gotos
-        Enumeration exitGotos = exitHandles.elements();
+        Enumeration<InstructionHandle> exitGotos = Collections.enumeration(exitHandles);
         while (exitGotos.hasMoreElements()) {
             BranchHandle gotoExit = (BranchHandle)exitGotos.nextElement();
             gotoExit.setTarget(exit);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
@@ -34,13 +32,14 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class ConcatCall extends FunctionCall {
-    public ConcatCall(QName fname, Vector arguments) {
+    public ConcatCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.IFLT;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
@@ -32,6 +30,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -46,7 +45,7 @@
     /**
      * Create a contains() call - two arguments, both strings
      */
-    public ContainsCall(QName fname, Vector arguments) {
+    public ContainsCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,11 +21,8 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.GETFIELD;
-import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
@@ -34,6 +31,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -48,7 +46,7 @@
     /**
      * Default function call constructor
      */
-    public DocumentCall(QName fname, Vector arguments) {
+    public DocumentCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
@@ -30,6 +28,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -37,7 +36,7 @@
  */
 final class ElementAvailableCall extends FunctionCall {
 
-    public ElementAvailableCall(QName fname, Vector arguments) {
+    public ElementAvailableCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.GOTO_W;
@@ -37,6 +35,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeSetType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -193,12 +192,12 @@
     public MethodType lookupPrimop(SymbolTable stable, String op,
                                    MethodType ctype) {
         MethodType result = null;
-        final Vector primop = stable.lookupPrimop(op);
+        final List<MethodType> primop = stable.lookupPrimop(op);
         if (primop != null) {
             final int n = primop.size();
             int minDistance = Integer.MAX_VALUE;
             for (int i = 0; i < n; i++) {
-                final MethodType ptype = (MethodType) primop.elementAt(i);
+                final MethodType ptype = primop.get(i);
                 // Skip if different arity
                 if (ptype.argsCount() != ctype.argsCount()) {
                     continue;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,17 +21,13 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ALOAD;
 import com.sun.org.apache.bcel.internal.generic.ASTORE;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.ILOAD;
-import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
-import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
+import com.sun.org.apache.bcel.internal.generic.ISTORE;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
-import com.sun.org.apache.bcel.internal.generic.ISTORE;
 import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
 import com.sun.org.apache.bcel.internal.generic.NEW;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
@@ -41,6 +37,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -57,9 +54,9 @@
     /**
      * Array of predicates in '(e)[p1]...[pn]'.
      */
-    private final Vector _predicates;
+    private final List<Expression> _predicates;
 
-    public FilterExpr(Expression primary, Vector predicates) {
+    public FilterExpr(Expression primary, List<Expression> predicates) {
         _primary = primary;
         _predicates = predicates;
         primary.setParent(this);
@@ -78,7 +75,7 @@
         if (_predicates != null) {
             final int n = _predicates.size();
             for (int i = 0; i < n; i++) {
-                final Expression exp = (Expression)_predicates.elementAt(i);
+                final Expression exp = (Expression)_predicates.get(i);
                 exp.setParser(parser);
                 exp.setParent(this);
             }
@@ -112,7 +109,7 @@
         // Type check predicates and turn all optimizations off if appropriate
         int n = _predicates.size();
         for (int i = 0; i < n; i++) {
-            Predicate pred = (Predicate) _predicates.elementAt(i);
+            Predicate pred = (Predicate) _predicates.get(i);
 
             if (!canOptimize) {
                 pred.dontOptimize();
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,18 +21,17 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class FloorCall extends FunctionCall {
-    public FloorCall(QName fname, Vector arguments) {
+    public FloorCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,27 +21,27 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Iterator;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 public final class FlowList {
-    private Vector _elements;
+    private List<InstructionHandle> _elements;
 
     public FlowList() {
         _elements = null;
     }
 
     public FlowList(InstructionHandle bh) {
-        _elements = new Vector();
-        _elements.addElement(bh);
+        _elements = new ArrayList<>();
+        _elements.add(bh);
     }
 
     public FlowList(FlowList list) {
@@ -50,9 +50,9 @@
 
     public FlowList add(InstructionHandle bh) {
         if (_elements == null) {
-            _elements = new Vector();
+            _elements = new ArrayList<>();
         }
-        _elements.addElement(bh);
+        _elements.add(bh);
         return this;
     }
 
@@ -61,11 +61,11 @@
             _elements = right._elements;
         }
         else {
-            final Vector temp = right._elements;
+            final List<InstructionHandle> temp = right._elements;
             if (temp != null) {
                 final int n = temp.size();
                 for (int i = 0; i < n; i++) {
-                    _elements.addElement(temp.elementAt(i));
+                    _elements.add(temp.get(i));
                 }
             }
         }
@@ -79,7 +79,7 @@
         if (_elements != null) {
             final int n = _elements.size();
             for (int i = 0; i < n; i++) {
-                BranchHandle bh = (BranchHandle)_elements.elementAt(i);
+                BranchHandle bh = (BranchHandle)_elements.get(i);
                 bh.setTarget(target);
             }
             _elements.clear();          // avoid backpatching more than once
@@ -99,15 +99,15 @@
         }
 
         final int n = _elements.size();
-        final Iterator oldIter = oldList.iterator();
-        final Iterator newIter = newList.iterator();
+        final Iterator<InstructionHandle> oldIter = oldList.iterator();
+        final Iterator<InstructionHandle> newIter = newList.iterator();
 
         while (oldIter.hasNext()) {
-            final InstructionHandle oldIh = (InstructionHandle) oldIter.next();
-            final InstructionHandle newIh = (InstructionHandle) newIter.next();
+            final InstructionHandle oldIh = oldIter.next();
+            final InstructionHandle newIh = newIter.next();
 
             for (int i = 0; i < n; i++) {
-                if (_elements.elementAt(i) == oldIh) {
+                if (_elements.get(i) == oldIh) {
                     result.add(newIh);
                 }
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,9 +24,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Enumeration;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.GOTO;
@@ -42,7 +40,9 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -97,12 +97,12 @@
         il.append(methodGen.loadIterator());
 
         // Collect sort objects associated with this instruction
-        final Vector sortObjects = new Vector();
+        final List<Sort> sortObjects = new ArrayList<>();
         Iterator<SyntaxTreeNode> children = elements();
         while (children.hasNext()) {
-            final Object child = children.next();
+            final SyntaxTreeNode child = children.next();
             if (child instanceof Sort) {
-                sortObjects.addElement(child);
+                sortObjects.add((Sort)child);
             }
         }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
@@ -34,6 +32,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -46,7 +45,7 @@
     private Expression _name;
     private QName      _resolvedQName = null;
 
-    public FormatNumberCall(QName fname, Vector arguments) {
+    public FormatNumberCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
         _value = argument(0);
         _format = argument(1);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,19 +21,18 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
-import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.List;
 
 /**
  * @author G. Todd Miller
@@ -52,9 +51,9 @@
      * a list of arguments where the arguments must be instances of
      * LiteralExpression.
      */
-    public FunctionAvailableCall(QName fname, Vector arguments) {
+    public FunctionAvailableCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
-        _arg = (Expression)arguments.elementAt(0);
+        _arg = (Expression)arguments.get(0);
         _type = null;
 
         if (_arg instanceof LiteralExpr) {
@@ -131,7 +130,7 @@
           methodName = replaceDash(methodName);
 
         try {
-            final Class clazz = ObjectFactory.findProviderClass(className, true);
+            final Class<?> clazz = ObjectFactory.findProviderClass(className, true);
 
             if (clazz == null) {
                 return false;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -48,12 +49,12 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Enumeration;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.Vector;
 import jdk.xml.internal.JdkXmlFeatures;
 
 /**
@@ -68,9 +69,9 @@
     // Name of this function call
     private QName  _fname;
     // Arguments to this function call (might not be any)
-    private final Vector _arguments;
+    private final List<Expression> _arguments;
     // Empty argument list, used for certain functions
-    private final static Vector EMPTY_ARG_LIST = new Vector(0);
+    private final static List<Expression> EMPTY_ARG_LIST = new ArrayList<>(0);
 
     // Valid namespaces for Java function-call extension
     protected final static String EXT_XSLTC =
@@ -122,9 +123,9 @@
 
     // External Java function's class/method/signature
     private String      _className;
-    private Class       _clazz;
+    private Class<?>    _clazz;
     private Method      _chosenMethod;
-    private Constructor _chosenConstructor;
+    private Constructor<?> _chosenConstructor;
     private MethodType  _chosenMethodType;
 
     // Encapsulates all unsupported external function calls
@@ -156,7 +157,7 @@
         public Class<?>  type;
         public int distance;
 
-        public JavaType(Class type, int distance){
+        public JavaType(Class<?> type, int distance){
             this.type = type;
             this.distance = distance;
         }
@@ -294,7 +295,7 @@
 
     }
 
-    public FunctionCall(QName fname, Vector arguments) {
+    public FunctionCall(QName fname, List<Expression> arguments) {
         _fname = fname;
         _arguments = arguments;
         _type = null;
@@ -314,7 +315,7 @@
         if (_arguments != null) {
             final int n = _arguments.size();
             for (int i = 0; i < n; i++) {
-                final Expression exp = (Expression)_arguments.elementAt(i);
+                final Expression exp = _arguments.get(i);
                 exp.setParser(parser);
                 exp.setParent(this);
             }
@@ -435,18 +436,18 @@
         _fname.clearNamespace();        // HACK!!!
 
         final int n = _arguments.size();
-        final Vector argsType = typeCheckArgs(stable);
+        final List<Type> argsType = typeCheckArgs(stable);
         final MethodType args = new MethodType(Type.Void, argsType);
         final MethodType ptype =
             lookupPrimop(stable, _fname.getLocalPart(), args);
 
         if (ptype != null) {
             for (int i = 0; i < n; i++) {
-                final Type argType = (Type) ptype.argsType().elementAt(i);
-                final Expression exp = (Expression)_arguments.elementAt(i);
+                final Type argType = (Type) ptype.argsType().get(i);
+                final Expression exp = _arguments.get(i);
                 if (!argType.identicalTo(exp.getType())) {
                     try {
-                        _arguments.setElementAt(new CastExpr(exp, argType), i);
+                        _arguments.set(i, new CastExpr(exp, argType));
                     }
                     catch (TypeCheckError e) {
                         throw new TypeCheckError(this); // invalid conversion
@@ -462,7 +463,7 @@
 
 
     public Type typeCheckConstructor(SymbolTable stable) throws TypeCheckError{
-        final Vector constructors = findConstructors();
+        final List<Constructor<?>> constructors = findConstructors();
         if (constructors == null) {
             // Constructor not found in this class
             throw new TypeCheckError(ErrorMsg.CONSTRUCTOR_NOT_FOUND,
@@ -472,23 +473,22 @@
 
         final int nConstructors = constructors.size();
         final int nArgs = _arguments.size();
-        final Vector argsType = typeCheckArgs(stable);
+        final List<Type> argsType = typeCheckArgs(stable);
 
         // Try all constructors
         int bestConstrDistance = Integer.MAX_VALUE;
         _type = null;                   // reset
         for (int j, i = 0; i < nConstructors; i++) {
             // Check if all parameters to this constructor can be converted
-            final Constructor constructor =
-                (Constructor)constructors.elementAt(i);
-            final Class[] paramTypes = constructor.getParameterTypes();
+            final Constructor<?> constructor = constructors.get(i);
+            final Class<?>[] paramTypes = constructor.getParameterTypes();
 
             Class<?> extType;
             int currConstrDistance = 0;
             for (j = 0; j < nArgs; j++) {
                 // Convert from internal (translet) type to external (Java) type
                 extType = paramTypes[j];
-                final Type intType = (Type)argsType.elementAt(j);
+                final Type intType = argsType.get(j);
                 JavaType match = _internal2Java.maps(intType, new JavaType(extType, 0));
                 if (match != null) {
                     currConstrDistance += match.distance;
@@ -556,7 +556,7 @@
                     || _namespace_format == NAMESPACE_FORMAT_PACKAGE)
                     hasThisArgument = true;
 
-                Expression firstArg = (Expression)_arguments.elementAt(0);
+                Expression firstArg = _arguments.get(0);
                 Type firstArgType = (Type)firstArg.typeCheck(stable);
 
                 if (_namespace_format == NAMESPACE_FORMAT_CLASS
@@ -566,7 +566,7 @@
                     hasThisArgument = true;
 
                 if (hasThisArgument) {
-                    _thisArgument = (Expression) _arguments.elementAt(0);
+                    _thisArgument = _arguments.get(0);
                     _arguments.remove(0); nArgs--;
                     if (firstArgType instanceof ObjectType) {
                         _className = ((ObjectType) firstArgType).getJavaClassName();
@@ -592,30 +592,30 @@
             }
         }
 
-        final Vector methods = findMethods();
+        final List<Method> methods = findMethods();
 
         if (methods == null) {
             // Method not found in this class
             throw new TypeCheckError(ErrorMsg.METHOD_NOT_FOUND_ERR, _className + "." + name);
         }
 
-        Class extType = null;
+        Class<?> extType = null;
         final int nMethods = methods.size();
-        final Vector argsType = typeCheckArgs(stable);
+        final List<Type> argsType = typeCheckArgs(stable);
 
         // Try all methods to identify the best fit
         int bestMethodDistance  = Integer.MAX_VALUE;
         _type = null;                       // reset internal type
         for (int j, i = 0; i < nMethods; i++) {
             // Check if all paramteters to this method can be converted
-            final Method method = (Method)methods.elementAt(i);
-            final Class[] paramTypes = method.getParameterTypes();
+            final Method method = (Method)methods.get(i);
+            final Class<?>[] paramTypes = method.getParameterTypes();
 
             int currMethodDistance = 0;
             for (j = 0; j < nArgs; j++) {
                 // Convert from internal (translet) type to external (Java) type
                 extType = paramTypes[j];
-                final Type intType = (Type)argsType.elementAt(j);
+                final Type intType = argsType.get(j);
                 JavaType match = _internal2Java.maps(intType, new JavaType(extType, 0));
                 if (match != null) {
                     currMethodDistance += match.distance;
@@ -683,18 +683,16 @@
     /**
      * Type check the actual arguments of this function call.
      */
-    public Vector typeCheckArgs(SymbolTable stable) throws TypeCheckError {
-        final Vector result = new Vector();
-        final Enumeration e = _arguments.elements();
-        while (e.hasMoreElements()) {
-            final Expression exp = (Expression)e.nextElement();
-            result.addElement(exp.typeCheck(stable));
+    public List<Type> typeCheckArgs(SymbolTable stable) throws TypeCheckError {
+        final List<Type> result = new ArrayList<>();
+        for (Expression exp : _arguments) {
+            result.add(exp.typeCheck(stable));
         }
         return result;
     }
 
     protected final Expression argument(int i) {
-        return (Expression)_arguments.elementAt(i);
+        return _arguments.get(i);
     }
 
     protected final Expression argument() {
@@ -706,7 +704,7 @@
     }
 
     protected final void setArgument(int i, Expression exp) {
-        _arguments.setElementAt(exp, i);
+        _arguments.set(i, exp);
     }
 
     /**
@@ -795,7 +793,7 @@
             //   <TransletClass>.class.getModule().addReads(
             generateAddReads(classGen, methodGen, clazz);
 
-            Class[] paramTypes = _chosenConstructor.getParameterTypes();
+            Class<?>[] paramTypes = _chosenConstructor.getParameterTypes();
             LocalVariableGen[] paramTemp = new LocalVariableGen[n];
 
             // Backwards branches are prohibited if an uninitialized object is
@@ -856,7 +854,7 @@
                 translateUnallowedExtension(cpg, il);
 
             final String clazz = _chosenMethod.getDeclaringClass().getName();
-            Class[] paramTypes = _chosenMethod.getParameterTypes();
+            Class<?>[] paramTypes = _chosenMethod.getParameterTypes();
 
 
             // Generate call to Module.addReads:
@@ -960,9 +958,9 @@
      * after stripping its namespace or <code>null</code>
      * if no such methods exist.
      */
-    private Vector findMethods() {
+    private List<Method> findMethods() {
 
-          Vector result = null;
+          List<Method> result = null;
           final String namespace = _fname.getNamespace();
 
           if (_className != null && _className.length() > 0) {
@@ -1003,9 +1001,9 @@
                     && methods[i].getParameterTypes().length == nArgs)
                 {
                   if (result == null) {
-                    result = new Vector();
+                    result = new ArrayList<>();
                   }
-                  result.addElement(methods[i]);
+                  result.add(methods[i]);
                 }
               }
             }
@@ -1022,9 +1020,8 @@
      * after stripping its namespace or <code>null</code>
      * if no such methods exist.
      */
-    private Vector findConstructors() {
-        Vector result = null;
-        final String namespace = _fname.getNamespace();
+    private List<Constructor<?>> findConstructors() {
+        List<Constructor<?>> result = null;
 
         final int nArgs = _arguments.size();
         try {
@@ -1037,20 +1034,17 @@
             }
           }
 
-          final Constructor[] constructors = _clazz.getConstructors();
+          final Constructor<?>[] constructors = _clazz.getConstructors();
 
-          for (int i = 0; i < constructors.length; i++) {
-              final int mods = constructors[i].getModifiers();
-              // Is it public, static and same number of args ?
-              if (Modifier.isPublic(mods) &&
-                  constructors[i].getParameterTypes().length == nArgs)
-              {
-                if (result == null) {
-                  result = new Vector();
+            for (Constructor<?> constructor : constructors) {
+                final int mods = constructor.getModifiers();
+                // Is it public, static and same number of args ?
+                if (Modifier.isPublic(mods) && constructor.getParameterTypes().length == nArgs) {
+                    if (result == null) {
+                        result = new ArrayList<>();
+                    }   result.add(constructor);
                 }
-                result.addElement(constructors[i]);
-              }
-          }
+            }
         }
         catch (ClassNotFoundException e) {
           final ErrorMsg msg = new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, _className);
@@ -1064,10 +1058,10 @@
     /**
      * Compute the JVM signature for the class.
      */
-    static final String getSignature(Class clazz) {
+    static final String getSignature(Class<?> clazz) {
         if (clazz.isArray()) {
             final StringBuffer sb = new StringBuffer();
-            Class cl = clazz;
+            Class<?> cl = clazz;
             while (cl.isArray()) {
                 sb.append("[");
                 cl = cl.getComponentType();
@@ -1120,7 +1114,7 @@
     static final String getSignature(Method meth) {
         final StringBuffer sb = new StringBuffer();
         sb.append('(');
-        final Class[] params = meth.getParameterTypes(); // avoid clone
+        final Class<?>[] params = meth.getParameterTypes(); // avoid clone
         for (int j = 0; j < params.length; j++) {
             sb.append(getSignature(params[j]));
         }
@@ -1131,10 +1125,10 @@
     /**
      * Compute the JVM constructor descriptor for the constructor.
      */
-    static final String getSignature(Constructor cons) {
+    static final String getSignature(Constructor<?> cons) {
         final StringBuffer sb = new StringBuffer();
         sb.append('(');
-        final Class[] params = cons.getParameterTypes(); // avoid clone
+        final Class<?>[] params = cons.getParameterTypes(); // avoid clone
         for (int j = 0; j < params.length; j++) {
             sb.append(getSignature(params[j]));
         }
@@ -1144,13 +1138,13 @@
     /**
      * Return the signature of the current method
      */
-    private String getMethodSignature(Vector argsType) {
+    private String getMethodSignature(List<Type> argsType) {
         final StringBuffer buf = new StringBuffer(_className);
         buf.append('.').append(_fname.getLocalPart()).append('(');
 
         int nArgs = argsType.size();
         for (int i = 0; i < nArgs; i++) {
-            final Type intType = (Type)argsType.elementAt(i);
+            final Type intType = argsType.get(i);
             buf.append(intType.toString());
             if (i < nArgs - 1) buf.append(", ");
         }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,20 +21,19 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class GenerateIdCall extends FunctionCall {
-    public GenerateIdCall(QName fname, Vector arguments) {
+    public GenerateIdCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,8 +24,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.GOTO;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,28 +21,16 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
-import com.sun.org.apache.bcel.internal.generic.ALOAD;
-import com.sun.org.apache.bcel.internal.generic.ASTORE;
-import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
-import com.sun.org.apache.bcel.internal.generic.GOTO;
-import com.sun.org.apache.bcel.internal.generic.IFGT;
-import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
-import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
-import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
-import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
-import com.sun.org.apache.bcel.internal.generic.NEW;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
-import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.List;
 
 /**
  * @author Morten Jorgensen
@@ -82,7 +70,7 @@
      * @param fname The function name (should be 'key' or 'id')
      * @param arguments A vector containing the arguments the the function
      */
-    public KeyCall(QName fname, Vector arguments) {
+    public KeyCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
         switch(argumentCount()) {
         case 1:
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.ILOAD;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
@@ -33,6 +31,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Morten Jorgensen
@@ -45,7 +44,7 @@
      * Get the parameters passed to function:
      *   lang(string)
      */
-    public LangCall(QName fname, Vector arguments) {
+    public LangCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
         _lang = argument(0);
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -102,6 +103,7 @@
 
         // Check if we have any declared namespaces
         if (_accessedPrefixes == null) {
+            // use Hashtable for behavior compatibility
             _accessedPrefixes = new Hashtable<>();
         }
         else {
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,14 +21,13 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Morten Jorgensen
@@ -45,7 +44,7 @@
     /**
      * Handles calls with one parameter (either node or node-set).
      */
-    public LocalNameCall(QName fname, Vector arguments) {
+    public LocalNameCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -137,11 +137,11 @@
         // Yes, the operation is supported
         if (haveType != null) {
             // Check if left-hand side operand must be type casted
-            Type arg1 = (Type)haveType.argsType().elementAt(0);
+            Type arg1 = (Type)haveType.argsType().get(0);
             if (!arg1.identicalTo(tleft))
                 _left = new CastExpr(_left, arg1);
             // Check if right-hand side operand must be type casted
-            Type arg2 = (Type) haveType.argsType().elementAt(1);
+            Type arg2 = (Type) haveType.argsType().get(1);
             if (!arg2.identicalTo(tright))
                 _right = new CastExpr(_right, arg1);
             // Return the result type for the operator we will use
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -46,12 +47,12 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.dtm.Axis;
 import com.sun.org.apache.xml.internal.dtm.DTM;
-import java.util.Enumeration;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.Vector;
 
 /**
  * Mode gathers all the templates belonging to a given mode;
@@ -83,12 +84,12 @@
     /**
      * A vector of all the templates in this mode.
      */
-    private Vector _templates;
+    private List<Template> _templates;
 
     /**
      * Group for patterns with node()-type kernel and child axis.
      */
-    private Vector _childNodeGroup = null;
+    private List<LocationPathPattern> _childNodeGroup = null;
 
     /**
      * Test sequence for patterns with node()-type kernel and child axis.
@@ -98,7 +99,7 @@
     /**
      * Group for patterns with node()-type kernel and attribute axis.
      */
-    private Vector _attribNodeGroup = null;
+    private List<LocationPathPattern> _attribNodeGroup = null;
 
     /**
      * Test sequence for patterns with node()-type kernel and attribute axis.
@@ -108,7 +109,7 @@
     /**
      * Group for patterns with id() or key()-type kernel.
      */
-    private Vector _idxGroup = null;
+    private List<LocationPathPattern> _idxGroup = null;
 
     /**
      * Test sequence for patterns with id() or key()-type kernel.
@@ -118,7 +119,7 @@
     /**
      * Group for patterns with any other kernel type.
      */
-    private Vector[] _patternGroups;
+    private List<LocationPathPattern>[] _patternGroups;
 
     /**
      * Test sequence for patterns with any other kernel type.
@@ -175,12 +176,13 @@
      * @param suffix A suffix to append to the method name for this mode
      *               (normally a sequence number - still in a String).
      */
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public Mode(QName name, Stylesheet stylesheet, String suffix) {
         _name = name;
         _stylesheet = stylesheet;
         _methodName = APPLY_TEMPLATES + suffix;
-        _templates = new Vector();
-        _patternGroups = new Vector[32];
+        _templates = new ArrayList<>();
+        _patternGroups = (List<LocationPathPattern>[])new ArrayList[32];
     }
 
     /**
@@ -214,10 +216,10 @@
     }
 
     public void addTemplate(Template template) {
-        _templates.addElement(template);
+        _templates.add(template);
     }
 
-    private Vector quicksort(Vector templates, int p, int r) {
+    private List<Template> quicksort(List<Template> templates, int p, int r) {
         if (p < r) {
             final int q = partition(templates, p, r);
             quicksort(templates, p, q);
@@ -226,15 +228,15 @@
         return templates;
     }
 
-    private int partition(Vector templates, int p, int r) {
-        final Template x = (Template)templates.elementAt(p);
+    private int partition(List<Template> templates, int p, int r) {
+        final Template x = (Template)templates.get(p);
         int i = p - 1;
         int j = r + 1;
         while (true) {
-            while (x.compareTo((Template)templates.elementAt(--j)) > 0);
-            while (x.compareTo((Template)templates.elementAt(++i)) < 0);
+            while (x.compareTo((Template)templates.get(--j)) > 0);
+            while (x.compareTo((Template)templates.get(++i)) < 0);
             if (i < j) {
-                templates.set(j, templates.set(i, templates.elementAt(j)));
+                templates.set(j, templates.set(i, templates.get(j)));
             }
             else {
                 return j;
@@ -247,35 +249,10 @@
      */
     public void processPatterns(Map<String, Key> keys) {
         _keys = keys;
-
-/*
-System.out.println("Before Sort " + _name);
-for (int i = 0; i < _templates.size(); i++) {
-    System.out.println("name = " + ((Template)_templates.elementAt(i)).getName());
-    System.out.println("pattern = " + ((Template)_templates.elementAt(i)).getPattern());
-    System.out.println("priority = " + ((Template)_templates.elementAt(i)).getPriority());
-    System.out.println("position = " + ((Template)_templates.elementAt(i)).getPosition());
-}
-*/
-
         _templates = quicksort(_templates, 0, _templates.size() - 1);
 
-/*
-System.out.println("\n After Sort " + _name);
-for (int i = 0; i < _templates.size(); i++) {
-    System.out.println("name = " + ((Template)_templates.elementAt(i)).getName());
-    System.out.println("pattern = " + ((Template)_templates.elementAt(i)).getPattern());
-    System.out.println("priority = " + ((Template)_templates.elementAt(i)).getPriority());
-    System.out.println("position = " + ((Template)_templates.elementAt(i)).getPosition());
-}
-*/
-
         // Traverse all templates
-        final Enumeration templates = _templates.elements();
-        while (templates.hasMoreElements()) {
-            // Get the next template
-            final Template template = (Template)templates.nextElement();
-
+        for (Template template : _templates) {
             /*
              * Add this template to a table of named templates if it has a name.
              * If there are multiple templates with the same name, all but one
@@ -308,8 +285,8 @@
         if (pattern instanceof IdKeyPattern) {
             final IdKeyPattern idkey = (IdKeyPattern)pattern;
             idkey.setTemplate(template);
-            if (_idxGroup == null) _idxGroup = new Vector();
-            _idxGroup.add(pattern);
+            if (_idxGroup == null) _idxGroup = new ArrayList<>();
+            _idxGroup.add((IdKeyPattern)pattern);
         }
         // Alternative patterns are broken up and re-processed recursively
         else if (pattern instanceof AlternativePattern) {
@@ -355,47 +332,50 @@
         // Make sure the array of pattern groups is long enough
         final int oldLength = _patternGroups.length;
         if (kernelType >= oldLength) {
-            Vector[] newGroups = new Vector[kernelType * 2];
+            @SuppressWarnings({"rawtypes", "unchecked"})
+            List<LocationPathPattern>[] newGroups =
+                    (List<LocationPathPattern>[])new ArrayList[kernelType * 2];
+
             System.arraycopy(_patternGroups, 0, newGroups, 0, oldLength);
             _patternGroups = newGroups;
         }
 
         // Find the vector to put this pattern into
-        Vector patterns;
+        List<LocationPathPattern> patterns;
 
         if (kernelType == DOM.NO_TYPE) {
             if (pattern.getAxis() == Axis.ATTRIBUTE) {
                 patterns = (_attribNodeGroup == null) ?
-                    (_attribNodeGroup = new Vector(2)) : _attribNodeGroup;
+                    (_attribNodeGroup = new ArrayList<>(2)) : _attribNodeGroup;
             }
             else {
                 patterns = (_childNodeGroup == null) ?
-                    (_childNodeGroup = new Vector(2)) : _childNodeGroup;
+                    (_childNodeGroup = new ArrayList<>(2)) : _childNodeGroup;
             }
         }
         else {
             patterns = (_patternGroups[kernelType] == null) ?
-                (_patternGroups[kernelType] = new Vector(2)) :
+                (_patternGroups[kernelType] = new ArrayList<>(2)) :
                 _patternGroups[kernelType];
         }
 
         if (patterns.size() == 0) {
-            patterns.addElement(pattern);
+            patterns.add(pattern);
         }
         else {
             boolean inserted = false;
             for (int i = 0; i < patterns.size(); i++) {
                 final LocationPathPattern lppToCompare =
-                    (LocationPathPattern)patterns.elementAt(i);
+                    (LocationPathPattern)patterns.get(i);
 
                 if (pattern.noSmallerThan(lppToCompare)) {
                     inserted = true;
-                    patterns.insertElementAt(pattern, i);
+                    patterns.add(i, pattern);
                     break;
                 }
             }
             if (inserted == false) {
-                patterns.addElement(pattern);
+                patterns.add(pattern);
             }
         }
     }
@@ -404,7 +384,7 @@
      * Complete test sequences of a given type by adding all patterns
      * from a given group.
      */
-    private void completeTestSequences(int nodeType, Vector patterns) {
+    private void completeTestSequences(int nodeType, List<LocationPathPattern> patterns) {
         if (patterns != null) {
             if (_patternGroups[nodeType] == null) {
                 _patternGroups[nodeType] = patterns;
@@ -412,8 +392,7 @@
             else {
                 final int m = patterns.size();
                 for (int j = 0; j < m; j++) {
-                    addPattern(nodeType,
-                        (LocationPathPattern) patterns.elementAt(j));
+                    addPattern(nodeType, patterns.get(j));
                 }
             }
         }
@@ -425,8 +404,8 @@
      * sequences, and of "@*" to all attribute test sequences.
      */
     private void prepareTestSequences() {
-        final Vector starGroup = _patternGroups[DTM.ELEMENT_NODE];
-        final Vector atStarGroup = _patternGroups[DTM.ATTRIBUTE_NODE];
+        final List<LocationPathPattern> starGroup = _patternGroups[DTM.ELEMENT_NODE];
+        final List<LocationPathPattern> atStarGroup = _patternGroups[DTM.ATTRIBUTE_NODE];
 
         // Complete test sequence for "text()" with "child::node()"
         completeTestSequences(DTM.TEXT_NODE, _childNodeGroup);
@@ -443,7 +422,7 @@
         // Complete test sequence for "@*" with "attribute::node()"
         completeTestSequences(DTM.ATTRIBUTE_NODE, _attribNodeGroup);
 
-        final Vector names = _stylesheet.getXSLTC().getNamesIndex();
+        final List<String> names = _stylesheet.getXSLTC().getNamesIndex();
         if (starGroup != null || atStarGroup != null ||
             _childNodeGroup != null || _attribNodeGroup != null)
         {
@@ -453,7 +432,7 @@
             for (int i = DTM.NTYPES; i < n; i++) {
                 if (_patternGroups[i] == null) continue;
 
-                final String name = (String) names.elementAt(i - DTM.NTYPES);
+                final String name = names.get(i - DTM.NTYPES);
 
                 if (isAttributeName(name)) {
                     // If an attribute then copy "@*" to its test sequence
@@ -476,7 +455,7 @@
 
         final int n = _patternGroups.length;
         for (int i = 0; i < n; i++) {
-            final Vector patterns = _patternGroups[i];
+            final List<LocationPathPattern> patterns = _patternGroups[i];
             if (patterns != null) {
                 final TestSeq testSeq = new TestSeq(patterns, i, this);
 // System.out.println("testSeq[" + i + "] = " + testSeq);
@@ -520,7 +499,7 @@
 
         int numParams = 0;
         if (template.isSimpleNamedTemplate()) {
-            Vector parameters = template.getParameters();
+            List<Param> parameters = template.getParameters();
             numParams = parameters.size();
         }
 
@@ -676,8 +655,8 @@
         final ConstantPoolGen cpg = classGen.getConstantPool();
 
         // Append switch() statement - namespace test dispatch loop
-        final Vector namespaces = xsltc.getNamespaceIndex();
-        final Vector names = xsltc.getNamesIndex();
+        final List<String> namespaces = xsltc.getNamespaceIndex();
+        final List<String> names = xsltc.getNamesIndex();
         final int namespaceCount = namespaces.size() + 1;
         final int namesCount = names.size();
 
@@ -697,7 +676,7 @@
             // Add test sequences for known namespace types
             for (int i = DTM.NTYPES; i < (DTM.NTYPES+namesCount); i++) {
                 if ((isNamespace[i]) && (isAttribute[i] == attrFlag)) {
-                    String name = (String)names.elementAt(i-DTM.NTYPES);
+                    String name = names.get(i-DTM.NTYPES);
                     String namespace = name.substring(0,name.lastIndexOf(':'));
                     final int type = xsltc.registerNamespace(namespace);
 
@@ -737,7 +716,7 @@
     public void compileApplyTemplates(ClassGenerator classGen) {
         final XSLTC xsltc = classGen.getParser().getXSLTC();
         final ConstantPoolGen cpg = classGen.getConstantPool();
-        final Vector names = xsltc.getNamesIndex();
+        final List<String> names = xsltc.getNamesIndex();
 
         // Create the applyTemplates() method
         final com.sun.org.apache.bcel.internal.generic.Type[] argTypes =
@@ -816,7 +795,7 @@
         final boolean[] isAttribute = new boolean[types.length];
         final boolean[] isNamespace = new boolean[types.length];
         for (int i = 0; i < names.size(); i++) {
-            final String name = (String)names.elementAt(i);
+            final String name = names.get(i);
             isAttribute[i + DTM.NTYPES] = isAttributeName(name);
             isNamespace[i + DTM.NTYPES] = isNamespaceName(name);
         }
@@ -1067,28 +1046,26 @@
         });
     }
 
-
+    @SuppressWarnings({"rawtypes", "unchecked"})
     public void compileApplyImports(ClassGenerator classGen, int min, int max) {
         final XSLTC xsltc = classGen.getParser().getXSLTC();
         final ConstantPoolGen cpg = classGen.getConstantPool();
-        final Vector names      = xsltc.getNamesIndex();
+        final List<String> names = xsltc.getNamesIndex();
 
         // Clear some datastructures
         _namedTemplates = new HashMap<>();
         _neededTemplates = new HashMap<>();
         _templateIHs = new HashMap<>();
         _templateILs = new HashMap<>();
-        _patternGroups = new Vector[32];
+        _patternGroups = (List<LocationPathPattern>[])new ArrayList[32];
         _rootPattern = null;
 
         // IMPORTANT: Save orignal & complete set of templates!!!!
-        Vector oldTemplates = _templates;
+        List<Template> oldTemplates = _templates;
 
         // Gather templates that are within the scope of this import
-        _templates = new Vector();
-        final Enumeration templates = oldTemplates.elements();
-        while (templates.hasMoreElements()) {
-            final Template template = (Template)templates.nextElement();
+        _templates = new ArrayList<>();
+        for (Template template : oldTemplates) {
             final int prec = template.getImportPrecedence();
             if ((prec >= min) && (prec < max)) addTemplate(template);
         }
@@ -1159,7 +1136,7 @@
         final boolean[] isAttribute = new boolean[types.length];
         final boolean[] isNamespace = new boolean[types.length];
         for (int i = 0; i < names.size(); i++) {
-            final String name = (String)names.elementAt(i);
+            final String name = (String)names.get(i);
             isAttribute[i+DTM.NTYPES] = isAttributeName(name);
             isNamespace[i+DTM.NTYPES] = isNamespaceName(name);
         }
@@ -1406,8 +1383,8 @@
         // is creating a problem in the Turkish locale
         pattern = "loadinstruction pop";
 
-        for (Iterator iter = find.search(pattern); iter.hasNext();) {
-            InstructionHandle[] match = (InstructionHandle[]) iter.next();
+        for (Iterator<InstructionHandle[]> iter = find.search(pattern); iter.hasNext();) {
+            InstructionHandle[] match = iter.next();
             try {
                 if (!match[0].hasTargeters() && !match[1].hasTargeters()) {
                     il.delete(match[0], match[1]);
@@ -1423,8 +1400,8 @@
         // changed to lower case - changing to all lower case although only the instruction with capital I
         // is creating a problem in the Turkish locale
         pattern = "iload iload swap istore";
-        for (Iterator iter = find.search(pattern); iter.hasNext();) {
-            InstructionHandle[] match = (InstructionHandle[]) iter.next();
+        for (Iterator<InstructionHandle[]> iter = find.search(pattern); iter.hasNext();) {
+            InstructionHandle[] match = iter.next();
             try {
                 com.sun.org.apache.bcel.internal.generic.ILOAD iload1 =
                     (com.sun.org.apache.bcel.internal.generic.ILOAD) match[0].getInstruction();
@@ -1452,8 +1429,8 @@
         // changed to lower case - changing to all lower case although only the instruction with capital I
         // is creating a problem in the Turkish locale
         pattern = "loadinstruction loadinstruction swap";
-        for (Iterator iter = find.search(pattern); iter.hasNext();) {
-            InstructionHandle[] match = (InstructionHandle[])iter.next();
+        for (Iterator<InstructionHandle[]> iter = find.search(pattern); iter.hasNext();) {
+            InstructionHandle[] match = iter.next();
             try {
                 if (!match[0].hasTargeters() &&
                     !match[1].hasTargeters() &&
@@ -1474,8 +1451,8 @@
         // changed to lower case - changing to all lower case although only the instruction with capital I
         // is creating a problem in the Turkish locale
         pattern = "aload aload";
-        for (Iterator iter = find.search(pattern); iter.hasNext();) {
-            InstructionHandle[] match = (InstructionHandle[])iter.next();
+        for (Iterator<InstructionHandle[]> iter = find.search(pattern); iter.hasNext();) {
+            InstructionHandle[] match = iter.next();
             try {
                 if (!match[1].hasTargeters()) {
                     com.sun.org.apache.bcel.internal.generic.ALOAD aload1 =
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
@@ -30,6 +28,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Morten Jorgensen
@@ -50,7 +49,7 @@
     /**
      * Handles calls with one parameter (either node or node-set).
      */
-    public NameBase(QName fname, Vector arguments) {
+    public NameBase(QName fname, List<Expression> arguments) {
         super(fname, arguments);
         _param = argument(0);
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,13 +21,12 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -46,7 +45,7 @@
     /**
      * Handles calls with one parameter (either node or node-set).
      */
-    public NameCall(QName fname, Vector arguments) {
+    public NameCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,13 +21,12 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Morten Jorgensen
@@ -44,7 +43,7 @@
     /**
      * Handles calls with one parameter (either node or node-set).
      */
-    public NamespaceUriCall(QName fname, Vector arguments) {
+    public NamespaceUriCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,20 +21,19 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.GOTO;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class NotCall extends FunctionCall {
-    public NotCall(QName fname, Vector arguments) {
+    public NotCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,23 +21,21 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.ArrayList;
-
 import com.sun.org.apache.bcel.internal.classfile.Field;
 import com.sun.org.apache.bcel.internal.generic.ALOAD;
-import com.sun.org.apache.bcel.internal.generic.ILOAD;
 import com.sun.org.apache.bcel.internal.generic.ASTORE;
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
+import com.sun.org.apache.bcel.internal.generic.D2I;
 import com.sun.org.apache.bcel.internal.generic.GETFIELD;
 import com.sun.org.apache.bcel.internal.generic.GOTO;
 import com.sun.org.apache.bcel.internal.generic.IFNONNULL;
+import com.sun.org.apache.bcel.internal.generic.ILOAD;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
-import com.sun.org.apache.bcel.internal.generic.D2I;
 import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
 import com.sun.org.apache.bcel.internal.generic.NEW;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
@@ -50,6 +48,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -86,7 +86,7 @@
     private boolean _formatNeeded = false;
 
     private String _className = null;
-    private ArrayList _closureVars = null;
+    private List<VariableRefBase> _closureVars = null;
 
      // -- Begin Closure interface --------------------
 
@@ -118,7 +118,7 @@
      */
     public void addVariable(VariableRefBase variableRef) {
         if (_closureVars == null) {
-            _closureVars = new ArrayList();
+            _closureVars = new ArrayList<>();
         }
 
         // Only one reference per variable
@@ -395,8 +395,7 @@
             _closureVars.size();
 
         for (int i = 0; i < closureLen; i++) {
-            VariableBase var =
-                ((VariableRefBase) _closureVars.get(i)).getVariable();
+            VariableBase var = (_closureVars.get(i)).getVariable();
 
             nodeCounterGen.addField(new Field(ACC_PUBLIC,
                                         cpg.addUtf8(var.getEscapedName()),
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,13 +21,12 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -35,7 +34,7 @@
  */
 final class NumberCall extends FunctionCall {
 
-    public NumberCall(QName fname, Vector arguments) {
+    public NumberCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.ArrayList;
-
 import com.sun.org.apache.bcel.internal.classfile.Field;
 import com.sun.org.apache.bcel.internal.generic.ASTORE;
 import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
@@ -47,6 +45,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xalan.internal.xsltc.runtime.Operators;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -92,7 +92,7 @@
     /**
      * List of variables in closure.
      */
-    private ArrayList _closureVars = null;
+    private List<VariableRefBase> _closureVars = null;
 
     /**
      * Reference to parent closure.
@@ -208,7 +208,7 @@
      */
     public void addVariable(VariableRefBase variableRef) {
         if (_closureVars == null) {
-            _closureVars = new ArrayList();
+            _closureVars = new ArrayList<>();
         }
 
         // Only one reference per variable
@@ -372,7 +372,7 @@
 
         // Add a new instance variable for each var in closure
         for (int i = 0; i < length; i++) {
-            VariableBase var = ((VariableRefBase) _closureVars.get(i)).getVariable();
+            VariableBase var = (_closureVars.get(i)).getVariable();
 
             filterGen.addField(new Field(ACC_PUBLIC,
                                         cpg.addUtf8(var.getEscapedName()),
@@ -559,7 +559,7 @@
         final int length = (_closureVars == null) ? 0 : _closureVars.size();
 
         for (int i = 0; i < length; i++) {
-            VariableRefBase varRef = (VariableRefBase) _closureVars.get(i);
+            VariableRefBase varRef = _closureVars.get(i);
             VariableBase var = varRef.getVariable();
             Type varType = var.getType();
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -81,7 +81,7 @@
             // Type check all the predicates (e -> position() = e)
             final int n = _predicates.size();
             for (int i = 0; i < n; i++) {
-                final Predicate pred = (Predicate)_predicates.elementAt(i);
+                final Predicate pred = _predicates.get(i);
                 pred.typeCheck(stable);
             }
         }
@@ -133,7 +133,7 @@
         if (hasPredicates()) {
             final int n = _predicates.size();
             for (int i = 0; i < n; i++) {
-                Predicate pred = (Predicate)_predicates.elementAt(i);
+                Predicate pred = _predicates.get(i);
                 Expression exp = pred.getExpr();
                 exp.translateDesynthesized(classGen, methodGen);
                 _trueList.append(exp._trueList);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -183,11 +183,11 @@
                 new MethodType(Type.Void, tleft, tright));
 
         if (ptype != null) {
-            Type arg1 = (Type) ptype.argsType().elementAt(0);
+            Type arg1 = ptype.argsType().get(0);
             if (!arg1.identicalTo(tleft)) {
                 _left = new CastExpr(_left, arg1);
             }
-            Type arg2 = (Type) ptype.argsType().elementAt(1);
+            Type arg2 = ptype.argsType().get(1);
             if (!arg2.identicalTo(tright)) {
                 _right = new CastExpr(_right, arg1);
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,13 +21,12 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -35,7 +34,7 @@
  */
 final class RoundCall extends FunctionCall {
 
-    public RoundCall(QName fname, Vector arguments) {
+    public RoundCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -20,9 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.ArrayList;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.classfile.Field;
 import com.sun.org.apache.bcel.internal.generic.ALOAD;
 import com.sun.org.apache.bcel.internal.generic.ANEWARRAY;
@@ -53,6 +51,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.dtm.Axis;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -69,7 +69,7 @@
     private String         _lang; // bug! see 26869
 
     private String _className = null;
-    private ArrayList<VariableRefBase> _closureVars = null;
+    private List<VariableRefBase> _closureVars = null;
     private boolean _needsSortRecordFactory = false;
 
     // -- Begin Closure interface --------------------
@@ -233,7 +233,7 @@
     public static void translateSortIterator(ClassGenerator classGen,
                                       MethodGenerator methodGen,
                                       Expression nodeSet,
-                                      Vector<Sort> sortObjects)
+                                      List<Sort> sortObjects)
     {
         final ConstantPoolGen cpg = classGen.getConstantPool();
         final InstructionList il = methodGen.getInstructionList();
@@ -299,7 +299,7 @@
      * Compiles code that instantiates a NodeSortRecordFactory object which
      * will produce NodeSortRecord objects of a specific type.
      */
-    public static void compileSortRecordFactory(Vector<Sort> sortObjects,
+    public static void compileSortRecordFactory(List<Sort> sortObjects,
         ClassGenerator classGen, MethodGenerator methodGen)
     {
         String sortRecordClass =
@@ -308,7 +308,7 @@
         boolean needsSortRecordFactory = false;
         final int nsorts = sortObjects.size();
         for (int i = 0; i < nsorts; i++) {
-            final Sort sort = sortObjects.elementAt(i);
+            final Sort sort = sortObjects.get(i);
             needsSortRecordFactory |= sort._needsSortRecordFactory;
         }
 
@@ -339,7 +339,7 @@
         il.append(new PUSH(cpg, nsorts));
         il.append(new ANEWARRAY(cpg.addClass(STRING)));
         for (int level = 0; level < nsorts; level++) {
-            final Sort sort = (Sort)sortObjects.elementAt(level);
+            final Sort sort = sortObjects.get(level);
             il.append(DUP);
             il.append(new PUSH(cpg, level));
             sort.translateSortOrder(classGen, methodGen);
@@ -354,7 +354,7 @@
         il.append(new PUSH(cpg, nsorts));
         il.append(new ANEWARRAY(cpg.addClass(STRING)));
         for (int level = 0; level < nsorts; level++) {
-            final Sort sort = (Sort)sortObjects.elementAt(level);
+            final Sort sort = sortObjects.get(level);
             il.append(DUP);
             il.append(new PUSH(cpg, level));
             sort.translateSortType(classGen, methodGen);
@@ -369,7 +369,7 @@
         il.append(new PUSH(cpg, nsorts));
         il.append(new ANEWARRAY(cpg.addClass(STRING)));
         for (int level = 0; level < nsorts; level++) {
-              final Sort sort = (Sort)sortObjects.elementAt(level);
+              final Sort sort = sortObjects.get(level);
               il.append(DUP);
               il.append(new PUSH(cpg, level));
               sort.translateLang(classGen, methodGen);
@@ -384,7 +384,7 @@
         il.append(new PUSH(cpg, nsorts));
         il.append(new ANEWARRAY(cpg.addClass(STRING)));
         for (int level = 0; level < nsorts; level++) {
-            final Sort sort = (Sort)sortObjects.elementAt(level);
+            final Sort sort = sortObjects.get(level);
             il.append(DUP);
             il.append(new PUSH(cpg, level));
             sort.translateCaseOrder(classGen, methodGen);
@@ -416,7 +416,7 @@
                     + "[" + STRING_SIG + ")V")));
 
         // Initialize closure variables in sortRecordFactory
-        final ArrayList<VariableRefBase> dups = new ArrayList<>();
+        final List<VariableRefBase> dups = new ArrayList<>();
 
         for (int j = 0; j < nsorts; j++) {
             final Sort sort = (Sort) sortObjects.get(j);
@@ -442,11 +442,11 @@
         }
     }
 
-    public static String compileSortRecordFactory(Vector<Sort> sortObjects,
+    public static String compileSortRecordFactory(List<Sort> sortObjects,
         ClassGenerator classGen, MethodGenerator methodGen,
         String sortRecordClass)
     {
-        final XSLTC xsltc = (sortObjects.firstElement()).getXSLTC();
+        final XSLTC xsltc = (sortObjects.get(0)).getXSLTC();
         final String className = xsltc.getHelperClassName();
 
         final NodeSortRecordFactGenerator sortRecordFactory =
@@ -461,7 +461,7 @@
 
         // Add a new instance variable for each var in closure
         final int nsorts = sortObjects.size();
-        final ArrayList<VariableRefBase> dups = new ArrayList<>();
+        final List<VariableRefBase> dups = new ArrayList<>();
 
         for (int j = 0; j < nsorts; j++) {
             final Sort sort = sortObjects.get(j);
@@ -587,10 +587,10 @@
     /**
      * Create a new auxillary class extending NodeSortRecord.
      */
-    private static String compileSortRecord(Vector<Sort> sortObjects,
+    private static String compileSortRecord(List<Sort> sortObjects,
                                             ClassGenerator classGen,
                                             MethodGenerator methodGen) {
-        final XSLTC  xsltc = sortObjects.firstElement().getXSLTC();
+        final XSLTC  xsltc = sortObjects.get(0).getXSLTC();
         final String className = xsltc.getHelperClassName();
 
         // This generates a new class for handling this specific sort
@@ -606,7 +606,7 @@
 
         // Add a new instance variable for each var in closure
         final int nsorts = sortObjects.size();
-        final ArrayList<VariableRefBase> dups = new ArrayList<>();
+        final List<VariableRefBase> dups = new ArrayList<>();
 
         for (int j = 0; j < nsorts; j++) {
             final Sort sort = sortObjects.get(j);
@@ -673,7 +673,7 @@
     /**
      * Compiles a method that overloads NodeSortRecord.extractValueFromDOM()
      */
-    private static MethodGenerator compileExtract(Vector<Sort> sortObjects,
+    private static MethodGenerator compileExtract(List<Sort> sortObjects,
                                          NodeSortRecordGenerator sortRecord,
                                          ConstantPoolGen cpg,
                                          String className) {
@@ -715,7 +715,7 @@
         // Append all the cases for the switch statment
         for (int level = 0; level < levels; level++) {
             match[level] = level;
-            final Sort sort = sortObjects.elementAt(level);
+            final Sort sort = sortObjects.get(level);
             target[level] = il.append(NOP);
             sort.translateSelect(sortRecord, extractMethod);
             il.append(ARETURN);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
@@ -31,6 +29,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -45,7 +44,7 @@
     /**
      * Create a starts-with() call - two arguments, both strings
      */
-    public StartsWithCall(QName fname, Vector arguments) {
+    public StartsWithCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,17 +21,15 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ALOAD;
 import com.sun.org.apache.bcel.internal.generic.ASTORE;
 import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.ICONST;
 import com.sun.org.apache.bcel.internal.generic.ILOAD;
-import com.sun.org.apache.bcel.internal.generic.ISTORE;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
+import com.sun.org.apache.bcel.internal.generic.ISTORE;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
 import com.sun.org.apache.bcel.internal.generic.NEW;
@@ -44,6 +42,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.dtm.Axis;
 import com.sun.org.apache.xml.internal.dtm.DTM;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -60,7 +59,7 @@
     /**
      * A vector of predicates (filters) defined on this step - may be null
      */
-    private Vector _predicates;
+    private List<Predicate> _predicates;
 
     /**
      * Some simple predicates can be handled by this class (and not by the
@@ -74,7 +73,7 @@
      */
     private int _nodeType;
 
-    public Step(int axis, int nodeType, Vector predicates) {
+    public Step(int axis, int nodeType, List<Predicate> predicates) {
         _axis = axis;
         _nodeType = nodeType;
         _predicates = predicates;
@@ -88,7 +87,7 @@
         if (_predicates != null) {
             final int n = _predicates.size();
             for (int i = 0; i < n; i++) {
-                final Predicate exp = (Predicate)_predicates.elementAt(i);
+                final Predicate exp = _predicates.get(i);
                 exp.setParser(parser);
                 exp.setParent(this);
             }
@@ -119,14 +118,14 @@
     /**
      * Returns the vector containing all predicates for this step.
      */
-    public Vector getPredicates() {
+    public List<Predicate> getPredicates() {
         return _predicates;
     }
 
     /**
      * Returns the vector containing all predicates for this step.
      */
-    public void addPredicates(Vector predicates) {
+    public void addPredicates(List<Predicate> predicates) {
         if (_predicates == null) {
             _predicates = predicates;
         }
@@ -213,9 +212,7 @@
 
         // Type check all predicates (expressions applied to the step)
         if (_predicates != null) {
-            final int n = _predicates.size();
-            for (int i = 0; i < n; i++) {
-                final Expression pred = (Expression)_predicates.elementAt(i);
+            for (Expression pred : _predicates) {
                 pred.typeCheck(stable);
             }
         }
@@ -249,9 +246,9 @@
             final XSLTC xsltc = getParser().getXSLTC();
 
             if (_nodeType >= DTM.NTYPES) {
-                final Vector ni = xsltc.getNamesIndex();
+                final List<String> ni = xsltc.getNamesIndex();
 
-                name = (String)ni.elementAt(_nodeType-DTM.NTYPES);
+                name = ni.get(_nodeType-DTM.NTYPES);
                 star = name.lastIndexOf('*');
             }
 
@@ -375,7 +372,7 @@
             translateStep(classGen, methodGen, predicateIndex);
         }
         else {
-            final Predicate predicate = (Predicate) _predicates.get(predicateIndex--);
+            final Predicate predicate = _predicates.get(predicateIndex--);
 
             // Special case for predicates that can use the NodeValueIterator
             // instead of an auxiliary class. Certain path/predicates pairs
@@ -525,9 +522,7 @@
         final StringBuffer buffer = new StringBuffer("step(\"");
         buffer.append(Axis.getNames(_axis)).append("\", ").append(_nodeType);
         if (_predicates != null) {
-            final int n = _predicates.size();
-            for (int i = 0; i < n; i++) {
-                final Predicate pred = (Predicate)_predicates.elementAt(i);
+            for (Expression pred : _predicates) {
                 buffer.append(", ").append(pred.toString());
             }
         }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.classfile.Field;
 import com.sun.org.apache.bcel.internal.generic.ALOAD;
 import com.sun.org.apache.bcel.internal.generic.ASTORE;
@@ -54,6 +52,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.dtm.Axis;
 import com.sun.org.apache.xml.internal.dtm.DTM;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -68,7 +67,7 @@
 
     protected final int _axis;
     protected final int _nodeType;
-    protected Vector _predicates;
+    protected List<Predicate> _predicates;
 
     private Step    _step = null;
     private boolean _isEpsilon = false;
@@ -76,7 +75,7 @@
 
     private double  _priority = Double.MAX_VALUE;
 
-    public StepPattern(int axis, int nodeType, Vector predicates) {
+    public StepPattern(int axis, int nodeType, List<Predicate> predicates) {
         _axis = axis;
         _nodeType = nodeType;
         _predicates = predicates;
@@ -85,9 +84,7 @@
     public void setParser(Parser parser) {
         super.setParser(parser);
         if (_predicates != null) {
-            final int n = _predicates.size();
-            for (int i = 0; i < n; i++) {
-                final Predicate exp = (Predicate)_predicates.elementAt(i);
+            for (Predicate exp : _predicates) {
                 exp.setParser(parser);
                 exp.setParent(this);
             }
@@ -110,7 +107,7 @@
         return _isEpsilon && hasPredicates() == false;
     }
 
-    public StepPattern setPredicates(Vector predicates) {
+    public StepPattern setPredicates(List<Predicate> predicates) {
         _predicates = predicates;
         return(this);
     }
@@ -149,7 +146,7 @@
 
     public String toString() {
         final StringBuffer buffer = new StringBuffer("stepPattern(\"");
-    buffer.append(Axis.getNames(_axis))
+        buffer.append(Axis.getNames(_axis))
             .append("\", ")
             .append(_isEpsilon ?
                         ("epsilon{" + Integer.toString(_nodeType) + "}") :
@@ -164,7 +161,7 @@
         final int n = _predicates.size();
 
         for (int i = 0; i < n && noContext; i++) {
-            Predicate pred = (Predicate) _predicates.elementAt(i);
+            Predicate pred = _predicates.get(i);
             if (pred.isNthPositionFilter() ||
                 pred.hasPositionCall() ||
                 pred.hasLastCall())
@@ -189,9 +186,7 @@
     public Type typeCheck(SymbolTable stable) throws TypeCheckError {
         if (hasPredicates()) {
             // Type check all the predicates (e -> position() = e)
-            final int n = _predicates.size();
-            for (int i = 0; i < n; i++) {
-                final Predicate pred = (Predicate)_predicates.elementAt(i);
+            for (Predicate pred : _predicates) {
                 pred.typeCheck(stable);
             }
 
@@ -202,7 +197,7 @@
 
             // Create an instance of Step to do the translation
             if (_contextCase == SIMPLE_CONTEXT) {
-                Predicate pred = (Predicate)_predicates.elementAt(0);
+                Predicate pred = _predicates.get(0);
                 if (pred.isNthPositionFilter()) {
                     _contextCase = GENERAL_CONTEXT;
                     step = new Step(_axis, _nodeType, _predicates);
@@ -210,9 +205,8 @@
                     step = new Step(_axis, _nodeType, null);
                 }
             } else if (_contextCase == GENERAL_CONTEXT) {
-                final int len = _predicates.size();
-                for (int i = 0; i < len; i++) {
-                    ((Predicate)_predicates.elementAt(i)).dontOptimize();
+                for (Predicate pred : _predicates) {
+                    pred.dontOptimize();
                 }
 
                 step = new Step(_axis, _nodeType, _predicates);
@@ -292,9 +286,7 @@
         }
 
         // Compile the expressions within the predicates
-        final int n = _predicates.size();
-        for (int i = 0; i < n; i++) {
-            Predicate pred = (Predicate)_predicates.elementAt(i);
+        for (Predicate pred : _predicates) {
             Expression exp = pred.getExpr();
             exp.translateDesynthesized(classGen, methodGen);
             _trueList.append(exp._trueList);
@@ -382,7 +374,7 @@
         il.append(methodGen.storeCurrentNode());
 
         // Translate the expression of the predicate
-        Predicate pred = (Predicate) _predicates.elementAt(0);
+        Predicate pred = _predicates.get(0);
         Expression exp = pred.getExpr();
         exp.translateDesynthesized(classGen, methodGen);
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,21 +21,20 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class StringCall extends FunctionCall {
-    public StringCall(QName fname, Vector arguments) {
+    public StringCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,21 +21,20 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
 final class StringLengthCall extends FunctionCall {
-    public StringLengthCall(QName fname, Vector arguments) {
+    public StringLengthCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -53,13 +54,13 @@
 import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
 import com.sun.org.apache.xml.internal.dtm.DTM;
 import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.StringTokenizer;
-import java.util.Vector;
 
 /**
  * @author Jacek Ambroziak
@@ -91,7 +92,7 @@
     /**
      * Contains global variables and parameters defined in the stylesheet.
      */
-    private Vector _globals = new Vector();
+    private List<VariableBase> _globals = new ArrayList<>();
 
     /**
      * Used to cache the result returned by <code>hasLocalParams()</code>.
@@ -106,13 +107,13 @@
     /**
       * Contains all templates defined in this stylesheet
       */
-    private final Vector _templates = new Vector();
+    private final List<Template> _templates = new ArrayList<>();
 
     /**
      * Used to cache result of <code>getAllValidTemplates()</code>. Only
      * set in top-level stylesheets that include/import other stylesheets.
      */
-    private Vector _allValidTemplates = null;
+    private List<Template> _allValidTemplates = null;
 
     /**
      * Counter to generate unique mode suffixes.
@@ -149,7 +150,7 @@
     /**
      * Array of all the stylesheets imported or included from this one.
      */
-    private Vector _includedStylesheets = null;
+    private List<Stylesheet> _includedStylesheets = null;
 
     /**
      * Import precendence for this stylesheet.
@@ -370,8 +371,7 @@
                                           : 0;
 
             for (int i = 0; i < inclImpCount; i++) {
-                int prec = ((Stylesheet)_includedStylesheets.elementAt(i))
-                                              .getMinimumDescendantPrecedence();
+                int prec = (_includedStylesheets.get(i)).getMinimumDescendantPrecedence();
 
                 if (prec < min) {
                     min = prec;
@@ -420,9 +420,9 @@
 
     public void addIncludedStylesheet(Stylesheet child) {
         if (_includedStylesheets == null) {
-            _includedStylesheets = new Vector();
+            _includedStylesheets = new ArrayList<>();
         }
-        _includedStylesheets.addElement(child);
+        _includedStylesheets.add(child);
     }
 
     public void setSystemId(String systemId) {
@@ -461,10 +461,10 @@
      */
     public boolean hasLocalParams() {
         if (_hasLocalParams == null) {
-            Vector templates = getAllValidTemplates();
+           List<Template> templates = getAllValidTemplates();
             final int n = templates.size();
             for (int i = 0; i < n; i++) {
-                final Template template = (Template)templates.elementAt(i);
+                final Template template = templates.get(i);
                 if (template.hasParams()) {
                     _hasLocalParams = Boolean.TRUE;
                     return true;
@@ -648,7 +648,7 @@
     public Type typeCheck(SymbolTable stable) throws TypeCheckError {
         final int count = _globals.size();
         for (int i = 0; i < count; i++) {
-            final VariableBase var = (VariableBase)_globals.elementAt(i);
+            final VariableBase var = _globals.get(i);
             var.typeCheck(stable);
         }
         return typeCheckContents(stable);
@@ -711,7 +711,7 @@
             if (element instanceof Template) {
                 // Separate templates by modes
                 final Template template = (Template)element;
-                //_templates.addElement(template);
+                //_templates.add(template);
                 getMode(template.getModeName()).addTemplate(template);
             }
             // xsl:attribute-set
@@ -770,7 +770,7 @@
         }
 
         // Put the names array into the translet - used for dom/translet mapping
-        final Vector namesIndex = getXSLTC().getNamesIndex();
+        final List<String> namesIndex = getXSLTC().getNamesIndex();
         int size = namesIndex.size();
         String[] namesArray = new String[size];
         String[] urisArray = new String[size];
@@ -778,7 +778,7 @@
 
         int index;
         for (int i = 0; i < size; i++) {
-            String encodedName = (String)namesIndex.elementAt(i);
+            String encodedName = namesIndex.get(i);
             if ((index = encodedName.lastIndexOf(':')) > -1) {
                 urisArray[i] = encodedName.substring(0, index);
             }
@@ -859,7 +859,7 @@
         }
 
         // Put the namespace names array into the translet
-        final Vector namespaces = getXSLTC().getNamespaceIndex();
+        final List<String> namespaces = getXSLTC().getNamespaceIndex();
         staticConst.markChunkStart();
         il.append(new PUSH(cpg, namespaces.size()));
         il.append(new ANEWARRAY(cpg.addClass(STRING)));
@@ -870,7 +870,7 @@
         staticConst.markChunkEnd();
 
         for (int i = 0; i < namespaces.size(); i++) {
-            final String ns = (String)namespaces.elementAt(i);
+            final String ns = namespaces.get(i);
             staticConst.markChunkStart();
             il.append(new GETSTATIC(namespaceArrayRef));
             il.append(new PUSH(cpg, i));
@@ -1050,7 +1050,7 @@
         current.setStart(il.append(new ISTORE(current.getIndex())));
 
         // Create a new list containing variables/params + keys
-        Vector varDepElements = new Vector(_globals);
+        List<SyntaxTreeNode> varDepElements = new ArrayList<>(_globals);
         Iterator<SyntaxTreeNode> elements = elements();
         while (elements.hasNext()) {
             SyntaxTreeNode element = elements.next();
@@ -1065,7 +1065,7 @@
         // Translate vars/params and keys in the right order
         final int count = varDepElements.size();
         for (int i = 0; i < count; i++) {
-            final TopLevelElement tle = (TopLevelElement) varDepElements.elementAt(i);
+            final TopLevelElement tle = (TopLevelElement) varDepElements.get(i);
             tle.translate(classGen, toplevel);
             if (tle instanceof Key) {
                 final Key key = (Key) tle;
@@ -1074,7 +1074,7 @@
         }
 
         // Compile code for other top-level elements
-        Vector whitespaceRules = new Vector();
+       List<Whitespace.WhitespaceRule> whitespaceRules = new ArrayList<>();
         elements = elements();
         while (elements.hasNext()) {
             SyntaxTreeNode element = elements.next();
@@ -1115,27 +1115,15 @@
      * compatibility with Xalan interpretive, that type of dependency is
      * allowed and, therefore, consider to determine the partial order.
      */
-    private Vector resolveDependencies(Vector input) {
-        /* DEBUG CODE - INGORE
-        for (int i = 0; i < input.size(); i++) {
-            final TopLevelElement e = (TopLevelElement) input.elementAt(i);
-            System.out.println("e = " + e + " depends on:");
-            Vector dep = e.getDependencies();
-            for (int j = 0; j < (dep != null ? dep.size() : 0); j++) {
-                System.out.println("\t" + dep.elementAt(j));
-            }
-        }
-        System.out.println("=================================");
-        */
-
-        Vector result = new Vector();
+    private List<SyntaxTreeNode> resolveDependencies(List<SyntaxTreeNode> input) {
+        List<SyntaxTreeNode> result = new ArrayList<>();
         while (input.size() > 0) {
             boolean changed = false;
             for (int i = 0; i < input.size(); ) {
-                final TopLevelElement vde = (TopLevelElement) input.elementAt(i);
-                final Vector dep = vde.getDependencies();
+                final TopLevelElement vde = (TopLevelElement) input.get(i);
+                final List<SyntaxTreeNode> dep = vde.getDependencies();
                 if (dep == null || result.containsAll(dep)) {
-                    result.addElement(vde);
+                    result.add(vde);
                     input.remove(i);
                     changed = true;
                 }
@@ -1153,14 +1141,6 @@
             }
         }
 
-        /* DEBUG CODE - INGORE
-        System.out.println("=================================");
-        for (int i = 0; i < result.size(); i++) {
-            final TopLevelElement e = (TopLevelElement) result.elementAt(i);
-            System.out.println("e = " + e);
-        }
-        */
-
         return result;
     }
 
@@ -1374,8 +1354,8 @@
         final String pattern = "`aload'`pop'`instruction'";
         final InstructionList il = methodGen.getInstructionList();
         final InstructionFinder find = new InstructionFinder(il);
-        for(Iterator iter=find.search(pattern); iter.hasNext(); ) {
-            InstructionHandle[] match = (InstructionHandle[])iter.next();
+        for(Iterator<InstructionHandle[]> iter=find.search(pattern); iter.hasNext(); ) {
+            InstructionHandle[] match = iter.next();
             try {
                 il.delete(match[0], match[1]);
             }
@@ -1386,12 +1366,12 @@
     }
 
     public int addParam(Param param) {
-        _globals.addElement(param);
+        _globals.add(param);
         return _globals.size() - 1;
     }
 
     public int addVariable(Variable global) {
-        _globals.addElement(global);
+        _globals.add(global);
         return _globals.size() - 1;
     }
 
@@ -1410,11 +1390,11 @@
         return _className;
     }
 
-    public Vector getTemplates() {
+    public List<Template> getTemplates() {
         return _templates;
     }
 
-    public Vector getAllValidTemplates() {
+    public List<Template> getAllValidTemplates() {
         // Return templates if no imported/included stylesheets
         if (_includedStylesheets == null) {
             return _templates;
@@ -1422,11 +1402,9 @@
 
         // Is returned value cached?
         if (_allValidTemplates == null) {
-           Vector templates = new Vector();
-           templates.addAll(_templates);
-            int size = _includedStylesheets.size();
-            for (int i = 0; i < size; i++) {
-                Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i);
+            List<Template> templates = new ArrayList<>();
+            templates.addAll(_templates);
+            for (Stylesheet included : _includedStylesheets) {
                 templates.addAll(included.getAllValidTemplates());
             }
             //templates.addAll(_templates);
@@ -1442,6 +1420,6 @@
     }
 
     protected void addTemplate(Template template) {
-        _templates.addElement(template);
+        _templates.add(template);
     }
 }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -24,11 +25,12 @@
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 import java.util.StringTokenizer;
-import java.util.Vector;
 
 /**
  * @author Jacek Ambroziak
@@ -39,7 +41,7 @@
 
     // These maps are used for all stylesheets
     private final Map<String, Stylesheet> _stylesheets = new HashMap<>();
-    private final Map<String, Vector> _primops     = new HashMap<>();
+    private final Map<String, List<MethodType>> _primops = new HashMap<>();
 
     // These maps are used for some stylesheets
     private Map<String, VariableBase> _variables = null;
@@ -138,18 +140,18 @@
      * is prepended.
      */
     public void addPrimop(String name, MethodType mtype) {
-        Vector methods = _primops.get(name);
+        List<MethodType> methods = _primops.get(name);
         if (methods == null) {
-            _primops.put(name, methods = new Vector());
+            _primops.put(name, methods = new ArrayList<>());
         }
-        methods.addElement(mtype);
+        methods.add(mtype);
     }
 
     /**
      * Lookup a primitive operator or function in the symbol table by
      * prepending the prefix <tt>PrimopPrefix</tt>.
      */
-    public Vector lookupPrimop(String name) {
+    public List<MethodType> lookupPrimop(String name) {
         return _primops.get(name);
     }
 
@@ -272,7 +274,7 @@
      */
     public void pushExcludedNamespacesContext() {
         if (_excludedURIStack == null) {
-            _excludedURIStack = new Stack();
+            _excludedURIStack = new Stack<>();
         }
         _excludedURIStack.push(_excludedURI);
         _excludedURI = null;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -20,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
 import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
@@ -34,6 +33,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.utils.XML11Char;
+import java.util.ArrayList;
 import java.util.List;
 
 
@@ -60,7 +60,7 @@
 
     // The list of parameters in this template. This is only used
     // for simple named templates.
-    private Vector<Param> _parameters = new Vector<>();
+    private List<Param> _parameters = new ArrayList<>();
 
     public boolean hasParams() {
         return _parameters.size() > 0;
@@ -79,10 +79,10 @@
     }
 
     public void addParameter(Param param) {
-        _parameters.addElement(param);
+        _parameters.add(param);
     }
 
-    public Vector<Param> getParameters() {
+    public List<Param> getParameters() {
         return _parameters;
     }
 
@@ -328,7 +328,7 @@
 
             // Update load/store instructions to access Params from the stack
             for (int i = 0; i < numParams; i++) {
-                Param param = (Param)_parameters.elementAt(i);
+                Param param = _parameters.get(i);
                 param.setLoadInstruction(namedMethodGen.loadParameter(i));
                 param.setStoreInstruction(namedMethodGen.storeParameter(i));
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -28,9 +29,9 @@
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
-import java.util.Dictionary;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
-import java.util.Vector;
 
 /**
  * A test sequence is a sequence of patterns that
@@ -56,10 +57,10 @@
     private int _kernelType;
 
     /**
-     * Vector of all patterns in the test sequence. May include
+     * ArrayList of all patterns in the test sequence. May include
      * patterns with "*", "@*" or "node()" kernel.
      */
-    private Vector _patterns = null;
+    private List<LocationPathPattern> _patterns = null;
 
     /**
      * A reference to the Mode object.
@@ -84,11 +85,11 @@
     /**
      * Creates a new test sequence given a set of patterns and a mode.
      */
-    public TestSeq(Vector patterns, Mode mode) {
+    public TestSeq(List<LocationPathPattern> patterns, Mode mode) {
         this(patterns, -2, mode);
     }
 
-    public TestSeq(Vector patterns, int kernelType, Mode mode) {
+    public TestSeq(List<LocationPathPattern> patterns, int kernelType, Mode mode) {
         _patterns = patterns;
         _kernelType = kernelType;
         _mode = mode;
@@ -104,8 +105,7 @@
         final StringBuffer result = new StringBuffer();
 
         for (int i = 0; i < count; i++) {
-            final LocationPathPattern pattern =
-                (LocationPathPattern) _patterns.elementAt(i);
+            final LocationPathPattern pattern = _patterns.get(i);
 
             if (i == 0) {
                 result.append("Testseq for kernel ").append(_kernelType)
@@ -131,8 +131,8 @@
      * of the default pattern.
      */
     public double getPriority() {
-        final Template template = (_patterns.size() == 0) ? _default
-            : ((Pattern) _patterns.elementAt(0)).getTemplate();
+        final Template template = (_patterns.isEmpty()) ? _default
+            : ((Pattern) _patterns.get(0)).getTemplate();
         return template.getPriority();
     }
 
@@ -141,8 +141,8 @@
      * this test sequence.
      */
     public int getPosition() {
-        final Template template = (_patterns.size() == 0) ? _default
-            : ((Pattern) _patterns.elementAt(0)).getTemplate();
+        final Template template = (_patterns.isEmpty()) ? _default
+            : ((Pattern) _patterns.get(0)).getTemplate();
         return template.getPosition();
     }
 
@@ -152,13 +152,9 @@
      * finds a patterns that is fully reduced.
      */
     public void reduce() {
-        final Vector newPatterns = new Vector();
+        final List<LocationPathPattern> newPatterns = new ArrayList<>();
 
-        final int count = _patterns.size();
-        for (int i = 0; i < count; i++) {
-            final LocationPathPattern pattern =
-                (LocationPathPattern)_patterns.elementAt(i);
-
+        for (LocationPathPattern pattern : _patterns) {
             // Reduce this pattern
             pattern.reduceKernelPattern();
 
@@ -168,7 +164,7 @@
                 break;          // Ignore following patterns
             }
             else {
-                newPatterns.addElement(pattern);
+                newPatterns.add(pattern);
             }
         }
         _patterns = newPatterns;
@@ -183,9 +179,7 @@
         if (_default != null) {
             templates.put(_default, this);
         }
-        for (int i = 0; i < _patterns.size(); i++) {
-            final LocationPathPattern pattern =
-                (LocationPathPattern)_patterns.elementAt(i);
+        for (LocationPathPattern pattern : _patterns) {
             templates.put(pattern.getTemplate(), this);
         }
     }
@@ -204,7 +198,7 @@
      * Returns pattern n in this test sequence
      */
     private LocationPathPattern getPattern(int n) {
-        return (LocationPathPattern)_patterns.elementAt(n);
+        return _patterns.get(n);
     }
 
     /**
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
@@ -30,6 +28,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.ArrayList;
+import java.util.List;
 
 class TopLevelElement extends SyntaxTreeNode {
 
@@ -37,7 +37,7 @@
      * List of dependencies with other variables, parameters or
      * keys defined at the top level.
      */
-    protected Vector _dependencies = null;
+    protected List<SyntaxTreeNode> _dependencies = null;
 
     /**
      * Type check all the children of this node.
@@ -80,10 +80,10 @@
      */
     public void addDependency(TopLevelElement other) {
         if (_dependencies == null) {
-            _dependencies = new Vector();
+            _dependencies = new ArrayList<>();
         }
         if (!_dependencies.contains(other)) {
-            _dependencies.addElement(other);
+            _dependencies.add(other);
         }
     }
 
@@ -91,7 +91,7 @@
      * Get the list of dependencies with other top-level elements
      * like variables, parameteres or keys.
      */
-    public Vector getDependencies() {
+    public List<SyntaxTreeNode> getDependencies() {
         return _dependencies;
     }
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -66,7 +66,7 @@
                                                              tleft));
 
         if (ptype != null) {
-            final Type arg1 = (Type) ptype.argsType().elementAt(0);
+            final Type arg1 = ptype.argsType().get(0);
             if (!arg1.identicalTo(tleft)) {
                 _left = new CastExpr(_left, arg1);
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
@@ -35,6 +33,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xml.internal.dtm.Axis;
 import com.sun.org.apache.xml.internal.dtm.DTM;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -57,7 +57,7 @@
     public void setParser(Parser parser) {
         super.setParser(parser);
         // find all expressions in this Union
-        final Vector components = new Vector();
+        final List<Expression> components = new ArrayList<>();
         flatten(components);
         final int size = components.size();
         _components = (Expression[])components.toArray(new Expression[size]);
@@ -95,14 +95,14 @@
         return "union(" + _pathExpr + ", " + _rest + ')';
     }
 
-    private void flatten(Vector components) {
-        components.addElement(_pathExpr);
+    private void flatten(List<Expression> components) {
+        components.add(_pathExpr);
         if (_rest != null) {
             if (_rest instanceof UnionPathExpr) {
                 ((UnionPathExpr)_rest).flatten(components);
             }
             else {
-                components.addElement(_rest);
+                components.add(_rest);
             }
         }
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,8 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
@@ -31,6 +29,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -40,7 +39,7 @@
 final class UnparsedEntityUriCall extends FunctionCall {
     private Expression _entity;
 
-    public UnparsedEntityUriCall(QName fname, Vector arguments) {
+    public UnparsedEntityUriCall(QName fname, List<Expression> arguments) {
         super(fname, arguments);
         _entity = argument();
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,19 +24,17 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
-
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -43,7 +42,7 @@
  */
 final class UnsupportedElement extends SyntaxTreeNode {
 
-    private Vector _fallbacks = null;
+    private List<SyntaxTreeNode> _fallbacks = null;
     private ErrorMsg _message = null;
     private boolean _isExtension = false;
 
@@ -94,9 +93,9 @@
                     fallback.activate();
                     fallback.parseContents(parser);
                     if (_fallbacks == null) {
-                        _fallbacks = new Vector();
+                        _fallbacks = new ArrayList<>();
                     }
-                    _fallbacks.addElement(child);
+                    _fallbacks.add(child);
                 }
             }
         }
@@ -116,7 +115,7 @@
         if (_fallbacks != null) {
             int count = _fallbacks.size();
             for (int i = 0; i < count; i++) {
-                Fallback fallback = (Fallback)_fallbacks.elementAt(i);
+                Fallback fallback = (Fallback)_fallbacks.get(i);
                 fallback.typeCheck(stable);
             }
         }
@@ -130,7 +129,7 @@
         if (_fallbacks != null) {
             int count = _fallbacks.size();
             for (int i = 0; i < count; i++) {
-                Fallback fallback = (Fallback)_fallbacks.elementAt(i);
+                Fallback fallback = (Fallback)_fallbacks.get(i);
                 fallback.translate(classGen, methodGen);
             }
         }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,9 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.StringTokenizer;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
 import com.sun.org.apache.bcel.internal.generic.InstructionList;
@@ -32,6 +29,9 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
 
 /**
  * @author Jacek Ambroziak
@@ -45,7 +45,7 @@
         "";
 
     // Contains the names of all references attribute sets
-    private final Vector _sets = new Vector(2);
+    private final List<QName> _sets = new ArrayList<>(2);
 
     /**
      * Constructur - define initial attribute sets to use
@@ -87,10 +87,7 @@
         final InstructionList il = methodGen.getInstructionList();
         final SymbolTable symbolTable = getParser().getSymbolTable();
 
-        // Go through each attribute set and generate a method call
-        for (int i=0; i<_sets.size(); i++) {
-            // Get the attribute set name
-            final QName name = (QName)_sets.elementAt(i);
+        for (QName name : _sets) {
             // Get the AttributeSet reference from the symbol table
             final AttributeSet attrs = symbolTable.lookupAttributeSet(name);
             // Compile the call to the set's method if the set exists
@@ -102,7 +99,7 @@
                 il.append(methodGen.loadHandler());
                 il.append(methodGen.loadCurrentNode());
                 final int method = cpg.addMethodref(classGen.getClassName(),
-                                                    methodName, ATTR_SET_SIG);
+                        methodName, ATTR_SET_SIG);
                 il.append(new INVOKESPECIAL(method));
             }
             // Generate an error if the attribute set does not exist
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -20,15 +21,13 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
-import com.sun.org.apache.bcel.internal.generic.Instruction;
-import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
+import com.sun.org.apache.bcel.internal.generic.Instruction;
+import com.sun.org.apache.bcel.internal.generic.InstructionList;
 import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
 import com.sun.org.apache.bcel.internal.generic.NEW;
 import com.sun.org.apache.bcel.internal.generic.PUSH;
@@ -40,6 +39,8 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
 import com.sun.org.apache.xml.internal.utils.XML11Char;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author Jacek Ambroziak
@@ -61,7 +62,7 @@
     protected String      select;            // Textual repr. of variable expr.
 
     // References to this variable (when local)
-    protected Vector<VariableRefBase> _refs = new Vector<>(2);
+    protected List<VariableRefBase> _refs = new ArrayList<>(2);
 
     // Used to make sure parameter field is not added twice
     protected boolean    _ignore = false;
@@ -78,7 +79,7 @@
      * expression contains a reference to this variable.
      */
     public void addReference(VariableRefBase vref) {
-        _refs.addElement(vref);
+        _refs.add(vref);
     }
 
     /**
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java	Thu Oct 19 10:54:40 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,9 +21,6 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
-import java.util.StringTokenizer;
-import java.util.Vector;
-
 import com.sun.org.apache.bcel.internal.generic.ALOAD;
 import com.sun.org.apache.bcel.internal.generic.BranchHandle;
 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
@@ -40,6 +37,9 @@
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
 
 /**
  * @author Morten Jorgensen
@@ -63,7 +63,7 @@
     /**
      * Auxillary class for encapsulating a single strip/preserve rule
      */
-    private final static class WhitespaceRule {
+    final static class WhitespaceRule {
         private final int _action;
         private String _namespace; // Should be replaced by NS type (int)
         private String _element;   // Should be replaced by node type (int)
@@ -174,8 +174,8 @@
      * De-tokenize the elements listed in the 'elements' attribute and
      * instanciate a set of strip/preserve rules.
      */
-    public Vector getRules() {
-        final Vector rules = new Vector();
+    public List<WhitespaceRule> getRules() {
+        final List<WhitespaceRule> rules = new ArrayList<>();
         // Go through each element and instanciate strip/preserve-object
         final StringTokenizer list = new StringTokenizer(_elementList);
         while (list.hasMoreElements()) {
@@ -191,35 +191,33 @@
      * Scans through the rules vector and looks for a rule of higher
      * priority that contradicts the current rule.
      */
-    private static WhitespaceRule findContradictingRule(Vector rules,
+    private static WhitespaceRule findContradictingRule(List<WhitespaceRule> rules,
                                                         WhitespaceRule rule) {
-        for (int i = 0; i < rules.size(); i++) {
-            // Get the next rule in the prioritized list
-            WhitespaceRule currentRule = (WhitespaceRule)rules.elementAt(i);
+        for (WhitespaceRule currentRule : rules) {
             // We only consider rules with higher priority
             if (currentRule == rule) {
                 return null;
             }
 
             /*
-             * See if there is a contradicting rule with higher priority.
-             * If the rules has the same action then this rule is redundant,
-             * if they have different action then this rule will never win.
-             */
+            * See if there is a contradicting rule with higher priority.
+            * If the rules has the same action then this rule is redundant,
+            * if they have different action then this rule will never win.
+            */
             switch (currentRule.getStrength()) {
-            case RULE_ALL:
-                return currentRule;
+                case RULE_ALL:
+                    return currentRule;
 
-            case RULE_ELEMENT:
-                if (!rule.getElement().equals(currentRule.getElement())) {
+                case RULE_ELEMENT:
+                    if (!rule.getElement().equals(currentRule.getElement())) {
+                        break;
+                    }
+                // intentional fall-through
+                case RULE_NAMESPACE:
+                    if (rule.getNamespace().equals(currentRule.getNamespace())) {
+                        return currentRule;
+                    }
                     break;
-                }
-                // intentional fall-through
-            case RULE_NAMESPACE:
-                if (rule.getNamespace().equals(currentRule.getNamespace())) {
-                    return currentRule;
-                }
-                break;
             }
         }
         return null;
@@ -230,7 +228,7 @@
      * Orders a set or rules by priority, removes redundant rules and rules
      * that are shadowed by stronger, contradicting rules.
      */
-    private static int prioritizeRules(Vector rules) {
+    private static int prioritizeRules(List<WhitespaceRule> rules) {
         WhitespaceRule currentRule;
         int defaultAction = PRESERVE_SPACE;
 
@@ -242,20 +240,20 @@
         // elements and signal that all whitespaces should be preserved
         boolean strip = false;
         for (int i = 0; i < rules.size(); i++) {
-            currentRule = (WhitespaceRule)rules.elementAt(i);
+            currentRule = rules.get(i);
             if (currentRule.getAction() == STRIP_SPACE) {
                 strip = true;
             }
         }
         // Return with default action: PRESERVE_SPACE
         if (!strip) {
-            rules.removeAllElements();
+            rules.clear();
             return PRESERVE_SPACE;
         }
 
         // Remove all rules that are contradicted by rules with higher priority
         for (int idx = 0; idx < rules.size(); ) {
-            currentRule = (WhitespaceRule)rules.elementAt(idx);
+            currentRule = rules.get(idx);
 
             // Remove this single rule if it has no purpose
             if (findContradictingRule(rules,currentRule) != null) {
@@ -266,7 +264,7 @@
                 if (currentRule.getStrength() == RULE_ALL) {
                     defaultAction = currentRule.getAction();
                     for (int i = idx; i < rules.size(); i++) {
-                        rules.removeElementAt(i);
+                        rules.remove(i);
                     }
                 }
                 // Skip to next rule (there might not be any)...
@@ -275,16 +273,16 @@
         }
 
         // The rules vector could be empty if first rule has strength RULE_ALL
-        if (rules.size() == 0) {
+        if (rules.isEmpty()) {
             return defaultAction;
         }
 
         // Now work backwards and strip away all rules that have the same
         // action as the default rule (no reason the check them at the end).
         do {
-            currentRule = (WhitespaceRule)rules.lastElement();
+            currentRule = rules.get(rules.size() - 1);
             if (currentRule.getAction() == defaultAction) {
-                rules.removeElementAt(rules.size() - 1);
+                rules.remove(rules.size() - 1);
             }
             else {
                 break;
@@ -330,7 +328,7 @@
     /**
      * Compiles the predicate method
      */
-    private static void compilePredicate(Vector rules,
+    private static void compilePredicate(List<WhitespaceRule> rules,
                                          int defaultAction,
                                          ClassGenerator classGen) {
         final ConstantPoolGen cpg = classGen.getConstantPool();
@@ -363,7 +361,7 @@
         // Traverse all strip/preserve rules
         for (int i = 0; i<rules.size(); i++) {
             // Get the next rule in the prioritised list
-            WhitespaceRule rule = (WhitespaceRule)rules.elementAt(i);
+            WhitespaceRule rule = rules.get(i);
 
             // Returns the namespace for a node in the DOM
             final int gns = cpg.addInterfaceMethodref(DOM_INTF,
@@ -467,7 +465,7 @@
      *    - STRIP_SPACE    (always strip whitespace text-nodes)
      *    - PRESERVE_SPACE (always preserve whitespace text-nodes)
      */
-    public static int translateRules(Vector rules,
+    public static int translateRules(List<WhitespaceRule> rules,
                                      ClassGenerator classGen) {
         // Get the core rules in prioritized order
         final int defaultAction = prioritizeRules(rules);
@@ -485,7 +483,7 @@
     /**
      * Sorts a range of rules with regard to PRIORITY only
      */
-    private static void quicksort(Vector rules, int p, int r) {
+    private static void quicksort(List<WhitespaceRule> rules, int p, int r) {
         while (p < r) {
             final int q = partition(rules, p, r);
             quicksort(rules, p, q);
@@ -496,18 +494,18 @@
     /**
      * Used with quicksort method above
      */
-    private static int partition(Vector rules, int p, int r) {
-        final WhitespaceRule x = (WhitespaceRule)rules.elementAt((p+r) >>> 1);
+    private static int partition(List<WhitespaceRule> rules, int p, int r) {
+        final WhitespaceRule x = rules.get((p+r) >>> 1);
         int i = p - 1, j = r + 1;
         while (true) {
-            while (x.compareTo((WhitespaceRule)rules.elementAt(--j)) < 0) {
+            while (x.compareTo(rules.get(--j)) < 0) {
             }
-            while (x.compareTo((WhitespaceRule)rules.elementAt(++i)) > 0) {
+            while (x.compareTo(rules.get(++i)) > 0) {
             }
             if (i < j) {
-                final WhitespaceRule tmp = (WhitespaceRule)rules.elementAt(i);
-                rules.setElementAt(rules.elementAt(j), i);
-                rules.setElementAt(tmp, j);
+                final WhitespaceRule tmp = rules.get(i);
+                rules.set(i, rules.get(j));
+                rules.set(j, tmp);
             }
             else {
                 return j;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java	Thu Oct 19 13:52:37 2017 +0530
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java	Thu Oct 19 10:54:40 2017 -0700
@@ -25,27 +25,27 @@
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler;
 
+import com.sun.java_cup.internal.runtime.*;
+import com.sun.org.apache.xalan.internal.xsltc.DOM;
+import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
+import com.sun.org.apache.xalan.internal.xsltc.runtime.Operators;
+import com.sun.org.apache.xml.internal.dtm.Axis;
+import com.sun.org.apache.xml.internal.dtm.DTM;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Stack;
-import java.util.Vector;
-import java.io.StringReader;
-import com.sun.java_cup.internal.runtime.*;
-import com.sun.org.apache.xml.internal.dtm.DTM;
-import com.sun.org.apache.xalan.internal.xsltc.DOM;
-import com.sun.org.apache.xml.internal.dtm.Axis;
-import com.sun.org.apache.xalan.internal.xsltc.runtime.Operators;
-import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
 
 /**
  * CUP v0.10j generated parser.
  * This class was generated by CUP v0.10j on Thu Oct 06 10:09:26 PDT 2005.
  */
-public class XPathParser extends com.sun.java_cup.internal.runtime.lr_parser {
+public class XPathParser extends lr_parser {
 
   /** Default constructor. */
   public XPathParser() {super();}
 
   /** Constructor which sets the default scanner. */
-  public XPathParser(com.sun.java_cup.internal.runtime.Scanner s) {super(s);}
+  public XPathParser(Scanner s) {super(s);}
 
   /** Production table. */
   protected static final short _production_table[][] =
@@ -842,24 +842,24 @@
   public short[][] reduce_table() {return _reduce_table;}
 
   /** Instance of action encapsulation class. */
-  protected CUP$XPathParser$actions action_obj;
+  protected parser_actions action_obj;
 
   /** Action encapsulation object initializer. */
   protected void init_actions()
     {
-      action_obj = new CUP$XPathParser$actions(this);
+      action_obj = new parser_actions(this);
     }
 
   /** Invoke a user supplied parse action. */
-  public com.sun.java_cup.internal.runtime.Symbol do_action(
+  public Symbol do_action(
     int                        act_num,
-    com.sun.java_cup.internal.runtime.lr_parser parser,
-    java.util.Stack            stack,
+    lr_parser parser,
+    Stack<Symbol>            stack,
     int                        top)
     throws java.lang.Exception
   {
     /* call code in generated class */
-    return action_obj.CUP$XPathParser$do_action(act_num, parser, stack, top);
+    return action_obj.parser_do_action(act_num, parser, stack, top);
   }
 
   /** Indicates start state. */
@@ -878,7 +878,7 @@
     /**
      * Used by function calls with no args.
      */
-    static public final Vector EmptyArgs = new Vector(0);
+    static public final List<Expression> EmptyArgs = new ArrayList<>(0);
 
     /**
      * Reference to non-existing variable.
@@ -947,7 +947,7 @@
      * expansion to be correct, the priority of the pattern/template must be
      * set to -0.25 (when no other predicates are present).
      */
-    public StepPattern createStepPattern(int axis, Object test, Vector predicates) {
+    public StepPattern createStepPattern(int axis, Object test, List<Predicate> predicates) {
         int nodeType;
 
         if (test == null) {  // "*"
@@ -978,7 +978,7 @@
                 // Expand {uri}:* to *[namespace-uri() = 'uri'] - same for @*
                 if (uri != null && (local.equals("*") || local.equals("@*"))) {
                     if (predicates == null) {
-                        predicates = new Vector(2);
+                        predicates = new ArrayList<>(2);
                     }
 
                     // Priority is set by hand if no other predicates exist
@@ -1130,363 +1130,366 @@
 }
 
 /** Cup generated class to encapsulate user supplied action code.*/
-class CUP$XPathParser$actions {
+class parser_actions {
   private final XPathParser parser;
 
   /** Constructor */
-  CUP$XPathParser$actions(XPathParser parser) {
+  parser_actions(XPathParser parser) {
     this.parser = parser;
   }
 
   /** Method with the actual generated action code. */
-  public final com.sun.java_cup.internal.runtime.Symbol CUP$XPathParser$do_action(
-    int                        CUP$XPathParser$act_num,
-    com.sun.java_cup.internal.runtime.lr_parser CUP$XPathParser$parser,
-    java.util.Stack            CUP$XPathParser$stack,
-    int                        CUP$XPathParser$top)
+  public final Symbol parser_do_action(
+    int                        parser_act_num,
+    lr_parser parser_parser,
+    Stack<Symbol>            parser_stack,
+    int                        parser_top)
     throws java.lang.Exception
     {
       /* Symbol object for return from actions */
-      com.sun.java_cup.internal.runtime.Symbol CUP$XPathParser$result;
+      Symbol parser_result;
 
       /* select the action based on the action number */
-      switch (CUP$XPathParser$act_num)
+      switch (parser_act_num)
         {
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 140: // QName ::= ID
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("id");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 139: // QName ::= SELF
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("self");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 138: // QName ::= PRECEDINGSIBLING
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("preceding-sibling");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 137: // QName ::= PRECEDING
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("preceding");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 136: // QName ::= PARENT
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("parent");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 135: // QName ::= NAMESPACE
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("namespace");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 134: // QName ::= FOLLOWINGSIBLING
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("following-sibling");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 133: // QName ::= FOLLOWING
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("following");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 132: // QName ::= DESCENDANTORSELF
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("decendant-or-self");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 131: // QName ::= DESCENDANT
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("decendant");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 130: // QName ::= CHILD
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("child");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 129: // QName ::= ATTRIBUTE
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("attribute");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 128: // QName ::= ANCESTORORSELF
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("ancestor-or-self");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 127: // QName ::= ANCESTOR
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("child");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 126: // QName ::= KEY
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("key");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 125: // QName ::= MOD
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("mod");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 124: // QName ::= DIV
             {
               QName RESULT = null;
                  RESULT = parser.getQNameIgnoreDefaultNs("div");
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 123: // QName ::= QNAME
             {
               QName RESULT = null;
-                int qnameleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int qnameright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                String qname = (String)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int qnameleft = (parser_stack.get(parser_top-0)).left;
+                int qnameright = (parser_stack.get(parser_top-0)).right;
+                String qname = (String)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = parser.getQNameIgnoreDefaultNs(qname);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(37/*QName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(37/*QName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 122: // NameTest ::= QName
             {
               Object RESULT = null;
-                int qnleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int qnright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                QName qn = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int qnleft = (parser_stack.get(parser_top-0)).left;
+                int qnright = (parser_stack.get(parser_top-0)).right;
+                QName qn = (QName)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = qn;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(26/*NameTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(26/*NameTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 121: // NameTest ::= STAR
             {
               Object RESULT = null;
                  RESULT = null;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(26/*NameTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(26/*NameTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 120: // NodeTest ::= PI
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.PI);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(25/*NodeTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 119: // NodeTest ::= PIPARAM LPAREN Literal RPAREN
             {
               Object RESULT = null;
-                int lleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int lright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                String l = (String)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+                int lleft = (parser_stack.get(parser_top-1)).left;
+                int lright = (parser_stack.get(parser_top-1)).right;
+                String l = (String)((Symbol) parser_stack.get(parser_top-1)).value;
 
            QName name = parser.getQNameIgnoreDefaultNs("name");
            Expression exp = new EqualityExpr(Operators.EQ,
                                              new NameCall(name),
                                              new LiteralExpr(l));
-           Vector predicates = new Vector();
-           predicates.addElement(new Predicate(exp));
+           List<Predicate> predicates = new ArrayList<>();
+           predicates.add(new Predicate(exp));
            RESULT = new Step(Axis.CHILD, NodeTest.PI, predicates);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(25/*NodeTest*/, (parser_stack.get(parser_top-3)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 118: // NodeTest ::= COMMENT
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.COMMENT);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(25/*NodeTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 117: // NodeTest ::= TEXT
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.TEXT);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(25/*NodeTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 116: // NodeTest ::= NODE
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.ANODE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(25/*NodeTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 115: // NodeTest ::= NameTest
             {
               Object RESULT = null;
-                int ntleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ntright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Object nt = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ntleft = (parser_stack.get(parser_top-0)).left;
+                int ntright = (parser_stack.get(parser_top-0)).right;
+                Object nt = (Object)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = nt;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(25/*NodeTest*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 114: // Argument ::= Expr
             {
               Expression RESULT = null;
-                int exleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int exright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ex = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int exleft = (parser_stack.get(parser_top-0)).left;
+                int exright = (parser_stack.get(parser_top-0)).right;
+                Expression ex = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = ex;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(3/*Argument*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(3/*Argument*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 113: // VariableName ::= QName
             {
               QName RESULT = null;
-                int vnameleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int vnameright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                QName vname = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int vnameleft = (parser_stack.get(parser_top-0)).left;
+                int vnameright = (parser_stack.get(parser_top-0)).right;
+                QName vname = (QName)((Symbol) parser_stack.get(parser_top-0)).value;
 
             RESULT = vname;
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(39/*VariableName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(39/*VariableName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 112: // FunctionName ::= QName
             {
               QName RESULT = null;
-                int fnameleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int fnameright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                QName fname = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int fnameleft = (parser_stack.get(parser_top-0)).left;
+                int fnameright = (parser_stack.get(parser_top-0)).right;
+                QName fname = (QName)((Symbol) parser_stack.get(parser_top-0)).value;
 
             RESULT = fname;
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(38/*FunctionName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(38/*FunctionName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 111: // NonemptyArgumentList ::= Argument COMMA NonemptyArgumentList
             {
-              Vector RESULT = null;
-                int argleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int argright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression arg = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int arglleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int arglright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector argl = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
-                 argl.insertElementAt(arg, 0); RESULT = argl;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(36/*NonemptyArgumentList*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+                List<Expression> RESULT = null;
+                int argleft = (parser_stack.get(parser_top-2)).left;
+                int argright = (parser_stack.get(parser_top-2)).right;
+                Expression arg = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int arglleft = (parser_stack.get(parser_top-0)).left;
+                int arglright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Expression> argl = (ArrayList<Expression>)((Symbol) parser_stack.get(parser_top-0)).value;
+                argl.add(0, arg);
+                RESULT = argl;
+              parser_result = new Symbol(36/*NonemptyArgumentList*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 110: // NonemptyArgumentList ::= Argument
             {
-              Vector RESULT = null;
-                int argleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int argright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression arg = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+              List<Expression> RESULT = null;
+                int argleft = (parser_stack.get(parser_top-0)).left;
+                int argright = (parser_stack.get(parser_top-0)).right;
+                Expression arg = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
 
-            Vector temp = new Vector();
-            temp.addElement(arg);
+            List<Expression> temp = new ArrayList<>();
+            temp.add(arg);
             RESULT = temp;
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(36/*NonemptyArgumentList*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(36/*NonemptyArgumentList*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 109: // FunctionCall ::= FunctionName LPAREN NonemptyArgumentList RPAREN
             {
-              Expression RESULT = null;
-                int fnameleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left;
-                int fnameright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).right;
-                QName fname = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).value;
-                int arglleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int arglright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Vector argl = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+                Expression RESULT = null;
+                int fnameleft = (parser_stack.get(parser_top-3)).left;
+                int fnameright = (parser_stack.get(parser_top-3)).right;
+                QName fname = (QName)((Symbol) parser_stack.get(parser_top-3)).value;
+                int arglleft = (parser_stack.get(parser_top-1)).left;
+                int arglright = (parser_stack.get(parser_top-1)).right;
+                @SuppressWarnings("unchecked")
+                List<Expression> argl = (ArrayList<Expression>)((Symbol) parser_stack.get(parser_top-1)).value;
 
           if (fname == parser.getQNameIgnoreDefaultNs("concat")) {
             RESULT = new ConcatCall(fname, argl);
@@ -1571,17 +1574,17 @@
             RESULT = new FunctionCall(fname, argl);
           }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(16/*FunctionCall*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(16/*FunctionCall*/, (parser_stack.get(parser_top-3)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 108: // FunctionCall ::= FunctionName LPAREN RPAREN
             {
               Expression RESULT = null;
-                int fnameleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int fnameright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                QName fname = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
+                int fnameleft = (parser_stack.get(parser_top-2)).left;
+                int fnameright = (parser_stack.get(parser_top-2)).right;
+                QName fname = (QName)((Symbol) parser_stack.get(parser_top-2)).value;
 
 
           if (fname == parser.getQNameIgnoreDefaultNs("current")) {
@@ -1627,17 +1630,17 @@
             RESULT = new FunctionCall(fname, parser.EmptyArgs);
           }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(16/*FunctionCall*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(16/*FunctionCall*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 107: // VariableReference ::= DOLLAR VariableName
             {
               Expression RESULT = null;
-                int varNameleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int varNameright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                QName varName = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int varNameleft = (parser_stack.get(parser_top-0)).left;
+                int varNameright = (parser_stack.get(parser_top-0)).right;
+                QName varName = (QName)((Symbol) parser_stack.get(parser_top-0)).value;
 
             // An empty qname prefix for a variable or parameter reference
             // should map to the null namespace and not the default URI.
@@ -1659,41 +1662,41 @@
                 RESULT = new UnresolvedRef(varName);
             }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(15/*VariableReference*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(15/*VariableReference*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 106: // PrimaryExpr ::= FunctionCall
             {
               Expression RESULT = null;
-                int fcleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int fcright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression fc = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int fcleft = (parser_stack.get(parser_top-0)).left;
+                int fcright = (parser_stack.get(parser_top-0)).right;
+                Expression fc = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = fc;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(17/*PrimaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(17/*PrimaryExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 105: // PrimaryExpr ::= REAL
             {
               Expression RESULT = null;
-                int numleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int numright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Double num = (Double)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int numleft = (parser_stack.get(parser_top-0)).left;
+                int numright = (parser_stack.get(parser_top-0)).right;
+                Double num = (Double)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new RealExpr(num.doubleValue());
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(17/*PrimaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(17/*PrimaryExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 104: // PrimaryExpr ::= INT
             {
               Expression RESULT = null;
-                int numleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int numright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Long num = (Long)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int numleft = (parser_stack.get(parser_top-0)).left;
+                int numright = (parser_stack.get(parser_top-0)).right;
+                Long num = (Long)((Symbol) parser_stack.get(parser_top-0)).value;
 
            long value = num.longValue();
            if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {
@@ -1710,17 +1713,17 @@
                    RESULT = new IntExpr(num.intValue());
            }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(17/*PrimaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(17/*PrimaryExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 103: // PrimaryExpr ::= Literal
             {
               Expression RESULT = null;
-                int stringleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int stringright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                String string = (String)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int stringleft = (parser_stack.get(parser_top-0)).left;
+                int stringright = (parser_stack.get(parser_top-0)).right;
+                String string = (String)((Symbol) parser_stack.get(parser_top-0)).value;
 
         /*
         * If the string appears to have the syntax of a QName, store
@@ -1738,278 +1741,281 @@
         RESULT = (namespace == null) ? new LiteralExpr(string)
                      : new LiteralExpr(string, namespace);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(17/*PrimaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(17/*PrimaryExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 102: // PrimaryExpr ::= LPAREN Expr RPAREN
             {
               Expression RESULT = null;
-                int exleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int exright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Expression ex = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+                int exleft = (parser_stack.get(parser_top-1)).left;
+                int exright = (parser_stack.get(parser_top-1)).right;
+                Expression ex = (Expression)((Symbol) parser_stack.get(parser_top-1)).value;
                  RESULT = ex;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(17/*PrimaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(17/*PrimaryExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 101: // PrimaryExpr ::= VariableReference
             {
               Expression RESULT = null;
-                int vrleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int vrright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression vr = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int vrleft = (parser_stack.get(parser_top-0)).left;
+                int vrright = (parser_stack.get(parser_top-0)).right;
+                Expression vr = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = vr;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(17/*PrimaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(17/*PrimaryExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 100: // FilterExpr ::= PrimaryExpr Predicates
             {
               Expression RESULT = null;
-                int primaryleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int primaryright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Expression primary = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int primaryleft = (parser_stack.get(parser_top-1)).left;
+                int primaryright = (parser_stack.get(parser_top-1)).right;
+                Expression primary = (Expression)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Expression> pp = (ArrayList<Expression>)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new FilterExpr(primary, pp);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(6/*FilterExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(6/*FilterExpr*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 99: // FilterExpr ::= PrimaryExpr
             {
               Expression RESULT = null;
-                int primaryleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int primaryright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression primary = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int primaryleft = (parser_stack.get(parser_top-0)).left;
+                int primaryright = (parser_stack.get(parser_top-0)).right;
+                Expression primary = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = primary;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(6/*FilterExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(6/*FilterExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 98: // AbbreviatedStep ::= DDOT
             {
               Expression RESULT = null;
                  RESULT = new Step(Axis.PARENT, NodeTest.ANODE, null);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(20/*AbbreviatedStep*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(20/*AbbreviatedStep*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 97: // AbbreviatedStep ::= DOT
             {
               Expression RESULT = null;
                  RESULT = new Step(Axis.SELF, NodeTest.ANODE, null);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(20/*AbbreviatedStep*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(20/*AbbreviatedStep*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 96: // AxisName ::= SELF
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.SELF);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 95: // AxisName ::= PRECEDINGSIBLING
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.PRECEDINGSIBLING);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 94: // AxisName ::= PRECEDING
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.PRECEDING);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 93: // AxisName ::= PARENT
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.PARENT);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 92: // AxisName ::= NAMESPACE
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.NAMESPACE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 91: // AxisName ::= FOLLOWINGSIBLING
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.FOLLOWINGSIBLING);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 90: // AxisName ::= FOLLOWING
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.FOLLOWING);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 89: // AxisName ::= DESCENDANTORSELF
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.DESCENDANTORSELF);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 88: // AxisName ::= DESCENDANT
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.DESCENDANT);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 87: // AxisName ::= CHILD
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.CHILD);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 86: // AxisName ::= ATTRIBUTE
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.ATTRIBUTE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 85: // AxisName ::= ANCESTORORSELF
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.ANCESTORORSELF);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 84: // AxisName ::= ANCESTOR
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.ANCESTOR);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(40/*AxisName*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 83: // AxisSpecifier ::= ATSIGN
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.ATTRIBUTE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(41/*AxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(41/*AxisSpecifier*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 82: // AxisSpecifier ::= AxisName DCOLON
             {
               Integer RESULT = null;
-                int anleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int anright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Integer an = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+                int anleft = (parser_stack.get(parser_top-1)).left;
+                int anright = (parser_stack.get(parser_top-1)).right;
+                Integer an = (Integer)((Symbol) parser_stack.get(parser_top-1)).value;
                  RESULT = an;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(41/*AxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(41/*AxisSpecifier*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 81: // Step ::= AbbreviatedStep
             {
               Expression RESULT = null;
-                int abbrevleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int abbrevright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression abbrev = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int abbrevleft = (parser_stack.get(parser_top-0)).left;
+                int abbrevright = (parser_stack.get(parser_top-0)).right;
+                Expression abbrev = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = abbrev;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(7/*Step*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(7/*Step*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 80: // Step ::= AxisSpecifier NodeTest
             {
               Expression RESULT = null;
-                int axisleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int axisright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Integer axis = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ntestleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ntestright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Object ntest = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int axisleft = (parser_stack.get(parser_top-1)).left;
+                int axisright = (parser_stack.get(parser_top-1)).right;
+                Integer axis = (Integer)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ntestleft = (parser_stack.get(parser_top-0)).left;
+                int ntestright = (parser_stack.get(parser_top-0)).right;
+                Object ntest = (Object)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new Step(axis.intValue(),
                              parser.findNodeType(axis.intValue(), ntest),
                              null);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(7/*Step*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(7/*Step*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 79: // Step ::= AxisSpecifier NodeTest Predicates
             {
               Expression RESULT = null;
-                int axisleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int axisright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Integer axis = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int ntestleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int ntestright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Object ntest = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int axisleft = (parser_stack.get(parser_top-2)).left;
+                int axisright = (parser_stack.get(parser_top-2)).right;
+                Integer axis = (Integer)((Symbol) parser_stack.get(parser_top-2)).value;
+                int ntestleft = (parser_stack.get(parser_top-1)).left;
+                int ntestright = (parser_stack.get(parser_top-1)).right;
+                Object ntest = (Object)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Predicate> pp = (ArrayList<Predicate>)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new Step(axis.intValue(),
                              parser.findNodeType(axis.intValue(), ntest),
                              pp);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(7/*Step*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(7/*Step*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 78: // Step ::= NodeTest Predicates
             {
               Expression RESULT = null;
-                int ntestleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int ntestright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Object ntest = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ntestleft = (parser_stack.get(parser_top-1)).left;
+                int ntestright = (parser_stack.get(parser_top-1)).right;
+                Object ntest = (Object)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Predicate> pp = (ArrayList<Predicate>)((Symbol) parser_stack.get(parser_top-0)).value;
 
             if (ntest instanceof Step) {
                 Step step = (Step)ntest;
@@ -2021,17 +2027,17 @@
                              parser.findNodeType(Axis.CHILD, ntest), pp);
             }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(7/*Step*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(7/*Step*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 77: // Step ::= NodeTest
             {
               Expression RESULT = null;
-                int ntestleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ntestright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Object ntest = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ntestleft = (parser_stack.get(parser_top-0)).left;
+                int ntestright = (parser_stack.get(parser_top-0)).right;
+                Object ntest = (Object)((Symbol) parser_stack.get(parser_top-0)).value;
 
             if (ntest instanceof Step) {
                 RESULT = (Step)ntest;
@@ -2042,17 +2048,17 @@
                              null);
             }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(7/*Step*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(7/*Step*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 76: // AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath
             {
               Expression RESULT = null;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int rlpleft = (parser_stack.get(parser_top-0)).left;
+                int rlpright = (parser_stack.get(parser_top-0)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
 
            //
            // Expand '//' into '/descendant-or-self::node()/' or
@@ -2068,25 +2074,25 @@
            RESULT = new AbsoluteLocationPath(parser.insertStep(step,
                                 (RelativeLocationPath) rlp));
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(24/*AbbreviatedAbsoluteLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(24/*AbbreviatedAbsoluteLocationPath*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 75: // AbbreviatedRelativeLocationPath ::= RelativeLocationPath DSLASH Step
             {
               Expression RESULT = null;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int stepleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int stepright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression step = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int rlpleft = (parser_stack.get(parser_top-2)).left;
+                int rlpright = (parser_stack.get(parser_top-2)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int stepleft = (parser_stack.get(parser_top-0)).left;
+                int stepright = (parser_stack.get(parser_top-0)).right;
+                Expression step = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
 
            final Step right  = (Step)step;
            final int  axis   = right.getAxis();
            final int  type   = right.getNodeType();
-           final Vector predicates = right.getPredicates();
+           final List<Predicate> predicates = right.getPredicates();
 
            if ((axis == Axis.CHILD) && (type != NodeTest.ATTRIBUTE)) {
                // Compress './/child:E' into 'descendant::E' - if possible
@@ -2135,65 +2141,65 @@
                RESULT = new ParentLocationPath(left, ppl);
            }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(22/*AbbreviatedRelativeLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(22/*AbbreviatedRelativeLocationPath*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 74: // AbsoluteLocationPath ::= AbbreviatedAbsoluteLocationPath
             {
               Expression RESULT = null;
-                int aalpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aalpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression aalp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int aalpleft = (parser_stack.get(parser_top-0)).left;
+                int aalpright = (parser_stack.get(parser_top-0)).right;
+                Expression aalp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = aalp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(23/*AbsoluteLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(23/*AbsoluteLocationPath*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 73: // AbsoluteLocationPath ::= SLASH RelativeLocationPath
             {
               Expression RESULT = null;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int rlpleft = (parser_stack.get(parser_top-0)).left;
+                int rlpright = (parser_stack.get(parser_top-0)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new AbsoluteLocationPath(rlp);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(23/*AbsoluteLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(23/*AbsoluteLocationPath*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 72: // AbsoluteLocationPath ::= SLASH
             {
               Expression RESULT = null;
                  RESULT = new AbsoluteLocationPath();
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(23/*AbsoluteLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(23/*AbsoluteLocationPath*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 71: // RelativeLocationPath ::= AbbreviatedRelativeLocationPath
             {
               Expression RESULT = null;
-                int arlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int arlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression arlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int arlpleft = (parser_stack.get(parser_top-0)).left;
+                int arlpright = (parser_stack.get(parser_top-0)).right;
+                Expression arlp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = arlp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(21/*RelativeLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(21/*RelativeLocationPath*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 70: // RelativeLocationPath ::= RelativeLocationPath SLASH Step
             {
               Expression RESULT = null;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int stepleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int stepright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression step = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int rlpleft = (parser_stack.get(parser_top-2)).left;
+                int rlpright = (parser_stack.get(parser_top-2)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int stepleft = (parser_stack.get(parser_top-0)).left;
+                int stepright = (parser_stack.get(parser_top-0)).right;
+                Expression step = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
 
         if (rlp instanceof Step && ((Step) rlp).isAbbreviatedDot()) {
               RESULT = step;       // Remove './' from the middle
@@ -2206,56 +2212,56 @@
                 new ParentLocationPath((RelativeLocationPath) rlp, step);
            }
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(21/*RelativeLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(21/*RelativeLocationPath*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 69: // RelativeLocationPath ::= Step
             {
               Expression RESULT = null;
-                int stepleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int stepright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression step = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int stepleft = (parser_stack.get(parser_top-0)).left;
+                int stepright = (parser_stack.get(parser_top-0)).right;
+                Expression step = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = step;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(21/*RelativeLocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(21/*RelativeLocationPath*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 68: // LocationPath ::= AbsoluteLocationPath
             {
               Expression RESULT = null;
-                int alpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int alpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression alp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int alpleft = (parser_stack.get(parser_top-0)).left;
+                int alpright = (parser_stack.get(parser_top-0)).right;
+                Expression alp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = alp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(4/*LocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(4/*LocationPath*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 67: // LocationPath ::= RelativeLocationPath
             {
               Expression RESULT = null;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int rlpleft = (parser_stack.get(parser_top-0)).left;
+                int rlpright = (parser_stack.get(parser_top-0)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = rlp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(4/*LocationPath*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(4/*LocationPath*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 66: // PathExpr ::= FilterExpr DSLASH RelativeLocationPath
             {
               Expression RESULT = null;
-                int fexpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int fexpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression fexp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int fexpleft = (parser_stack.get(parser_top-2)).left;
+                int fexpright = (parser_stack.get(parser_top-2)).right;
+                Expression fexp = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int rlpleft = (parser_stack.get(parser_top-0)).left;
+                int rlpright = (parser_stack.get(parser_top-0)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
 
            //
            // Expand '//' into '/descendant-or-self::node()/' or
@@ -2275,887 +2281,892 @@
            }
            RESULT = fpp;
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(19/*PathExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(19/*PathExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 65: // PathExpr ::= FilterExpr SLASH RelativeLocationPath
             {
               Expression RESULT = null;
-                int fexpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int fexpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression fexp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int rlpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int rlpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression rlp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int fexpleft = (parser_stack.get(parser_top-2)).left;
+                int fexpright = (parser_stack.get(parser_top-2)).right;
+                Expression fexp = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int rlpleft = (parser_stack.get(parser_top-0)).left;
+                int rlpright = (parser_stack.get(parser_top-0)).right;
+                Expression rlp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new FilterParentPath(fexp, rlp);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(19/*PathExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(19/*PathExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 64: // PathExpr ::= FilterExpr
             {
               Expression RESULT = null;
-                int fexpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int fexpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression fexp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int fexpleft = (parser_stack.get(parser_top-0)).left;
+                int fexpright = (parser_stack.get(parser_top-0)).right;
+                Expression fexp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = fexp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(19/*PathExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(19/*PathExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 63: // PathExpr ::= LocationPath
             {
               Expression RESULT = null;
-                int lpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int lpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression lp = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int lpleft = (parser_stack.get(parser_top-0)).left;
+                int lpright = (parser_stack.get(parser_top-0)).right;
+                Expression lp = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = lp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(19/*PathExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(19/*PathExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 62: // UnionExpr ::= PathExpr VBAR UnionExpr
             {
               Expression RESULT = null;
-                int peleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int peright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression pe = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int restleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int restright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression rest = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int peleft = (parser_stack.get(parser_top-2)).left;
+                int peright = (parser_stack.get(parser_top-2)).right;
+                Expression pe = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int restleft = (parser_stack.get(parser_top-0)).left;
+                int restright = (parser_stack.get(parser_top-0)).right;
+                Expression rest = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new UnionPathExpr(pe, rest);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(18/*UnionExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(18/*UnionExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 61: // UnionExpr ::= PathExpr
             {
               Expression RESULT = null;
-                int peleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int peright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression pe = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int peleft = (parser_stack.get(parser_top-0)).left;
+                int peright = (parser_stack.get(parser_top-0)).right;
+                Expression pe = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = pe;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(18/*UnionExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(18/*UnionExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 60: // UnaryExpr ::= MINUS UnaryExpr
             {
               Expression RESULT = null;
-                int ueleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ueright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ue = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ueleft = (parser_stack.get(parser_top-0)).left;
+                int ueright = (parser_stack.get(parser_top-0)).right;
+                Expression ue = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new UnaryOpExpr(ue);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(14/*UnaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(14/*UnaryExpr*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 59: // UnaryExpr ::= UnionExpr
             {
               Expression RESULT = null;
-                int ueleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ueright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ue = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ueleft = (parser_stack.get(parser_top-0)).left;
+                int ueright = (parser_stack.get(parser_top-0)).right;
+                Expression ue = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = ue;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(14/*UnaryExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(14/*UnaryExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 58: // MultiplicativeExpr ::= MultiplicativeExpr MOD UnaryExpr
             {
               Expression RESULT = null;
-                int meleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int meright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression me = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int ueleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ueright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ue = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int meleft = (parser_stack.get(parser_top-2)).left;
+                int meright = (parser_stack.get(parser_top-2)).right;
+                Expression me = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int ueleft = (parser_stack.get(parser_top-0)).left;
+                int ueright = (parser_stack.get(parser_top-0)).right;
+                Expression ue = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new BinOpExpr(BinOpExpr.MOD, me, ue);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(13/*MultiplicativeExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(13/*MultiplicativeExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 57: // MultiplicativeExpr ::= MultiplicativeExpr DIV UnaryExpr
             {
               Expression RESULT = null;
-                int meleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int meright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression me = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int ueleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ueright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ue = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int meleft = (parser_stack.get(parser_top-2)).left;
+                int meright = (parser_stack.get(parser_top-2)).right;
+                Expression me = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int ueleft = (parser_stack.get(parser_top-0)).left;
+                int ueright = (parser_stack.get(parser_top-0)).right;
+                Expression ue = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new BinOpExpr(BinOpExpr.DIV, me, ue);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(13/*MultiplicativeExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(13/*MultiplicativeExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 56: // MultiplicativeExpr ::= MultiplicativeExpr STAR UnaryExpr
             {
               Expression RESULT = null;
-                int meleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int meright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression me = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int ueleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ueright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ue = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int meleft = (parser_stack.get(parser_top-2)).left;
+                int meright = (parser_stack.get(parser_top-2)).right;
+                Expression me = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int ueleft = (parser_stack.get(parser_top-0)).left;
+                int ueright = (parser_stack.get(parser_top-0)).right;
+                Expression ue = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new BinOpExpr(BinOpExpr.TIMES, me, ue);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(13/*MultiplicativeExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(13/*MultiplicativeExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 55: // MultiplicativeExpr ::= UnaryExpr
             {
               Expression RESULT = null;
-                int ueleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ueright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ue = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ueleft = (parser_stack.get(parser_top-0)).left;
+                int ueright = (parser_stack.get(parser_top-0)).right;
+                Expression ue = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = ue;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(13/*MultiplicativeExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(13/*MultiplicativeExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 54: // AdditiveExpr ::= AdditiveExpr MINUS MultiplicativeExpr
             {
               Expression RESULT = null;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int meleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int meright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression me = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int aeleft = (parser_stack.get(parser_top-2)).left;
+                int aeright = (parser_stack.get(parser_top-2)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int meleft = (parser_stack.get(parser_top-0)).left;
+                int meright = (parser_stack.get(parser_top-0)).right;
+                Expression me = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new BinOpExpr(BinOpExpr.MINUS, ae, me);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(12/*AdditiveExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(12/*AdditiveExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 53: // AdditiveExpr ::= AdditiveExpr PLUS MultiplicativeExpr
             {
               Expression RESULT = null;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int meleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int meright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression me = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int aeleft = (parser_stack.get(parser_top-2)).left;
+                int aeright = (parser_stack.get(parser_top-2)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int meleft = (parser_stack.get(parser_top-0)).left;
+                int meright = (parser_stack.get(parser_top-0)).right;
+                Expression me = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new BinOpExpr(BinOpExpr.PLUS, ae, me);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(12/*AdditiveExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(12/*AdditiveExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 52: // AdditiveExpr ::= MultiplicativeExpr
             {
               Expression RESULT = null;
-                int meleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int meright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression me = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int meleft = (parser_stack.get(parser_top-0)).left;
+                int meright = (parser_stack.get(parser_top-0)).right;
+                Expression me = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = me;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(12/*AdditiveExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(12/*AdditiveExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 51: // RelationalExpr ::= RelationalExpr GE AdditiveExpr
             {
               Expression RESULT = null;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int releft = (parser_stack.get(parser_top-2)).left;
+                int reright = (parser_stack.get(parser_top-2)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new RelationalExpr(Operators.GE, re, ae);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(11/*RelationalExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(11/*RelationalExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 50: // RelationalExpr ::= RelationalExpr LE AdditiveExpr
             {
               Expression RESULT = null;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int releft = (parser_stack.get(parser_top-2)).left;
+                int reright = (parser_stack.get(parser_top-2)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new RelationalExpr(Operators.LE, re, ae);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(11/*RelationalExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(11/*RelationalExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 49: // RelationalExpr ::= RelationalExpr GT AdditiveExpr
             {
               Expression RESULT = null;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int releft = (parser_stack.get(parser_top-2)).left;
+                int reright = (parser_stack.get(parser_top-2)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new RelationalExpr(Operators.GT, re, ae);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(11/*RelationalExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(11/*RelationalExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 48: // RelationalExpr ::= RelationalExpr LT AdditiveExpr
             {
               Expression RESULT = null;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int releft = (parser_stack.get(parser_top-2)).left;
+                int reright = (parser_stack.get(parser_top-2)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new RelationalExpr(Operators.LT, re, ae);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(11/*RelationalExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(11/*RelationalExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 47: // RelationalExpr ::= AdditiveExpr
             {
               Expression RESULT = null;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = ae;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(11/*RelationalExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(11/*RelationalExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 46: // EqualityExpr ::= EqualityExpr NE RelationalExpr
             {
               Expression RESULT = null;
-                int eeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int eeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression ee = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int eeleft = (parser_stack.get(parser_top-2)).left;
+                int eeright = (parser_stack.get(parser_top-2)).right;
+                Expression ee = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int releft = (parser_stack.get(parser_top-0)).left;
+                int reright = (parser_stack.get(parser_top-0)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new EqualityExpr(Operators.NE, ee, re);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(10/*EqualityExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(10/*EqualityExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 45: // EqualityExpr ::= EqualityExpr EQ RelationalExpr
             {
               Expression RESULT = null;
-                int eeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int eeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression ee = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int eeleft = (parser_stack.get(parser_top-2)).left;
+                int eeright = (parser_stack.get(parser_top-2)).right;
+                Expression ee = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int releft = (parser_stack.get(parser_top-0)).left;
+                int reright = (parser_stack.get(parser_top-0)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new EqualityExpr(Operators.EQ, ee, re);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(10/*EqualityExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(10/*EqualityExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 44: // EqualityExpr ::= RelationalExpr
             {
               Expression RESULT = null;
-                int releft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int reright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression re = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int releft = (parser_stack.get(parser_top-0)).left;
+                int reright = (parser_stack.get(parser_top-0)).right;
+                Expression re = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = re;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(10/*EqualityExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(10/*EqualityExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 43: // AndExpr ::= AndExpr AND EqualityExpr
             {
               Expression RESULT = null;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int eeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int eeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ee = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int aeleft = (parser_stack.get(parser_top-2)).left;
+                int aeright = (parser_stack.get(parser_top-2)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int eeleft = (parser_stack.get(parser_top-0)).left;
+                int eeright = (parser_stack.get(parser_top-0)).right;
+                Expression ee = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new LogicalExpr(LogicalExpr.AND, ae, ee);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(9/*AndExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(9/*AndExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 42: // AndExpr ::= EqualityExpr
             {
               Expression RESULT = null;
-                int eleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int eright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression e = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int eleft = (parser_stack.get(parser_top-0)).left;
+                int eright = (parser_stack.get(parser_top-0)).right;
+                Expression e = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = e;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(9/*AndExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(9/*AndExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 41: // OrExpr ::= OrExpr OR AndExpr
             {
               Expression RESULT = null;
-                int oeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int oeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Expression oe = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int oeleft = (parser_stack.get(parser_top-2)).left;
+                int oeright = (parser_stack.get(parser_top-2)).right;
+                Expression oe = (Expression)((Symbol) parser_stack.get(parser_top-2)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new LogicalExpr(LogicalExpr.OR, oe, ae);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(8/*OrExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(8/*OrExpr*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 40: // OrExpr ::= AndExpr
             {
               Expression RESULT = null;
-                int aeleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int aeright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ae = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int aeleft = (parser_stack.get(parser_top-0)).left;
+                int aeright = (parser_stack.get(parser_top-0)).right;
+                Expression ae = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = ae;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(8/*OrExpr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(8/*OrExpr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 39: // Expr ::= OrExpr
             {
               Expression RESULT = null;
-                int exleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int exright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression ex = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int exleft = (parser_stack.get(parser_top-0)).left;
+                int exright = (parser_stack.get(parser_top-0)).right;
+                Expression ex = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = ex;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(2/*Expr*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(2/*Expr*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 38: // Predicate ::= LBRACK Expr RBRACK
             {
               Expression RESULT = null;
-                int eleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int eright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Expression e = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+                int eleft = (parser_stack.get(parser_top-1)).left;
+                int eright = (parser_stack.get(parser_top-1)).right;
+                Expression e = (Expression)((Symbol) parser_stack.get(parser_top-1)).value;
 
                 RESULT = new Predicate(e);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(5/*Predicate*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(5/*Predicate*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 37: // Predicates ::= Predicate Predicates
             {
-              Vector RESULT = null;
-                int pleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int pright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Expression p = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
-                 pp.insertElementAt(p, 0); RESULT = pp;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(35/*Predicates*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+                List<Expression> RESULT = null;
+                int pleft = (parser_stack.get(parser_top-1)).left;
+                int pright = (parser_stack.get(parser_top-1)).right;
+                Expression p = (Expression)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Expression> pp = (ArrayList<Expression>)((Symbol) parser_stack.get(parser_top-0)).value;
+                pp.add(0, p); RESULT = pp;
+              parser_result = new Symbol(35/*Predicates*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 36: // Predicates ::= Predicate
             {
-              Vector RESULT = null;
-                int pleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int pright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Expression p = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                List<Expression> RESULT = null;
+                int pleft = (parser_stack.get(parser_top-0)).left;
+                int pright = (parser_stack.get(parser_top-0)).right;
+                Expression p = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
 
-                Vector temp = new Vector();
-                temp.addElement(p);
+                List<Expression> temp = new ArrayList<>();
+                temp.add(p);
                 RESULT = temp;
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(35/*Predicates*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(35/*Predicates*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 35: // ChildOrAttributeAxisSpecifier ::= ATTRIBUTE DCOLON
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.ATTRIBUTE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(42/*ChildOrAttributeAxisSpecifier*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 34: // ChildOrAttributeAxisSpecifier ::= CHILD DCOLON
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.CHILD);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(42/*ChildOrAttributeAxisSpecifier*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 33: // ChildOrAttributeAxisSpecifier ::= ATSIGN
             {
               Integer RESULT = null;
                  RESULT = Integer.valueOf(Axis.ATTRIBUTE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(42/*ChildOrAttributeAxisSpecifier*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 32: // NameTestPattern ::= QName
             {
               Object RESULT = null;
-                int qnleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int qnright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                QName qn = (QName)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int qnleft = (parser_stack.get(parser_top-0)).left;
+                int qnright = (parser_stack.get(parser_top-0)).right;
+                QName qn = (QName)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = qn;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(34/*NameTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(34/*NameTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 31: // NameTestPattern ::= STAR
             {
               Object RESULT = null;
                  RESULT = null;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(34/*NameTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(34/*NameTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 30: // NodeTestPattern ::= PI
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.PI);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(33/*NodeTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 29: // NodeTestPattern ::= COMMENT
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.COMMENT);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(33/*NodeTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 28: // NodeTestPattern ::= TEXT
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.TEXT);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(33/*NodeTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 27: // NodeTestPattern ::= NODE
             {
               Object RESULT = null;
                  RESULT = Integer.valueOf(NodeTest.ANODE);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(33/*NodeTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 26: // NodeTestPattern ::= NameTestPattern
             {
               Object RESULT = null;
-                int ntleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ntright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Object nt = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ntleft = (parser_stack.get(parser_top-0)).left;
+                int ntright = (parser_stack.get(parser_top-0)).right;
+                Object nt = (Object)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = nt;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(33/*NodeTestPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 25: // StepPattern ::= ChildOrAttributeAxisSpecifier ProcessingInstructionPattern Predicates
             {
               StepPattern RESULT = null;
-                int axisleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int axisright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Integer axis = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int pipleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int pipright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                StepPattern pip = (StepPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int axisleft = (parser_stack.get(parser_top-2)).left;
+                int axisright = (parser_stack.get(parser_top-2)).right;
+                Integer axis = (Integer)((Symbol) parser_stack.get(parser_top-2)).value;
+                int pipleft = (parser_stack.get(parser_top-1)).left;
+                int pipright = (parser_stack.get(parser_top-1)).right;
+                StepPattern pip = (StepPattern)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Predicate> pp = (ArrayList<Predicate>)((Symbol) parser_stack.get(parser_top-0)).value;
 
                // TODO: report error if axis is attribute
                RESULT = (ProcessingInstructionPattern)pip.setPredicates(pp);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 24: // StepPattern ::= ChildOrAttributeAxisSpecifier ProcessingInstructionPattern
             {
               StepPattern RESULT = null;
-                int axisleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int axisright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Integer axis = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int pipleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int pipright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                StepPattern pip = (StepPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int axisleft = (parser_stack.get(parser_top-1)).left;
+                int axisright = (parser_stack.get(parser_top-1)).right;
+                Integer axis = (Integer)((Symbol) parser_stack.get(parser_top-1)).value;
+                int pipleft = (parser_stack.get(parser_top-0)).left;
+                int pipright = (parser_stack.get(parser_top-0)).right;
+                StepPattern pip = (StepPattern)((Symbol) parser_stack.get(parser_top-0)).value;
 
                RESULT = pip;    // TODO: report error if axis is attribute
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 23: // StepPattern ::= ChildOrAttributeAxisSpecifier NodeTestPattern Predicates
             {
               StepPattern RESULT = null;
-                int axisleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int axisright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                Integer axis = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int ntleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int ntright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Object nt = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int axisleft = (parser_stack.get(parser_top-2)).left;
+                int axisright = (parser_stack.get(parser_top-2)).right;
+                Integer axis = (Integer)((Symbol) parser_stack.get(parser_top-2)).value;
+                int ntleft = (parser_stack.get(parser_top-1)).left;
+                int ntright = (parser_stack.get(parser_top-1)).right;
+                Object nt = (Object)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+               List<Predicate>pp = (ArrayList<Predicate>)((Symbol) parser_stack.get(parser_top-0)).value;
 
                RESULT = parser.createStepPattern(axis.intValue(), nt, pp);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 22: // StepPattern ::= ChildOrAttributeAxisSpecifier NodeTestPattern
             {
               StepPattern RESULT = null;
-                int axisleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int axisright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Integer axis = (Integer)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ntleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ntright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Object nt = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int axisleft = (parser_stack.get(parser_top-1)).left;
+                int axisright = (parser_stack.get(parser_top-1)).right;
+                Integer axis = (Integer)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ntleft = (parser_stack.get(parser_top-0)).left;
+                int ntright = (parser_stack.get(parser_top-0)).right;
+                Object nt = (Object)((Symbol) parser_stack.get(parser_top-0)).value;
 
                RESULT = parser.createStepPattern(axis.intValue(), nt, null);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 21: // StepPattern ::= ProcessingInstructionPattern Predicates
             {
               StepPattern RESULT = null;
-                int pipleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int pipright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                StepPattern pip = (StepPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int pipleft = (parser_stack.get(parser_top-1)).left;
+                int pipright = (parser_stack.get(parser_top-1)).right;
+                StepPattern pip = (StepPattern)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Predicate> pp = (ArrayList<Predicate>)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = (ProcessingInstructionPattern)pip.setPredicates(pp);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 20: // StepPattern ::= ProcessingInstructionPattern
             {
               StepPattern RESULT = null;
-                int pipleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int pipright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                StepPattern pip = (StepPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int pipleft = (parser_stack.get(parser_top-0)).left;
+                int pipright = (parser_stack.get(parser_top-0)).right;
+                StepPattern pip = (StepPattern)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = pip;
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 19: // StepPattern ::= NodeTestPattern Predicates
             {
               StepPattern RESULT = null;
-                int ntleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
-                int ntright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
-                Object nt = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
-                int ppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Vector pp = (Vector)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ntleft = (parser_stack.get(parser_top-1)).left;
+                int ntright = (parser_stack.get(parser_top-1)).right;
+                Object nt = (Object)((Symbol) parser_stack.get(parser_top-1)).value;
+                int ppleft = (parser_stack.get(parser_top-0)).left;
+                int ppright = (parser_stack.get(parser_top-0)).right;
+                @SuppressWarnings("unchecked")
+                List<Predicate> pp = (ArrayList<Predicate>)((Symbol) parser_stack.get(parser_top-0)).value;
 
                 RESULT = parser.createStepPattern(Axis.CHILD, nt, pp);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 18: // StepPattern ::= NodeTestPattern
             {
               StepPattern RESULT = null;
-                int ntleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int ntright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                Object nt = (Object)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int ntleft = (parser_stack.get(parser_top-0)).left;
+                int ntright = (parser_stack.get(parser_top-0)).right;
+                Object nt = (Object)((Symbol) parser_stack.get(parser_top-0)).value;
 
                 RESULT = parser.createStepPattern(Axis.CHILD, nt, null);
 
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(32/*StepPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(32/*StepPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }
-          return CUP$XPathParser$result;
+          return parser_result;
 
           /*. . . . . . . . . . . . . . . . . . . .*/
           case 17: // RelativePathPattern ::= StepPattern DSLASH RelativePathPattern
             {
               RelativePathPattern RESULT = null;
-                int spleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
-                int spright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
-                StepPattern sp = (StepPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
-                int rppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
-                int rppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
-                RelativePathPattern rpp = (RelativePathPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+                int spleft = (parser_stack.get(parser_top-2)).left;
+                int spright = (parser_stack.get(parser_top-2)).right;
+                StepPattern sp = (StepPattern)((Symbol) parser_stack.get(parser_top-2)).value;
+                int rppleft = (parser_stack.get(parser_top-0)).left;
+                int rppright = (parser_stack.get(parser_top-0)).right;
+                RelativePathPattern rpp = (RelativePathPattern)((Symbol) parser_stack.get(parser_top-0)).value;
                  RESULT = new AncestorPattern(sp, rpp);
-              CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(31/*RelativePathPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+              parser_result = new Symbol(31/*RelativePathPattern*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
             }