# HG changeset patch
# User joehw
# Date 1508358349 25200
# Node ID e1a6c01687414db52dee498a7d66c28acf634350
# Parent d07d5f7cab35a2e7ed6199fd0eeb02b8a0a3b896
8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
Reviewed-by: lancea, rriggs, mullan
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.java
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.java Wed Oct 18 13:25:49 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 vars, int globalsSize) {
// do nothing
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java
--- a/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java Wed Oct 18 13:25:49 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 stack = new Stack<>();
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
@@ -322,7 +322,7 @@
public abstract Symbol do_action(
int act_num,
lr_parser parser,
- Stack stack,
+ Stack 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");
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 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 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 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());
}
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java Wed Oct 18 13:25:49 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
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java Wed Oct 18 13:25:49 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[] 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[] parmList = new List[arg_types.length];
param_annotations = parmList;
hasParameterAnnotations = true;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java Wed Oct 18 13:25:49 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, ...)
*
Stack: ..., count -> ..., arrayref
@@ -107,7 +106,7 @@
@Override
public Class>[] getExceptions() {
- return new Class[] {
+ return new Class>[] {
ExceptionConst.NEGATIVE_ARRAY_SIZE_EXCEPTION
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java Wed Oct 18 13:25:49 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
};
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java
--- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java Wed Oct 18 13:25:49 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
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java Wed Oct 18 13:25:49 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) {
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java Wed Oct 18 13:25:49 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);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java Wed Oct 18 13:25:49 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();
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java Wed Oct 18 13:25:49 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 sortObjects = new Vector<>();
+ final List sortObjects = new ArrayList<>();
for (final SyntaxTreeNode child : getContents()) {
if (child instanceof Sort) {
- sortObjects.addElement((Sort)child);
+ sortObjects.add((Sort)child);
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java Wed Oct 18 13:25:49 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;
/**
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java Wed Oct 18 13:25:49 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 elements = elements();
while (elements.hasNext()) {
final Expression exp = (Expression)elements.next();
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java Wed Oct 18 13:25:49 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);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
_arg = argument(0);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java Wed Oct 18 13:25:49 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 defaultParams = _calleeTemplate.getParameters();
+ List 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.
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java Wed Oct 18 13:25:49 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 @@
* elements and default to the if present.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
- final Vector whenElements = new Vector();
+ final List whenElements = new ArrayList<>();
Otherwise otherwise = null;
Iterator 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 exitHandles = new ArrayList<>();
InstructionHandle exit = null;
- Enumeration whens = whenElements.elements();
+ Enumeration 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 exitGotos = Collections.enumeration(exitHandles);
while (exitGotos.hasMoreElements()) {
BranchHandle gotoExit = (BranchHandle)exitGotos.nextElement();
gotoExit.setTarget(exit);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java Wed Oct 18 13:25:49 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 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;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java Wed Oct 18 13:25:49 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 _predicates;
- public FilterExpr(Expression primary, Vector predicates) {
+ public FilterExpr(Expression primary, List 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();
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java Wed Oct 18 13:25:49 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 _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 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 oldIter = oldList.iterator();
+ final Iterator 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);
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java Wed Oct 18 13:25:49 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 sortObjects = new ArrayList<>();
Iterator 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);
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
_value = argument(0);
_format = argument(1);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java Wed Oct 18 13:25:49 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 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;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java Wed Oct 18 13:25:49 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 _arguments;
// Empty argument list, used for certain functions
- private final static Vector EMPTY_ARG_LIST = new Vector(0);
+ private final static List 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 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 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> 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 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 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 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 typeCheckArgs(SymbolTable stable) throws TypeCheckError {
+ final List 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 @@
// .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 null
* if no such methods exist.
*/
- private Vector findMethods() {
+ private List findMethods() {
- Vector result = null;
+ List 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 null
* if no such methods exist.
*/
- private Vector findConstructors() {
- Vector result = null;
- final String namespace = _fname.getNamespace();
+ private List> findConstructors() {
+ List> 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 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(", ");
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java Wed Oct 18 13:25:49 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;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
switch(argumentCount()) {
case 1:
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
_lang = argument(0);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java Wed Oct 18 13:25:49 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 {
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java Wed Oct 18 13:25:49 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
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java Wed Oct 18 13:25:49 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 _templates;
/**
* Group for patterns with node()-type kernel and child axis.
*/
- private Vector _childNodeGroup = null;
+ private List _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 _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 _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[] _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[])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 quicksort(List 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 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 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[] newGroups =
+ (List[])new ArrayList[kernelType * 2];
+
System.arraycopy(_patternGroups, 0, newGroups, 0, oldLength);
_patternGroups = newGroups;
}
// Find the vector to put this pattern into
- Vector patterns;
+ List 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 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 starGroup = _patternGroups[DTM.ELEMENT_NODE];
+ final List 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 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 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 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 namespaces = xsltc.getNamespaceIndex();
+ final List 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 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 names = xsltc.getNamesIndex();
// Clear some datastructures
_namedTemplates = new HashMap<>();
_neededTemplates = new HashMap<>();
_templateIHs = new HashMap<>();
_templateILs = new HashMap<>();
- _patternGroups = new Vector[32];
+ _patternGroups = (List[])new ArrayList[32];
_rootPattern = null;
// IMPORTANT: Save orignal & complete set of templates!!!!
- Vector oldTemplates = _templates;
+ List 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 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 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 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 iter = find.search(pattern); iter.hasNext();) {
+ InstructionHandle[] match = iter.next();
try {
if (!match[1].hasTargeters()) {
com.sun.org.apache.bcel.internal.generic.ALOAD aload1 =
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
_param = argument(0);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java Wed Oct 18 13:25:49 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 _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()),
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java Wed Oct 18 13:25:49 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 _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();
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java Wed Oct 18 13:25:49 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);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java Wed Oct 18 13:25:49 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);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java Wed Oct 18 13:25:49 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 _closureVars = null;
+ private List _closureVars = null;
private boolean _needsSortRecordFactory = false;
// -- Begin Closure interface --------------------
@@ -233,7 +233,7 @@
public static void translateSortIterator(ClassGenerator classGen,
MethodGenerator methodGen,
Expression nodeSet,
- Vector sortObjects)
+ List 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 sortObjects,
+ public static void compileSortRecordFactory(List 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 dups = new ArrayList<>();
+ final List 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 sortObjects,
+ public static String compileSortRecordFactory(List 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 dups = new ArrayList<>();
+ final List 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 sortObjects,
+ private static String compileSortRecord(List 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 dups = new ArrayList<>();
+ final List 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 sortObjects,
+ private static MethodGenerator compileExtract(List 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);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java Wed Oct 18 13:25:49 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 _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 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 getPredicates() {
return _predicates;
}
/**
* Returns the vector containing all predicates for this step.
*/
- public void addPredicates(Vector predicates) {
+ public void addPredicates(List 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 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());
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java Wed Oct 18 13:25:49 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 _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 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 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);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java Wed Oct 18 13:25:49 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 _globals = new ArrayList<>();
/**
* Used to cache the result returned by hasLocalParams().
@@ -106,13 +107,13 @@
/**
* Contains all templates defined in this stylesheet
*/
- private final Vector _templates = new Vector();
+ private final List _templates = new ArrayList<>();
/**
* Used to cache result of getAllValidTemplates(). Only
* set in top-level stylesheets that include/import other stylesheets.
*/
- private Vector _allValidTemplates = null;
+ private List _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 _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 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 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 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 varDepElements = new ArrayList<>(_globals);
Iterator 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 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 resolveDependencies(List input) {
+ List 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 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 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 getTemplates() {
return _templates;
}
- public Vector getAllValidTemplates() {
+ public List 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 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);
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java Wed Oct 18 13:25:49 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 _stylesheets = new HashMap<>();
- private final Map _primops = new HashMap<>();
+ private final Map> _primops = new HashMap<>();
// These maps are used for some stylesheets
private Map _variables = null;
@@ -138,18 +140,18 @@
* is prepended.
*/
public void addPrimop(String name, MethodType mtype) {
- Vector methods = _primops.get(name);
+ List 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 PrimopPrefix.
*/
- public Vector lookupPrimop(String name) {
+ public List 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;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java Wed Oct 18 13:25:49 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 _parameters = new Vector<>();
+ private List _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 getParameters() {
+ public List 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));
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java Wed Oct 18 13:25:49 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 _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 patterns, Mode mode) {
this(patterns, -2, mode);
}
- public TestSeq(Vector patterns, int kernelType, Mode mode) {
+ public TestSeq(List 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 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);
}
/**
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java Wed Oct 18 13:25:49 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 _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 getDependencies() {
return _dependencies;
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java Wed Oct 18 13:25:49 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);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java Wed Oct 18 13:25:49 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 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 components) {
+ components.add(_pathExpr);
if (_rest != null) {
if (_rest instanceof UnionPathExpr) {
((UnionPathExpr)_rest).flatten(components);
}
else {
- components.addElement(_rest);
+ components.add(_rest);
}
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java Wed Oct 18 13:25:49 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 arguments) {
super(fname, arguments);
_entity = argument();
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java Wed Oct 18 13:25:49 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 _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);
}
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java Wed Oct 18 13:25:49 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 _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
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java Wed Oct 18 13:25:49 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 _refs = new Vector<>(2);
+ protected List _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);
}
/**
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java Wed Oct 18 13:25:49 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 getRules() {
+ final List 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 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())) {
- break;
- }
+ 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;
+ 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 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 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,
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 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 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;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java Wed Oct 18 13:25:49 2017 -0700
@@ -25,27 +25,27 @@
package com.sun.org.apache.xalan.internal.xsltc.compiler;
-import java.util.Stack;
-import java.util.Vector;
-import java.io.StringReader;
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 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;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Stack;
/**
* 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 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 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 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 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 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 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 argl = (ArrayList)((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 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 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 argl = (ArrayList)((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 pp = (ArrayList)((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 pp = (ArrayList)((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 pp = (ArrayList)((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 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 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 pp = (ArrayList)((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 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 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 pp = (ArrayList)((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")
+ Listpp = (ArrayList)((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 pp = (ArrayList)((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 pp = (ArrayList)((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);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 16: // RelativePathPattern ::= StepPattern SLASH 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 ParentPattern(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);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 15: // RelativePathPattern ::= StepPattern
{
RelativePathPattern RESULT = null;
- int spleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
- int spright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
- StepPattern sp = (StepPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ int spleft = (parser_stack.get(parser_top-0)).left;
+ int spright = (parser_stack.get(parser_top-0)).right;
+ StepPattern sp = (StepPattern)((Symbol) parser_stack.get(parser_top-0)).value;
RESULT = sp;
- 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-0)).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-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 14: // ProcessingInstructionPattern ::= PIPARAM LPAREN Literal RPAREN
{
StepPattern 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;
RESULT = new ProcessingInstructionPattern(l);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(30/*ProcessingInstructionPattern*/, ((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(30/*ProcessingInstructionPattern*/, (parser_stack.get(parser_top-3)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 13: // IdKeyPattern ::= KEY LPAREN Literal COMMA Literal RPAREN
{
IdKeyPattern RESULT = null;
- int l1left = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).left;
- int l1right = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).right;
- String l1 = (String)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-3)).value;
- int l2left = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
- int l2right = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
- String l2 = (String)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int l1left = (parser_stack.get(parser_top-3)).left;
+ int l1right = (parser_stack.get(parser_top-3)).right;
+ String l1 = (String)((Symbol) parser_stack.get(parser_top-3)).value;
+ int l2left = (parser_stack.get(parser_top-1)).left;
+ int l2right = (parser_stack.get(parser_top-1)).right;
+ String l2 = (String)((Symbol) parser_stack.get(parser_top-1)).value;
RESULT = new KeyPattern(l1, l2);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(27/*IdKeyPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-5)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
+ parser_result = new Symbol(27/*IdKeyPattern*/, (parser_stack.get(parser_top-5)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 12: // IdKeyPattern ::= ID LPAREN Literal RPAREN
{
IdKeyPattern 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;
RESULT = new IdPattern(l);
parser.setHasIdCall(true);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(27/*IdKeyPattern*/, ((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(27/*IdKeyPattern*/, (parser_stack.get(parser_top-3)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 11: // LocationPathPattern ::= RelativePathPattern
{
Pattern RESULT = null;
- 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 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 = rpp;
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 10: // LocationPathPattern ::= DSLASH RelativePathPattern
{
Pattern RESULT = null;
- 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 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(rpp);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 9: // LocationPathPattern ::= IdKeyPattern DSLASH RelativePathPattern
{
Pattern RESULT = null;
- int ikpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
- int ikpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
- IdKeyPattern ikp = (IdKeyPattern)((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 ikpleft = (parser_stack.get(parser_top-2)).left;
+ int ikpright = (parser_stack.get(parser_top-2)).right;
+ IdKeyPattern ikp = (IdKeyPattern)((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(ikp, rpp);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 8: // LocationPathPattern ::= IdKeyPattern SLASH RelativePathPattern
{
Pattern RESULT = null;
- int ikpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
- int ikpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
- IdKeyPattern ikp = (IdKeyPattern)((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 ikpleft = (parser_stack.get(parser_top-2)).left;
+ int ikpright = (parser_stack.get(parser_top-2)).right;
+ IdKeyPattern ikp = (IdKeyPattern)((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 ParentPattern(ikp, rpp);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 7: // LocationPathPattern ::= IdKeyPattern
{
Pattern RESULT = null;
- int ikpleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
- int ikpright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
- IdKeyPattern ikp = (IdKeyPattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ int ikpleft = (parser_stack.get(parser_top-0)).left;
+ int ikpright = (parser_stack.get(parser_top-0)).right;
+ IdKeyPattern ikp = (IdKeyPattern)((Symbol) parser_stack.get(parser_top-0)).value;
RESULT = ikp;
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 6: // LocationPathPattern ::= SLASH RelativePathPattern
{
Pattern RESULT = null;
- 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 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 AbsolutePathPattern(rpp);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 5: // LocationPathPattern ::= SLASH
{
Pattern RESULT = null;
RESULT = new AbsolutePathPattern(null);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(29/*LocationPathPattern*/, ((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(29/*LocationPathPattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 4: // Pattern ::= LocationPathPattern VBAR Pattern
{
Pattern RESULT = null;
- int lppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).left;
- int lppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).right;
- Pattern lpp = (Pattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-2)).value;
- 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;
- Pattern p = (Pattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ int lppleft = (parser_stack.get(parser_top-2)).left;
+ int lppright = (parser_stack.get(parser_top-2)).right;
+ Pattern lpp = (Pattern)((Symbol) parser_stack.get(parser_top-2)).value;
+ int pleft = (parser_stack.get(parser_top-0)).left;
+ int pright = (parser_stack.get(parser_top-0)).right;
+ Pattern p = (Pattern)((Symbol) parser_stack.get(parser_top-0)).value;
RESULT = new AlternativePattern(lpp, p);
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(28/*Pattern*/, ((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(28/*Pattern*/, (parser_stack.get(parser_top-2)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 3: // Pattern ::= LocationPathPattern
{
Pattern RESULT = null;
- int lppleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
- int lppright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
- Pattern lpp = (Pattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ int lppleft = (parser_stack.get(parser_top-0)).left;
+ int lppright = (parser_stack.get(parser_top-0)).right;
+ Pattern lpp = (Pattern)((Symbol) parser_stack.get(parser_top-0)).value;
RESULT = lpp;
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(28/*Pattern*/, ((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(28/*Pattern*/, (parser_stack.get(parser_top-0)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 2: // TopLevel ::= EXPRESSION Expr
{
SyntaxTreeNode RESULT = null;
- int exprleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
- int exprright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
- Expression expr = (Expression)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ int exprleft = (parser_stack.get(parser_top-0)).left;
+ int exprright = (parser_stack.get(parser_top-0)).right;
+ Expression expr = (Expression)((Symbol) parser_stack.get(parser_top-0)).value;
RESULT = expr;
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(1/*TopLevel*/, ((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(1/*TopLevel*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 1: // TopLevel ::= PATTERN Pattern
{
SyntaxTreeNode RESULT = null;
- int patternleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left;
- int patternright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right;
- Pattern pattern = (Pattern)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).value;
+ int patternleft = (parser_stack.get(parser_top-0)).left;
+ int patternright = (parser_stack.get(parser_top-0)).right;
+ Pattern pattern = (Pattern)((Symbol) parser_stack.get(parser_top-0)).value;
RESULT = pattern;
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(1/*TopLevel*/, ((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(1/*TopLevel*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
- return CUP$XPathParser$result;
+ return parser_result;
/*. . . . . . . . . . . . . . . . . . . .*/
case 0: // $START ::= TopLevel EOF
{
Object RESULT = null;
- int start_valleft = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left;
- int start_valright = ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).right;
- SyntaxTreeNode start_val = (SyntaxTreeNode)((com.sun.java_cup.internal.runtime.Symbol) CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).value;
+ int start_valleft = (parser_stack.get(parser_top-1)).left;
+ int start_valright = (parser_stack.get(parser_top-1)).right;
+ SyntaxTreeNode start_val = (SyntaxTreeNode)((Symbol) parser_stack.get(parser_top-1)).value;
RESULT = start_val;
- CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(0/*$START*/, ((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(0/*$START*/, (parser_stack.get(parser_top-1)).left, (parser_stack.get(parser_top-0)).right, RESULT);
}
/* ACCEPT */
- CUP$XPathParser$parser.done_parsing();
- return CUP$XPathParser$result;
+ parser_parser.done_parsing();
+ return parser_result;
/* . . . . . .*/
default:
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Wed Oct 18 13:25:49 2017 -0700
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012, 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
@@ -36,12 +36,11 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
-import java.util.Enumeration;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
-import java.util.Vector;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
@@ -87,19 +86,19 @@
// Name index tables
private int _nextGType; // Next available element type
- private Vector _namesIndex; // Index of all registered QNames
+ private List _namesIndex; // Index of all registered QNames
private Map _elements; // Map of all registered elements
private Map _attributes; // Map of all registered attributes
// Namespace index tables
private int _nextNSType; // Next available namespace type
- private Vector _namespaceIndex; // Index of all registered namespaces
+ private List _namespaceIndex; // Index of all registered namespaces
private Map _namespaces; // Map of all registered namespaces
private Map _namespacePrefixes;// Map of all registered namespace prefixes
// All literal text in the stylesheet
- private ArrayList m_characterData;
+ private List m_characterData;
// These define the various methods for outputting the translet
public static final int JAR_OUTPUT = 1;
@@ -117,8 +116,8 @@
private File _destDir = null; // -d
private int _outputType = BYTEARRAY_OUTPUT; // by default
- private ArrayList _classes;
- private ArrayList _bcelClasses;
+ private List _classes;
+ private List _bcelClasses;
private boolean _callsNodeset = false;
private boolean _multiDocument = false;
private boolean _hasIdCall = false;
@@ -309,8 +308,8 @@
* The filtering of function types (external,internal) takes place in FunctionCall class
*
*/
- Class loadExternalFunction(String name) throws ClassNotFoundException {
- Class loaded = null;
+ Class> loadExternalFunction(String name) throws ClassNotFoundException {
+ Class> loaded = null;
//Check if the function is not loaded already
if (_externalExtensionFunctions.containsKey(name)) {
loaded = _externalExtensionFunctions.get(name);
@@ -322,7 +321,7 @@
throw new ClassNotFoundException(name);
}
//Return loaded class
- return (Class) loaded;
+ return loaded;
}
/*
@@ -342,8 +341,8 @@
_attributes = new HashMap<>();
_namespaces = new HashMap<>();
_namespaces.put("", _nextNSType);
- _namesIndex = new Vector(128);
- _namespaceIndex = new Vector(32);
+ _namesIndex = new ArrayList<>(128);
+ _namespaceIndex = new ArrayList<>(32);
_namespacePrefixes = new HashMap<>();
_stylesheet = null;
_parser.init();
@@ -458,7 +457,7 @@
*/
public boolean compile(InputSource input, String name) {
try {
- // Reset globals in case we're called by compile(Vector v);
+ // Reset globals in case we're called by compile(ArrayList v);
reset();
// The systemId may not be set, so we'll have to check the URL
@@ -531,11 +530,11 @@
}
/**
- * Compiles a set of stylesheets pointed to by a Vector of URLs
- * @param stylesheets A Vector containing URLs pointing to the stylesheets
+ * Compiles a set of stylesheets pointed to by a List of URLs
+ * @param stylesheets A List containing URLs pointing to the stylesheets
* @return 'true' if the compilation was successful
*/
- public boolean compile(Vector stylesheets) {
+ public boolean compile(List stylesheets) {
// Get the number of stylesheets (ie. URLs) in the vector
final int count = stylesheets.size();
@@ -545,21 +544,13 @@
// Special handling needed if the URL count is one, becuase the
// _className global must not be reset if it was set explicitly
if (count == 1) {
- final Object url = stylesheets.firstElement();
- if (url instanceof URL)
- return compile((URL)url);
- else
- return false;
+ return compile(stylesheets.get(0));
}
else {
// Traverse all elements in the vector and compile
- final Enumeration urls = stylesheets.elements();
- while (urls.hasMoreElements()) {
+ for (URL url : stylesheets) {
_className = null; // reset, so that new name will be computed
- final Object url = urls.nextElement();
- if (url instanceof URL) {
- if (!compile((URL)url)) return false;
- }
+ if (!compile(url)) return false;
}
}
return true;
@@ -623,7 +614,7 @@
* Get a list of all compile error messages
* @return A List containing all compile error messages
*/
- public ArrayList getErrors() {
+ public List getErrors() {
return _parser.getErrors();
}
@@ -631,7 +622,7 @@
* Get a list of all compile warning messages
* @return A List containing all compile error messages
*/
- public ArrayList getWarnings() {
+ public List getWarnings() {
return _parser.getWarnings();
}
@@ -685,7 +676,7 @@
/**
* Set the class name for the generated translet. This class name is
* overridden if multiple stylesheets are compiled in one go using the
- * compile(Vector urls) method.
+ * compile(List urls) method.
* @param className The name to assign to the translet class
*/
public void setClassName(String className) {
@@ -791,9 +782,9 @@
final String uri = name.getNamespace();
final String local = "@"+name.getLocalPart();
if ((uri != null) && (!uri.equals("")))
- _namesIndex.addElement(uri+":"+local);
+ _namesIndex.add(uri+":"+local);
else
- _namesIndex.addElement(local);
+ _namesIndex.add(local);
if (name.getLocalPart().equals("*")) {
registerNamespace(name.getNamespace());
}
@@ -810,7 +801,7 @@
Integer code = _elements.get(name.toString());
if (code == null) {
_elements.put(name.toString(), code = _nextGType++);
- _namesIndex.addElement(name.toString());
+ _namesIndex.add(name.toString());
}
if (name.getLocalPart().equals("*")) {
registerNamespace(name.getNamespace());
@@ -832,9 +823,9 @@
final String uri = name.getNamespace();
if ((uri != null) && (!uri.equals(""))){
// namespace::ext2:ped2 will be made empty in TypedNamespaceIterator
- _namesIndex.addElement("?");
+ _namesIndex.add("?");
} else{
- _namesIndex.addElement("?"+name.getLocalPart());
+ _namesIndex.add("?"+name.getLocalPart());
}
}
return code.intValue();
@@ -849,7 +840,7 @@
if (code == null) {
code = _nextNSType++;
_namespaces.put(namespaceURI,code);
- _namespaceIndex.addElement(namespaceURI);
+ _namespaceIndex.add(namespaceURI);
}
return code;
}
@@ -878,11 +869,11 @@
return _attributeSetSerial++;
}
- public Vector getNamesIndex() {
+ public List getNamesIndex() {
return _namesIndex;
}
- public Vector getNamespaceIndex() {
+ public List getNamespaceIndex() {
return _namespaceIndex;
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java Wed Oct 18 13:25:49 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.ALOAD;
import com.sun.org.apache.bcel.internal.generic.ASTORE;
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
@@ -40,7 +39,6 @@
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.xml.internal.serializer.ElemDesc;
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
import com.sun.org.apache.xml.internal.utils.XML11Char;
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java Wed Oct 18 13:25:49 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
@@ -149,7 +149,7 @@
* Translates an internal boolean into an external (Java) boolean.
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
- Class clazz) {
+ Class> clazz) {
if (clazz == java.lang.Boolean.TYPE) {
methodGen.getInstructionList().append(NOP);
}
@@ -168,7 +168,7 @@
* Translates an external (Java) boolean into internal boolean.
*/
public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen,
- Class clazz) {
+ Class> clazz) {
translateTo(classGen, methodGen, clazz);
}
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java Wed Oct 18 13:25:49 2017 -0700
@@ -1,5 +1,6 @@
/*
* 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
@@ -188,7 +189,7 @@
* type after coercion.
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
- Class clazz) {
+ Class> clazz) {
final InstructionList il = methodGen.getInstructionList();
if (clazz == Character.TYPE) {
il.append(I2C);
diff -r d07d5f7cab35 -r e1a6c0168741 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java Wed Oct 18 13:25:49 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
@@ -23,14 +24,6 @@
package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Stack;
-
-
import com.sun.org.apache.bcel.internal.Const;
import com.sun.org.apache.bcel.internal.classfile.Field;
import com.sun.org.apache.bcel.internal.classfile.Method;
@@ -46,23 +39,23 @@
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.ICONST;
-import com.sun.org.apache.bcel.internal.generic.IfInstruction;
import com.sun.org.apache.bcel.internal.generic.ILOAD;
-import com.sun.org.apache.bcel.internal.generic.IndexedInstruction;
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.INVOKEVIRTUAL;
import com.sun.org.apache.bcel.internal.generic.ISTORE;
+import com.sun.org.apache.bcel.internal.generic.IfInstruction;
+import com.sun.org.apache.bcel.internal.generic.IndexedInstruction;
import com.sun.org.apache.bcel.internal.generic.Instruction;
import com.sun.org.apache.bcel.internal.generic.InstructionConst;
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.InstructionTargeter;
+import com.sun.org.apache.bcel.internal.generic.LLOAD;
+import com.sun.org.apache.bcel.internal.generic.LSTORE;
import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
import com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction;
-import com.sun.org.apache.bcel.internal.generic.LLOAD;
-import com.sun.org.apache.bcel.internal.generic.LSTORE;
import com.sun.org.apache.bcel.internal.generic.MethodGen;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.sun.org.apache.bcel.internal.generic.PUTFIELD;
@@ -70,9 +63,15 @@
import com.sun.org.apache.bcel.internal.generic.Select;
import com.sun.org.apache.bcel.internal.generic.TargetLostException;
import com.sun.org.apache.bcel.internal.generic.Type;
-
import com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern;
import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
/**
* @author Jacek Ambroziak
@@ -266,7 +265,7 @@
*/
protected class LocalVariableRegistry {
/**
- *
A java.lang.ArrayList of all
+ *
A java.lang.List of all
* {@link LocalVariableGen}s created for this method, indexed by the
* slot number of the local variable. The JVM stack frame of local
* variables is divided into "slots". A single slot can be used to
@@ -279,12 +278,12 @@
* registered for the same slot; and if none occurs, the entry will be
* null.
*/
- protected ArrayList _variables = new ArrayList();
+ protected List
* @param lvg The variable to be registered
*/
+ @SuppressWarnings("unchecked")
protected void registerLocalVariable(LocalVariableGen lvg) {
int slot = lvg.getIndex();
@@ -320,12 +320,12 @@
Object localsInSlot = _variables.get(slot);
if (localsInSlot != null) {
if (localsInSlot instanceof LocalVariableGen) {
- ArrayList listOfLocalsInSlot = new ArrayList();
- listOfLocalsInSlot.add(localsInSlot);
+ List listOfLocalsInSlot = new ArrayList<>();
+ listOfLocalsInSlot.add((LocalVariableGen)localsInSlot);
listOfLocalsInSlot.add(lvg);
_variables.set(slot, listOfLocalsInSlot);
} else {
- ((ArrayList) localsInSlot).add(lvg);
+ ((List) localsInSlot).add(lvg);
}
} else {
_variables.set(slot, lvg);
@@ -369,12 +369,11 @@
return lvg;
}
} else {
- ArrayList listOfLocalsInSlot = (ArrayList) localsInSlot;
- int size = listOfLocalsInSlot.size();
+ @SuppressWarnings("unchecked")
+ List listOfLocalsInSlot =
+ (List) localsInSlot;
- for (int i = 0; i < size; i++) {
- LocalVariableGen lvg =
- (LocalVariableGen)listOfLocalsInSlot.get(i);
+ for (LocalVariableGen lvg : listOfLocalsInSlot) {
if (offsetInLocalVariableGenRange(lvg, offset)) {
return lvg;
}
@@ -403,20 +402,21 @@
* {@link #removeByNameTracking(LocalVariableGen)}
LocalVariableGen
*/
+ @SuppressWarnings("unchecked")
protected void registerByName(LocalVariableGen lvg) {
Object duplicateNameEntry = _nameToLVGMap.get(lvg.getName());
if (duplicateNameEntry == null) {
_nameToLVGMap.put(lvg.getName(), lvg);
} else {
- ArrayList sameNameList;
+ List sameNameList;
if (duplicateNameEntry instanceof ArrayList) {
- sameNameList = (ArrayList) duplicateNameEntry;
+ sameNameList = (List)duplicateNameEntry;
sameNameList.add(lvg);
} else {
- sameNameList = new ArrayList();
- sameNameList.add(duplicateNameEntry);
+ sameNameList = new ArrayList<>();
+ sameNameList.add((LocalVariableGen)duplicateNameEntry);
sameNameList.add(lvg);
}
@@ -431,11 +431,13 @@
* {@link #lookUpByName(String)}
* @param lvg a LocalVariableGen
*/
+ @SuppressWarnings("unchecked")
protected void removeByNameTracking(LocalVariableGen lvg) {
Object duplicateNameEntry = _nameToLVGMap.get(lvg.getName());
if (duplicateNameEntry instanceof ArrayList) {
- ArrayList sameNameList = (ArrayList) duplicateNameEntry;
+ List sameNameList =
+ (List)duplicateNameEntry;
for (int i = 0; i < sameNameList.size(); i++) {
if (sameNameList.get(i) == lvg) {
sameNameList.remove(i);
@@ -455,16 +457,18 @@
* @param name
* @return
*/
+ @SuppressWarnings("unchecked")
protected LocalVariableGen lookUpByName(String name) {
LocalVariableGen lvg = null;
Object duplicateNameEntry = _nameToLVGMap.get(name);
if (duplicateNameEntry instanceof ArrayList) {
- ArrayList sameNameList = (ArrayList) duplicateNameEntry;
+ List sameNameList =
+ (List)duplicateNameEntry;
for (int i = 0; i < sameNameList.size(); i++) {
- lvg = (LocalVariableGen)sameNameList.get(i);
- if (lvg.getName() == name) {
+ lvg = sameNameList.get(i);
+ if (lvg.getName() == null ? name == null : lvg.getName().equals(name)) {
break;
}
}
@@ -489,9 +493,10 @@
* @return an array of LocalVariableGen containing all the
* local variables
*/
+ @SuppressWarnings("unchecked")
protected LocalVariableGen[] getLocals(boolean includeRemoved) {
LocalVariableGen[] locals = null;
- ArrayList allVarsEverDeclared = new ArrayList();
+ List allVarsEverDeclared = new ArrayList<>();
if (includeRemoved) {
int slotCount = allVarsEverDeclared.size();
@@ -500,31 +505,29 @@
Object slotEntries = _variables.get(i);
if (slotEntries != null) {
if (slotEntries instanceof ArrayList) {
- ArrayList slotList = (ArrayList) slotEntries;
+ List slotList =
+ (List)slotEntries;
for (int j = 0; j < slotList.size(); j++) {
allVarsEverDeclared.add(slotList.get(i));
}
} else {
- allVarsEverDeclared.add(slotEntries);
+ allVarsEverDeclared.add((LocalVariableGen)slotEntries);
}
}
}
} else {
- Iterator nameVarsPairsIter = _nameToLVGMap.entrySet().iterator();
-
- while (nameVarsPairsIter.hasNext()) {
- Map.Entry nameVarsPair =
- (Map.Entry) nameVarsPairsIter.next();
+ for (Map.Entry nameVarsPair : _nameToLVGMap.entrySet()) {
Object vars = nameVarsPair.getValue();
if (vars != null) {
if (vars instanceof ArrayList) {
- ArrayList varsList = (ArrayList) vars;
+ List varsList =
+ (List) vars;
for (int i = 0; i < varsList.size(); i++) {
allVarsEverDeclared.add(varsList.get(i));
}
} else {
- allVarsEverDeclared.add(vars);
+ allVarsEverDeclared.add((LocalVariableGen)vars);
}
}
}
@@ -720,7 +723,7 @@
* current method. See {@link OutlineableChunkStart} and
* {@link OutlineableChunkEnd} for more information.
*/
- private class Chunk implements Comparable {
+ private class Chunk implements Comparable