file_name
stringlengths
6
86
file_path
stringlengths
45
249
content
stringlengths
47
6.26M
file_size
int64
47
6.26M
language
stringclasses
1 value
extension
stringclasses
1 value
repo_name
stringclasses
767 values
repo_stars
int64
8
14.4k
repo_forks
int64
0
1.17k
repo_open_issues
int64
0
788
repo_created_at
stringclasses
767 values
repo_pushed_at
stringclasses
767 values
TextIter.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/TextIter.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This class iterates through all text nodes of an element. * VTDNav has getText() which is inadequate for mixed content style of XML. * text nodes include character_data and CDATA. * Creation date: (12/5/03 5:53:41 PM) */ public class TextIter { private int prevLocation; //previous location of text node protected int depth; protected int index; // this is index for the element protected VTDNavHuge vn; private int lcIndex; private int lcLower; private int lcUpper; /** * TextIter constructor comment. */ public TextIter() { super(); vn = null; /*sel_char_data = true; sel_comment = true; sel_cdata = true;*/ } /** * Get the index vals for the text nodes in document order. * Creation date: (12/5/03 6:11:50 PM) * @return int (-1 if no more left) */ public int getNext() { if (vn == null) throw new IllegalArgumentException(" VTDNav instance can't be null"); int vtdSize = vn.vtdBuffer.size(); switch (depth) { case -1: return -1; case 0 : // scan forward, if none found, jump to level 1 element and scan backward until one is found // if there isn't a level-one element, jump to the end of vtd buffer and scan backward int sp = (prevLocation != -1) ? increment(prevLocation): index + 1; if (vn.l1Buffer.size() != 0) { int temp1 = vn.l1Buffer.upper32At(0); int temp2 = vn.l1Buffer.upper32At(vn.l1Buffer.size() - 1); lcIndex = (lcIndex != -1) ? lcIndex : 0; while (sp < vtdSize) { if (sp >= temp1 && sp < temp2) { int s = vn.l1Buffer.upper32At(lcIndex); if (sp == s) { // get to the next l1 element then do a rewind lcIndex++; sp = vn.l1Buffer.upper32At(lcIndex)-1; while (vn.getTokenDepth(sp) == 0 && vn.getTokenType(sp) != VTDNavHuge.TOKEN_STARTING_TAG) { //probe depth in here sp--; } sp++; // point to the first possible node } if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } sp++; } else { if (sp == temp2) { // get to the end of the document and do a rewind sp = vn.vtdBuffer.size() - 1; while (vn.getTokenDepth(sp) <= 0) { sp--; } sp++; //continue; } if (sp>=vtdSize) return -1; else if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } else if (vn.getTokenDepth(sp)>1) { break; } sp++; } } //prevLocation = vtdSize-1; return -1; // found nothing } else { // no child element for root, just scan right forward while (sp < vtdSize) { if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } sp++; } return -1; } case 1 : if (prevLocation != -1) { sp = increment(prevLocation) ; } else { // fetch lclower and lcupper lcLower = vn.l1Buffer.lower32At(vn.l1index); if (lcLower != -1) { lcUpper = vn.l2Buffer.size() - 1; int size = vn.l1Buffer.size(); for (int i = vn.l1index + 1; i < size ; i++) { int temp = vn.l1Buffer.lower32At(i); if (temp != 0xffffffff) { lcUpper = temp - 1; break; } } } sp = index + 1; } // check for l2lower and l2upper if (lcLower != -1) { // have at least one child element int temp1 = vn.l2Buffer.upper32At(lcLower); int temp2 = vn.l2Buffer.upper32At(lcUpper); lcIndex = (lcIndex != -1) ? lcIndex : lcLower; while (sp < vtdSize) { int s = vn.l2Buffer.upper32At(lcIndex); if (sp >= temp1 && sp < temp2) { if (sp == s) { lcIndex++; sp = vn.l2Buffer.upper32At(lcIndex) - 1; while (vn.getTokenDepth(sp) == 1) { sp--; } sp++; //continue; } if (isText(sp) == true && vn.getTokenDepth(sp)==1 ) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; } else { //if (sp == temp2) { // last child element //} else if (isText(sp) == true && vn.getTokenDepth(sp) == 1){ //System.out.println("depth ->"+vn.getTokenDepth(sp)); prevLocation = sp; return sp; } else if ((vn.getTokenType(sp)==VTDNavHuge.TOKEN_STARTING_TAG && vn.getTokenDepth(sp) < 2 ) || vn.getTokenDepth(sp)<1) { break; } sp++; } } //prevLocation = vtdSize-1; return -1; } else { // no child element if (sp>=vtdSize) return -1; int d = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && d >= 1 && !(d == 1 && type == VTDNavHuge.TOKEN_STARTING_TAG)) { if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; d = vn.getTokenDepth(sp); type = vn.getTokenType(sp); } //prevLocation = vtdSize-1; return -1; } case 2 : if (prevLocation != -1) { sp = increment(prevLocation); } else { // fetch lclower and lcupper lcLower = vn.l2Buffer.lower32At(vn.l2index); if (lcLower != -1) { lcUpper = vn.l3Buffer.size() - 1; int size = vn.l2Buffer.size(); for (int i = vn.l2index + 1; i < size ; i++) { int temp = vn.l2Buffer.lower32At(i); if (temp != 0xffffffff) { lcUpper = temp - 1; break; } } } sp = index + 1; } // check for l3lower and l3upper if (lcLower != -1) { // at least one child element int temp1 = vn.l3Buffer.intAt(lcLower); int temp2 = vn.l3Buffer.intAt(lcUpper); lcIndex = (lcIndex != -1) ? lcIndex : lcLower; while (sp < vtdSize) { int s = vn.l3Buffer.intAt(lcIndex); //int s = vn.l2Buffer.upper32At(lcIndex); if (sp >= temp1 && sp < temp2) { if (sp == s) { lcIndex++; sp = vn.l3Buffer.intAt(lcIndex) - 1; while (vn.getTokenDepth(sp) == 2) { sp--; } sp++; //continue; } if (isText(sp) == true && vn.getTokenDepth(sp)==2) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true && vn.getTokenDepth(sp)==2) { prevLocation = sp; return sp; } sp++; } else { //if (sp == temp2) { // last child element //} else if ( isText(sp) == true && vn.getTokenDepth(sp) == 2) { prevLocation = sp; return sp; } else if ((vn.getTokenType(sp)==VTDNavHuge.TOKEN_STARTING_TAG && vn.getTokenDepth(sp) < 3 ) || vn.getTokenDepth(sp)<2) { break; } sp++; } } //prevLocation = vtdSize-1; return -1; } else { // no child elements if (sp>=vtdSize) return -1; int d = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && d >= 2 && !(d == 2 && type == VTDNavHuge.TOKEN_STARTING_TAG)) { // the last condition indicates the start of the next sibling element if (isText(sp) == true && vn.getTokenDepth(sp)==2) { prevLocation = sp; return sp; } sp++; d = vn.getTokenDepth(sp); type = vn.getTokenType(sp); } //prevLocation = vtdSize-1; return -1; } default : //int curDepth = vn.context[0]; sp = (prevLocation != -1) ? increment(prevLocation): index + 1; if (sp>=vtdSize) return -1; int d = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && d >= depth && !(d == depth && type == VTDNavHuge.TOKEN_STARTING_TAG)) { if (isText(sp) == true && d == depth) { prevLocation = sp; return sp; } sp++; d = vn.getTokenDepth(sp); type = vn.getTokenType(sp); } } //prevLocation = vtdSize-1; return -1; } /** * Test whether a give token type is a TEXT. * Creation date: (12/11/03 3:46:10 PM) * @return boolean * @param type int */ final private boolean isText(int index) { int type = vn.getTokenType(index); return (type == VTDNavHuge.TOKEN_CHARACTER_DATA //|| type == vn.TOKEN_COMMENT || type == VTDNavHuge.TOKEN_CDATA_VAL); } /** * Obtain the current navigation position and element info from VTDNav. * So one can instantiate it once and use it for many different elements * Creation date: (12/5/03 6:20:44 PM) * @param v com.ximpleware.VTDNav */ public void touch(VTDNavHuge v) { if (v == null) throw new IllegalArgumentException(" VTDNav instance can't be null"); depth = v.context[0]; if (depth == -1) index = 0; else index = (depth != 0) ? v.context[depth] : v.rootIndex; vn = v; prevLocation = -1; lcIndex = -1; lcUpper = -1; lcLower = -1; } private int increment(int sp){ int type = vn.getTokenType(sp); int vtdSize = vn.vtdBuffer.size(); int i=sp+1; while(i<vtdSize && depth == vn.getTokenDepth(i) && type == vn.getTokenType(i)&& (vn.getTokenOffset(i-1)+ (int)((vn.vtdBuffer.longAt(i-1) & VTDNavHuge.MASK_TOKEN_FULL_LEN)>>32) == vn.getTokenOffset(i)) ){ i++; } return i; } }
14,656
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
LocationPathExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/LocationPathExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import com.ximpleware.NodeTest; import com.ximpleware.XPathEvalException; import com.ximpleware.extended.xpath.*; // if the context node is text(), // then many axis simply won't work /** * LocationPathExpr implements the location path expression * as defined in XPath spec */ public class LocationPathExpr extends Expr{ public static final int ABSOLUTE_PATH =0, RELATIVE_PATH =1; Step s; Step currentStep; int pathType; int state; //FastIntBuffer fib; // for uniqueness checking intHash ih; public static final int START = 0, // initial state END= 1, // return to begin TERMINAL= 2, // no more next step FORWARD = 3, // BACKWARD= 4; public LocationPathExpr(){ state = START; s = null; pathType = RELATIVE_PATH; currentStep = null; //fib = new FastIntBuffer(8);// page size 256 = 2^ 8 ih = new intHash(); } public void setStep(Step st){ s = st; } public void setPathType(int ptype){ pathType = ptype; } // Improved version for uniqueness checking public boolean isUnique(int i){ return ih.isUnique(i); } public void reset(VTDNavHuge vn){ state = START; Step temp = s; ih.reset(); currentStep = null; while(temp!=null){ temp.reset(vn); temp = temp.nextS; } } public String toString(){ String st = ""; Step ts = s; if (pathType == LocationPathExpr.ABSOLUTE_PATH){ st = st+"/"; } if (ts == null) return st; else return st + ts; } public boolean evalBoolean(VTDNavHuge vn){ boolean a = false; vn.push2(); // record stack size int size = vn.contextStack2.size; try{ a = (evalNodeSet(vn) != -1); }catch (Exception e){ } //rewind stack vn.contextStack2.size = size; reset(vn); vn.pop2(); return a; } public double evalNumber(VTDNavHuge vn){ int a = -1; vn.push2(); int size = vn.contextStack2.size; try { a =evalNodeSet(vn); if (a!=-1){ if (vn.getTokenType(a)== VTDNavHuge.TOKEN_ATTR_NAME){ a ++; }else if (vn.getTokenType(a)== VTDNavHuge.TOKEN_STARTING_TAG) { a = vn.getText(); } } } catch (Exception e){ } vn.contextStack2.size = size; reset(vn); vn.pop2(); try{ if (a!=-1) return vn.parseDouble(a); }catch (NavExceptionHuge e){ } return Double.NaN; } public String evalString(VTDNavHuge vn){ vn.push2(); int size = vn.contextStack2.size; int a = -1; try { a = evalNodeSet(vn); if (a != -1) { if (vn.getTokenType(a) == VTDNavHuge.TOKEN_ATTR_NAME) { a++; } if (vn.getTokenType(a) == VTDNavHuge.TOKEN_STARTING_TAG) { a = vn.getText(); } } } catch (Exception e) { } vn.contextStack2.size = size; reset(vn); vn.pop2(); try { if (a != -1) return vn.toString(a); } catch (NavExceptionHuge e) { } return ""; } public boolean isNodeSet(){ return true; } public boolean isNumerical(){ return false; } private final int process_child(VTDNavHuge vn)throws XPathEvalExceptionHuge,NavExceptionHuge{ int result; boolean b = false, b1 = false; //int contextSize; Predicate t= null; switch(state){ case START: if (currentStep.nt.testType != NodeTest.TEXT){ // first search for any predicate that // requires contextSize // if so, compute its context size // if size > 0 // set context // if size ==0 // immediately set the state to backward or end t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ state = END; break; } b=vn.toElement(VTDNavHuge.FIRST_CHILD); state = END; if (b == true){ do { if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null){ //currentStep.position++; state = FORWARD; currentStep = currentStep.getNextStep(); } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)){ return result; } } break; } } while (vn.toElement(VTDNavHuge.NS)); if (state == END) vn.toElement(VTDNavHuge.PARENT); } } else { if (vn.getAtTerminal()==true){ state = END; }else { // compute context size; t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } // b1 false indicate context size is zero. no need to go any further... if (b1){ state = END; break; } // get textIter TextIterHuge ti = null; if (currentStep.o != null){ ti = (TextIterHuge) currentStep.o; } else { ti = new TextIterHuge(); currentStep.o = ti; } ti.touch(vn); state = END; while((result = ti.getNext())!=-1){ vn.LN = result; vn.setAtTerminal(true); if (currentStep.evalPredicates(vn)){ break; } } // old code //result = vn.getText(); if (result != -1){ vn.setAtTerminal(true); //currentStep.resetP(vn); vn.LN = result; if (currentStep.getNextStep() != null){ vn.LN = result; state = FORWARD; currentStep = currentStep.getNextStep(); } else { //vn.pop(); state = TERMINAL; if ( isUnique(result)){ vn.LN = result; return result; } } } else{ //currentStep.set_ft(true); currentStep.resetP(vn); vn.setAtTerminal(false); } } } break; case END: currentStep =null; // reset(); return -1; case FORWARD: if (currentStep.nt.testType != NodeTest.TEXT){ t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ currentStep = currentStep.getPrevStep(); state = BACKWARD; break; } state = BACKWARD; forward: if (vn.toElement(VTDNavHuge.FC)) { do { if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } break forward; } } while (vn.toElement(VTDNavHuge.NS)); vn.toElement(VTDNavHuge.P); currentStep.resetP(vn); currentStep = currentStep.getPrevStep(); } else { //vn.toElement(VTDNav.P); currentStep = currentStep.getPrevStep(); } }else { // predicate at an attribute is not evaled if (vn.getAtTerminal() == true){ state = BACKWARD; currentStep = currentStep.getPrevStep(); }else { // compute context size; t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } // b1 false indicate context size is zero. no need to go any further... if (b1){ state = BACKWARD; break; } // get textIter TextIterHuge ti = null; if (currentStep.o != null){ ti = (TextIterHuge) currentStep.o; } else { ti = new TextIterHuge(); currentStep.o = ti; } ti.touch(vn); //result = ti.getNext(); while((result = ti.getNext())!=-1){ vn.LN = result; vn.setAtTerminal(true); if (currentStep.evalPredicates(vn)){ break; } } if (result == -1) { //currentStep.set_ft(true); //currentStep.resetP(vn); vn.setAtTerminal(false); if (state == FORWARD) { state = BACKWARD; currentStep = currentStep.getPrevStep(); } } else { vn.setAtTerminal(true); if (currentStep.getNextStep() != null) { vn.LN = result; state = FORWARD; currentStep = currentStep.getNextStep(); } else { //vn.pop(); state = TERMINAL; if (isUnique(result)) { vn.LN = result; return result; } } } } } break; case BACKWARD: if (currentStep.nt.testType != NodeTest.TEXT) { //currentStep = currentStep.getPrevStep(); b = false; while (vn.toElement(VTDNavHuge.NS)) { if (currentStep.eval(vn)) { b = true; break; } } if (b == true) { state = FORWARD; currentStep = currentStep.getNextStep(); } else if (currentStep.getPrevStep() == null){ currentStep.resetP(vn); vn.toElement(VTDNavHuge.P); state = END; } else { currentStep.resetP(vn); state = BACKWARD; vn.toElement(VTDNavHuge.P); currentStep = currentStep.getPrevStep(); } }else { vn.setAtTerminal(false); if (currentStep.getPrevStep() == null) state = END; else { state = BACKWARD; //vn.setAtTerminal(false); currentStep = currentStep.getPrevStep(); } } break; case TERMINAL: if (currentStep.nt.testType != NodeTest.TEXT) { while (vn.toElement(VTDNavHuge.NS)) { if (currentStep.eval(vn)) { // state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } currentStep.resetP(vn); if (currentStep.getPrevStep() == null){ state = END; vn.toElement(VTDNavHuge.P); } else { vn.toElement(VTDNavHuge.P); state = BACKWARD; currentStep = currentStep.getPrevStep(); } }else { TextIterHuge ti = (TextIterHuge) currentStep.o; int i = -1; while ((i=ti.getNext())!=-1) { if (currentStep.evalPredicates(vn)) { return i; } } currentStep.resetP(vn); vn.setAtTerminal(false); if (currentStep.getPrevStep() == null) state = END; else { state = BACKWARD; currentStep = currentStep.getPrevStep(); } } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private int process_DDFP(VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge { AutoPilotHuge ap; boolean b = false, b1 = false; //int contextSize; Predicate t= null; int result; switch(state){ case START: case FORWARD: if (vn.atTerminal){ if (state == START) state = END; else { // no need to set_ft to true // no need to resetP state = BACKWARD; currentStep = currentStep.getPrevStep(); } break; } t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ if (state ==START) state = END; else { currentStep = currentStep.getPrevStep(); state = BACKWARD; } break; } String helper = null; if (currentStep.nt.testType == NodeTest.NAMETEST){ helper = currentStep.nt.nodeName; } else if (currentStep.nt.testType == NodeTest.NODE){ helper = "*"; } else throw new XPathEvalExceptionHuge("can't run descendant " + "following, or following-sibling axis over comment(), pi(), and text()"); if (currentStep.o == null) currentStep.o = ap = new AutoPilotHuge(vn); else { ap = (AutoPilotHuge) currentStep.o; ap.bind(vn); } if (currentStep.get_ft() == true) { if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF ) if (currentStep.nt.testType == NodeTest.NODE) ap.setSpecial(true); else ap.setSpecial(false); //currentStep.o = ap = new AutoPilot(vn); if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF) ap.selectElement(helper); else if (currentStep.axis_type == AxisType.DESCENDANT) ap.selectElement_D(helper); else if (currentStep.axis_type == AxisType.PRECEDING) ap.selectElement_P(helper); else ap.selectElement_F(helper); currentStep.set_ft(false); } if ( state == START) state = END; vn.push2(); // not the most efficient. good for now //System.out.println(" --++ push in //"); b = false; while(ap.iterate()){ if (currentStep.evalPredicates(vn)){ b = true; break; } } if (b == false) { vn.pop2(); //System.out.println(" --++ pop in //"); currentStep.set_ft(true); currentStep.resetP(vn); if ( state == FORWARD){ state = BACKWARD; currentStep = currentStep.getPrevStep(); } } else { if (currentStep.getNextStep() != null){ state = FORWARD; currentStep = currentStep.getNextStep(); } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: //currentStep = currentStep.getPrevStep(); ap = (AutoPilotHuge) currentStep.o; //vn.push(); b = false; while(ap.iterate()){ if (currentStep.evalPredicates(vn)){ b = true; break; } } if (b == false) { vn.pop2(); currentStep.set_ft(true); currentStep.resetP(vn); //System.out.println(" --++ pop in //"); if (currentStep.getPrevStep() != null) { state = BACKWARD; currentStep = currentStep.getPrevStep(); } else state = END; } else { if (currentStep.getNextStep() != null) { //vn.push(); //System.out.println(" --++ push in //"); state = FORWARD; currentStep = currentStep.getNextStep(); } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } break; case TERMINAL: ap = (AutoPilotHuge) currentStep.o; b = false; while (ap.iterate()) { if (currentStep.evalPredicates(vn)) { b = true; break; } } if (b == true) { if (currentStep.evalPredicates(vn)) { result = vn.getCurrentIndex(); if (isUnique(result)) return result; } } else if (currentStep.getPrevStep() == null) { currentStep.resetP(vn); vn.pop2(); state = END; } else { vn.pop2(); currentStep.set_ft(true); currentStep.resetP(vn); //System.out.println(" --++ pop in //"); state = BACKWARD; //currentStep.ft = true; currentStep = currentStep.getPrevStep(); } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private final int process_parent(VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge{ boolean b1 = false; //int contextSize; Predicate t= null; int result; switch ( state) { case START: case FORWARD: t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ if (state == FORWARD){ state = BACKWARD; currentStep = currentStep.getPrevStep(); }else state = END; break; } if (vn.getCurrentDepth() == -1) { if ( state == START) state = END; else { //vn.pop(); state = BACKWARD; currentStep = currentStep.getPrevStep(); } } else { vn.push2(); vn.toElement(VTDNavHuge.P); // must return true if (currentStep.eval(vn)){ if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } }else{ vn.pop2(); currentStep.resetP(vn); if ( state == START) state = END; else { state = BACKWARD; currentStep = currentStep.getPrevStep(); } } } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: case TERMINAL: if (currentStep.getPrevStep() == null) { vn.pop2(); state = END; break; }else { vn.pop2(); state = BACKWARD; currentStep = currentStep.getPrevStep(); break; } default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private final int process_ancestor( VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge{ int result; boolean b = false, b1 = false; //int contextSize; Predicate t= null; switch(state){ case START: t = currentStep.p; while (t != null) { if (t.requireContextSize()) { int i = computeContextSize( t, vn); if (i == 0) { b1 = true; break; } else t.setContextSize(i); } t = t.nextP; } if (b1) { state = END; break; } state = END; if (vn.getCurrentDepth() != -1) { vn.push2(); while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if (isUnique(result)) return result; } } } if (state == END) { currentStep.resetP(vn); vn.pop2(); } } break; case END: currentStep =null; // reset(); return -1; case FORWARD: t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ currentStep = currentStep.getPrevStep(); state = BACKWARD; break; } state = BACKWARD; vn.push2(); while(vn.toElement(VTDNavHuge.P)){ if (currentStep.eval(vn)){ if (currentStep.getNextStep() != null){ state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if ( state == BACKWARD){ currentStep.resetP(vn); vn.pop2(); currentStep=currentStep.getPrevStep(); } break; case BACKWARD: b = false; vn.push2(); while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { if (currentStep.getNextStep()!= null) { state = FORWARD; currentStep = currentStep.getNextStep(); b = true; break; } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if (b==false){ vn.pop2(); if (currentStep.getPrevStep()!=null) { currentStep.resetP(vn); state = BACKWARD; currentStep = currentStep.getPrevStep(); } else { state = END; } } break; case TERMINAL: while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } vn.pop2(); if (currentStep.getPrevStep()!=null) { currentStep.resetP(vn); state = BACKWARD; currentStep = currentStep.getPrevStep(); } else { state = END; } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private final int process_ancestor_or_self(VTDNavHuge vn) throws XPathEvalExceptionHuge,NavExceptionHuge{ boolean b = false, b1 = false; //int contextSize; Predicate t= null; int result; switch ( state) { case START: t = currentStep.p; while (t != null) { if (t.requireContextSize()) { int i = computeContextSize( t, vn); if (i == 0) { b1 = true; break; } else t.setContextSize(i); } t = t.nextP; } if (b1) { state = END; break; } state = END; vn.push2(); if (currentStep.get_ft()== true){ currentStep.set_ft(false); if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { //vn.pop(); state = TERMINAL; if (vn.atTerminal) result = vn.LN; else result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if ( state == END) { currentStep.resetP(vn); vn.pop2(); } break; case FORWARD: t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ currentStep = currentStep.getPrevStep(); state = BACKWARD; break; } state = BACKWARD; vn.push2(); if (currentStep.get_ft() == true) { currentStep.set_ft(false); if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { //vn.pop(); state = TERMINAL; if (vn.atTerminal) result = vn.LN; else result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if ( state == BACKWARD) { currentStep.resetP(vn); currentStep.set_ft(true); vn.pop2(); currentStep = currentStep.getPrevStep(); } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: b = false; vn.push2(); while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); b = true; break; } else { //vn.pop(); state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if (b == false) { vn.pop2(); currentStep.resetP(vn); if (currentStep.getPrevStep() != null) { currentStep.set_ft(true); state = BACKWARD; currentStep = currentStep.getPrevStep(); } else { state = END; } } break; case TERMINAL: while (vn.toElement(VTDNavHuge.P)) { if (currentStep.eval(vn)) { result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } vn.pop2(); currentStep.resetP(vn); if (currentStep.getPrevStep()!=null) { currentStep.set_ft(true); state = BACKWARD; currentStep = currentStep.getPrevStep(); } else { state = END; } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private int process_self(VTDNavHuge vn) throws XPathEvalExceptionHuge,NavExceptionHuge{ boolean b1 = false; //int contextSize; Predicate t= null; int result; switch( state){ case START: case FORWARD: t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ if (state == FORWARD){ state = BACKWARD; currentStep = currentStep.getPrevStep(); }else state = END; break; } if (currentStep.eval(vn)){ if (currentStep.getNextStep()!=null){ state = FORWARD; currentStep = currentStep.getNextStep(); } else{ state = TERMINAL; if (vn.atTerminal == true) result = vn.LN; else result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } }else { currentStep.resetP(vn); if ( state == START) state = END; else state = BACKWARD; } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: case TERMINAL: if (currentStep.getPrevStep()!=null){ state = BACKWARD; currentStep= currentStep.getPrevStep(); }else{ state = END; } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private int process_following_sibling(VTDNavHuge vn) throws XPathEvalExceptionHuge,NavExceptionHuge{ boolean b = false, b1 = false; //int contextSize; Predicate t= null; int result; switch( state){ case START: case FORWARD: t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ if (state == FORWARD){ state = BACKWARD; currentStep = currentStep.getPrevStep(); }else state = END; break; } if ( state == START) state = END; else state = BACKWARD; vn.push2(); while (vn.toElement(VTDNavHuge.NS)){ if (currentStep.eval(vn)){ if (currentStep.getNextStep()!=null){ state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if ( state == END){ currentStep.resetP(vn); vn.pop2(); }else if ( state == BACKWARD){ currentStep.resetP(vn); vn.pop2(); currentStep = currentStep.getPrevStep(); } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: while (vn.toElement(VTDNavHuge.NS)){ if (currentStep.eval(vn)){ if (currentStep.getNextStep()!=null){ state = FORWARD; currentStep = currentStep.getNextStep(); b = true; break; } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if (b==false){ vn.pop2(); currentStep.resetP(vn); if (currentStep.getPrevStep()==null){ state = END; }else{ state = BACKWARD; currentStep = currentStep.getPrevStep(); } } break; case TERMINAL: while (vn.toElement(VTDNavHuge.NS)){ if (currentStep.eval(vn)){ // state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } vn.pop2(); currentStep.resetP(vn); if(currentStep.getPrevStep()!=null){ currentStep = currentStep.getPrevStep(); state = BACKWARD; }else{ state = END; } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private int process_preceding_sibling(VTDNavHuge vn) throws XPathEvalExceptionHuge,NavExceptionHuge { boolean b = false, b1 = false; //int contextSize; Predicate t= null; int result; switch(state){ case START: case FORWARD: t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ if (state == FORWARD){ state = BACKWARD; currentStep = currentStep.getPrevStep(); }else state = END; break; } if ( state == START) state = END; else state = BACKWARD; vn.push2(); while (vn.toElement(VTDNavHuge.PS)){ if (currentStep.eval(vn)){ if (currentStep.getNextStep()!=null){ state = FORWARD; currentStep = currentStep.getNextStep(); break; } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if ( state == END){ currentStep.resetP(vn); vn.pop2(); }else if ( state == BACKWARD){ currentStep.resetP(vn); vn.pop2(); currentStep = currentStep.getPrevStep(); } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: while (vn.toElement(VTDNavHuge.PS)){ if (currentStep.eval(vn)){ if (currentStep.getNextStep()!=null){ state = FORWARD; currentStep = currentStep.getNextStep(); b = true; break; } else { state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } } if (b==false){ vn.pop2(); currentStep.resetP(vn); if (currentStep.getPrevStep()==null){ state = END; }else{ state = BACKWARD; currentStep = currentStep.getPrevStep(); } } break; case TERMINAL: while (vn.toElement(VTDNavHuge.PS)){ if (currentStep.eval(vn)){ // state = TERMINAL; result = vn.getCurrentIndex(); if ( isUnique(result)) return result; } } vn.pop2(); if(currentStep.getPrevStep()!=null){ currentStep = currentStep.getPrevStep(); state = BACKWARD; }else{ state = END; } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } private int process_attribute(VTDNavHuge vn) throws XPathEvalExceptionHuge,NavExceptionHuge { AutoPilotHuge ap = null; boolean b1 = false; //int contextSize; Predicate t= null; //int result; int temp; switch( state){ case START: case FORWARD: if (currentStep.nt.testType != NodeTest.NAMETEST) throw new XPathEvalExceptionHuge("can't run descendant, descendant-or-self," + "following, or following-sibling axis over non-element nodes"); t = currentStep.p; while(t!=null){ if (t.requireContextSize()){ int i = computeContextSize(t,vn); if (i==0){ b1 = true; break; }else t.setContextSize(i); } t = t.nextP; } if (b1){ if (state == FORWARD){ state = BACKWARD; currentStep = currentStep.getPrevStep(); }else state = END; break; } if (vn.getAtTerminal()==true){ if (state ==START) state = END; else { state = BACKWARD; currentStep = currentStep.getPrevStep(); } } else { if (currentStep.get_ft() == true) { if (currentStep.o == null) currentStep.o = ap = new AutoPilotHuge(vn); else { ap = (AutoPilotHuge) currentStep.o; ap.bind(vn); //ap.set_ft(true); } if (currentStep.nt.localName != null) ap.selectAttrNS(currentStep.nt.URL, currentStep.nt.localName); else ap.selectAttr(currentStep.nt.nodeName); currentStep.set_ft(false); } if (state == START) state = END; vn.setAtTerminal(true); while ((temp = ap.iterateAttr()) != -1) { if (currentStep.evalPredicates(vn)) { break; } } if (temp == -1) { currentStep.set_ft(true); currentStep.resetP(vn); vn.setAtTerminal(false); if (state == FORWARD) { state = BACKWARD; currentStep = currentStep.getPrevStep(); } } else { if (currentStep.getNextStep() != null) { vn.LN = temp; state = FORWARD; currentStep = currentStep.getNextStep(); } else { //vn.pop(); state = TERMINAL; if (isUnique(temp)) { vn.LN = temp; return temp; } } } } break; case END: currentStep = null; // reset(); return -1; case BACKWARD: ap = (AutoPilotHuge) currentStep.o; //vn.push(); while( (temp = ap.iterateAttr()) != -1){ if (currentStep.evalPredicates(vn)){ break; } } if (temp == -1) { currentStep.set_ft(true); currentStep.resetP(vn); vn.setAtTerminal(false); if (currentStep.getPrevStep() != null) { state = BACKWARD; currentStep = currentStep.getPrevStep(); } else state = END; } else { if (currentStep.getNextStep() != null) { state = FORWARD; currentStep = currentStep.getNextStep(); } else { state = TERMINAL; if ( isUnique(temp)){ vn.LN = temp; return temp; } } } break; case TERMINAL: ap = (AutoPilotHuge) currentStep.o; while( (temp = ap.iterateAttr()) != -1){ if (currentStep.evalPredicates(vn)){ break; } } if (temp != -1) if (isUnique(temp)){ vn.LN = temp; return temp; } vn.setAtTerminal(false); currentStep.resetP(vn); if (currentStep.getPrevStep() == null) { currentStep.set_ft(true); state = END; } else { state = BACKWARD; currentStep.set_ft(true); currentStep = currentStep.getPrevStep(); } break; default: throw new XPathEvalExceptionHuge("unknown state"); } return -2; } public int evalNodeSet(VTDNavHuge vn) throws NavExceptionHuge,XPathEvalExceptionHuge{ int result; if (currentStep == null) { if ( pathType == ABSOLUTE_PATH){ vn.toElement(VTDNavHuge.ROOT); vn.toElement(VTDNavHuge.PARENT); } currentStep = s; if (currentStep == null){ if ( state == START){ state = END; return 0; } else{ return -1; } } } while (true) { switch (currentStep.axis_type) { case AxisType.CHILD: if ( (result = process_child(vn))!=-2) return result; break; case AxisType.DESCENDANT_OR_SELF: case AxisType.DESCENDANT: case AxisType.PRECEDING: case AxisType.FOLLOWING: if ((result = process_DDFP(vn))!= -2) return result; break; case AxisType.PARENT: if ((result = process_parent(vn))!= -2) return result; break; case AxisType.ANCESTOR: if ((result = process_ancestor(vn))!= -2) return result; break; case AxisType.ANCESTOR_OR_SELF: if ((result = process_ancestor_or_self(vn))!= -2) return result; break; case AxisType.SELF: if ((result = process_self(vn))!= -2) return result; break; case AxisType.FOLLOWING_SIBLING: if ((result = process_following_sibling(vn))!= -2) return result; break; case AxisType.PRECEDING_SIBLING: if ((result = process_preceding_sibling(vn))!= -2) return result; break; case AxisType.ATTRIBUTE: if ((result = process_attribute(vn))!= -2) return result; break; default: throw new XPathEvalExceptionHuge("axis not supported"); } } } public boolean isString(){ return false; } public boolean isBoolean(){ return false; } // to support computer context size // needs to add public boolean requireContextSize(){ return false; } // public void setContextSize(int size){ } public int computeContextSize(Predicate p, VTDNavHuge vn) throws NavExceptionHuge,XPathEvalExceptionHuge{ boolean b = false; //Predicate tp = null; int i = 0; AutoPilotHuge ap; switch(currentStep.axis_type){ case AxisType.CHILD: if (currentStep.nt.testType != NodeTest.TEXT){ b = vn.toElement(VTDNavHuge.FIRST_CHILD); if (b) { do { if (currentStep.eval(vn, p)) { i++; } } while (vn.toElement(VTDNavHuge.NS)); vn.toElement(VTDNavHuge.PARENT); currentStep.resetP(vn,p); return i; } else return 0; }else { TextIterHuge ti = new TextIterHuge(); ti.touch(vn); int result = -1; while((ti.getNext())!=-1){ vn.setAtTerminal(true); vn.LN = result; if (currentStep.evalPredicates(vn,p)){ i++; } } currentStep.resetP(vn,p); return i; } case AxisType.DESCENDANT_OR_SELF: case AxisType.DESCENDANT: case AxisType.PRECEDING: case AxisType.FOLLOWING: String helper = null; if (currentStep.nt.testType == NodeTest.NODE){ helper = "*"; }else if (currentStep.nt.testType == NodeTest.NAMETEST){ helper = currentStep.nt.nodeName; }else throw new XPathEvalExceptionHuge("can't run descendant " + "following, or following-sibling axis over comment(), pi(), and text()"); ap = new AutoPilotHuge(vn); if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF ) if (currentStep.nt.testType == NodeTest.NODE) ap.setSpecial(true); else ap.setSpecial(false); //currentStep.o = ap = new AutoPilot(vn); if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF) if (currentStep.nt.localName!=null) ap.selectElementNS(currentStep.nt.URL,currentStep.nt.localName); else ap.selectElement(helper); else if (currentStep.axis_type == AxisType.DESCENDANT) if (currentStep.nt.localName!=null) ap.selectElementNS_D(currentStep.nt.URL,currentStep.nt.localName); else ap.selectElement_D(helper); else if (currentStep.axis_type == AxisType.PRECEDING) if (currentStep.nt.localName!=null) ap.selectElementNS_P(currentStep.nt.URL,currentStep.nt.localName); else ap.selectElement_P(helper); else if (currentStep.nt.localName!=null) ap.selectElementNS_F(currentStep.nt.URL,currentStep.nt.localName); else ap.selectElement_F(helper); vn.push2(); while(ap.iterate()){ if (currentStep.evalPredicates(vn,p)){ i++; } } vn.pop2(); currentStep.resetP(vn,p); return i; case AxisType.PARENT: vn.push2(); i = 0; if (vn.toElement(VTDNavHuge.PARENT)){ if (currentStep.eval(vn,p)){ i++; } } vn.pop2(); currentStep.resetP(vn,p); return i; case AxisType.ANCESTOR: vn.push2(); i = 0; while (vn.toElement(VTDNavHuge.PARENT)) { if (currentStep.eval(vn, p)) { i++; } } vn.pop2(); currentStep.resetP(vn,p); return i; case AxisType.ANCESTOR_OR_SELF: vn.push2(); i = 0; do { if (currentStep.eval(vn, p)) { i++; } }while(vn.toElement(VTDNavHuge.PARENT)); vn.pop2(); currentStep.resetP(vn,p); return i; case AxisType.SELF: i = 0; if (vn.toElement(VTDNavHuge.PARENT)){ if (currentStep.eval(vn,p)){ i++; } } currentStep.resetP(vn,p); return i; case AxisType.FOLLOWING_SIBLING: vn.push2(); while(vn.toElement(VTDNavHuge.NEXT_SIBLING)){ if (currentStep.eval(vn,p)){ i++; } } vn.pop2(); currentStep.resetP(vn,p); return i; case AxisType.PRECEDING_SIBLING: vn.push2(); while(vn.toElement(VTDNavHuge.PREV_SIBLING)){ if (currentStep.eval(vn,p)){ i++; } } vn.pop2(); currentStep.resetP(vn,p); return i; case AxisType.ATTRIBUTE: ap = new AutoPilotHuge(vn); if (currentStep.nt.localName!=null) ap.selectAttrNS(currentStep.nt.URL, currentStep.nt.localName); else ap.selectAttr(currentStep.nt.nodeName); i = 0; while(ap.iterateAttr()!=-1){ if (currentStep.evalPredicates(vn,p)){ i++; } } currentStep.resetP(vn,p); return i; default: throw new XPathEvalExceptionHuge("axis not supported"); } //return 8; } public void setPosition(int pos){ } public int adjust(int n) { int i; if (pathType == RELATIVE_PATH) { i = Math.min(intHash.determineHashWidth(n),5); // hash width 64 } else { i = intHash.determineHashWidth(n); } if (ih!=null && i== ih.e) {} else ih = new intHash(i); Step temp = s; while(temp!=null){ temp.adjust(n); temp = temp.nextS; } return i; } }
51,846
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XPathEvalExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/XPathEvalExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This exception is thrown when there is something * during XPath evaluation * It is adapted to support extended VTD (256 max file size) * */ public class XPathEvalExceptionHuge extends VTDExceptionHuge{ public XPathEvalExceptionHuge(String s){ super(s); } }
1,121
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
EntityExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/EntityExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * Signals exception conditions for any invalid entity reference during parsing. * It is adapted to support extended VTD (256 max file size) * @author: */ public class EntityExceptionHuge extends ParseExceptionHuge { /** * EntityException constructor comment. */ public EntityExceptionHuge() { super(); } /** * EntityException constructor comment. * @param s java.lang.String */ public EntityExceptionHuge(String s) { super(s); } }
1,303
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
TextIterHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/TextIterHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This class iterates through all text nodes of an element. * VTDNavHuge has getText() which is inadequate for mixed content style of XML. * text nodes include character_data and CDATA. * This version is adapted to support extended VTD (256GB max file size) */ public class TextIterHuge { private int prevLocation; //previous location of text node protected int depth; protected int index; // this is index for the element protected VTDNavHuge vn; private int lcIndex; private int lcLower; private int lcUpper; /** * TextIter constructor comment. */ public TextIterHuge() { super(); vn = null; /*sel_char_data = true; sel_comment = true; sel_cdata = true;*/ } /** * Get the index vals for the text nodes in document order. * Creation date: (12/5/03 6:11:50 PM) * @return int (-1 if no more left) */ public int getNext() { if (vn == null) throw new IllegalArgumentException(" VTDNav instance can't be null"); int vtdSize = vn.vtdBuffer.size(); switch (depth) { case -1: return -1; case 0 : // scan forward, if none found, jump to level 1 element and scan backward until one is found // if there isn't a level-one element, jump to the end of vtd buffer and scan backward int sp = (prevLocation != -1) ? increment(prevLocation): index + 1; if (vn.l1Buffer.size() != 0) { int temp1 = vn.l1Buffer.upper32At(0); int temp2 = vn.l1Buffer.upper32At(vn.l1Buffer.size() - 1); lcIndex = (lcIndex != -1) ? lcIndex : 0; while (sp < vtdSize) { if (sp >= temp1 && sp < temp2) { int s = vn.l1Buffer.upper32At(lcIndex); if (sp == s) { // get to the next l1 element then do a rewind lcIndex++; sp = vn.l1Buffer.upper32At(lcIndex)-1; while (vn.getTokenDepth(sp) == 0 && vn.getTokenType(sp) != VTDNavHuge.TOKEN_STARTING_TAG) { //probe depth in here sp--; } sp++; // point to the first possible node } if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } sp++; } else { if (sp == temp2) { // get to the end of the document and do a rewind sp = vn.vtdBuffer.size() - 1; while (vn.getTokenDepth(sp) <= 0) { sp--; } sp++; //continue; } if (sp>=vtdSize) return -1; else if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } else if (vn.getTokenDepth(sp)>1) { break; } sp++; } } //prevLocation = vtdSize-1; return -1; // found nothing } else { // no child element for root, just scan right forward while (sp < vtdSize) { if (isText(sp) == true && vn.getTokenDepth(sp)==0) { prevLocation = sp; return sp; } sp++; } return -1; } case 1 : if (prevLocation != -1) { sp = increment(prevLocation) ; } else { // fetch lclower and lcupper lcLower = vn.l1Buffer.lower32At(vn.l1index); if (lcLower != -1) { lcUpper = vn.l2Buffer.size() - 1; int size = vn.l1Buffer.size(); for (int i = vn.l1index + 1; i < size ; i++) { int temp = vn.l1Buffer.lower32At(i); if (temp != 0xffffffff) { lcUpper = temp - 1; break; } } } sp = index + 1; } // check for l2lower and l2upper if (lcLower != -1) { // have at least one child element int temp1 = vn.l2Buffer.upper32At(lcLower); int temp2 = vn.l2Buffer.upper32At(lcUpper); lcIndex = (lcIndex != -1) ? lcIndex : lcLower; while (sp < vtdSize) { int s = vn.l2Buffer.upper32At(lcIndex); if (sp >= temp1 && sp < temp2) { if (sp == s) { lcIndex++; sp = vn.l2Buffer.upper32At(lcIndex) - 1; while (vn.getTokenDepth(sp) == 1) { sp--; } sp++; //continue; } if (isText(sp) == true && vn.getTokenDepth(sp)==1 ) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; } else { //if (sp == temp2) { // last child element //} else if (isText(sp) == true && vn.getTokenDepth(sp) == 1){ //System.out.println("depth ->"+vn.getTokenDepth(sp)); prevLocation = sp; return sp; } else if ((vn.getTokenType(sp)==VTDNavHuge.TOKEN_STARTING_TAG && vn.getTokenDepth(sp) < 2 ) || vn.getTokenDepth(sp)<1) { break; } sp++; } } //prevLocation = vtdSize-1; return -1; } else { // no child element if (sp>=vtdSize) return -1; int d = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && d >= 1 && !(d == 1 && type == VTDNavHuge.TOKEN_STARTING_TAG)) { if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; d = vn.getTokenDepth(sp); type = vn.getTokenType(sp); } //prevLocation = vtdSize-1; return -1; } case 2 : if (prevLocation != -1) { sp = increment(prevLocation); } else { // fetch lclower and lcupper lcLower = vn.l2Buffer.lower32At(vn.l2index); if (lcLower != -1) { lcUpper = vn.l3Buffer.size() - 1; int size = vn.l2Buffer.size(); for (int i = vn.l2index + 1; i < size ; i++) { int temp = vn.l2Buffer.lower32At(i); if (temp != 0xffffffff) { lcUpper = temp - 1; break; } } } sp = index + 1; } // check for l3lower and l3upper if (lcLower != -1) { // at least one child element int temp1 = vn.l3Buffer.intAt(lcLower); int temp2 = vn.l3Buffer.intAt(lcUpper); lcIndex = (lcIndex != -1) ? lcIndex : lcLower; while (sp < vtdSize) { int s = vn.l3Buffer.intAt(lcIndex); //int s = vn.l2Buffer.upper32At(lcIndex); if (sp >= temp1 && sp < temp2) { if (sp == s) { lcIndex++; sp = vn.l3Buffer.intAt(lcIndex) - 1; while (vn.getTokenDepth(sp) == 2) { sp--; } sp++; //continue; } if (isText(sp) == true && vn.getTokenDepth(sp)==2) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true && vn.getTokenDepth(sp)==2) { prevLocation = sp; return sp; } sp++; } else { //if (sp == temp2) { // last child element //} else if ( isText(sp) == true && vn.getTokenDepth(sp) == 2) { prevLocation = sp; return sp; } else if ((vn.getTokenType(sp)==VTDNavHuge.TOKEN_STARTING_TAG && vn.getTokenDepth(sp) < 3 ) || vn.getTokenDepth(sp)<2) { break; } sp++; } } //prevLocation = vtdSize-1; return -1; } else { // no child elements if (sp>=vtdSize) return -1; int d = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && d >= 2 && !(d == 2 && type == VTDNavHuge.TOKEN_STARTING_TAG)) { // the last condition indicates the start of the next sibling element if (isText(sp) == true && vn.getTokenDepth(sp)==2) { prevLocation = sp; return sp; } sp++; d = vn.getTokenDepth(sp); type = vn.getTokenType(sp); } //prevLocation = vtdSize-1; return -1; } default : //int curDepth = vn.context[0]; sp = (prevLocation != -1) ? increment(prevLocation): index + 1; if (sp>=vtdSize) return -1; int d = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (d >= depth && !(d == depth && type == VTDNavHuge.TOKEN_STARTING_TAG)) { if (isText(sp) == true && d == depth) { prevLocation = sp; return sp; } sp++; if(sp >= vtdSize) return -1; d = vn.getTokenDepth(sp); type = vn.getTokenType(sp); } } //prevLocation = vtdSize-1; return -1; } /** * Test whether a give token type is a TEXT. * Creation date: (12/11/03 3:46:10 PM) * @return boolean * @param type int */ final private boolean isText(int index) { int type = vn.getTokenType(index); return (type == VTDNavHuge.TOKEN_CHARACTER_DATA //|| type == vn.TOKEN_COMMENT || type == VTDNavHuge.TOKEN_CDATA_VAL); } /** * Obtain the current navigation position and element info from VTDNav. * So one can instantiate it once and use it for many different elements * Creation date: (12/5/03 6:20:44 PM) * @param v com.ximpleware.VTDNav */ public void touch(VTDNavHuge v) { if (v == null) throw new IllegalArgumentException(" VTDNav instance can't be null"); depth = v.context[0]; if (depth == -1) index = 0; else index = (depth != 0) ? v.context[depth] : v.rootIndex; vn = v; prevLocation = -1; lcIndex = -1; lcUpper = -1; lcLower = -1; } private int increment(int sp){ int type = vn.getTokenType(sp); int vtdSize = vn.vtdBuffer.size(); int i=sp+1; while(i<vtdSize && depth == vn.getTokenDepth(i) && type == vn.getTokenType(i)&& (vn.getTokenOffset(i-1)+ (int)((vn.vtdBuffer.longAt(i-1) & VTDNavHuge.MASK_TOKEN_FULL_LEN)>>32) == vn.getTokenOffset(i)) ){ i++; } return i; } }
14,737
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
VTDExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/VTDExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * VTDExceptionHuge is the root class for all exceptions in this package (com.ximpleware.extended) */ public class VTDExceptionHuge extends Exception { public VTDExceptionHuge(String s){ super(s); } public VTDExceptionHuge(){ } }
1,094
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
EncodingExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/EncodingExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * Signals character encoding exception during parsing. * It is adapted to support extended VTD (256 max file size) */ public class EncodingExceptionHuge extends ParseExceptionHuge { /** * EncodingException constructor comment. */ public EncodingExceptionHuge() { super(); } /** * EncodingException constructor comment. * @param s java.lang.String */ public EncodingExceptionHuge(String s) { super(s); } }
1,274
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XMLBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/XMLBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import java.io.*; /** * XMLBuffer is a class that reads in an XML doc into chunk-based memory buffers * the file size is equal to n*1GB + m (where m < 1GB) * */ public class XMLBuffer implements IByteBuffer { byte[][] bufferArray; long length; public XMLBuffer(){ //ArrayList al = new ArrayList(); } public XMLBuffer(byte[] ba){ if (ba==null) throw new IllegalArgumentException("ba can't be null "); if (ba.length > 1<<30) throw new IllegalArgumentException("ba should be shorter than 1G bytes "); bufferArray = new byte[1][]; bufferArray[0]= ba; length = ba.length; } /** * * @param fileName * @throws java.io.IOException * @throws ParseException * */ public void readFile(String fileName) throws java.io.IOException, ParseExceptionHuge { // get file size File f = new File(fileName); long l = f.length(); //System.out.println("length ==>"+l); length = l; if (l>= (1L<< 38)){ throw new ParseExceptionHuge("document too big > 256 Gbyte"); } // calculate # of buffers needed and each buffer size int pageNumber = (int)(l>>30)+(((l & 0x3fffffffL)==0)?0:1); bufferArray = new byte[pageNumber][]; //fill the buffers with doc content FileInputStream fis = new FileInputStream(f); int byteArrayLen = 0; for (int i=0;i<pageNumber;i++){ if (l > (1<<30)){ bufferArray[i] = new byte[1<<30]; byteArrayLen = 1<<30; } else{ bufferArray[i] = new byte[(int)l]; byteArrayLen = (int)l; } int offset = 0; int numRead = 0; int numOfBytes = 1048576;//I choose this value randomly, //any other (not too big) value also can be here. if (byteArrayLen-offset<numOfBytes) {numOfBytes=byteArrayLen-offset;} while (offset < byteArrayLen && (numRead=fis.read(bufferArray[i], offset, numOfBytes)) >= 0) { offset += numRead; if (byteArrayLen-offset<numOfBytes) { numOfBytes=byteArrayLen-offset; } } //fis.read(bufferArray[i]); l = l -(1<<30); } } /** * */ public final byte byteAt(long index){ return bufferArray[(int)(index>>30)][(int)(index & 0x3fffffff)]; } /** * Return a byte array filled with content from underlying byte storage. * @return byte[] * @param offset int bytes offset (not UTF char unit) * @param len int */ public byte[] getBytes(int offset, int len){ return (byte[]) null; } /** * Total size in terms of # of bytes. * @return int */ public long length(){ return length; } // get the whole XML public byte[] getBytes(){ return null; } public void writeToFileOutputStream(java.io.FileOutputStream ost, long os, long len) throws java.io.IOException{ //page size is 1<<30 // then find the remainder //ost's page # int pageN = (int)(os>>30); //ost's remainder int pos = (int)(os&((1<<30)-1)); // only write to outputStream once if (pos+len <= 1<<30){ ost.write(bufferArray[pageN], pos,(int) len); return; } //write the head ost.write(bufferArray[pageN],pos, (1<<30)-pos); pageN++; len -= (1<<30)-pos; //write the mid sections while(len>(1<<30)){ ost.write(bufferArray[pageN],0, (1<<30)); pageN++; len -= (1<<30); } //write the tail ost.write(bufferArray[pageN], 0, (int)len); return; } }
4,792
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
PathExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/PathExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import com.ximpleware.extended.xpath.Expr; /** * PathExpr implements the Path expression as defined * in XPath spec * */ public class PathExpr extends Expr { Expr fe; LocationPathExpr lpe; //boolean first_time; int evalState; //FastIntBuffer fib; intHash ih; //public int getPositon(){ // return fib.size(); //} public PathExpr(Expr f, LocationPathExpr l){ fe = f; lpe = l; //first_time = true; evalState = 0; //fib = new FastIntBuffer(8); ih = new intHash(); } public boolean evalBoolean(VTDNavHuge vn) { boolean a = false; vn.push2(); // record teh stack size int size = vn.contextStack2.size; try{ a = (evalNodeSet(vn) != -1); }catch (Exception e){ } //rewind stack vn.contextStack2.size = size; reset(vn); vn.pop2(); return a; } public double evalNumber(VTDNavHuge vn) { int a = -1; vn.push2(); int size = vn.contextStack2.size; try { a =evalNodeSet(vn); if (a!=-1){ if (vn.getTokenType(a)== VTDNavHuge.TOKEN_ATTR_NAME){ a ++; }else if (vn.getTokenType(a)== VTDNavHuge.TOKEN_STARTING_TAG) { a = vn.getText(); } } } catch (Exception e){ } vn.contextStack2.size = size; reset(vn); vn.pop2(); try{ if (a!=-1) return vn.parseDouble(a); }catch (NavExceptionHuge e){ } return Double.NaN; } public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge { int a; while (true) { switch (evalState) { case 0: //this state is teh initial state; a = fe.evalNodeSet(vn); if (a == -1){ evalState =4; } else evalState = 1; break; case 1: // fe returns valid value, then iterate the locationPath vn.push2(); a = lpe.evalNodeSet(vn); if (a == -1) { lpe.reset(vn); evalState = 3; } else { evalState = 2; if (isUnique(a)) return a; } break; case 2: a = lpe.evalNodeSet(vn); if (a == -1) { lpe.reset(vn); evalState = 3; } else{ if (isUnique(a)) return a; //return a; } break; case 3: vn.pop2(); a = fe.evalNodeSet(vn); if (a == -1) evalState = 4; else{ vn.push2(); evalState = 2; } break; case 4: return -1; default: throw new XPathEvalExceptionHuge( "Invalid state evaluating PathExpr"); } } //return -1; } public String evalString(VTDNavHuge vn) { vn.push2(); int size = vn.contextStack2.size; int a = -1; try { a = evalNodeSet(vn); if (a != -1) { if (vn.getTokenType(a) == VTDNavHuge.TOKEN_ATTR_NAME) { a++; } if (vn.getTokenType(a) == VTDNavHuge.TOKEN_STARTING_TAG) { a = vn.getText(); } } } catch (Exception e) { } vn.contextStack2.size = size; reset(vn); vn.pop2(); try { if (a != -1) return vn.toString(a); } catch (NavExceptionHuge e) { } return ""; } // The improved version, use hashtable to check for uniqueness public boolean isUnique(int i){ return ih.isUnique(i); } public void reset(VTDNavHuge vn) { fe.reset(vn); lpe.reset(vn); //fib.clear(); ih.reset(); evalState = 0; } public String toString() { return "("+fe +")/" + lpe; } public boolean isNumerical() { return false; } public boolean isNodeSet() { return true; } public boolean isString(){ return false; } public boolean isBoolean(){ return false; } // to support computer context size // needs to add public boolean requireContextSize(){ return false; } public void setContextSize(int size){ } public void setPosition(int pos){ } public int adjust(int n){ int i = fe.adjust(n); lpe.adjust(n); if (ih!=null && i==ih.e) {} else ih = new intHash(i); return i; } }
4,929
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
BookMarkHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/BookMarkHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* BookMarkHuge is based on (and inspired by) the concept and * implementation contributed by Rodrigo Cunha. It corresponds * to a single node position of VTDNavHuge's cursor. It is adapted to * supported extended VTD (256 GB file size) * * setCursorPosition(VTDNavHuge vn) sets the node position of vn. * setCursorPosition() sets the node position of the BookMark object's embedded * VTDNavHuge object * * recordCursorPosition(VTDNavHuge vn) records the node position of the VTDNavHuge * Object. * * recordCursorPosition() records the node position of the BookMarkHuge object's * embedded VTDNavHuge object * * BookMarkHuge(VTDNavHuge vn) implicitly sets the node position for * the created BookMark instance. */ package com.ximpleware.extended; /** * BookmarkHue is a single instance of a node position. * You can save the cursor's position into a BookMarkHuge instance * You can also point the cursor to the node position of previously * saved BookMarkHuge instance. * */ public class BookMarkHuge { VTDNavHuge vn1; // the reference to the corresponding VTDNav object int ba[]; /** * Constructor for BookMarkHuge * Take no argument * */ public BookMarkHuge(){ ba = null; vn1 = null; } /** * separate a bookMark object apart from its embedded * VTDNavHuge instance * */ public void unbind(){ vn1 = null; } /** * bind a BookMarkHuge object to a VTDNavHuge object * the cursor position is set to an invalid state * @param vn * */ public void bind(VTDNavHuge vn){ if (vn==null) throw new IllegalArgumentException("vn can't be null"); vn1 = vn; if (ba == null || vn.nestingLevel+8 != ba.length) ba = new int[vn.nestingLevel + 8]; ba[0]= -2 ; // this would never happen in a VTDNav obj's context } /** * This method returns the embedded VTDNavHuge Object * @return VTDNavHuge * */ public VTDNavHuge getNav(){ return vn1; } /** * BookMarkHuge constructor with an instance of vn * as input * @param vn */ public BookMarkHuge(VTDNavHuge vn){ bind(vn); recordCursorPosition(vn); } /** * set cursor position * This method can only set the cursor position * of an VTDNavHuge object identical to its internal copy * @param vn * @return * */ public boolean setCursorPosition(VTDNavHuge vn){ if (vn1 != vn || ba == null || ba[0] == -2) return false; for (int i = 0; i < vn.nestingLevel; i++) { vn.context[i] = ba[i]; } vn.l1index = ba[vn.nestingLevel]; vn.l2index = ba[vn.nestingLevel + 1]; vn.l3index = ba[vn.nestingLevel + 2]; vn.l2lower = ba[vn.nestingLevel + 3]; vn.l2upper = ba[vn.nestingLevel + 4]; vn.l3lower = ba[vn.nestingLevel + 5]; vn.l3upper = ba[vn.nestingLevel + 6]; if (ba[vn.nestingLevel+7] < 0){ vn.atTerminal = true; } else vn.atTerminal = false; vn.LN = ba[vn.nestingLevel+7] & 0x7fffffff; return true; } /** * Set the cursor position of VTDNavHuge object corresponding to the internal reference * position of the embedded VTDNavHuge object * @return * */ public boolean setCursorPosition(){ return setCursorPosition(vn1); } /** * Record the cursor position * This method is implemented to be lenient on loading in * that it can load nodes from any VTDNavHuge object * if vn is null, return false * * @param vn * @return * */ public boolean recordCursorPosition(VTDNavHuge vn){ if (vn == null) return false; if (vn== vn1){ }else { bind(vn); } for (int i = 0; i < vn.nestingLevel; i++) { ba[i] = vn1.context[i]; } ba[vn.nestingLevel]= vn.l1index ; ba[vn.nestingLevel + 1]= vn.l2index ; ba[vn.nestingLevel + 2]= vn.l3index ; ba[vn.nestingLevel + 3]= vn.l2lower ; ba[vn.nestingLevel + 4]= vn.l2upper ; ba[vn.nestingLevel + 5]= vn.l3lower ; ba[vn.nestingLevel + 6]= vn.l3upper ; //ba[vn.nestingLevel + 7]=(vn.atTerminal == true)?1:0; ba[vn.nestingLevel + 7]= (vn.atTerminal == true)? (vn.LN | 0x80000000) : vn.LN ; return true; } /** * Record cursor position of the VTDNavHuge object as embedded in the * bookmark * * @return * */ public boolean recordCursorPosition(){ return recordCursorPosition(vn1); } /** * Compare the bookmarks to ensure they represent the same * node in the same VTDNavHuge instance * @param bm2 * @return */ public final boolean deepEquals(BookMarkHuge bm2) { if (bm2.vn1 == this.vn1){ if (bm2.ba[bm2.ba[0]]==this.ba[this.ba[0]]){ if (this.ba[this.vn1.nestingLevel+7] < 0){ if (this.ba[this.vn1.nestingLevel+7] != bm2.ba[this.vn1.nestingLevel+7]) return false; } return true; } } return false; } /** * Compare the bookmarks to ensure they represent the same * node in the same VTDNavHuge instance * @param bm2 * @return */ public final boolean equals(BookMarkHuge bm2) { if (this == bm2) return true; return deepEquals(bm2); } /** * Compare two bookmarks to ensure they represent the same * node in the same VTDNavHuge instance */ public final boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof BookMarkHuge)) return false; return deepEquals((BookMarkHuge) obj); } /** * Returns the hash code which is a unique integer for every node */ public final int hashCode(){ if (ba == null || vn1==null || ba[0]==-2) return -2; if (vn1.atTerminal) return vn1.LN; if (ba[0]==1) return vn1.rootIndex; return ba[ba[0]]; } /** * Compare the node positions of two bookMarkHuge objects * @param bm1 * @return */ public boolean compare(BookMarkHuge bm1){ /*for (int i = 0; i < vn1.nestingLevel; i++) { ba[i] = bm1.ba[i]; } if (vn1.getCurrentDepth()>)*/ for (int i = 0; i < vn1.nestingLevel+6; i++) { if(ba[i] != bm1.ba[i]) return false; } return true; } }
7,746
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
AutoPilotHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/AutoPilotHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import com.ximpleware.extended.xpath.*; import java.util.*; import java.io.*; /** * XimpleWare's AutoPilotHuge implementation encapsulating node iterator * and XPath. * AutoPilotHuge is an extended VTD edition of AutoPilot supporting 256 GigByte * XML file * */ public class AutoPilotHuge { private int depth; // the depth of the element at the starting point will determine when to stop iteration private int iter_type; // see selectElement private VTDNavHuge vn; // the navigator object private int index; // for iterAttr private boolean ft; // a helper variable for private boolean special; // This helps distinguish between // the case of node() and * for preceding axis // of xpath evaluation private String name; // Store element name after selectElement private String localName; // Store local name after selectElemntNS private String URL; // Store URL name after selectElementNS private int size; // for iterateAttr private Expr xpe; // for evalXPath private int[] contextCopy; //for preceding axis private int stackSize; // the stack size for xpath evaluation static private Hashtable nsHash; //private parser p; // defines the type of "iteration" public final static int UNDEFINED = 0; // set the mode corresponding to DOM's getElemetnbyName(string) public final static int SIMPLE = 1; // set the mode corresponding to DOM's getElementbyNameNS(string) public final static int SIMPLE_NS = 2; public final static int DESCENDANT = 3; public final static int DESCENDANT_NS = 4; public final static int FOLLOWING = 5; public final static int FOLLOWING_NS=6; public final static int PRECEDING = 7; public final static int PRECEDING_NS=8; public final static int ATTR = 9; public final static int ATTR_NS = 10; static private Hashtable symbolHash; protected String getName(){ return name; } /** * AutoPilotHuge constructor comment. * @exception IllegalArgumentException If the VTDNav object is null */ public AutoPilotHuge(VTDNavHuge v) { if (v == null) throw new IllegalArgumentException(" instance of VTDNav can't be null "); name = null; vn = v; //depth = v.getCurrentDepth(); iter_type = UNDEFINED; // not defined ft = true; size = 0; special = false; xpe = null; symbolHash = new Hashtable(); //p = null; } /** * Use this constructor for delayed binding to VTDNavHuge * which allows the reuse of XPath expression * */ public AutoPilotHuge(){ name = null; //vn = v; //depth = v.getCurrentDepth(); iter_type = UNDEFINED; // not defined ft = true; size = 0; special = false; xpe = null; symbolHash = new Hashtable(); } /** This function creates URL ns prefix * and is intended to be called prior to selectXPath * @param prefix * @param URL */ public void declareXPathNameSpace(String prefix, String URL){ if (nsHash==null) nsHash = new Hashtable(); nsHash.put(prefix, URL); //System.out.println(ht); } /** * Bind resets the internal state of AutoPilotHuge * so one can attach a VTDNavHuge object to the autopilot * @param vnv * */ public void bind (VTDNavHuge vnv){ name = null; if (vnv == null) throw new IllegalArgumentException(" instance of VTDNav can't be null "); vn = vnv; //depth = v.getCurrentDepth(); iter_type = UNDEFINED; // not defined ft = true; size = 0; special = false; //resetXPath(); } /** * Register the binding between a variableExpr name and variableExpr expression * @param varName * @param varExpr * @throws XPathParseException */ public void declareVariableExpr(String varName, String varExpr) throws XPathParseExceptionHuge { try{ parser p = new parser(new StringReader(varExpr)); p.nsHash = nsHash; p.symbolHash = symbolHash; xpe = (com.ximpleware.extended.xpath.Expr) p.parse().value; symbolHash.put(varName, xpe); ft = true; }catch(XPathParseExceptionHuge e){ System.out.println("Syntax error after ==>"+varExpr.substring(0,e.getOffset())); throw e; }catch(Exception e){ throw new XPathParseExceptionHuge("Error occurred"); } } /** * Iterate over all the selected element nodes in document order. * Null element name allowed, corresponding to node() in xpath * Creation date: (12/4/03 5:25:42 PM) * @return boolean * @exception com.ximpleware.extended.NavExceptionHuge See description in method toElement() in VTDNavHuge class. */ public boolean iterate() throws PilotExceptionHuge, NavExceptionHuge { switch (iter_type) { case SIMPLE : //System.out.println("iterating ---> "+name+ " depth ---> "+depth); /*if (elementName == null) throw new PilotException(" Element name not set ");*/ if (vn.atTerminal) return false; if (ft == false) return vn.iterate(depth, name, special); else { ft = false; if (special || vn.matchElement(name)) { return true; } else return vn.iterate(depth, name, special); } case SIMPLE_NS : if (vn.atTerminal) return false; if (ft == false) return vn.iterateNS(depth, URL, localName); else { ft = false; if (vn.matchElementNS(URL, localName)) { return true; } else return vn.iterateNS(depth, URL, localName); } case DESCENDANT: if (vn.atTerminal) return false; return vn.iterate(depth, name, special); case DESCENDANT_NS: if (vn.atTerminal) return false; return vn.iterateNS(depth, URL, localName); case FOLLOWING: if (vn.atTerminal) return false; if (ft == false) return vn.iterate_following(name, special); else { ft = false; // find the first next sibling of while(true){ while (vn.toElement(VTDNavHuge.NS)){ if (special || vn.matchElement(name)) { return true; } return vn.iterate_following(name, special); } if (vn.toElement(VTDNavHuge.P)==false){ //return vn.iterate_following(name, special); return false; } } } case FOLLOWING_NS: if (vn.atTerminal) return false; if (ft == false) return vn.iterate_followingNS(URL,localName); else { ft = false; // find the first next sibling of while(true){ while (vn.toElement(VTDNavHuge.NS)){ if (vn.matchElementNS(URL,localName)) { return true; } return vn.iterate_followingNS(URL,localName); } if (vn.toElement(VTDNavHuge.P)==false){ return false; } } } case PRECEDING: if (vn.atTerminal) return false; return vn.iterate_preceding(name, contextCopy,special); case PRECEDING_NS: if (vn.atTerminal) return false; return vn.iterate_precedingNS(URL,localName,contextCopy); default : throw new PilotExceptionHuge(" iteration action type undefined"); } } /** * This method implements the attribute axis for XPath * @return the integer of the selected VTD index for attribute name * @throws com.ximpleware.extended.PilotException */ protected int iterateAttr() throws PilotExceptionHuge,NavExceptionHuge{ switch(iter_type){ case ATTR: if (name.compareTo("*")==0){ if (ft != false){ ft = false; index = vn.getCurrentIndex2()+1; } else index +=2; if (vn.ns == false){ while(index<size){ int type = vn.getTokenType(index); if (type == VTDNavHuge.TOKEN_ATTR_NAME || type == VTDNavHuge.TOKEN_ATTR_NS){ vn.LN = index; return index; }else{ return -1; } } return -1; }else { while(index<size){ int type = vn.getTokenType(index); if (type == VTDNavHuge.TOKEN_ATTR_NAME || type == VTDNavHuge.TOKEN_ATTR_NS){ if (type == VTDNavHuge.TOKEN_ATTR_NAME){ vn.LN = index; return index; } else index += 2; }else{ return -1; } } return -1; } }else{ if (ft == false){ return -1; } else { ft = false; int i = vn.getAttrVal(name); if(i!=-1){ vn.LN = i-1; return i-1; } else return -1; } } case ATTR_NS: if (ft == false){ return -1; } else { ft = false; int i = vn.getAttrValNS(URL,localName); if(i!=-1){ vn.LN = i -1; return i-1; } else return -1; } default: throw new PilotExceptionHuge("invalid iteration type"); } } /** * Select the element name before iterating. * "*" matches every element * Creation date: (12/4/03 5:51:31 PM) * @param en java.lang.String */ public void selectElement(String en) { if (en == null) throw new IllegalArgumentException("element name can't be null"); iter_type = SIMPLE; depth = vn.getCurrentDepth(); //startIndex = vn.getCurrentIndex(); name = en; ft = true; } /** * Select the element name (name space version) before iterating. URL, if set to *, * matches every namespace URL, if set to null, indicates the namespace is * undefined. localname, if set to *, matches any localname Creation date: * (12/4/03 6:05:19 PM) * * @param ns_URL String * @param ln String */ public void selectElementNS(String ns_URL, String ln) { if (ln == null) throw new IllegalArgumentException("local name can't be null"); iter_type = SIMPLE_NS; depth = vn.getCurrentDepth(); //startIndex = vn.getCurrentIndex(); localName = ln; URL = ns_URL; ft = true; } /** * Select all descendent elements along the descendent axis, without ns awareness * @param en */ protected void selectElement_D(String en) { if (en == null) throw new IllegalArgumentException("element name can't be null"); iter_type = DESCENDANT; depth = vn.getCurrentDepth(); //startIndex = vn.getCurrentIndex(); name = en; ft = true; } /** * Select all descendent elements along the Descendent axis, withns awareness * @param ns_URL * @param ln */ protected void selectElementNS_D(String ns_URL, String ln){ if (ln == null) throw new IllegalArgumentException("local name can't be null"); iter_type = DESCENDANT_NS; depth = vn.getCurrentDepth(); //startIndex = vn.getCurrentIndex(); localName = ln; URL = ns_URL; ft = true; } /** * Select all elements along the following axis, without ns, * null selects every elements and documents * @param en */ protected void selectElement_F(String en) { if (en == null) throw new IllegalArgumentException("element name can't be null"); iter_type = FOLLOWING; ft = true; name = en; } /** * Select all elements along the preceding axis as defined in XPath * The namespace-aware version * @param en */ protected void selectElementNS_F(String ns_URL, String ln){ if (ln == null) throw new IllegalArgumentException("local name can't be null"); iter_type = FOLLOWING_NS; ft = true; localName = ln; URL = ns_URL; } /** * Select all elements along the preceding axis as defined in XPath * @param en */ protected void selectElement_P(String en) { if (en == null) throw new IllegalArgumentException("element name can't be null"); depth = vn.getCurrentDepth(); iter_type = PRECEDING; ft = true; name = en; contextCopy = (int[])vn.context.clone(); for(int i = vn.context[0]+1;i<vn.context.length;i++){ contextCopy[i]=-1; } contextCopy[0]=vn.rootIndex; } /** * Select all elements along the preceding axis as defined in XPath * This is the namespace aware version * @param ns_URL * @param ln */ protected void selectElementNS_P(String ns_URL, String ln){ if (ln == null) throw new IllegalArgumentException("local name can't be null"); depth = vn.getCurrentDepth(); iter_type = PRECEDING_NS; ft = true; localName = ln; URL = ns_URL; contextCopy = (int[])vn.context.clone(); for(int i = vn.context[0]+1;i<vn.context.length;i++){ vn.context[i]=-1; } contextCopy[0]=vn.rootIndex; } /** * Select an attribute name for iteration, * choose all attributes of an element * @param en */ protected void selectAttr(String en) { if (en == null) throw new IllegalArgumentException("attribute name can't be null"); iter_type = ATTR; ft = true; size = vn.getTokenCount(); name = en; } /** * Select an attribute name, both local part and namespace URL part * @param ns_URL * @param ln */ protected void selectAttrNS(String ns_URL, String ln){ if (ln == null) throw new IllegalArgumentException("local name of an attribute can't be null"); iter_type = ATTR_NS; ft = true; localName = ln; URL = ns_URL; } /** * This method selects the string representing XPath expression * Usually evalXPath is called afterwards * @param s * @throws XPathParseException */ public void selectXPath(String s) throws XPathParseExceptionHuge { try{ parser p = new parser(new StringReader(s)); p.nsHash = nsHash; p.symbolHash = symbolHash; xpe = (com.ximpleware.extended.xpath.Expr) p.parse().value; ft = true; }catch(XPathParseExceptionHuge e){ System.out.println("Syntax error after ==>"+ s.substring(0,e.getOffset())); throw e; }catch(Exception e){ throw new XPathParseExceptionHuge("Error occurred"); } } /** * Reset the XPath so the XPath Expression can * be reused and revaluated in anther context position * */ public void resetXPath(){ if (xpe!=null && vn!=null){ xpe.reset(vn); ft = true; vn.contextStack2.size = stackSize; } } /** * evalXPathToNumber() evaluates the xpath expression to a double * @return double * */ public double evalXPathToNumber(){ return xpe.evalNumber(vn); } /** * evalXPathToString() evaluates the xpath expression to a String * @return String * */ public String evalXPathToString(){ return xpe.evalString(vn); } /** * evalXPathToBoolean() evaluates the xpath expression to a boolean * @return boolean * */ public boolean evalXPathToBoolean(){ return xpe.evalBoolean(vn); } /** * This method returns the next node in the nodeset * it returns -1 if there is no more node * Afer finishing evaluating, don't forget to <em> reset the xpath </em> * @return int corresponding to the VTD index */ public int evalXPath() throws XPathEvalExceptionHuge, NavExceptionHuge{ if (xpe!=null){ if (ft == true){ if (vn != null){ stackSize = vn.contextStack2.size; } ft = false; xpe.adjust(vn.getTokenCount()); } return xpe.evalNodeSet(vn); } throw new PilotExceptionHuge(" Null XPath expression "); } /** * Setspecial is used by XPath evaluator to distinguish between * node() and * * node() corresponding to b= true; * @param b */ protected void setSpecial(boolean b ){ special = b; } /** * Convert the expression to a string * For debugging purpose * @return String */ public String getExprString(){ return xpe.toString(); } /** * Remove all declared variable expressions */ public void clearVariableExprs(){ symbolHash.clear(); } /** * Remove all namespaces bindings */ public void clearXPathNameSpaces(){ nsHash.clear(); } }
18,228
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XPathParseExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/XPathParseExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This exception is thrown when an error occured during * the construction of XPathExpr. * It is adapted to support extended VTD (256 max file size) * */ public class XPathParseExceptionHuge extends VTDExceptionHuge{ public XPathParseExceptionHuge(String s){ super(s); } int offset; public XPathParseExceptionHuge(String s, int i){ super(s); offset = i; } public int getOffset(){ return offset; } }
1,280
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NodeTest.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/NodeTest.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import com.ximpleware.extended.xpath.LocationPathNode; /** * This class is used within LocationPathExpr to represent * Nodetest * */ public class NodeTest implements LocationPathNode{ public String nodeName; public String prefix; public String localName; public String URL; boolean nsEnabled; public int testType; public static final int NAMETEST = 0, NODE =1, TEXT =2, PI0=3, PI1 = 4, COMMENT = 5; public NodeTest(){ nsEnabled = false; localName = null; } /*public void setNsEnabled(boolean b){ nsEnabled = b; }*/ public void setTestType(int t){ testType = t; } public void setNodeName(String s){ nodeName = s; } public void setNodeNameNS(String p, String ln){ prefix = p; localName = ln; } public boolean eval(VTDNavHuge vn)throws NavExceptionHuge{ if (testType == NODE) return true; else if(testType == NAMETEST){ if (vn.atTerminal == true) return false; if (localName!=null) return vn.matchElementNS(URL,localName); else return vn.matchElement(nodeName); } return false; } public String toString(){ switch (testType){ case NAMETEST : if (localName == null) return nodeName; else return prefix+":"+localName; case NODE: return "node()"; case TEXT: return "text()"; case PI0: case PI1: return "processing-instruction()"; default: return "comment()"; } } }
2,346
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
IIntBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/IIntBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * Abstract int buffer storage interface. * Creation date: (11/23/03 6:14:40 PM) */ public interface IIntBuffer { /** * Get the int at the index value. * Creation date: (11/23/03 6:15:33 PM) * @param i int */ int intAt(int i); /** * Modify the int at index to value val. * Creation date: (11/23/03 6:16:56 PM) * @param index int * @param val int */ void modifyEntry(int index, int val); /** * Get the total number of int in the buffer. * Creation date: (11/23/03 7:21:25 PM) * @return int */ int size(); }
1,385
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
IReader.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/IReader.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * Abstract Reader Class decodes underlying raw bytes. * Creation date: (3/5/04 7:18:57 PM) */ interface IReader { /** * Get next available Char from the buffer. * Creation date: (3/5/04 7:39:44 PM) * @return boolean * @exception com.ximpleware.ParseException Parse exception. * @exception com.ximpleware.EncodingException Raw char to UCS conversion exception. * @exception com.ximpleware.EOFException The end of file exception. */ int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge; /** * Skip the next char if it is a match. * Creation date: (3/5/04 7:39:44 PM) * @return boolean * @exception com.ximpleware.ParseException Parse exception. * @exception com.ximpleware.EncodingException Raw char to UCS conversion exception. * @exception com.ximpleware.EOFException The end of file exception. */ boolean skipChar(int ch) throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge; }
1,882
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
IByteBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/IByteBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * Abstract XML document storage interface. */ public interface IByteBuffer { /** * Get the byte at the given index of the underlying byte storage. * @return byte */ byte byteAt(long index); /** * Return a byte array filled with content from underlying byte storage. * @return byte[] * @param offset int bytes offset (not UTF char unit) * @param len int */ byte[] getBytes(int offset, int len); /** * Total size in terms of # of bytes. * @return long */ long length(); // get the whole XML byte[] getBytes(); void writeToFileOutputStream(java.io.FileOutputStream ost, long offset, long length) throws java.io.IOException; }
1,527
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ParseExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/ParseExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This class is for any exception condition in the parsing phase. * Creation date: (11/19/03 11:43:03 AM) */ public class ParseExceptionHuge extends VTDExceptionHuge { /** * ParseException constructor comment. */ public ParseExceptionHuge() { super(); } /** * ParseException constructor comment. * @param s java.lang.String */ public ParseExceptionHuge(String s) { super(s); } }
1,249
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
VTDGenHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/VTDGenHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import java.io.*; import com.ximpleware.extended.parser.*; //import java.io.*; /** * VTDGenHuge implementation supporting extended VTD (256GB file size). * Current support built-in entities only * It parses DTD, but doesn't resolve declared entities */ public class VTDGenHuge { // internal parser state private final static int STATE_LT_SEEN = 0; // encounter the first < private final static int STATE_START_TAG = 1; private final static int STATE_END_TAG = 2; private final static int STATE_ATTR_NAME = 3; private final static int STATE_ATTR_VAL = 4; private final static int STATE_TEXT = 5; private final static int STATE_DOC_START = 6; // beginning of document private final static int STATE_DOC_END = 7; // end of document private final static int STATE_PI_TAG =8; private final static int STATE_PI_VAL = 9; private final static int STATE_DEC_ATTR_NAME = 10; private final static int STATE_COMMENT = 11; private final static int STATE_CDATA = 12; private final static int STATE_DOCTYPE = 13; private final static int STATE_END_COMMENT = 14; // comment appear after the last ending tag private final static int STATE_END_PI = 15; //private final static int STATE_END_PI_VAL = 17; public final static int IN_MEMORY = 0; public final static int MEM_MAPPED = 1; // token type public final static int TOKEN_STARTING_TAG = 0; public final static int TOKEN_ENDING_TAG = 1; public final static int TOKEN_ATTR_NAME = 2; public final static int TOKEN_ATTR_NS = 3; public final static int TOKEN_ATTR_VAL = 4; public final static int TOKEN_CHARACTER_DATA = 5; public final static int TOKEN_COMMENT = 6; public final static int TOKEN_PI_NAME = 7; public final static int TOKEN_PI_VAL = 8; public final static int TOKEN_DEC_ATTR_NAME = 9; public final static int TOKEN_DEC_ATTR_VAL = 10; public final static int TOKEN_CDATA_VAL = 11; public final static int TOKEN_DTD_VAL = 12; public final static int TOKEN_DOCUMENT = 13; // encoding format public final static int FORMAT_UTF8 = 2; public final static int FORMAT_ASCII = 0; public final static int FORMAT_ISO_8859_1 = 1; public final static int FORMAT_ISO_8859_2 = 3; public final static int FORMAT_ISO_8859_3 = 4; public final static int FORMAT_ISO_8859_4 = 5; public final static int FORMAT_ISO_8859_5 = 6; public final static int FORMAT_ISO_8859_6 = 7; public final static int FORMAT_ISO_8859_7 = 8; public final static int FORMAT_ISO_8859_8 = 9; public final static int FORMAT_ISO_8859_9 = 10; public final static int FORMAT_ISO_8859_10 = 11; public final static int FORMAT_ISO_8859_11 = 12; public final static int FORMAT_ISO_8859_12 = 13; public final static int FORMAT_ISO_8859_13 = 14; public final static int FORMAT_ISO_8859_14 = 15; public final static int FORMAT_ISO_8859_15 = 16; public final static int FORMAT_ISO_8859_16 = 17; public final static int FORMAT_WIN_1250 = 18; public final static int FORMAT_WIN_1251 = 19; public final static int FORMAT_WIN_1252 = 20; public final static int FORMAT_WIN_1253 = 21; public final static int FORMAT_WIN_1254 = 22; public final static int FORMAT_WIN_1255 = 23; public final static int FORMAT_WIN_1256 = 24; public final static int FORMAT_WIN_1257 = 25; public final static int FORMAT_WIN_1258 = 26; public final static int FORMAT_UTF_16LE = 64; public final static int FORMAT_UTF_16BE = 63; //namespace aware flag protected boolean ns; protected int VTDDepth; // Maximum Depth of VTDs protected int encoding; private int last_depth; private int last_l1_index; private int last_l2_index; private int last_l3_index; private int increment; private boolean BOM_detected; private boolean must_utf_8; private int ch; private int ch_temp; protected long offset; // this is byte offset, not char offset as encoded in VTD private long temp_offset; protected int depth; protected long prev_offset; protected int rootIndex; protected IByteBuffer xb; protected FastLongBuffer VTDBuffer; protected FastLongBuffer l1Buffer; protected FastLongBuffer l2Buffer; protected FastIntBuffer l3Buffer; protected boolean br; //buffer reuse protected long docLen; // again, in terms of byte, not char as encoded in VTD protected long endOffset; protected long[] tag_stack; public long[] attr_name_array; public final static int MAX_DEPTH = 30; // maximum depth value protected long docOffset; // attr_name_array size private final static int ATTR_NAME_ARRAY_SIZE = 16; // tag_stack size private final static int TAG_STACK_SIZE = 32; // max prefix length public final static int MAX_PREFIX_LENGTH = (1<<8) -1; // max Qname length public final static int MAX_QNAME_LENGTH = (1<<11) -1; // max Token length public final static int MAX_TOKEN_LENGTH = (1<<17) -1; class UTF8Reader implements IReader { public UTF8Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); int temp = xb.byteAt(offset); //int a = 0, c = 0, d = 0, val = 0; if (temp >= 0) { offset++; return temp; } return handleUTF8(temp); } private int handleUTF8(int temp) throws EncodingExceptionHuge, ParseExceptionHuge{ int val,c,d,a,i; temp = temp & 0xff; switch (UTF8Char.byteCount(temp)) { // handle multi-byte code case 2: c = 0x1f; // A mask determine the val portion of the first byte d = 6; // a = 1; // break; case 3: c = 0x0f; d = 12; a = 2; break; case 4: c = 0x07; d = 18; a = 3; break; case 5: c = 0x03; d = 24; a = 4; break; case 6: c = 0x01; d = 30; a = 5; break; default: throw new ParseExceptionHuge( "UTF 8 encoding error: should never happen"); } val = (temp & c) << d; i = a - 1; while (i >= 0) { temp = xb.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new ParseExceptionHuge( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1))); i--; } offset += a + 1; return val; } public boolean skipChar(int ch) throws EOFExceptionHuge, EncodingExceptionHuge, ParseExceptionHuge { //int a = 0, c = 0, d = 0, val = 0; int temp = xb.byteAt(offset); if (temp >= 0) if (ch == temp) { offset++; return true; } else { return false; } return skipUTF8(temp, ch); } private boolean skipUTF8(int temp, int ch) throws EncodingExceptionHuge, ParseExceptionHuge{ int val, c, d, a, i; temp = temp & 0xff; switch (UTF8Char.byteCount(temp)) { // handle multi-byte code case 2: c = 0x1f; // A mask determine the val portion of the first byte d = 6; // a = 1; // break; case 3: c = 0x0f; d = 12; a = 2; break; case 4: c = 0x07; d = 18; a = 3; break; case 5: c = 0x03; d = 24; a = 4; break; case 6: c = 0x01; d = 30; a = 5; break; default: throw new ParseExceptionHuge( "UTF 8 encoding error: should never happen"); } val = (temp & c) << d; i = a - 1; while (i >= 0) { temp = xb.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new ParseExceptionHuge( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1))); i--; } if (val == ch){ offset += a + 1; return true; }else return false; } } class UTF16BEReader implements IReader { public UTF16BEReader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { int val = 0; if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); int temp = (xb.byteAt(offset)&0xff) << 8 | (xb.byteAt(offset+1)&0xff); if ((temp < 0xd800) || (temp > 0xdfff)) { // not a high surrogate offset += 2; return temp; } else { if (temp<0xd800 || temp>0xdbff) throw new EncodingExceptionHuge("UTF 16 BE encoding error: should never happen"); val = temp; temp = (xb.byteAt(offset+2)&0xff) << 8 | (xb.byteAt(offset+3)&0xff); if (temp < 0xdc00 || temp > 0xdfff) { // has to be a low surrogate here throw new EncodingExceptionHuge("UTF 16 BE encoding error: should never happen"); } val = ((val - 0xd800)<<10) + (temp - 0xdc00) + 0x10000; offset += 4; return val; } } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { // implement UTF-16BE to UCS4 conversion int temp = (xb.byteAt(offset)&0xff) << 8 | (xb.byteAt(offset+1)&0xff); if ((temp < 0xd800) || (temp > 0xdfff)) { // not a high surrogate //offset += 2; if (temp == ch) { offset += 2; return true; } else return false; } else { if (temp<0xd800 || temp>0xdbff) throw new EncodingExceptionHuge("UTF 16 BE encoding error: should never happen"); int val = temp; temp = (xb.byteAt(offset+2)&0xff) << 8 | (xb.byteAt(offset+3)&0xff); if (temp < 0xdc00 || temp > 0xdfff) { // has to be a low surrogate here throw new EncodingExceptionHuge("UTF 16 BE encoding error: should never happen"); } val = ((val - 0xd800) << 10) + (temp - 0xdc00) + 0x10000; if (val == ch) { offset += 4; return true; } else return false; } } } class UTF16LEReader implements IReader { public UTF16LEReader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { int val = 0; if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); int temp = (xb.byteAt(offset+1) &0xff) << 8 | (xb.byteAt(offset)& 0xff); if (temp < 0xd800 || temp > 0xdfff) { // check for low surrogate offset += 2; return temp; } else { if (temp<0xd800 || temp>0xdbff) throw new EncodingExceptionHuge("UTF 16 LE encoding error: should never happen"); val = temp; temp = (xb.byteAt(offset+3) &0xff) << 8 | (xb.byteAt(offset+2)&0xff); if (temp < 0xdc00 || temp > 0xdfff) { // has to be high surrogate throw new EncodingExceptionHuge("UTF 16 LE encoding error: should never happen"); } val = ((val - 0xd800) <<10) + (temp - 0xdc00) + 0x10000; offset += 4; return val; } } public boolean skipChar(int ch) throws EOFExceptionHuge, EncodingExceptionHuge, ParseExceptionHuge { int temp = (xb.byteAt(offset+1)&0xff) << 8 | (xb.byteAt(offset)&0xff); if (temp < 0xd800 ||temp > 0xdfff) { // check for low surrogate if (temp == ch) { offset += 2; return true; } else { return false; } } else { if (temp<0xd800 || temp>0xdbff) throw new EncodingExceptionHuge("UTF 16 LE encoding error: should never happen"); int val = temp; temp = (xb.byteAt(offset+3)&0xff)<< 8 | (xb.byteAt(offset+2)&0xff); if (temp < 0xdc00 || temp > 0xdfff) { // has to be high surrogate throw new EncodingExceptionHuge("UTF 16 LE encoding error: should never happen"); } val = ((val - 0xd800)<<10) + (temp - 0xdc00) + 0x10000; if (val == ch) { offset += 4; return true; } else return false; } } } class ASCIIReader implements IReader { public ASCIIReader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { int a; if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); a= xb.byteAt(offset++); if (a<0) throw new ParseExceptionHuge( "ASCII encoding error: invalid ASCII Char"); return a&0x7f; } public boolean skipChar(int ch) throws ParseExceptionHuge, EOFExceptionHuge, EncodingExceptionHuge { if (ch == xb.byteAt(offset)) { offset++; return true; } else { return false; } } } class ISO8859_1Reader implements IReader { public ISO8859_1Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return xb.byteAt(offset++) & 0xff; } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == xb.byteAt(offset)) { offset++; return true; } else { return false; } } } class ISO8859_2Reader implements IReader { public ISO8859_2Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_2.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_2.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_3Reader implements IReader { public ISO8859_3Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_3.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_3.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_4Reader implements IReader { public ISO8859_4Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_4.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_4.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_5Reader implements IReader { public ISO8859_5Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_5.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_5.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_6Reader implements IReader { public ISO8859_6Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_6.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_6.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_7Reader implements IReader { public ISO8859_7Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_7.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_7.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_8Reader implements IReader { public ISO8859_8Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_8.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_8.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_9Reader implements IReader { public ISO8859_9Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_9.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_9.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_10Reader implements IReader { public ISO8859_10Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_10.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_10.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_11Reader implements IReader { public ISO8859_11Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_11.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_11.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_13Reader implements IReader { public ISO8859_13Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_13.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_13.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_14Reader implements IReader { public ISO8859_14Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_14.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_14.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class ISO8859_15Reader implements IReader { public ISO8859_15Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return ISO8859_15.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == ISO8859_15.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1250Reader implements IReader { public WIN1250Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1250.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1250.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1251Reader implements IReader { public WIN1251Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1251.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1251.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1252Reader implements IReader { public WIN1252Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1252.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1252.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1253Reader implements IReader { public WIN1253Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1253.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1253.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1254Reader implements IReader { public WIN1254Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1254.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1254.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1255Reader implements IReader { public WIN1255Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1255.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1255.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1256Reader implements IReader { public WIN1256Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1256.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1256.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1257Reader implements IReader { public WIN1257Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1257.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1257.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } class WIN1258Reader implements IReader { public WIN1258Reader() { } public int getChar() throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (offset >= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); return WIN1258.decode(xb.byteAt(offset++)); } public boolean skipChar(int ch) throws EOFExceptionHuge, ParseExceptionHuge, EncodingExceptionHuge { if (ch == WIN1258.decode(xb.byteAt(offset))) { offset++; return true; } else { return false; } } } protected IReader r; /** * VTDGenHuge constructor method. */ public VTDGenHuge() { attr_name_array = new long[ATTR_NAME_ARRAY_SIZE]; tag_stack = new long[TAG_STACK_SIZE]; //scratch_buffer = new int[10]; VTDDepth = 0; r = new UTF8Reader(); br = false; } /** * Clear internal states so VTDGEn can process the next file. */ public void clear() { if (br==false){ VTDBuffer = null; l1Buffer = null; l2Buffer = null; l3Buffer = null; } xb = null; offset = temp_offset =0; last_depth = last_l1_index = last_l2_index = 0; rootIndex = 0; depth = -1; increment =1; BOM_detected = false; must_utf_8 = false; ch = ch_temp = 0; } /** * This method will detect whether the entity is valid or not and increment offset. * @return int * @throws com.ximpleware.extended.ParseExceptionHuge Super class for any exception during parsing. * @throws com.ximpleware.extended.EncodingExceptionHuge UTF/native encoding exception. * @throws com.ximpleware.extended.EOFExceptionHuge End of file exception. */ private int entityIdentifier() throws EntityExceptionHuge, EncodingExceptionHuge,EOFExceptionHuge, ParseExceptionHuge { int ch = r.getChar(); int val = 0; switch (ch) { case '#': ch = r.getChar(); if (ch == 'x') { while (true) { ch = r.getChar(); if (ch >= '0' && ch <= '9') { val = (val << 4) + (ch - '0'); } else if (ch >= 'a' && ch <= 'f') { val = (val << 4) + (ch - 'a' + 10); } else if (ch >= 'A' && ch <= 'F') { val = (val << 4) + (ch - 'A' + 10); } else if (ch == ';') { return val; } else throw new EntityExceptionHuge("Errors in char reference: Illegal char following &#x."); } } else { while (true) { if (ch >= '0' && ch <= '9') { val = val * 10 + (ch - '0'); } else if (ch == ';') { break; } else throw new EntityExceptionHuge("Errors in char reference: Illegal char following &#."); ch = r.getChar(); } } if (!XMLChar.isValidChar(val)) { throw new EntityExceptionHuge("Errors in entity reference: Invalid XML char."); } return val; //break; case 'a' : ch = r.getChar(); if (ch == 'm') { if (r.getChar() == 'p' && r.getChar() == ';') { //System.out.println(" entity for &"); return '&'; } else throw new EntityExceptionHuge("Errors in Entity: Illegal builtin reference"); } else if (ch == 'p') { if (r.getChar() == 'o' && r.getChar() == 's' && r.getChar() == ';') { //System.out.println(" entity for ' "); return '\''; } else throw new EntityExceptionHuge("Errors in Entity: Illegal builtin reference"); } else throw new EntityExceptionHuge("Errors in Entity: Illegal builtin reference"); case 'q' : if (r.getChar() == 'u' && r.getChar() == 'o' && r.getChar() == 't' && r.getChar() == ';') { return '"'; } else throw new EntityExceptionHuge("Errors in Entity: Illegal builtin reference"); case 'l' : if (r.getChar() == 't' && r.getChar() == ';') { return '<'; } else throw new EntityExceptionHuge("Errors in Entity: Illegal builtin reference"); //break; case 'g' : if (r.getChar() == 't' && r.getChar() == ';') { return '>'; } else throw new EntityExceptionHuge("Errors in Entity: Illegal builtin reference"); default : throw new EntityExceptionHuge("Errors in Entity: Illegal entity char"); } //return val; } /** * Format the string indicating the position (line number:offset)of the offset if * there is an exception. * @return java.lang.String indicating the line number and offset of the exception */ private String formatLineNumber() { long so = docOffset; int lineNumber = 0; long lineOffset = 0; //long end = offset; if (encoding < FORMAT_UTF_16BE) { while (so <= offset-1) { if (xb.byteAt(so) == '\n') { lineNumber++; lineOffset = so; } //lineOffset++; so++; } lineOffset = offset - lineOffset; } else if (encoding == FORMAT_UTF_16BE) { while (so <= offset-2) { if (xb.byteAt(so + 1) == '\n' && xb.byteAt(so) == 0) { lineNumber++; lineOffset = so; } so += 2; } lineOffset = (offset - lineOffset) >> 1; } else { while (so <= offset-2) { if (xb.byteAt(so) == '\n' && xb.byteAt(so + 1) == 0) { lineNumber++; lineOffset = so; } so += 2; } lineOffset = (offset - lineOffset) >> 1; } return "\nLine Number: " + (lineNumber+1) + " Offset: " + (lineOffset-1); } /** * Write the remaining portion of LC info * */ private void finishUp(){ if (last_depth == 1) { l1Buffer.append(((long) last_l1_index << 32) | 0xffffffffL); } else if (last_depth == 2) { l2Buffer.append(((long) last_l2_index << 32) | 0xffffffffL); } } /** * The entity ignorant version of getCharAfterS. * @return int * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws com.ximpleware.extended.EOFExceptionHuge */ private int getCharAfterS() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge { int n; while (true) { n = r.getChar(); if (n == ' ' || n == '\t' || n == '\n' || n == '\r') { } else return n; } //throw new EOFExceptionHuge("should never come here"); } /** * The entity aware version of getCharAfterS * @return int * @throws ParseExceptionHuge Super class for any exception during parsing. * @throws EncodingExceptionHuge UTF/native encoding exception. * @throws com.ximpleware.extended.EOFExceptionHuge End of file exception. */ private int getCharAfterSe() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge { int n = 0; long temp; //offset saver while (true) { n = r.getChar(); if (!XMLChar.isSpaceChar(n)) { if (n != '&') return n; else { temp = offset; if (!XMLChar.isSpaceChar(entityIdentifier())) { offset = temp; // rewind return '&'; } } } } } /** * This method returns the VTDNavHuge object after parsing, it also cleans * internal state so VTDGenHuge can process the next file. * @return com.ximpleware.extended.VTDNavHuge */ public VTDNavHuge getNav() { // call VTDNav constructor VTDNavHuge vn = new VTDNavHuge( rootIndex, encoding, ns, VTDDepth, xb, VTDBuffer, l1Buffer, l2Buffer, l3Buffer, docOffset, docLen); clear(); return vn; } /** * Get the offset value of previous character. * @return int * @throws ParseExceptionHuge Super class for exceptions during parsing. */ private long getPrevOffset() throws ParseExceptionHuge { long prevOffset = offset; int temp; switch (encoding) { case FORMAT_UTF8 : do { prevOffset--; } while (xb.byteAt(prevOffset) <0 && (xb.byteAt(prevOffset) & (byte)0xc0) == (byte)0x80); return prevOffset; case FORMAT_ASCII : case FORMAT_ISO_8859_1: case FORMAT_ISO_8859_2: case FORMAT_ISO_8859_3: case FORMAT_ISO_8859_4: case FORMAT_ISO_8859_5: case FORMAT_ISO_8859_6: case FORMAT_ISO_8859_7: case FORMAT_ISO_8859_8: case FORMAT_ISO_8859_9: case FORMAT_ISO_8859_10: case FORMAT_WIN_1250: case FORMAT_WIN_1251: case FORMAT_WIN_1252: case FORMAT_WIN_1253: case FORMAT_WIN_1254: case FORMAT_WIN_1255: case FORMAT_WIN_1256: case FORMAT_WIN_1257: case FORMAT_WIN_1258: return offset - 1; case FORMAT_UTF_16LE : temp= (xb.byteAt(offset)&0xff) << 8 | (xb.byteAt(offset + 1)&0xff); if (temp < 0xd800 || temp > 0xdfff) { return offset - 2; } else return offset - 4; case FORMAT_UTF_16BE : temp =(xb.byteAt(offset)&0xff) << 8 | (xb.byteAt(offset + 1)&0xff); if (temp < 0xd800 || temp > 0xdfff) { return offset - 2; } else return offset - 4; default : throw new ParseExceptionHuge("Other Error: Should never happen"); } } /** * A private method that detects the BOM and decides document encoding * @throws EncodingExceptionHuge * @throws ParseExceptionHuge */ private void decide_encoding() throws EncodingExceptionHuge,ParseExceptionHuge { if (xb.length()==0) throw new EncodingExceptionHuge("Document is zero sized "); if (xb.byteAt(offset) == -2) { increment = 2; if (xb.byteAt(offset+1) == -1) { offset += 2; encoding = FORMAT_UTF_16BE; BOM_detected = true; r = new UTF16BEReader(); } else throw new EncodingExceptionHuge("Unknown Character encoding: should be 0xff 0xfe"); } else if (xb.byteAt(offset) == -1) { increment = 2; if (xb.byteAt(offset+1) == -2) { offset += 2; encoding = FORMAT_UTF_16LE; BOM_detected = true; r = new UTF16LEReader(); } else throw new EncodingExceptionHuge("Unknown Character encoding: not UTF-16LE"); } else if (xb.byteAt(offset) == -17){ if (xb.byteAt(offset+1) == -69 && xb.byteAt(offset+2)==-65){ offset +=3; must_utf_8= true; } else throw new EncodingExceptionHuge("Unknown Character encoding: not UTF-8"); } else if (xb.byteAt(offset)==0){ if (xb.byteAt(offset+1) == 0x3c && xb.byteAt(offset+2)== 0 && xb.byteAt(offset+3)== 0x3f){ encoding = FORMAT_UTF_16BE; increment = 2; r = new UTF16BEReader(); } else throw new EncodingExceptionHuge("Unknown Character encoding: not UTF-16BE"); } else if (xb.byteAt(offset)==0x3c){ if (xb.byteAt(offset+1) == 0 && xb.byteAt(offset+2) == 0x3f && xb.byteAt(offset+3) == 0){ increment = 2; encoding = FORMAT_UTF_16LE; r = new UTF16LEReader(); } } // check for max file size exception if (encoding < FORMAT_UTF_16BE) { if ((offset + (long) docLen) >= 1L << 37) throw new ParseExceptionHuge( "Other error: file size too big >=128GB "); } else { if ((offset + (long) docLen) >= 1L << 37) throw new ParseExceptionHuge( "Other error: file size too large >= 128GB"); } } /** * This method parses the XML file and returns a boolean indicating * if it is successful or not. * @param fileName * @param ns namespace aware or not * @param mode indicates whether the file is loaded in memory of memory mapped * @return boolean indicating whether the parseFile is a success * */ public boolean parseFile(String fileName, boolean ns, int mode){ //FileInputStream fis = null; //File f = null; try{ if (mode == IN_MEMORY){ XMLBuffer xb = new XMLBuffer(); xb.readFile(fileName); this.setDoc(xb); this.parse(ns); // set namespace awareness to true return true; } else if (mode == MEM_MAPPED) { XMLMemMappedBuffer xmb = new XMLMemMappedBuffer(); xmb.readFile(fileName); this.setDoc(xmb); this.parse(ns); // set namespace awareness to true return true; } return false; }catch(java.io.IOException e){ }catch (ParseExceptionHuge e){ } finally{ } return false; } /** * parseFile with default mode set to IN_MEMORY * @param fileName * @param ns * @return boolean indicating whether the parseFile is a success * */ public boolean parseFile(String fileName, boolean ns){ return parseFile(fileName, ns, IN_MEMORY); } /** * Generating VTD tokens and Location cache info. * @param NS boolean Enable namespace or not * @throws ParseExceptionHuge Super class for any exceptions during parsing. * @throws EOFExceptionHuge End of file exception. * @throws EntityExceptionHuge Entity resolution exception. * @throws EncodingExceptionHuge UTF/native encoding exception. */ public void parse(boolean NS) throws EncodingExceptionHuge, EOFExceptionHuge, EntityExceptionHuge, ParseExceptionHuge { // define internal variables ns = NS; long length1 = 0, length2 = 0; int attr_count = 0 /*, ch = 0, ch_temp = 0*/; int parser_state = STATE_DOC_START; //boolean has_amp = false; boolean is_ns = false; encoding = FORMAT_UTF8; boolean helper=false; //boolean docEnd = false; // first check first several bytes to figure out the encoding decide_encoding(); // enter the main finite state machine try { writeVTD(0,0,TOKEN_DOCUMENT,depth); while (true) { switch (parser_state) { case STATE_LT_SEEN : //if (depth < -1) // throw new ParseExceptionHuge("Other Errors: Invalid depth"); temp_offset = offset; ch = r.getChar(); if (XMLChar.isNameStartChar(ch)) { depth++; parser_state = STATE_START_TAG; } else { switch (ch) { case '/' : parser_state = STATE_END_TAG; break; case '?' : parser_state = process_qm_seen(); break; case '!' : // three possibility (comment, CDATA, DOCTYPE) parser_state = process_ex_seen(); break; default : throw new ParseExceptionHuge( "Other Error: Invalid char after <" + formatLineNumber()); } } break; case STATE_START_TAG : //name space is handled by while (true) { ch = r.getChar(); if (XMLChar.isNameChar(ch)) { if (ch == ':') { length2 = offset - temp_offset - increment; } } else break; } length1 = offset - temp_offset - increment; if (depth > MAX_DEPTH) { throw new ParseExceptionHuge( "Other Error: Depth exceeds MAX_DEPTH" + formatLineNumber()); } //writeVTD(offset, TOKEN_STARTING_TAG, length2:length1, depth) long x = ((long) length1 << 38) |temp_offset; tag_stack[depth] = x; // System.out.println( // " " + (temp_offset) + " " + length2 + ":" + length1 + " startingTag " + depth); if (depth > VTDDepth) VTDDepth = depth; if (encoding < FORMAT_UTF_16BE){ if (length2>MAX_PREFIX_LENGTH || length1 > MAX_QNAME_LENGTH) throw new ParseExceptionHuge( "Token Length Error: Starting tag prefix or qname length too long" + formatLineNumber()); writeVTD( (temp_offset), (length2 << 10) | length1, TOKEN_STARTING_TAG, depth); } else{ if (length2>(MAX_PREFIX_LENGTH <<1) || length1 > (MAX_QNAME_LENGTH<<1)) throw new ParseExceptionHuge( "Token Length Error: Starting tag prefix or qname length too long" +formatLineNumber()); writeVTD( (temp_offset) >> 1, (length2 << 9) | (length1 >> 1), TOKEN_STARTING_TAG, depth); } //offset += length1; length2 = 0; if (XMLChar.isSpaceChar(ch)) { ch = getCharAfterS(); if (XMLChar.isNameStartChar(ch)) { // seen an attribute here temp_offset = getPrevOffset(); parser_state = STATE_ATTR_NAME; break; } } helper = true; if (ch == '/') { depth--; helper = false; ch = r.getChar(); } if (ch == '>') { if (depth != -1) { temp_offset = offset; ch = getCharAfterSe(); // consume WSs if (ch == '<') { parser_state = STATE_LT_SEEN; if (r.skipChar('/')) { if (helper == true) { length1 = offset - temp_offset - (increment << 1); if (length1 > 0) { if (encoding < FORMAT_UTF_16BE) writeVTD((temp_offset), length1, TOKEN_CHARACTER_DATA, depth); else writeVTD((temp_offset) >> 1, (length1 >> 1), TOKEN_CHARACTER_DATA, depth); } } parser_state = STATE_END_TAG; break; } } else if (XMLChar.isContentChar(ch)) { //temp_offset = offset; parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; } else throw new ParseExceptionHuge( "Error in text content: Invalid char" + formatLineNumber()); } else { parser_state = STATE_DOC_END; } break; } throw new ParseExceptionHuge( "Starting tag Error: Invalid char in starting tag" + formatLineNumber()); case STATE_END_TAG : temp_offset = offset; long sos = tag_stack[depth] & 0x1fffffffffL; int sl = (int) (tag_stack[depth] >> 38); offset = temp_offset+sl; if (offset>= endOffset) throw new EOFExceptionHuge("permature EOF reached, XML document incomplete"); for (int i = 0; i < sl; i++) { if (xb.byteAt(sos + i) != xb.byteAt(temp_offset + i)) throw new ParseExceptionHuge( "Ending tag error: Start/ending tag mismatch" + formatLineNumber()); } depth--; ch = getCharAfterS(); if(ch != '>') throw new ParseExceptionHuge( "Ending tag error: Invalid char in ending tag " + formatLineNumber()); if (depth != -1) { temp_offset = offset; ch = getCharAfterS(); if (ch == '<') parser_state = STATE_LT_SEEN; else if (XMLChar.isContentChar(ch)) { parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; entityIdentifier(); parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; }else throw new ParseExceptionHuge( "Other Error: Invalid char in xml" + formatLineNumber()); } else parser_state = STATE_DOC_END; break; case STATE_ATTR_NAME : if (ch == 'x') { if (r.skipChar('m') && r.skipChar('l') && r.skipChar('n') && r.skipChar('s')) { ch = r.getChar(); if (ch == '=' || XMLChar.isSpaceChar(ch) || ch == ':') { is_ns = true; //break; } } } while (true) { if (XMLChar.isNameChar(ch)) { if (ch == ':') { length2 = offset - temp_offset - increment; } ch = r.getChar(); } else break; } length1 = getPrevOffset() - temp_offset; // check for uniqueness here boolean unique = true; boolean unequal; for (int i = 0; i < attr_count; i++) { unequal = false; int prevLen = (int) attr_name_array[i] & 0x0001ffff; if (length1 == prevLen) { long prevOffset = (attr_name_array[i] >> 17); for (int j = 0; j < prevLen; j++) { if (xb.byteAt(prevOffset + j) != xb.byteAt(temp_offset + j)) { unequal = true; break; } } } else unequal = true; unique = unique && unequal; } if (!unique && attr_count != 0) throw new ParseExceptionHuge( "Error in attr: Attr name not unique" + formatLineNumber()); unique = true; if (attr_count < attr_name_array.length) { attr_name_array[attr_count] = ( (temp_offset) << 17) | length1; attr_count++; } else // grow the attr_name_array by 16 { long[] temp_array = attr_name_array; /*System.out.println( "size increase from " + temp_array.length + " to " + (attr_count + 16));*/ attr_name_array = new long[attr_count + ATTR_NAME_ARRAY_SIZE]; for (int i = 0; i < attr_count; i++) { attr_name_array[i] = temp_array[i]; } attr_name_array[attr_count] = ((temp_offset) << 17) | length1; attr_count++; } // after checking, write VTD if (is_ns) { if (encoding < FORMAT_UTF_16BE){ if (length2>MAX_PREFIX_LENGTH || length1 > MAX_QNAME_LENGTH) throw new ParseExceptionHuge( "Token length overflow error: Attr NS tag prefix or qname length too long" +formatLineNumber()); writeVTD( temp_offset, (length2 << 10) | length1, TOKEN_ATTR_NS, depth); } else{ if (length2>(MAX_PREFIX_LENGTH << 1) || length1 > (MAX_QNAME_LENGTH <<1)) throw new ParseExceptionHuge( "Token length overflow error: Attr NS prefix or qname length too long" + formatLineNumber()); writeVTD( temp_offset >> 1, (length2 << 9) | (length1 >> 1), TOKEN_ATTR_NS, depth); } is_ns = false; } else { if (encoding < FORMAT_UTF_16BE){ if (length2>MAX_PREFIX_LENGTH || length1 > MAX_QNAME_LENGTH) throw new ParseExceptionHuge( "Token Length Error: Attr name prefix or qname length too long" + formatLineNumber()); writeVTD( temp_offset, (length2 << 10) | length1, TOKEN_ATTR_NAME, depth); } else{ if (length2>(MAX_PREFIX_LENGTH<<1) || length1 > (MAX_QNAME_LENGTH<<1)) throw new ParseExceptionHuge( "Token Length overflow error: Attr name prefix or qname length too long" + formatLineNumber()); writeVTD( temp_offset >> 1, (length2 << 9) | (length1 >> 1), TOKEN_ATTR_NAME, depth); } } /*System.out.println( " " + temp_offset + " " + length2 + ":" + length1 + " attr name " + depth);*/ length2 = 0; if (XMLChar.isSpaceChar(ch)) { ch = getCharAfterS(); } if (ch != '=') throw new ParseExceptionHuge( "Error in attr: invalid char" + formatLineNumber()); ch_temp = getCharAfterS(); if (ch_temp != '"' && ch_temp != '\'') throw new ParseExceptionHuge( "Error in attr: invalid char (should be ' or \" )" + formatLineNumber()); temp_offset = offset; parser_state = STATE_ATTR_VAL; break; case STATE_ATTR_VAL : while (true) { ch = r.getChar(); if (XMLChar.isValidChar(ch) && ch != '<') { if (ch == ch_temp) break; if (ch == '&') { // as in vtd spec, we mark attr val with entities if (!XMLChar .isValidChar(entityIdentifier())) { throw new ParseExceptionHuge( "Error in attr: Invalid XML char" + formatLineNumber()); } } } else throw new ParseExceptionHuge( "Error in attr: Invalid XML char" + formatLineNumber()); } length1 = offset - temp_offset - increment; if (encoding < FORMAT_UTF_16BE){ if (length1 > MAX_TOKEN_LENGTH) throw new ParseExceptionHuge("Token Length Error:" +" Attr val too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset, length1, TOKEN_ATTR_VAL, depth); } else{ if (length1 > (MAX_TOKEN_LENGTH <<1)) throw new ParseExceptionHuge("Token Length Error:" +" Attr val too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_ATTR_VAL, depth); } ch = r.getChar(); if (XMLChar.isSpaceChar(ch)) { ch = getCharAfterS(); if (XMLChar.isNameStartChar(ch)) { temp_offset = offset - increment; parser_state = STATE_ATTR_NAME; break; } } helper = true; if (ch == '/') { depth--; helper = false; ch = r.getChar(); } if (ch == '>') { attr_count = 0; if (depth != -1) { temp_offset = offset; ch = getCharAfterSe(); if (ch == '<') { parser_state = STATE_LT_SEEN; if (r.skipChar('/')) { if (helper == true) { length1 = offset - temp_offset - (increment << 1); //if (length1 > 0) { if (encoding < FORMAT_UTF_16BE) writeVTD((temp_offset), length1, TOKEN_CHARACTER_DATA, depth); else writeVTD((temp_offset) >> 1, (length1 >> 1), TOKEN_CHARACTER_DATA, depth); //} } parser_state = STATE_END_TAG; break; } } else if (XMLChar.isContentChar(ch)) { //temp_offset = offset; parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; }else throw new ParseExceptionHuge( "Error in text content: Invalid char" + formatLineNumber()); } else { parser_state = STATE_DOC_END; } break; } throw new ParseExceptionHuge( "Starting tag Error: Invalid char in starting tag" + formatLineNumber()); case STATE_TEXT : if (depth == -1) throw new ParseExceptionHuge( "Error in text content: Char data at the wrong place" + formatLineNumber()); while (true) { ch = r.getChar(); if (XMLChar.isContentChar(ch)) { } else if (ch == '&') { //has_amp = true; if (!XMLChar.isValidChar(entityIdentifier())) throw new ParseExceptionHuge( "Error in text content: Invalid char in text content " + formatLineNumber()); //parser_state = STATE_TEXT; } else if (ch == '<') { break; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } } else throw new ParseExceptionHuge( "Error in text content: Invalid char in text content " + formatLineNumber()); } length1 = offset - increment - temp_offset; if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, length1, TOKEN_CHARACTER_DATA, depth); else writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_CHARACTER_DATA, depth); //has_amp = true; parser_state = STATE_LT_SEEN; break; case STATE_DOC_START : parser_state = process_start_doc(); break; case STATE_DOC_END : //docEnd = true; parser_state = process_end_doc(); break; case STATE_PI_TAG : parser_state = process_pi_tag(); break; //throw new ParseExceptionHuge("Error in PI: Invalid char"); case STATE_PI_VAL : parser_state = process_pi_val(); break; case STATE_DEC_ATTR_NAME : parser_state = process_dec_attr(); break; case STATE_COMMENT : parser_state = process_comment(); break; case STATE_CDATA : parser_state = process_cdata(); break; case STATE_DOCTYPE : parser_state = process_doc_type(); break; case STATE_END_COMMENT : parser_state = process_end_comment(); break; case STATE_END_PI : parser_state = process_end_pi(); break; default : throw new ParseExceptionHuge( "Other error: invalid parser state" +formatLineNumber()); } } } catch (EOFExceptionHuge e) { if (parser_state != STATE_DOC_END) throw e; finishUp(); } } private void matchCPEncoding()throws ParseExceptionHuge{ if ((r.skipChar('p') || r.skipChar('P')) && r.skipChar('1') && r.skipChar('2') && r.skipChar('5')) { if (encoding <= FORMAT_UTF_16LE) { if (must_utf_8) throw new EncodingExceptionHuge( "Can't switch from UTF-8" + formatLineNumber()); if (r.skipChar('0')){ encoding = FORMAT_WIN_1250; r=new WIN1250Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('1')){ encoding = FORMAT_WIN_1251; r=new WIN1251Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('2')){ encoding = FORMAT_WIN_1252; r=new WIN1252Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('3')){ encoding = FORMAT_WIN_1253; r=new WIN1253Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('4')){ encoding = FORMAT_WIN_1254; r=new WIN1254Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('5') ){ encoding = FORMAT_WIN_1255; r=new WIN1255Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('6')){ encoding = FORMAT_WIN_1256; r=new WIN1256Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('7') ){ encoding = FORMAT_WIN_1257; r=new WIN1257Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('8') ){ encoding = FORMAT_WIN_1258; r=new WIN1258Reader(); writeVTD(temp_offset, 6, TOKEN_DEC_ATTR_VAL, depth); }else throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); if (r.skipChar(ch_temp)) return; } else throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to ISO-8859" + formatLineNumber()); } throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); } private void matchWindowsEncoding()throws ParseExceptionHuge{ if ((r.skipChar('i') || r.skipChar('I')) &&(r.skipChar('n') || r.skipChar('N')) &&(r.skipChar('d') || r.skipChar('D')) &&(r.skipChar('o') || r.skipChar('O')) &&(r.skipChar('w') || r.skipChar('W')) &&(r.skipChar('s') || r.skipChar('S')) && r.skipChar('-') && r.skipChar('1') && r.skipChar('2') && r.skipChar('5')) { if (encoding <= FORMAT_UTF_16LE) { if (must_utf_8) throw new EncodingExceptionHuge( "Can't switch from UTF-8" + formatLineNumber()); if (r.skipChar('0')){ encoding = FORMAT_WIN_1250; r=new WIN1250Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('1')){ encoding = FORMAT_WIN_1251; r=new WIN1251Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('2')){ encoding = FORMAT_WIN_1252; r=new WIN1252Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('3')){ encoding = FORMAT_WIN_1253; r=new WIN1253Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('4')){ encoding = FORMAT_WIN_1254; r=new WIN1254Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('5')){ encoding = FORMAT_WIN_1255; r=new WIN1255Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('6')){ encoding = FORMAT_WIN_1256; r=new WIN1256Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('7')){ encoding = FORMAT_WIN_1257; r=new WIN1257Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('8')){ encoding = FORMAT_WIN_1258; r=new WIN1258Reader(); writeVTD(temp_offset, 12, TOKEN_DEC_ATTR_VAL, depth); }else throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); if (r.skipChar(ch_temp)) return; } else throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to ISO-8859" + formatLineNumber()); } throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); } private void matchUTFEncoding() throws ParseExceptionHuge{ if ((r.skipChar('s') || r.skipChar('S'))) if (r.skipChar('-') && (r.skipChar('a') || r.skipChar('A')) && (r.skipChar('s') || r.skipChar('S')) && (r.skipChar('c') || r.skipChar('C')) && (r.skipChar('i') || r.skipChar('I')) && (r.skipChar('i') || r.skipChar('I')) && r.skipChar(ch_temp)) { if (encoding != FORMAT_UTF_16LE && encoding != FORMAT_UTF_16BE) { if (must_utf_8) throw new EncodingExceptionHuge( "Can't switch from UTF-8" + formatLineNumber()); encoding = FORMAT_ASCII; r=new ASCIIReader(); writeVTD(temp_offset, 8, TOKEN_DEC_ATTR_VAL, depth); return; } else throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to US-ASCII" + formatLineNumber()); } else throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); if ((r.skipChar('t') || r.skipChar('T')) && (r.skipChar('f') || r.skipChar('F')) && r.skipChar('-')) { if (r.skipChar('8') && r.skipChar(ch_temp)) { if (encoding != FORMAT_UTF_16LE && encoding != FORMAT_UTF_16BE) { //encoding = FORMAT_UTF8; writeVTD(temp_offset, 5, TOKEN_DEC_ATTR_VAL, depth); return; } else throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to UTF-8" + formatLineNumber()); } if (r.skipChar('1') && r.skipChar('6')) { if (r.skipChar(ch_temp)) { if (encoding == FORMAT_UTF_16LE || encoding == FORMAT_UTF_16BE) { if (!BOM_detected) throw new EncodingExceptionHuge( "BOM not detected for UTF-16" + formatLineNumber()); writeVTD( temp_offset >> 1, 6, TOKEN_DEC_ATTR_VAL, depth); return; } throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to UTF-16" + formatLineNumber()); } else if ((r.skipChar('l') || r.skipChar('L')) && (r.skipChar('e') || r.skipChar('E')) && r.skipChar(ch_temp)) { if (encoding == FORMAT_UTF_16LE) { r = new UTF16LEReader(); writeVTD( temp_offset >> 1, 8, TOKEN_DEC_ATTR_VAL, depth); return; } throw new ParseExceptionHuge( "XML del error: Can't switch encoding to UTF-16LE" + formatLineNumber()); } else if ((r.skipChar('b') || r.skipChar('B')) && (r.skipChar('e') || r.skipChar('E')) && r.skipChar(ch_temp)) { if (encoding == FORMAT_UTF_16BE) { writeVTD( temp_offset >> 1, 8, TOKEN_DEC_ATTR_VAL, depth); return; } throw new ParseExceptionHuge( "XML del error: Can't swtich encoding to UTF-16BE" + formatLineNumber()); } throw new ParseExceptionHuge( "XML decl error: Invalid encoding" + formatLineNumber()); } } } private void matchISOEncoding()throws ParseExceptionHuge{ if ((r.skipChar('s') || r.skipChar('S')) && (r.skipChar('o') || r.skipChar('O')) && r.skipChar('-') && r.skipChar('8') && r.skipChar('8') && r.skipChar('5') && r.skipChar('9') && r.skipChar('-')) { if (encoding <= FORMAT_UTF_16LE) { if (must_utf_8) throw new EncodingExceptionHuge( "Can't switch from UTF-8" + formatLineNumber()); if (r.skipChar('1')){ if (r.skipChar(ch_temp)) { encoding = FORMAT_ISO_8859_1; r = new ISO8859_1Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); return; } else if (r.skipChar('0') ){ encoding = FORMAT_ISO_8859_10; r = new ISO8859_10Reader(); writeVTD(temp_offset, 11, TOKEN_DEC_ATTR_VAL, depth); } else if (r.skipChar('1') ){ encoding = FORMAT_ISO_8859_11; r = new ISO8859_11Reader(); writeVTD(temp_offset, 11, TOKEN_DEC_ATTR_VAL, depth); } else if (r.skipChar('3') ){ encoding = FORMAT_ISO_8859_13; r = new ISO8859_13Reader(); writeVTD(temp_offset, 11, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('4') ){ encoding = FORMAT_ISO_8859_14; r = new ISO8859_14Reader(); writeVTD(temp_offset, 11, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('5') ){ encoding = FORMAT_ISO_8859_15; r = new ISO8859_15Reader(); writeVTD(temp_offset, 11, TOKEN_DEC_ATTR_VAL, depth); } }else if (r.skipChar('2') ){ encoding = FORMAT_ISO_8859_2; r = new ISO8859_2Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('3')){ r = new ISO8859_3Reader(); encoding = FORMAT_ISO_8859_3; writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('4') ){ r = new ISO8859_4Reader(); encoding = FORMAT_ISO_8859_4; writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('5') ){ encoding = FORMAT_ISO_8859_5; r = new ISO8859_5Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('6') ){ encoding = FORMAT_ISO_8859_6; r = new ISO8859_6Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('7') ){ encoding = FORMAT_ISO_8859_7; r = new ISO8859_7Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('8') ){ encoding = FORMAT_ISO_8859_8; r = new ISO8859_8Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); }else if (r.skipChar('9')){ encoding = FORMAT_ISO_8859_9; r = new ISO8859_9Reader(); writeVTD(temp_offset, 10, TOKEN_DEC_ATTR_VAL, depth); } else throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); if (r.skipChar(ch_temp)) return; } else throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to ISO-8859" + formatLineNumber()); } throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); } /** * This private method processes declaration attributes * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_dec_attr() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge{ //int length1; int parser_state; if (ch == 'v' && r.skipChar('e') && r.skipChar('r') && r.skipChar('s') && r.skipChar('i') && r.skipChar('o') && r.skipChar('n')) { ch = getCharAfterS(); if (ch == '=') { /*System.out.println( " " + (temp_offset - 1) + " " + 7 + " dec attr name version " + depth);*/ if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset - 1, 7, TOKEN_DEC_ATTR_NAME, depth); else writeVTD( (temp_offset -2) >> 1, 7, TOKEN_DEC_ATTR_NAME, depth); } else throw new ParseExceptionHuge( "XML decl error: Invalid char" + formatLineNumber()); } else throw new ParseExceptionHuge( "XML decl error: should be version" + formatLineNumber()); ch_temp = getCharAfterS(); if (ch_temp != '\'' && ch_temp != '"') throw new ParseExceptionHuge( "XML decl error: Invalid char to start attr name" + formatLineNumber()); temp_offset = offset; // support 1.0 or 1.1 if (r.skipChar('1') && r.skipChar('.') && (r.skipChar('0') || r.skipChar('1'))) { /*System.out.println( " " + temp_offset + " " + 3 + " dec attr val (version)" + depth);*/ if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, 3, TOKEN_DEC_ATTR_VAL, depth); else writeVTD( temp_offset >> 1, 3, TOKEN_DEC_ATTR_VAL, depth); } else throw new ParseExceptionHuge( "XML decl error: Invalid version(other than 1.0 or 1.1) detected" + formatLineNumber()); if (!r.skipChar(ch_temp)) throw new ParseExceptionHuge( "XML decl error: version not terminated properly" + formatLineNumber()); ch = r.getChar(); //? space or e if (XMLChar.isSpaceChar(ch)) { ch = getCharAfterS(); temp_offset = offset - increment; if (ch == 'e') { if (r.skipChar('n') && r.skipChar('c') && r.skipChar('o') && r.skipChar('d') && r.skipChar('i') && r.skipChar('n') && r.skipChar('g')) { ch = r.getChar(); if (XMLChar.isSpaceChar(ch)) ch = getCharAfterS(); if (ch == '=') { /*System.out.println( " " + (temp_offset) + " " + 8 + " dec attr name (encoding) " + depth);*/ if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, 8, TOKEN_DEC_ATTR_NAME, depth); else writeVTD( temp_offset >> 1, 8, TOKEN_DEC_ATTR_NAME, depth); } else throw new ParseExceptionHuge( "XML decl error: Invalid char" + formatLineNumber()); ch_temp = getCharAfterS(); if (ch_temp != '"' && ch_temp != '\'') throw new ParseExceptionHuge( "XML decl error: Invalid char to start attr name" + formatLineNumber()); temp_offset = offset; ch = r.getChar(); switch (ch) { case 'a' : case 'A' : if ((r.skipChar('s') || r.skipChar('S')) && (r.skipChar('c') || r.skipChar('C')) && (r.skipChar('i') || r.skipChar('I')) && (r.skipChar('i') || r.skipChar('I')) && r.skipChar(ch_temp)) { if (encoding != FORMAT_UTF_16LE && encoding != FORMAT_UTF_16BE) { if (must_utf_8) throw new EncodingExceptionHuge("Can't switch from UTF-8" + formatLineNumber()); encoding = FORMAT_ASCII; r = new ASCIIReader(); /*System.out.println( " " + (temp_offset) + " " + 5 + " dec attr val (encoding) " + depth);*/ writeVTD( temp_offset, 5, TOKEN_DEC_ATTR_VAL, depth); break; } else throw new ParseExceptionHuge( "XML decl error: Can't switch encoding to ASCII" + formatLineNumber()); } throw new ParseExceptionHuge( "XML decl error: Invalid Encoding" + formatLineNumber()); case 'c': case 'C': matchCPEncoding(); break; case 'i' : case 'I' : matchISOEncoding(); break; case 'u' : case 'U' : matchUTFEncoding(); break; // now deal with windows encoding case 'w' : case 'W' : matchWindowsEncoding(); break; default : throw new ParseExceptionHuge( "XML decl Error: invalid encoding" + formatLineNumber()); } ch = r.getChar(); if (XMLChar.isSpaceChar(ch)) ch = getCharAfterS(); temp_offset = offset - increment; } else throw new ParseExceptionHuge( "XML decl Error: Invalid char" + formatLineNumber()); } if (ch == 's') { if (r.skipChar('t') && r.skipChar('a') && r.skipChar('n') && r.skipChar('d') && r.skipChar('a') && r.skipChar('l') && r.skipChar('o') && r.skipChar('n') && r.skipChar('e')) { ch = getCharAfterS(); if (ch != '=') throw new ParseExceptionHuge( "XML decl error: Invalid char" + formatLineNumber()); /*System.out.println( " " + temp_offset + " " + 3 + " dec attr name (standalone) " + depth);*/ if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, 10, TOKEN_DEC_ATTR_NAME, depth); else writeVTD( temp_offset >> 1, 10, TOKEN_DEC_ATTR_NAME, depth); ch_temp = getCharAfterS(); temp_offset = offset; if (ch_temp != '"' && ch_temp != '\'') throw new ParseExceptionHuge( "XML decl error: Invalid char to start attr name" + formatLineNumber()); ch = r.getChar(); if (ch == 'y') { if (r.skipChar('e') && r.skipChar('s') && r.skipChar(ch_temp)) { /*System.out.println( " " + (temp_offset) + " " + 3 + " dec attr val (standalone) " + depth);*/ if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, 3, TOKEN_DEC_ATTR_VAL, depth); else writeVTD( temp_offset >> 1, 3, TOKEN_DEC_ATTR_VAL, depth); } else throw new ParseExceptionHuge( "XML decl error: invalid val for standalone" + formatLineNumber()); } else if (ch == 'n') { if (r.skipChar('o') && r.skipChar(ch_temp)) { /*System.out.println( " " + (temp_offset) + " " + 2 + " dec attr val (standalone)" + depth);*/ if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, 2, TOKEN_DEC_ATTR_VAL, depth); else writeVTD( temp_offset >> 1, 2, TOKEN_DEC_ATTR_VAL, depth); } else throw new ParseExceptionHuge( "XML decl error: invalid val for standalone" + formatLineNumber()); } else throw new ParseExceptionHuge( "XML decl error: invalid val for standalone" + formatLineNumber()); } else throw new ParseExceptionHuge( "XML decl error" + formatLineNumber()); ch = r.getChar(); if (XMLChar.isSpaceChar(ch)) ch = getCharAfterS(); } } if (ch == '?' && r.skipChar('>')) { temp_offset = offset; ch = getCharAfterS(); if (ch == '<') { parser_state = STATE_LT_SEEN; } else throw new ParseExceptionHuge( "Other Error: Invalid Char in XML" + formatLineNumber()); } else throw new ParseExceptionHuge( "XML decl Error: Invalid termination sequence" + formatLineNumber()); return parser_state; } /** * This private method processes PI tag * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_pi_tag() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge{ long length1; int parser_state; while (true) { ch = r.getChar(); if (!XMLChar.isNameChar(ch)) break; } length1 = offset - temp_offset - increment; /*System.out.println( ((char) XMLDoc[temp_offset]) + " " + (temp_offset) + " " + length1 + " PI Target " + depth); */ if (encoding < FORMAT_UTF_16BE){ if (length1 > MAX_TOKEN_LENGTH) throw new ParseExceptionHuge("Token Length Error:" +" PI name too long (>0xfffff)" + formatLineNumber()); writeVTD( (temp_offset), length1, TOKEN_PI_NAME, depth); } else{ if(length1 > (MAX_TOKEN_LENGTH<<1)) throw new ParseExceptionHuge("Token Length Error:" +" PI name too long (>0xfffff)" + formatLineNumber()); writeVTD( (temp_offset) >> 1, (length1 >> 1), TOKEN_PI_NAME, depth); } //length1 = 0; /*temp_offset = offset; if (XMLChar.isSpaceChar(ch)) { ch = r.getChar(); }*/ if (ch == '?') { if (r.skipChar('>')) { temp_offset = offset; ch = getCharAfterSe(); if (ch == '<') { parser_state = STATE_LT_SEEN; } else if (XMLChar.isContentChar(ch)) { parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; entityIdentifier(); parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; }else throw new ParseExceptionHuge( "Error in text content: Invalid char" + formatLineNumber()); return parser_state; } else throw new ParseExceptionHuge( "Error in PI: invalid termination sequence" + formatLineNumber()); } parser_state = STATE_PI_VAL; return parser_state; } /** * This private method processes PI val * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_pi_val() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge{ int parser_state; long length1; if (!XMLChar.isSpaceChar(ch)) throw new ParseExceptionHuge( "Error in PI: invalid termination sequence" + formatLineNumber()); temp_offset = offset; ch = r.getChar(); while (true) { if (XMLChar.isValidChar(ch)) { //System.out.println(""+(char)ch); if (ch == '?') if (r.skipChar('>')) { break; } /*else throw new ParseExceptionHuge( "Error in PI: invalid termination sequence for PI" + formatLineNumber());*/ } else throw new ParseExceptionHuge( "Errors in PI: Invalid char in PI val" + formatLineNumber()); ch = r.getChar(); } length1 = offset - temp_offset - (increment<<1); /*System.out.println( ((char) XMLDoc[temp_offset]) + " " + (temp_offset) + " " + length1 + " PI val " + depth);*/ if (encoding < FORMAT_UTF_16BE){ if (length1 > MAX_TOKEN_LENGTH) throw new ParseExceptionHuge("Token Length Error:" +"PI VAL too long (>0xfffff)" + formatLineNumber()); writeVTD(temp_offset, length1, TOKEN_PI_VAL, depth); } else{ if (length1 > (MAX_TOKEN_LENGTH<<1)) throw new ParseExceptionHuge("Token Length Error:" +"PI VAL too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_PI_VAL, depth); } //length1 = 0; temp_offset = offset; ch = getCharAfterSe(); if (ch == '<') { parser_state = STATE_LT_SEEN; } else if (XMLChar.isContentChar(ch)) { //temp_offset = offset; parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; }else throw new ParseExceptionHuge( "Error in text content: Invalid char" + formatLineNumber()); return parser_state; } /** * This private method process comment * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_comment() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge{ int parser_state; long length1; while (true) { ch = r.getChar(); if (XMLChar.isValidChar(ch)) { if (ch == '-' && r.skipChar('-')) { length1 = offset - temp_offset - (increment<<1); break; } } else throw new ParseExceptionHuge( "Error in comment: Invalid Char" + formatLineNumber()); } if (r.getChar() == '>') { //System.out.println(" " + (temp_offset) + " " + length1 + " comment " + depth); if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, length1, TOKEN_COMMENT, depth); else writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_COMMENT, depth); //length1 = 0; temp_offset = offset; ch = getCharAfterSe(); if (ch == '<') { parser_state = STATE_LT_SEEN; } else if (XMLChar.isContentChar(ch)) { //temp_offset = offset; parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; //temp_offset = offset; entityIdentifier(); parser_state = STATE_TEXT; } else if (ch == ']') { if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; }else throw new ParseExceptionHuge( "Error in text content: Invalid char" + formatLineNumber()); return parser_state; } else throw new ParseExceptionHuge( "Error in comment: Invalid terminating sequence" + formatLineNumber()); } private int process_end_doc() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge { int parser_state; ch = getCharAfterS(); /* eof exception should be thrown here for premature ending*/ if (ch == '<') { if (r.skipChar('?')) { /* processing instruction after end tag of root element*/ temp_offset = offset; parser_state = STATE_END_PI; return parser_state; } else if ( r.skipChar('!') && r.skipChar('-') && r.skipChar('-')) { // comments allowed after the end tag of the root element temp_offset = offset; parser_state = STATE_END_COMMENT; return parser_state; } } throw new ParseExceptionHuge( "Other Error: XML not terminated properly" + formatLineNumber()); } private int process_qm_seen()throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge { temp_offset = offset; ch = r.getChar(); if (XMLChar.isNameStartChar(ch)) { //temp_offset = offset; if ((ch == 'x' || ch == 'X') && (r.skipChar('m') || r.skipChar('M')) && (r.skipChar('l') || r.skipChar('L'))) { ch = r.getChar(); if (ch == '?' || XMLChar.isSpaceChar(ch)) throw new ParseExceptionHuge( "Error in PI: [xX][mM][lL] not a valid PI targetname" + formatLineNumber()); offset = getPrevOffset(); } return STATE_PI_TAG; } throw new ParseExceptionHuge( "Other Error: First char after <? invalid" + formatLineNumber()); } private int process_ex_seen()throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge { int parser_state; boolean hasDTD = false; ch = r.getChar(); switch (ch) { case '-' : if (r.skipChar('-')) { temp_offset = offset; parser_state = STATE_COMMENT; break; } else throw new ParseExceptionHuge( "Error in comment: Invalid char sequence to start a comment" + formatLineNumber()); case '[' : if (r.skipChar('C') && r.skipChar('D') && r.skipChar('A') && r.skipChar('T') && r.skipChar('A') && r.skipChar('[') && (depth != -1)) { temp_offset = offset; parser_state = STATE_CDATA; break; } else { if (depth == -1) throw new ParseExceptionHuge( "Error in CDATA: Wrong place for CDATA" + formatLineNumber()); throw new ParseExceptionHuge( "Error in CDATA: Invalid char sequence for CDATA" + formatLineNumber()); } case 'D' : if (r.skipChar('O') && r.skipChar('C') && r.skipChar('T') && r.skipChar('Y') && r.skipChar('P') && r.skipChar('E') && (depth == -1) && !hasDTD) { hasDTD = true; temp_offset = offset; parser_state = STATE_DOCTYPE; break; } else { if (hasDTD == true) throw new ParseExceptionHuge( "Error for DOCTYPE: Only DOCTYPE allowed" + formatLineNumber()); if (depth != -1) throw new ParseExceptionHuge( "Error for DOCTYPE: DTD at wrong place" + formatLineNumber()); throw new ParseExceptionHuge( "Error for DOCTYPE: Invalid char sequence for DOCTYPE" + formatLineNumber()); } default : throw new ParseExceptionHuge( "Other Error: Unrecognized char after <!" + formatLineNumber()); } return parser_state; } private int process_start_doc()throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge { int c = r.getChar(); if (c == '<') { temp_offset = offset; // xml decl has to be right after the start of the document if (r.skipChar('?') && (r.skipChar('x') || r.skipChar('X')) && (r.skipChar('m') || r.skipChar('M')) && (r.skipChar('l') || r.skipChar('L'))) { if (r.skipChar(' ') || r.skipChar('\t') || r.skipChar('\n') || r.skipChar('\r')) { ch = getCharAfterS(); temp_offset = offset; return STATE_DEC_ATTR_NAME; } else if (r.skipChar('?')) throw new ParseExceptionHuge( "Error in XML decl: Premature ending" + formatLineNumber()); } offset = temp_offset; return STATE_LT_SEEN; }else if (c==' '||c=='\n'||c=='\r'||c=='\t'){ if (getCharAfterS()=='<'){ return STATE_LT_SEEN; } } throw new ParseExceptionHuge( "Other Error: XML not starting properly" + formatLineNumber()); } /** * This private method processes CDATA section * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_cdata() throws ParseExceptionHuge, EncodingExceptionHuge, EOFExceptionHuge{ int parser_state; long length1; while (true) { ch = r.getChar(); if (XMLChar.isValidChar(ch)) { if (ch == ']' && r.skipChar(']')) { while (r.skipChar(']')); if (r.skipChar('>')) { break; } /*else throw new ParseExceptionHuge( "Error in CDATA: Invalid termination sequence" + formatLineNumber());*/ } } else throw new ParseExceptionHuge( "Error in CDATA: Invalid Char" + formatLineNumber()); } length1 = offset - temp_offset - (increment<<1) - increment; if (encoding < FORMAT_UTF_16BE){ writeVTD( temp_offset, length1, TOKEN_CDATA_VAL, depth); } else { writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_CDATA_VAL, depth); } //System.out.println(" " + (temp_offset) + " " + length1 + " CDATA " + depth); ch = getCharAfterSe(); if (ch == '<') { parser_state = STATE_LT_SEEN; } else if (XMLChar.isContentChar(ch)) { temp_offset = offset-1; parser_state = STATE_TEXT; } else if (ch == '&') { //has_amp = true; temp_offset = offset-1; entityIdentifier(); parser_state = STATE_TEXT; //temp_offset = offset; } else if (ch == ']') { temp_offset = offset-1; if (r.skipChar(']')) { while (r.skipChar(']')) { } if (r.skipChar('>')) throw new ParseExceptionHuge( "Error in text content: ]]> in text content" + formatLineNumber()); } parser_state = STATE_TEXT; }else throw new ParseExceptionHuge( "Other Error: Invalid char in xml" + formatLineNumber()); return parser_state; } /** * This private method process DTD * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_doc_type() throws ParseExceptionHuge,EncodingExceptionHuge, EOFExceptionHuge{ int z = 1, parser_state; long length1; while (true) { ch = r.getChar(); if (XMLChar.isValidChar(ch)) { if (ch == '>') z--; else if (ch == '<') z++; if (z == 0) break; } else throw new ParseExceptionHuge( "Error in DOCTYPE: Invalid char" + formatLineNumber()); } length1 = offset - temp_offset - increment; /*System.out.println( " " + (temp_offset) + " " + length1 + " DOCTYPE val " + depth);*/ if (encoding < FORMAT_UTF_16BE){ if (length1 > MAX_TOKEN_LENGTH) throw new ParseExceptionHuge("Token Length Error:" +" DTD val too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset, length1, TOKEN_DTD_VAL, depth); } else{ if (length1 > (MAX_TOKEN_LENGTH<<1)) throw new ParseExceptionHuge("Token Length Error:" +" DTD val too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_DTD_VAL, depth); } ch = getCharAfterS(); if (ch == '<') { parser_state = STATE_LT_SEEN; } else throw new ParseExceptionHuge( "Other Error: Invalid char in xml" + formatLineNumber()); return parser_state; } /** * This private method processes PI after root document * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge * @throws EncodingExceptionHuge * @throws EOFExceptionHuge */ private int process_end_pi() throws ParseExceptionHuge,EncodingExceptionHuge, EOFExceptionHuge{ long length1;int parser_state; ch = r.getChar(); if (XMLChar.isNameStartChar(ch)) { if ((ch == 'x' || ch == 'X') && (r.skipChar('m') || r.skipChar('M')) && (r.skipChar('l') && r.skipChar('L'))) { //temp_offset = offset; ch = r.getChar(); if (XMLChar.isSpaceChar(ch) || ch == '?') throw new ParseExceptionHuge( "Error in PI: [xX][mM][lL] not a valid PI target" + formatLineNumber()); //offset = temp_offset; } while (true) { //ch = getChar(); if (!XMLChar.isNameChar(ch)) { break; } ch = r.getChar(); } length1 = offset - temp_offset - increment; /*System.out.println( "" + (char) XMLDoc[temp_offset] + " " + (temp_offset) + " " + length1 + " PI Target " + depth);*/ if (encoding < FORMAT_UTF_16BE){ if (length1 > MAX_TOKEN_LENGTH) throw new ParseExceptionHuge("Token Length Error:" +"PI name too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset, length1, TOKEN_PI_NAME, depth); } else{ if (length1 > (MAX_TOKEN_LENGTH<<1)) throw new ParseExceptionHuge("Token Length Error:" +"PI name too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_PI_NAME, depth); } //length1 = 0; temp_offset = offset; if (XMLChar.isSpaceChar(ch)) { ch = getCharAfterS(); while (true) { if (XMLChar.isValidChar(ch)) { if (ch == '?') if (r.skipChar('>')) { parser_state = STATE_DOC_END; break; } else throw new ParseExceptionHuge( "Error in PI: invalid termination sequence" + formatLineNumber()); } else throw new ParseExceptionHuge( "Error in PI: Invalid char in PI val" + formatLineNumber()); ch = r.getChar(); } length1 = offset - temp_offset - (increment<<1); if (encoding < FORMAT_UTF_16BE){ if (length1 > MAX_TOKEN_LENGTH) throw new ParseExceptionHuge("Token Length Error:" +"PI val too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset, length1, TOKEN_PI_VAL, depth); } else{ if (length1 > (MAX_TOKEN_LENGTH<<1)) throw new ParseExceptionHuge("Token Length Error:" +"PI val too long (>0xfffff)" + formatLineNumber()); writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_PI_VAL, depth); } //System.out.println(" " + temp_offset + " " + length1 + " PI val " + depth); } else { if ((ch == '?') && r.skipChar('>')) { parser_state = STATE_DOC_END; } else throw new ParseExceptionHuge( "Error in PI: invalid termination sequence" + formatLineNumber()); } //parser_state = STATE_DOC_END; } else throw new ParseExceptionHuge("Error in PI: invalid char in PI target" +formatLineNumber()); return parser_state; } /** * This private method process the comment after the root document * @return the parser state after which the parser loop jumps to * @throws ParseExceptionHuge */ private int process_end_comment()throws ParseExceptionHuge { int parser_state; long length1; while (true) { ch = r.getChar(); if (XMLChar.isValidChar(ch)) { if (ch == '-' && r.skipChar('-')) { length1 = offset - temp_offset - (increment<<1); break; } } else throw new ParseExceptionHuge( "Error in comment: Invalid Char" + formatLineNumber()); } if (r.getChar() == '>') { //System.out.println(" " + temp_offset + " " + length1 + " comment " + depth); if (encoding < FORMAT_UTF_16BE) writeVTD( temp_offset, length1, TOKEN_COMMENT, depth); else writeVTD( temp_offset >> 1, length1 >> 1, TOKEN_COMMENT, depth); //length1 = 0; parser_state = STATE_DOC_END; return parser_state; } throw new ParseExceptionHuge( "Error in comment: '-->' expected" + formatLineNumber()); } /** * Set the XMLDoc container. * @param XMLBuffer xb1 */ public void setDoc(IByteBuffer xb1) { xb = xb1; int a; br = false; depth = -1; increment =1; BOM_detected = false; must_utf_8 = false; ch = ch_temp = 0; temp_offset = 0; docOffset = offset = 0; //System.out.println("doc length is "+xb.length()); docLen = xb.length(); endOffset = xb.length(); last_l1_index= last_l2_index = last_l3_index = last_depth =0; int i1=7,i2=9,i3=11; if (docLen <= 1024) { //a = 1024; //set the floor a = 6; i1=5; i2=5;i3=5; } else if (docLen <=4096){ a = 7; i1=6; i2=6; i3=6; }else if (docLen <=1024*16){ a =8; i1 = 7;i2=7;i3=7; }else if (docLen <= 1024 * 16 * 4) { //a = 2048; a = 11; } else if (docLen <= 1024 * 256) { //a = 1024 * 4; a = 12; } else if (docLen <= (1<<26)){ //a = 1 << 15; i1 = i2 = i3 = 12; a = 15; } else if (docLen <= (1<<30 )){ //a = 1 << 15; i1 = i2 = i3 = 13; a = 19; } else { i1 = i2 = i3 = 16; a = 23; } VTDBuffer = new FastLongBuffer(a, (int) (xb.length()>> (a+1))); l1Buffer = new FastLongBuffer(i1); l2Buffer = new FastLongBuffer(i2); l3Buffer = new FastIntBuffer(i3); } /** * Write the VTD and LC into their storage container. * @param offset int * @param length int * @param token_type int * @param depth int */ private void writeVTD(long offset, long length, int token_type, int depth) { /*System.out.print(" type "+token_type); System.out.print(" length "+ Long.toHexString(length)+" length "+length); System.out.print(" prefix length " + (length>>10)); System.out.print(" qn length " + (length & 0x3ff)); System.out.print(" offset "+offset); System.out.println(" depth "+depth);*/ switch (token_type) { case TOKEN_CHARACTER_DATA: case TOKEN_CDATA_VAL: case TOKEN_COMMENT: if (length > MAX_TOKEN_LENGTH) { long k; long r_offset = offset; for (k = length; k > MAX_TOKEN_LENGTH; k = k - MAX_TOKEN_LENGTH) { VTDBuffer.append(((long) ((token_type << 22) | ((depth & 0x1f) << 17) | MAX_TOKEN_LENGTH) << 38) | r_offset); /*VTDBuffer.append(((long) ((token_type << 28) | ((depth & 0xff) << 20) | MAX_TOKEN_LENGTH) << 32) | r_offset);*/ r_offset += MAX_TOKEN_LENGTH; } VTDBuffer.append(((long) ((token_type << 22) | ((depth & 0x1f) << 17) | k) << 38) | r_offset); /*VTDBuffer.append(((long) ((token_type << 28) | ((depth & 0xff) << 20) | k) << 32) | r_offset);*/ } else { VTDBuffer.append(((long) ((token_type << 22) | ((depth & 0x1f) << 17) | length) << 38) | offset); /*VTDBuffer.append(((long) ((token_type << 28) | ((depth & 0xff) << 20) | length) << 32) | offset);*/ } break; //case TOKEN_ENDING_TAG: break; default: VTDBuffer.append(((long) ((token_type << 22) | ((depth & 0x1f) << 17) | length) << 38) | offset); /*VTDBuffer.append(((long) ((token_type << 28) | ((depth & 0xff) << 20) | length) << 32) | offset);*/ } // remember VTD depth start from zero if (token_type == TOKEN_STARTING_TAG) { switch (depth) { case 0: rootIndex = VTDBuffer.size() - 1; break; case 1: if (last_depth == 1) { l1Buffer.append(((long) last_l1_index << 32) | 0xffffffffL); } else if (last_depth == 2) { l2Buffer.append(((long) last_l2_index << 32) | 0xffffffffL); } last_l1_index = VTDBuffer.size() - 1; last_depth = 1; break; case 2: if (last_depth == 1) { l1Buffer.append(((long) last_l1_index << 32) + l2Buffer.size()); } else if (last_depth == 2) { l2Buffer.append(((long) last_l2_index << 32) | 0xffffffffL); } last_l2_index = VTDBuffer.size() - 1; last_depth = 2; break; case 3: l3Buffer.append(VTDBuffer.size() - 1); if (last_depth == 2) { l2Buffer.append(((long) last_l2_index << 32) + l3Buffer.size() - 1); } last_depth = 3; break; default: //rootIndex = VTDBuffer.size() - 1; } } /*else if (token_type == TOKEN_ENDING_TAG && (depth == 0)) { if (last_depth == 1) { l1Buffer.append(((long) last_l1_index << 32) | 0xffffffffL); } else if (last_depth == 2) { l2Buffer.append(((long) last_l2_index << 32) | 0xffffffffL); } }*/ } }
101,479
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ILongBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/ILongBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * Abstract long buffer storage interface * Creation date: (11/23/03 6:13:38 PM) */ public interface ILongBuffer { /** * Get the long at the given index. * Creation date: (11/23/03 6:29:53 PM) * @return long * @param index int */ long longAt(int index); /** * Get the lower 32 bit of the long at given index. * Creation date: (11/23/03 6:45:27 PM) * @return int * @param index int */ int lower32At(int index); /** * Modify the entry at given index with a new val. * Creation date: (11/23/03 6:42:57 PM) * @param index int * @param newVal long */ void modifyEntry(int index, long newVal); /** * Get the number of long in the buffer. * Creation date: (11/23/03 7:22:25 PM) * @return int */ int size(); /** * Get the upper 32 bit of the long at the given index. * Creation date: (11/23/03 6:45:27 PM) * @return int * @param index int */ int upper32At(int index); }
1,767
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ContextBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/ContextBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; //import java.lang.NullPointerException; import java.lang.IllegalArgumentException; import java.util.ArrayList; //import com.ximpleware.NavException; /** * This class is used as the global stack in VTDNavHuge class. * The VTDNavHuge object instantiates a context Buffer object, then everytime * load/store is called, current context information gets pushed/popped to/from the * ContextBuffer. * Creation date: (11/16/03 4:30:45 PM) */ public class ContextBuffer{ private java.util.ArrayList bufferArrayList; private int capacity; private int pageSize; protected int size; private int incSize; private int n; // for fast divide private int r; // mask for remainder /** * ContextBuffer constructor comment. * inc is the # of int to be pushed/pop to/from the underlying storage * @param i int */ public ContextBuffer(int i) { super(); pageSize =1024; n = 10; //1<<10 == 1024 r = pageSize - 1; incSize = i; if (incSize<0) throw new IllegalArgumentException(); bufferArrayList = new ArrayList(); } /** * ContextBuffer constructor comment. * incSize is the # of int to be pushed/pop to/from the underlying storage * Creation date: (11/16/03 8:02:21 PM) * @param p int (pageSize equals (1<<p) * @param i int */ public ContextBuffer(int p, int i) { if (p<0)throw new IllegalArgumentException("invalid Buffer size"); pageSize = (1<<p); r = pageSize - 1; n = p; incSize = i; if (incSize < 0) throw new IllegalArgumentException("context buffer's incremental size must be greater than zero"); bufferArrayList = new ArrayList(); } /** * Pop the content value back into an integer array. * Creation date: (11/17/03 1:07:42 AM) * @param output int[] * @return boolean If load is successful. **/ public boolean load(int[] output){ if (size < incSize) { return false; } int startingOffset = size - incSize; int len = incSize; //int[] result = new int[len]; // allocate result array //if (pageSize != 1) { //int first_index = (int) (startingOffset / pageSize); //int last_index = (int) ((startingOffset + len) / pageSize); //if ((startingOffset + len) % pageSize == 0) { int first_index = (startingOffset >> n); int last_index = ((startingOffset + len) >>n); if (((startingOffset + len)& r)== 0) { last_index--; } if (first_index == last_index) { // to see if there is a need to go across buffer boundry System.arraycopy( (int[]) (bufferArrayList.get(first_index)), //startingOffset % pageSize, startingOffset & r, output, 0, len); } else { int int_array_offset = 0; for (int i = first_index; i <= last_index; i++) { int[] currentChunk = (int[]) bufferArrayList.get(i); if (i == first_index) // first section { System.arraycopy( currentChunk, //startingOffset % pageSize startingOffset & r, output, 0, // pageSize - (startingOffset % pageSize)); pageSize - (startingOffset & r)); //int_array_offset += pageSize - (startingOffset) % pageSize; int_array_offset += pageSize - (startingOffset &r); } else if (i == last_index) // last sections { System.arraycopy( currentChunk, 0, output, int_array_offset, len - int_array_offset); } else { System.arraycopy(currentChunk, 0, output, int_array_offset, pageSize); int_array_offset += pageSize; } } } size -= incSize; return true; } /** * Test the load and store functions. * Creation date: (11/19/03 3:51:17 PM) * @param args java.lang.String[] */ public static void main(String[] args) { try { int[] ia = new int[18]; ContextBuffer cb = new ContextBuffer(18); for (int i = 0; i < 57; i++) { for (int j = 0; j < 17; j++) { ia[j] = i; } ia[17] = -1; cb.store(ia); } //cb.store(ia); for (int i = 56; i >= 0; i--) { cb.load(ia); System.out.println(""+ia[0]); if (ia[17]!=-1) System.out.println("store error "+i+ " "+17+" "+ia[17]); for (int j = 16; j >= 0; j--) { if (ia[j] != i) { System.out.println(" store error " + i + " " + j + " " + ia[j]); } } } System.out.println("cb.clear()"); cb.clear(); for (int i = 0; i < 157; i++) { for (int j = 0; j < 18; j++) { ia[j] = i; } cb.store(ia); } //cb.store(ia); for (int i = 156; i >= 0; i--) { cb.load(ia); System.out.println(""+ia[0]); for (int j = 17; j >= 0; j--) { if (ia[j] != i) { System.out.println(" store error " + i + " " + j + " " + ia[j]); } } } cb.clear(); for (int i = 0; i < 257; i++) { for (int j = 0; j < 18; j++) { ia[j] = i; } cb.store(ia); } //cb.store(ia); for (int i = 256; i >= 0; i--) { cb.load(ia); System.out.println(""+ia[0]); for (int j = 17; j >= 0; j--) { if (ia[j] != i) { System.out.println(" store error " + i + " " + j + " " + ia[j]); } } } System.out.println("success"); System.out.println("test fastIntBuffer"); ia = new int[1000000]; for (int k=0;k<1000000;k++){ ia[k]= k; } FastIntBuffer fib = new FastIntBuffer(13); //for(int i=0;i<10;i++){ fib.append(ia); //} fib.clear(); fib.append(ia); //for(int i=0;i<10;i++){ // fib.append(ia); //} int ib[] = fib.toIntArray(); for (int i = 0;i<1000000;i++){ if (ib[i]!=i){ System.out.println("error occurred at "+i ); //break; } } System.out.println("test fastLongBuffer"); long[] la = new long[1000000]; for (int k=0;k<1000000;k++){ la[k]= k; } FastLongBuffer flb = new FastLongBuffer(14); flb.append(la); flb.clear(); flb.append(la); long lb[] = flb.toLongArray(); for (int i = 0;i<1000000;i++){ if (lb[i]!=i){ System.out.println("error occurred at "+i); } } System.out.println("success"); } catch (Exception e) { e.printStackTrace(); System.out.println(" exception caught "); } } /** * Set the context buffer size to zero * capacity untouched */ public void clear(){ size = 0; } /** * Push the array content on to the stack. * Creation date: (11/17/03 1:06:43 AM) * @param input int[] */ public void store(int[] input){ if (input == null) { throw new IllegalArgumentException("context buffer can't store a null pointer"); } //if (input.length != incSize) { // throw a derivative of runtime exceptions // throw new NavException("Store: Input size doesn't match increment size"); //} // no additional buffer space needed int lastBufferIndex; int[] lastBuffer; if (bufferArrayList.size() == 0) { lastBuffer = new int[pageSize]; bufferArrayList.add(lastBuffer); lastBufferIndex = 0; capacity = pageSize; } else { lastBufferIndex = Math.min((size>>n),//+(((size&r)==0)? 0:1), bufferArrayList.size() - 1); lastBuffer = (int[]) bufferArrayList.get(lastBufferIndex); } if ((this.size + input.length) < this.capacity) { //get the last buffer from the bufferListArray //obtain the starting offset in that buffer to which the data is to be copied //update length //System.arraycopy(input, 0, lastBuffer, size % pageSize, input.length); if (this.size + input.length< ((lastBufferIndex+1)<<n)){ System.arraycopy(input, 0, lastBuffer, size & r, input.length); } else { int offset = pageSize - (size &r); // copy the first part System.arraycopy(input, 0, lastBuffer, size & r, offset); // copy the middle part int l = input.length - (offset); int k = (l)>> n; int z; for (z=1;z<=k;z++){ System.arraycopy(input,offset, (int[]) bufferArrayList.get(lastBufferIndex+z), 0, pageSize); offset += pageSize; } // copy the last part System.arraycopy(input,offset,(int[]) bufferArrayList.get(lastBufferIndex+z), 0, l & r); } size += input.length; return; //System.out.println(" --+++ buffer size "+size); //size += input.length; } else // new buffers needed { // compute the number of additional buffers needed int k = //((int) ((input.length + size) / pageSize)) ((input.length + size) >>n) //+ (((input.length + size) % pageSize) > 0 ? 1 : 0) + (((input.length + size) & r ) > 0 ? 1 : 0) - (capacity >> n); // create these buffers // add to bufferArrayList //System.arraycopy(input, 0, lastBuffer, size % pageSize, capacity - size); System.arraycopy(input, 0, lastBuffer, size & r, capacity - size); for (int i = 0; i < k; i++) { int[] newBuffer = new int[pageSize]; if (i < k - 1) { // full copy System.arraycopy(input, pageSize * i + capacity - size, newBuffer, 0, pageSize); } else { // last page System.arraycopy( input, pageSize * i + capacity - size, newBuffer, 0, (input.length + size) - pageSize * i - capacity); } bufferArrayList.add(newBuffer); } // update length size += input.length; // update capacity capacity += (k <<n); // update } } }
11,974
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
PilotException.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/PilotException.java
/* * Copyright (C) 2002-2010 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This class is the base class of all the exceptions of autopilot. * Creation date: (11/30/03 6:14:43 PM) */ public class PilotException extends NavException { /** * PilotException constructor comment. */ public PilotException() { super(); } /** * PilotException constructor comment. * @param s java.lang.String */ public PilotException(String s) { super(s); } }
1,231
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XMLMemMappedBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/XMLMemMappedBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import java.io.*; import java.nio.*; import java.nio.channels.*; /** * * XMLMemMappedBuffer maps an XML document into memory using memory map. * It avoids the complete loading of the document in memory thus making it * possible to process very large files. But the trade off is potentially * lower performance due to disk IO. */ public class XMLMemMappedBuffer implements IByteBuffer { MappedByteBuffer input[]; FileChannel fc; RandomAccessFile raf; String fn; long length; public XMLMemMappedBuffer(){ } public long length(){ return length; } public byte byteAt(long index){ return input[(int)(index>>30)].get((int)(index & 0x3fffffff)); } public void readFile(String fileName) throws java.io.IOException, ParseExceptionHuge { File f = new File(fileName); fn = fileName; long l = f.length(); length = l; if (l>= (1L<< 38)){ throw new ParseExceptionHuge("document too big > 256 Gbyte"); } raf = new RandomAccessFile(fileName, "r"); fc = raf.getChannel(); int pageNumber = (int)(l>>30)+(((l & 0x3fffffffL)==0)?0:1); input = new MappedByteBuffer[pageNumber]; long l2 =0; for (int i=0;i<pageNumber;i++){ if (i < (pageNumber-1)){ //bufferArray[i] = new byte[1<<30]; input[i]= fc.map(FileChannel.MapMode.READ_ONLY, l2 ,1<<30); l2 = l2+(1<<30); } else{ //bufferArray[i] = new byte[(int)l]; input[i]= fc.map(FileChannel.MapMode.READ_ONLY, l2, l - ((long)i<<30)); } //input[i] = new RandomAccessFile(fileName, "r").getChannel() //.map(FileChannel.MapMode.READ_ONLY, 0,(1<<32)-1); } //if (fc!=null) //fc.close(); //if (raf!=null) //raf.close(); } /** * NOt implemented yet */ public byte[] getBytes(){ return null; } /** * not implemented yet */ public byte[] getBytes(int offset, int len){ return (byte[]) null; } /** * write the segment (denoted by its offset and length) into an output file stream */ public void writeToFileOutputStream(java.io.FileOutputStream ost, long os, long len) throws java.io.IOException{ FileChannel ostChannel = ost.getChannel(); fc.transferTo(os, len, ostChannel); } }
3,428
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ElementFragmentNsHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/ElementFragmentNsHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import java.io.*; import com.ximpleware.extended.FastIntBuffer; //import com.ximpleware.extended.TranscodeException; import com.ximpleware.extended.VTDNavHuge; //import com.ximpleware.extended.transcode.Transcoder; public class ElementFragmentNsHuge { VTDNavHuge vn; long[] l; FastIntBuffer fib; long stLen; // length of starting tag int UTF_8_Size; int ASCII_Size; int ISO_8859_1_Size; int UTF_16_BE_Size; int UTF_16_LE_Size; static byte[] ws; // a few byte patterns for white space and '=' static{ ws = new byte[5]; ws[0]=0; ws[1]=(byte)' '; ws[2]=0; ws[3]='='; ws[4]=0; } /** * * @param vn1 * @param l1 * @param fib1 * @param len */ protected ElementFragmentNsHuge(VTDNavHuge vn1, long l1[], FastIntBuffer fib1, long len){ UTF_8_Size = -1; ASCII_Size = -1; ISO_8859_1_Size = -1; UTF_16_BE_Size = -1; UTF_16_LE_Size = -1; vn = vn1; l = l1; fib = fib1; stLen = len; } /** * Transcode the ElementFragmentNS object to a byte array according to the * destination encoding format * @param encoding * @return * */ /* public final byte[] toBytes(int dest_encoding) throws TranscodeException{ if (dest_encoding == vn.encoding){ return toBytes(); } // find out how long the output bytes are byte[] ba = new byte[getSize(dest_encoding)]; int os = (int)l; int len = (int)(l>>32); int os1 = 0; byte[] xml = vn.getXML().getBytes(); if (stLen==0){ Transcoder.transcodeAndFill(xml,ba,os,len,vn.encoding,dest_encoding); return ba; } int enc = vn.getEncoding(); int temp = 0; int outPosition = 0; // transcode and fill the bytes switch (enc) { case VTDNav.FORMAT_UTF_16BE: case VTDNav.FORMAT_UTF_16LE: temp = (stLen + 1) << 1; break; default: temp = stLen + 1; } // transcode starting length outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, os, temp, vn.encoding, dest_encoding); //System.arraycopy(xml, os, ba, 0, temp); //namespace compensation os1 += temp; int tos = 0, tlen = 0; for (int i = 0; i < fib.size(); i++) { //System.out.println("i ==>"+fib.intAt(i)); switch (enc) { case VTDNav.FORMAT_UTF_16BE: //write a 0 and ws //System.arraycopy(ws, 0, ba, os1, 2); outPosition = Transcoder.transcodeAndFill2(outPosition, ws,ba,0,2, vn.encoding, dest_encoding); os1 += 2; tos = vn.getTokenOffset(fib.intAt(i)) << 1; tlen = (vn.getTokenLength(fib.intAt(i)) & 0xffff) << 1; //System.arraycopy(xml, tos, ba, os1, tlen); outPosition = Transcoder.transcodeAndFill2(outPosition, xml,ba,tos,tlen, vn.encoding, dest_encoding); os1 += tlen; // write a 0 and = //System.arraycopy(ws, 2, ba, os1, 2); outPosition = Transcoder.transcodeAndFill2(outPosition, ws,ba,2,2, vn.encoding, dest_encoding); os1 += 2; tos = (vn.getTokenOffset(fib.intAt(i) + 1) - 1) << 1; tlen = ((vn.getTokenLength(fib.intAt(i) + 1) & 0xffff) + 2) << 1; //System.arraycopy(xml, tos, ba, os1, tlen); outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, tos, tlen, vn.encoding, dest_encoding); os1 += tlen; break; case VTDNav.FORMAT_UTF_16LE: // write a ws and 0 //System.arraycopy(ws, 1, ba, os1, 2); outPosition = Transcoder.transcodeAndFill2(outPosition, ws, ba, 1, 2, vn.encoding, dest_encoding); os1 += 2; tos = vn.getTokenOffset(fib.intAt(i)) << 1; tlen = (vn.getTokenLength(fib.intAt(i)) & 0xffff) << 1; //System.arraycopy(xml, tos, ba, os1, tlen); outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, tos, tlen, vn.encoding, dest_encoding); os1 += tlen; // write a = and 0 //System.arraycopy(ws, 3, ba, os1, 2); outPosition = Transcoder.transcodeAndFill2(outPosition, ws,ba,3,2, vn.encoding, dest_encoding); os1 += 2; tos = (vn.getTokenOffset(fib.intAt(i) + 1) - 1) << 1; tlen = ((vn.getTokenLength(fib.intAt(i) + 1) & 0xffff) + 2) << 1; // System.arraycopy(xml, tos, ba, os1, tlen); outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, tos, tlen, vn.encoding, dest_encoding); os1 += tlen; break; default: // write a ws //System.arraycopy(ws, 1, ba, os1, 1); outPosition = Transcoder.transcodeAndFill2(outPosition, ws,ba,1,1, vn.encoding, dest_encoding); os1++; tos = vn.getTokenOffset(fib.intAt(i)); tlen = (vn.getTokenLength(fib.intAt(i)) & 0xffff); //System.arraycopy(xml, tos, ba, os1, tlen); outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, tos, tlen, vn.encoding, dest_encoding); os1 += tlen; // write a = //System.arraycopy(ws, 3, ba, os1, 1); outPosition = Transcoder.transcodeAndFill2(outPosition, ws,ba,3,1, vn.encoding, dest_encoding); os1++; tos = vn.getTokenOffset(fib.intAt(i) + 1) - 1; tlen = (vn.getTokenLength(fib.intAt(i) + 1) & 0xffff) + 2; //System.arraycopy(xml, tos, ba, os1, tlen); outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, tos, tlen, vn.encoding, dest_encoding); os1 += tlen; } } //System.out.println(new String(ba)); switch (enc) { case VTDNav.FORMAT_UTF_16BE: case VTDNav.FORMAT_UTF_16LE: temp = (stLen + 1) << 1; break; default: temp = stLen + 1; } //System.arraycopy(xml, os + temp, ba, os1, len - temp); outPosition = Transcoder.transcodeAndFill2(outPosition, xml, ba, os + temp, len - temp, vn.encoding, dest_encoding); //System.out.println(new String(ba)); return ba; }*/ /** * getSize gets the byte length of ns compensated fragment in its source * encoding format * @return the byte length of ns compensated fragment in its source encoding format * */ public final long getSize(){ //int encoding = vn.encoding; long len = l[1]; if (stLen != 0) for (int i = 0; i < fib.size(); i++) { int k = fib.intAt(i); if (vn.encoding < VTDNavHuge.FORMAT_UTF_16BE ){ len += (vn.getTokenLength(k) & 0xffff) + vn.getTokenLength(k + 1) + 4; }else{ len += ((vn.getTokenLength(k) & 0xffff) + vn.getTokenLength(k + 1) + 4)<<1; } } return len; } /** * This method returns the size of the transcoded byte representation of * the ns compensated element fragment * @param dest_encoding * @return * @throws TranscodeException * */ /*public final int getSize(int dest_encoding) throws TranscodeException{ //int len = (int) (l >> 32); //if (stLen != 0) // for (int i = 0; i < fib.size(); i++) { // int k = fib.intAt(i); // len += (vn.getTokenLength(k) & 0xffff) // + vn.getTokenLength(k + 1) + 4; // } if (vn.encoding == dest_encoding) return getSize(); //int src_encoding= vn.encoding; byte[] ba = vn.getXML().getBytes(); int len = Transcoder.getOutLength(ba, (int)l, (int)(l>>32), vn.encoding, dest_encoding ); if (stLen != 0) for (int i = 0; i < fib.size(); i++) { int k = fib.intAt(i); if (vn.encoding < VTDNav.FORMAT_UTF_16BE ){ len += Transcoder.getOutLength(ba, vn.getTokenOffset(k), (vn.getTokenLength(k) & 0xffff), vn.encoding, dest_encoding) + Transcoder.getOutLength(ba, vn.getTokenOffset(k+1), vn.getTokenLength(k + 1), vn.encoding, dest_encoding) + ((dest_encoding<VTDNav.FORMAT_UTF_16BE)?4:8); }else { len += Transcoder.getOutLength(ba, vn.getTokenOffset(k)<<1, (vn.getTokenLength(k) & 0xffff)<<1, vn.encoding, dest_encoding) + Transcoder.getOutLength(ba, vn.getTokenOffset(k+1)<<1, vn.getTokenLength(k + 1)<<1, vn.encoding, dest_encoding) + ((dest_encoding<VTDNav.FORMAT_UTF_16BE)?4:8); } } return len; }*/ /** * Write ns compensated fragments (bytes in original encoding format) to outputstream * @param ost * @throws IOException * */ public final void writeToFileOutputStream(FileOutputStream ost) throws IOException{ long os = l[0]; long len = l[1]; //int os1 = 0; IByteBuffer xml = vn.getXML(); if (stLen==0){ //System.arraycopy(xml,os,ba,0,len); //ost.write(xml,os,len); xml.writeToFileOutputStream(ost, os, len); return; //return ba; } int enc = vn.getEncoding(); long temp = 0; switch(enc){ case VTDNavHuge.FORMAT_UTF_16BE: case VTDNavHuge.FORMAT_UTF_16LE: temp= (stLen+1)<<1; break; default: temp = stLen+1; } //ost.write(xml,os,temp); xml.writeToFileOutputStream(ost, os, temp); //System.arraycopy(xml,os,ba,0,temp); //namespace compensation //os1 += temp; long tos =0,tlen=0; for (int i = 0; i < fib.size(); i++) { //System.out.println("i ==>"+fib.intAt(i)); switch (enc) { case VTDNavHuge.FORMAT_UTF_16BE: //write a 0 and ws //System.arraycopy(ws,0,ba,os1,2); ost.write(ws,0,2); //os1 += 2; tos = vn.getTokenOffset(fib.intAt(i))<<1; tlen= (vn.getTokenLength(fib.intAt(i)) & 0xffff)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); xml.writeToFileOutputStream(ost, tos, tlen); //os1 +=tlen; // write a 0 and = //System.arraycopy(ws,2,ba,os1,2); ost.write(ws,2,2); //os1 += 2; tos = (vn.getTokenOffset(fib.intAt(i)+1)-1)<<1; tlen= ((vn.getTokenLength(fib.intAt(i)+1) & 0xffff)+2)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); xml.writeToFileOutputStream(ost, tos, tlen); //os1 +=tlen; break; case VTDNavHuge.FORMAT_UTF_16LE: // write a ws and 0 //System.arraycopy(ws,1,ba,os1,2); ost.write(ws,1,2); //os1 += 2; tos = vn.getTokenOffset(fib.intAt(i))<<1; tlen= (vn.getTokenLength(fib.intAt(i)) & 0xffff)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); xml.writeToFileOutputStream(ost, tos, tlen); //os1 +=tlen; // write a = and 0 //System.arraycopy(ws,3,ba,os1,2); ost.write(ws,3,2); //os1 += 2; tos = (vn.getTokenOffset(fib.intAt(i)+1)-1)<<1; tlen= ((vn.getTokenLength(fib.intAt(i)+1) & 0xffff)+2)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); xml.writeToFileOutputStream(ost, tos, tlen); //os1 +=tlen; break; default: // write a ws //System.arraycopy(ws, 1, ba, os1, 1); ost.write(ws,1,1); //os1 ++; tos = vn.getTokenOffset(fib.intAt(i)); tlen = (vn.getTokenLength(fib.intAt(i)) & 0xffff); //System.arraycopy(xml, tos, ba, os1, tlen); //ost.write(xml,tos,tlen); xml.writeToFileOutputStream(ost, tos, tlen); //os1 +=tlen; // write a = //System.arraycopy(ws, 3, ba, os1, 1); ost.write(ws,3,1); //os1 ++; tos = vn.getTokenOffset(fib.intAt(i) + 1) - 1 ; tlen = (vn.getTokenLength(fib.intAt(i) + 1) & 0xffff) + 2; //System.arraycopy(xml, tos, ba, os1, tlen); //ost.write(xml,tos,tlen); xml.writeToFileOutputStream(ost, tos, tlen); //os1 +=tlen; } } //System.out.println(new String(ba)); switch(enc){ case VTDNavHuge.FORMAT_UTF_16BE: case VTDNavHuge.FORMAT_UTF_16LE: temp= (stLen+1)<<1; break; default: temp = stLen+1; } //System.arraycopy(xml, os + temp, ba, os1, len - temp); //ost.write(xml,os+temp,len-temp); xml.writeToFileOutputStream(ost,os+temp,len-temp); } /** * Write the transcode byte representation of an ns-compensated * element fragment to the output stream * @param ost * @param dest_encoding * @throws IOException * @throws TranscodeException * */ /* public final void writeToOutputStream(OutputStream ost,int dest_encoding) throws IOException, TranscodeException{ if (vn.encoding == dest_encoding){ writeToOutputStream(ost); return; } int os = (int)l; int len = (int)(l>>32); //int os1 = 0; byte[] xml = vn.getXML().getBytes(); if (stLen==0){ //System.arraycopy(xml,os,ba,0,len); //ost.write(xml,os,len); Transcoder.transcodeAndWrite(xml,ost, os,len, vn.encoding, dest_encoding ); return; //return ba; } int enc = vn.getEncoding(); int temp = 0; switch(enc){ case VTDNav.FORMAT_UTF_16BE: case VTDNav.FORMAT_UTF_16LE: temp= (stLen+1)<<1; break; default: temp = stLen+1; } //ost.write(xml,os,temp); Transcoder.transcodeAndWrite(xml,ost, os, temp, enc,dest_encoding ); //System.arraycopy(xml,os,ba,0,temp); //namespace compensation //os1 += temp; int tos =0,tlen=0; for (int i = 0; i < fib.size(); i++) { //System.out.println("i ==>"+fib.intAt(i)); switch (enc) { case VTDNav.FORMAT_UTF_16BE: //write a 0 and ws //System.arraycopy(ws,0,ba,os1,2); //ost.write(ws,0,2); Transcoder.transcodeAndWrite(ws,ost,0,2, enc,dest_encoding ); //os1 += 2; tos = vn.getTokenOffset(fib.intAt(i))<<1; tlen= (vn.getTokenLength(fib.intAt(i)) & 0xffff)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); Transcoder.transcodeAndWrite(xml,ost,tos,tlen, enc,dest_encoding ); //os1 +=tlen; // write a 0 and = //System.arraycopy(ws,2,ba,os1,2); //ost.write(ws,2,2); Transcoder.transcodeAndWrite(ws,ost,2,2, enc,dest_encoding ); //os1 += 2; tos = (vn.getTokenOffset(fib.intAt(i)+1)-1)<<1; tlen= ((vn.getTokenLength(fib.intAt(i)+1) & 0xffff)+2)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); Transcoder.transcodeAndWrite(xml,ost,tos,tlen, enc,dest_encoding ); //os1 +=tlen; break; case VTDNav.FORMAT_UTF_16LE: // write a ws and 0 //System.arraycopy(ws,1,ba,os1,2); //ost.write(ws,1,2); Transcoder.transcodeAndWrite(ws,ost,1,2, enc,dest_encoding ); //os1 += 2; tos = vn.getTokenOffset(fib.intAt(i))<<1; tlen= (vn.getTokenLength(fib.intAt(i)) & 0xffff)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); Transcoder.transcodeAndWrite(xml,ost,tos,tlen, enc,dest_encoding ); //os1 +=tlen; // write a = and 0 //System.arraycopy(ws,3,ba,os1,2); //ost.write(ws,3,2); Transcoder.transcodeAndWrite(ws,ost,3,2, enc,dest_encoding ); //os1 += 2; tos = (vn.getTokenOffset(fib.intAt(i)+1)-1)<<1; tlen= ((vn.getTokenLength(fib.intAt(i)+1) & 0xffff)+2)<<1; //System.arraycopy(xml,tos,ba,os1,tlen); //ost.write(xml,tos,tlen); Transcoder.transcodeAndWrite(xml,ost,tos,tlen, enc,dest_encoding ); //os1 +=tlen; break; default: // write a ws //System.arraycopy(ws, 1, ba, os1, 1); //ost.write(ws,1,1); Transcoder.transcodeAndWrite(ws,ost,1,1,enc, dest_encoding); //os1 ++; tos = vn.getTokenOffset(fib.intAt(i)); tlen = (vn.getTokenLength(fib.intAt(i)) & 0xffff); //System.arraycopy(xml, tos, ba, os1, tlen); //ost.write(xml,tos,tlen); Transcoder.transcodeAndWrite(xml,ost,tos,tlen, enc,dest_encoding ); //os1 +=tlen; // write a = //System.arraycopy(ws, 3, ba, os1, 1); //ost.write(ws,3,1); Transcoder.transcodeAndWrite(ws,ost,3,1, enc,dest_encoding ); //os1 ++; tos = vn.getTokenOffset(fib.intAt(i) + 1) - 1 ; tlen = (vn.getTokenLength(fib.intAt(i) + 1) & 0xffff) + 2; //System.arraycopy(xml, tos, ba, os1, tlen); //ost.write(xml,tos,tlen); Transcoder.transcodeAndWrite(xml,ost,tos,tlen, enc,dest_encoding ); //os1 +=tlen; } } //System.out.println(new String(ba)); switch(enc){ case VTDNav.FORMAT_UTF_16BE: case VTDNav.FORMAT_UTF_16LE: temp= (stLen+1)<<1; break; default: temp = stLen+1; } //System.arraycopy(xml, os + temp, ba, os1, len - temp); //ost.write(xml,os+temp,len-temp); Transcoder.transcodeAndWrite(xml,ost,os+temp,len-temp, enc,dest_encoding ); }*/ /** * Get the long encoding the len and offset of uncompensated element fragment * @return * */ public final long[] getOffsetLen(){ return l; } }
21,443
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
FilterExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/FilterExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import com.ximpleware.extended.xpath.Expr; import com.ximpleware.extended.xpath.Predicate; /** * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class FilterExpr extends Expr { public Expr e; public Predicate p; //FastIntBuffer fib; //int stackSize; boolean first_time; //public int position; public FilterExpr(Expr l, Predicate pr){ e = l; p = pr; //stackSize = 0; //position = 1; //fib = new FastIntBuffer(8); first_time = true; } /*public int getPositon(){ return fib.size(); }*/ public boolean evalBoolean(VTDNavHuge vn) { //if (e.isBoolean()) // return e.evalBoolean(vn); boolean a = false; vn.push2(); //record stack size int size = vn.contextStack2.size; try{ a = (evalNodeSet(vn) != -1); }catch (Exception e){ } //rewind stack vn.contextStack2.size = size; reset(vn); vn.pop2(); return a; } public double evalNumber(VTDNavHuge vn) { // if (e.isNumerical()) // return e.evalNumber(vn); // double d; int a = -1; vn.push2(); int size = vn.contextStack2.size; try { a =evalNodeSet(vn); if (a!=-1){ if (vn.getTokenType(a)== VTDNavHuge.TOKEN_ATTR_NAME){ a ++; }else if (vn.getTokenType(a)== VTDNavHuge.TOKEN_STARTING_TAG) { a = vn.getText(); } } } catch (Exception e){ } vn.contextStack2.size = size; reset(vn); vn.pop2(); try{ if (a!=-1) return vn.parseDouble(a); }catch (NavExceptionHuge e){ } return Double.NaN; } public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge { // if tne predicate require context size // needs to precompute the context size // vn.push2(); // computerContext(); // set contxt(); // vn.pop2() // if the context size is zero // get immediately set teh state to end // or backward if (first_time && p.requireContextSize()){ first_time = false; int i = 0; //vn.push2(); e.adjust(vn.getTokenCount()); while(e.evalNodeSet(vn)!=-1) i++; //vn.pop2(); p.setContextSize(i); reset2(vn); } int a = e.evalNodeSet(vn); while (a!=-1){ if (p.eval(vn)==true){ //p.reset(); return a; }else { //p.reset(); a = e.evalNodeSet(vn); } } return -1; } public String evalString(VTDNavHuge vn) { //if (e.isString()) // return e.evalString(vn); vn.push2(); int size = vn.contextStack2.size; int a = -1; try { a = evalNodeSet(vn); if (a != -1) { if (vn.getTokenType(a) == VTDNavHuge.TOKEN_ATTR_NAME) { a++; } if (vn.getTokenType(a) == VTDNavHuge.TOKEN_STARTING_TAG) { a = vn.getText(); } } } catch (Exception e) { } vn.contextStack2.size = size; reset(vn); vn.pop2(); try { if (a != -1) return vn.toString(a); } catch (NavExceptionHuge e) { } return ""; } public void reset(VTDNavHuge vn) { reset2(vn); //vn.contextStack2.size = stackSize; //position = 1; first_time = true; } public void reset2(VTDNavHuge vn){ e.reset(vn); p.reset(vn); //fib.clear(); } public String toString() { return "("+e+") "+p; } public boolean isNumerical() { return false; } public boolean isNodeSet() { return true; } /*public boolean isUnique(int i){ int size = fib.size(); for (int j=0; j<size;j++){ if (i == fib.intAt(j)) return false; } fib.append(i); return true; }*/ public boolean isString(){ return false; } public boolean isBoolean(){ return false; } // to support computer context size // needs to add public boolean requireContextSize(){ return false; } public void setContextSize(int size){ } public void setPosition(int pos){ } public int adjust(int n){ return e.adjust(n); //p.adjust(n); } }
5,221
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NavExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/NavExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This exception is for any exception conditions during navigation phase. * It is adapted to support extended VTD (256 max file size) */ public class NavExceptionHuge extends VTDExceptionHuge { /** * NavException constructor comment. */ public NavExceptionHuge() { super(); } /** * NavException constructor comment. * @param s java.lang.String */ public NavExceptionHuge(String s) { super(s); } }
1,266
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NodeRecorderHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/NodeRecorderHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * * NodeRecorderHuge allows one to record the node position of VTDNavHuge. However, the * internal representation of node is variable in length and recording a large * number of nodes could consume much memory. It is a <em>bad</em> idea to * record every node of an document. So be careful when using it. */ public class NodeRecorderHuge { protected VTDNavHuge vn; protected FastIntBuffer fib; public final static int BUF_SZ_EXPO = 7;// buffer page size is now 128 int size; // in # of nodes int position; // in # of nodes int count; // in # of ints /** * The parameter-less constructor * */ public NodeRecorderHuge() { vn = null; size = position = 0; fib = new FastIntBuffer(BUF_SZ_EXPO); } /** * * @param vn1 */ public NodeRecorderHuge(VTDNavHuge vn1) { bind(vn1); size = position = count = 0; fib = new FastIntBuffer(BUF_SZ_EXPO); } public void bind(VTDNavHuge vn1) { if (vn1 == null) throw new IllegalArgumentException( "NodeRecorder can't take a null VTDNav instatnce"); vn = vn1; } /** * This function records the position of VN into an internal buffer * */ public void record() { //add the context and int i; switch (vn.context[0]) { case -1: fib.append(0xff | 0x80000000); size++; position++; count++; break; case 0: if (vn.atTerminal == false) { fib.append(0); count++; } else { fib.append(0x80000000); count += 2; } size++; position++; if (vn.atTerminal == true) fib.append(vn.LN); break; case 1: if (vn.atTerminal == false) { fib.append(1); fib.append(vn.context[1]); fib.append(vn.l1index); size++; position++; count += 3; } else { fib.append(0x80000001); fib.append(vn.context[1]); fib.append(vn.l1index); fib.append(vn.LN); size++; position++; count += 4; } break; case 2: if (vn.atTerminal == false) { fib.append(2); count += 7; } else { fib.append(0x80000002); count += 8; } fib.append(vn.context[1]); fib.append(vn.context[2]); fib.append(vn.l1index); fib.append(vn.l2lower); fib.append(vn.l2upper); fib.append(vn.l2index); size++; position++; if (vn.atTerminal == true) fib.append(vn.LN); break; case 3: if (vn.atTerminal == false) { fib.append(3); count += 11; } else { fib.append(0x80000003); count += 12; } fib.append(vn.context[1]); fib.append(vn.context[2]); fib.append(vn.context[3]); fib.append(vn.l1index); fib.append(vn.l2lower); fib.append(vn.l2upper); fib.append(vn.l2index); fib.append(vn.l3lower); fib.append(vn.l3upper); fib.append(vn.l3index); size++; position++; if (vn.atTerminal == true) fib.append(vn.LN); break; default: if (vn.atTerminal == false) { i = vn.context[0]; fib.append(i); count += i + 8; } else { i = vn.context[0]; fib.append(i | 0x80000000); count += i + 9; } for (int k = 1; k <= i; k++) { fib.append(vn.context[k]); } fib.append(vn.l1index); fib.append(vn.l2lower); fib.append(vn.l2upper); fib.append(vn.l2index); fib.append(vn.l3lower); fib.append(vn.l3upper); fib.append(vn.l3index); size++; position++; if (vn.atTerminal) fib.append(vn.LN); } } /** * resetPointer() will set the pointer to the first node in NodeRecorder * This method is called when one wants to read the nodes in the nodeRecorder * */ public void resetPointer() { position = 0; count=0; } /** * Clear will erase all the nodes, internal buffers are reused * */ public void clear() { size = position = count = 0; fib.clear(); } /** * This method set the cursor in VTDNav to the nodes as recorded * in NodeRecorder, and return the output of "getCurrentIndex()" * It is important to notice that you can only go forward, not * backward * @return int * */ public int iterate() { int j,i ; if (count<fib.size()) { i = fib.intAt(count); boolean b = (i >= 0); if (b == false) { i = i & 0x7fffffff; } switch (i) { case 0xff: vn.context[0]=-1; vn.atTerminal=false; count++; break; case 0: vn.context[0]=0; if (b==false){ vn.atTerminal = true; vn.LN = fib.intAt(count+1); count+=2; }else{ vn.atTerminal = false; count++; } break; case 1: vn.context[0]=1; vn.context[1]=fib.intAt(count+1); vn.l1index = fib.intAt(count+2); if (b==false){ vn.atTerminal = true; vn.LN = fib.intAt(count+3); count+=4; }else{ vn.atTerminal = false; count+=3; } break; case 2: vn.context[0]=2; vn.context[1]=fib.intAt(count+1); vn.context[2]=fib.intAt(count+2); vn.l1index = fib.intAt(count+3); vn.l2lower = fib.intAt(count+4); vn.l2upper = fib.intAt(count+5); vn.l2index = fib.intAt(count+6); if (b==false){ vn.atTerminal = true; vn.LN = fib.intAt(count+7); count+=8; }else{ vn.atTerminal = false; count+=7; } break; case 3: vn.context[0]=3; vn.context[1]=fib.intAt(count+1); vn.context[2]=fib.intAt(count+2); vn.context[3]=fib.intAt(count+3); vn.l1index = fib.intAt(count+4); vn.l2lower = fib.intAt(count+5); vn.l2upper = fib.intAt(count+6); vn.l2index = fib.intAt(count+7); vn.l3lower = fib.intAt(count+8); vn.l3upper = fib.intAt(count+9); vn.l3index = fib.intAt(count+10); if (b==false){ vn.atTerminal = true; vn.LN = fib.intAt(count+11); count+=12; }else{ vn.atTerminal = false; count+=11; } break; default: vn.context[0]=i; for(j=1;j<i;j++){ vn.context[j]=fib.intAt(count+j); } vn.l1index = fib.intAt(count+i); vn.l2lower = fib.intAt(count+i+1); vn.l2upper = fib.intAt(count+i+2); vn.l2index = fib.intAt(count+i+3); vn.l3lower = fib.intAt(count+i+4); vn.l3upper = fib.intAt(count+i+5); vn.l3index = fib.intAt(count+i+6); if (b==false){ vn.atTerminal = true; vn.LN = fib.intAt(count+11); count+=i+8; }else{ vn.atTerminal = false; count+=i+7; } break; } position++; return vn.getCurrentIndex(); } return -1; } }
10,128
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
FastIntBuffer.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/FastIntBuffer.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; import java.lang.IndexOutOfBoundsException; import java.lang.NullPointerException; import java.lang.IllegalArgumentException; import java.util.ArrayList; /** * A fast, unsynchronized, chunk-based int buffer * identical with com.ximpleware.FastIntBuffer * */ public class FastIntBuffer implements IIntBuffer { /* bufferArrayList is a resizable array list of int buffers * */ private ArrayList bufferArrayList; /** * Total capacity of the IntBuffer */ private int capacity; /** * Page size of the incremental growth of the Int Buffer */ private int pageSize; /** * Total number of integers in the IntBuffer */ private int size; private int exp; private int r; /** * FastIntBuffer constructor comment. */ public FastIntBuffer() { size = 0; capacity = 0; pageSize = 1024; exp = 10; r = 1023; bufferArrayList = new ArrayList(); } /** * Constructor with adjustable buffer page size of the value bfz * @param e int is the size of the internal buffer */ public FastIntBuffer(int e) { if (e < 0) { throw new IllegalArgumentException(); } capacity = size = 0; pageSize = 1<<e; exp = e; r = pageSize -1; bufferArrayList = new ArrayList(); } /** * Append an int array to the end of this buffer instance * @param int_array int[] */ public void append(int[] int_array) { if (int_array == null) { throw new NullPointerException(); } // no additional buffer space needed int lastBufferIndex; int[] lastBuffer; if (bufferArrayList.size() == 0) { lastBuffer = new int[pageSize]; bufferArrayList.add(lastBuffer); lastBufferIndex = 0; capacity = pageSize; } else { lastBufferIndex = Math.min((size>>exp),//+(((size&r)==0)? 0:1), bufferArrayList.size() - 1); lastBuffer = (int[]) bufferArrayList.get(lastBufferIndex); } if ((this.size + int_array.length) < this.capacity) { //get the last buffer from the bufferListArray //obtain the starting offset in that buffer to which the data is to be copied //update length //System.arraycopy(input, 0, lastBuffer, size % pageSize, input.length); if (this.size + int_array.length< ((lastBufferIndex+1)<<exp)){ System.arraycopy(int_array, 0, lastBuffer, size & r, int_array.length); } else { int offset = pageSize -(size&r); // copy the first part System.arraycopy(int_array, 0, lastBuffer, size & r, offset); // copy the middle part int l = int_array.length - offset; int k = (l)>> exp; int z; for (z=1;z<=k;z++){ System.arraycopy(int_array,offset, (int[]) bufferArrayList.get(lastBufferIndex+z), 0, pageSize); offset += pageSize; } // copy the last part System.arraycopy(int_array, offset, (int[]) bufferArrayList.get(lastBufferIndex+z), 0, l & r); } size += int_array.length; return; } else // new buffers needed { // compute the number of additional buffers needed // int n = // ((int) ((int_array.length + size) / pageSize)) // + (((int_array.length + size) % pageSize) > 0 ? 1 : 0) // - (int) (capacity / pageSize); int n = ((int_array.length + size) >> exp) + (((int_array.length + size) &r) > 0 ? 1 : 0) - (capacity >> exp); // create these buffers // add to bufferArrayList //System.arraycopy(int_array, 0, lastBuffer, size % pageSize, capacity - size); System.arraycopy(int_array, 0, lastBuffer, size& r, capacity - size); for (int i = 0; i < n; i++) { int[] newBuffer = new int[pageSize]; if (i < n - 1) { // full copy System.arraycopy( int_array, pageSize * i + capacity - size, newBuffer, 0, pageSize); } else { // last page System.arraycopy( int_array, pageSize * i + capacity - size, newBuffer, 0, int_array.length + this.size - capacity - pageSize*i); } bufferArrayList.add(newBuffer); } // update length size += int_array.length; // update capacity capacity += n * pageSize; // update } } /** * Append a single int to the end of this buffer Instance * @param i int */ public void append(int i) { int[] lastBuffer; int lastBufferIndex; if (bufferArrayList.size() == 0) { lastBuffer = new int[pageSize]; bufferArrayList.add(lastBuffer); capacity = pageSize; } else { lastBufferIndex = Math.min((size>>exp),//+(((size&r)==0)? 0:1), bufferArrayList.size() - 1); lastBuffer = (int[]) bufferArrayList.get(lastBufferIndex); //lastBuffer = (int[]) bufferArrayList.get(bufferArrayList.size() - 1); } if ((this.size + 1) <= this.capacity) { //get the last buffer from the bufferListArray //obtain the starting offset in that buffer to which the data is to be copied //update length //System.arraycopy(long_array, 0, lastBuffer, size % pageSize, long_array.length); lastBuffer[size & r] = i; // lastBuffer[size % pageSize] = i; size += 1; } else // new buffers needed { int[] newBuffer = new int[pageSize]; size++; capacity += pageSize; bufferArrayList.add(newBuffer); newBuffer[0] = i; } } /** * Returns the total allocated capacity of this buffer instance. * @return int */ public int getCapacity() { return capacity; } /** * Returns a single int array representing every int in this buffer instance * @return int[] (null if there isn't anything left in the buffer * @param startingOffset int * @param len int * @return int[] */ public int[] getIntArray(int startingOffset, int len) { if (size <= 0 || startingOffset < 0) { throw (new IllegalArgumentException()); } if ((startingOffset + len) > size()) { throw (new IndexOutOfBoundsException()); } int[] result = new int[len]; // allocate result array // int first_index = (int) (startingOffset / pageSize); // int last_index = (int) ((startingOffset + len) / pageSize); // if ((startingOffset + len) % pageSize == 0) { // last_index--; // } int first_index = startingOffset >> exp; int last_index = (startingOffset + len)>> exp; if (((startingOffset + len) & r) == 0) { last_index--; } if (first_index == last_index) { // to see if there is a need to go across buffer boundry System.arraycopy( (int[]) (bufferArrayList.get(first_index)), // startingOffset % pageSize, startingOffset & r, result, 0, len); } else { int int_array_offset = 0; for (int i = first_index; i <= last_index; i++) { int[] currentChunk = (int[]) bufferArrayList.get(i); if (i == first_index) // first section { System.arraycopy( currentChunk, // startingOffset % pageSize, startingOffset & r, result, 0, // pageSize - (startingOffset % pageSize)); pageSize - (startingOffset & r)); // int_array_offset += pageSize - (startingOffset) % pageSize; int_array_offset += pageSize - (startingOffset & r); } else if (i == last_index) // last sections { System.arraycopy( currentChunk, 0, result, int_array_offset, len - int_array_offset); } else { System.arraycopy(currentChunk, 0, result, int_array_offset, pageSize); int_array_offset += pageSize; } } } return result; } /** * Returns the page size of this buffer instance. * Creation date: (7/17/03 6:38:02 PM) * @return int */ public int getPageSize() { return pageSize; } /** * Get the int at the location specified by index. * @return int * @param index int */ public int intAt(int index) { if (index < 0 || index > size()-1) { throw new IndexOutOfBoundsException(); } // int pageNum = (int) index / pageSize; int pageNum = index>>exp; //System.out.println("page Number is "+pageNum); // int offset = index % pageSize; int offset = index & r; return ((int[]) bufferArrayList.get(pageNum))[offset]; } /** * Assigns a new int value to location index of the buffer instance. * @param index int * @param newValue int */ public void modifyEntry(int index, int newValue) { if (index < 0 || index > size - 1) { throw new IndexOutOfBoundsException(); } // ((int[]) bufferArrayList.get((int) (index / pageSize)))[index % pageSize] = ((int[]) bufferArrayList.get((index >> exp)))[index & r] = newValue; } /** * Returns the total number of int values in the buffer instance * @return int */ public int size() { return size; } /** * * @param newSz * @return status of resize * */ public boolean resize(int newSz){ if (newSz <= capacity && newSz >=0){ size = newSz; return true; } else return false; } /** * Returns the int array corresponding to all int values in this buffer instance * @return int[] (null if the buffer is empty) */ public int[] toIntArray() { if (size > 0) { int s = size; int[] resultArray = new int[size]; //copy all the content int into the resultArray int array_offset = 0; for (int i = 0; s>0; i++) { System.arraycopy( (int[]) bufferArrayList.get(i), 0, resultArray, array_offset, (s<pageSize) ? s : pageSize); // (i == (bufferArrayList.size() - 1)) ? size() % pageSize : pageSize); s = s - pageSize; array_offset += pageSize; } return resultArray; } return null; } /** * set the size of int buffer to zero, capacity * untouched so int buffer can be reused without * any unnecessary and additional allocation * */ public void clear(){ size = 0; } }
12,228
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
PilotExceptionHuge.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/PilotExceptionHuge.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended; /** * This class is the base class of all the exceptions of AutoPilotHuge. * It is adapted to support extended VTD (256 max file size) */ public class PilotExceptionHuge extends NavExceptionHuge { /** * PilotException constructor comment. */ public PilotExceptionHuge() { super(); } /** * PilotException constructor comment. * @param s java.lang.String */ public PilotExceptionHuge(String s) { super(s); } }
1,273
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_2.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_2.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-3 char * into a Unicode char * */ public class ISO8859_2 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0]= 0x00A0; // NO-BREAK SPACE chars[0xA1]= 0x0104;// LATIN CAPITAL LETTER A WITH OGONEK chars[0xA2]= 0x02D8;// BREVE chars[0xA3]= 0x0141; // LATIN CAPITAL LETTER L WITH STROKE chars[0xA4]= 0x00A4; // CURRENCY SIGN chars[0xA5]= 0x013D; // LATIN CAPITAL LETTER L WITH CARON chars[0xA6]= 0x015A; // LATIN CAPITAL LETTER S WITH ACUTE chars[0xA7]= 0x00A7; // SECTION SIGN chars[0xA8]= 0x00A8; // DIAERESIS chars[0xA9]= 0x0160; // LATIN CAPITAL LETTER S WITH CARON chars[0xAA]= 0x015E; // LATIN CAPITAL LETTER S WITH CEDILLA chars[0xAB]= 0x0164; // LATIN CAPITAL LETTER T WITH CARON chars[0xAC]= 0x0179; // LATIN CAPITAL LETTER Z WITH ACUTE chars[0xAD]= 0x00AD; // SOFT HYPHEN chars[0xAE]= 0x017D; // LATIN CAPITAL LETTER Z WITH CARON chars[0xAF]= 0x017B; // LATIN CAPITAL LETTER Z WITH DOT ABOVE chars[0xB0]= 0x00B0; // DEGREE SIGN chars[0xB1]= 0x0105; // LATIN SMALL LETTER A WITH OGONEK chars[0xB2]= 0x02DB; // OGONEK chars[0xB3]= 0x0142; // LATIN SMALL LETTER L WITH STROKE chars[0xB4]= 0x00B4; // ACUTE ACCENT chars[0xB5]= 0x013E; // LATIN SMALL LETTER L WITH CARON chars[0xB6]= 0x015B; // LATIN SMALL LETTER S WITH ACUTE chars[0xB7]= 0x02C7; // CARON chars[0xB8]= 0x00B8; // CEDILLA chars[0xB9]= 0x0161; // LATIN SMALL LETTER S WITH CARON chars[0xBA]= 0x015F; // LATIN SMALL LETTER S WITH CEDILLA chars[0xBB]= 0x0165; // LATIN SMALL LETTER T WITH CARON chars[0xBC]= 0x017A; // LATIN SMALL LETTER Z WITH ACUTE chars[0xBD]= 0x02DD; // DOUBLE ACUTE ACCENT chars[0xBE]= 0x017E; // LATIN SMALL LETTER Z WITH CARON chars[0xBF]= 0x017C; // LATIN SMALL LETTER Z WITH DOT ABOVE chars[0xC0]= 0x0154; // LATIN CAPITAL LETTER R WITH ACUTE chars[0xC1]= 0x00C1; // LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2]= 0x00C2; // LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC3]= 0x0102; // LATIN CAPITAL LETTER A WITH BREVE chars[0xC4]= 0x00C4; // LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5]= 0x0139; // LATIN CAPITAL LETTER L WITH ACUTE chars[0xC6]= 0x0106; // LATIN CAPITAL LETTER C WITH ACUTE chars[0xC7]= 0x00C7; // LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8]= 0x010C; // LATIN CAPITAL LETTER C WITH CARON chars[0xC9]= 0x00C9; // LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA]= 0x0118 ; //LATIN CAPITAL LETTER E WITH OGONEK chars[0xCB]= 0x00CB; // LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC]= 0x011A; // LATIN CAPITAL LETTER E WITH CARON chars[0xCD]= 0x00CD; // LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE]= 0x00CE; // LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF]= 0x010E; // LATIN CAPITAL LETTER D WITH CARON chars[0xD0]= 0x0110; // LATIN CAPITAL LETTER D WITH STROKE chars[0xD1]= 0x0143; // LATIN CAPITAL LETTER N WITH ACUTE chars[0xD2]= 0x0147; // LATIN CAPITAL LETTER N WITH CARON chars[0xD3]= 0x00D3; // LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4]= 0x00D4; // LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5]= 0x0150; // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE chars[0xD6]= 0x00D6; // LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7]= 0x00D7; // MULTIPLICATION SIGN chars[0xD8]= 0x0158; // LATIN CAPITAL LETTER R WITH CARON chars[0xD9]= 0x016E; // LATIN CAPITAL LETTER U WITH RING ABOVE chars[0xDA]= 0x00DA; // LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB]= 0x0170; // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE chars[0xDC]= 0x00DC; // LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD]= 0x00DD; // LATIN CAPITAL LETTER Y WITH ACUTE chars[0xDE]= 0x0162; // LATIN CAPITAL LETTER T WITH CEDILLA chars[0xDF]= 0x00DF; // LATIN SMALL LETTER SHARP S chars[0xE0]= 0x0155; // LATIN SMALL LETTER R WITH ACUTE chars[0xE1]= 0x00E1; // LATIN SMALL LETTER A WITH ACUTE chars[0xE2]= 0x00E2; // LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3]= 0x0103; // LATIN SMALL LETTER A WITH BREVE chars[0xE4]= 0x00E4; // LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5]= 0x013A; // LATIN SMALL LETTER L WITH ACUTE chars[0xE6]= 0x0107; // LATIN SMALL LETTER C WITH ACUTE chars[0xE7]= 0x00E7; // LATIN SMALL LETTER C WITH CEDILLA chars[0xE8]= 0x010D; // LATIN SMALL LETTER C WITH CARON chars[0xE9]= 0x00E9; // LATIN SMALL LETTER E WITH ACUTE chars[0xEA]= 0x0119; // LATIN SMALL LETTER E WITH OGONEK chars[0xEB]= 0x00EB; // LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC]= 0x011B; // LATIN SMALL LETTER E WITH CARON chars[0xED]= 0x00ED; // LATIN SMALL LETTER I WITH ACUTE chars[0xEE]= 0x00EE; // LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF]= 0x010F; // LATIN SMALL LETTER D WITH CARON chars[0xF0]= 0x0111; // LATIN SMALL LETTER D WITH STROKE chars[0xF1]= 0x0144; // LATIN SMALL LETTER N WITH ACUTE chars[0xF2]= 0x0148; // LATIN SMALL LETTER N WITH CARON chars[0xF3]= 0x00F3; // LATIN SMALL LETTER O WITH ACUTE chars[0xF4]= 0x00F4; // LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5]= 0x0151; // LATIN SMALL LETTER O WITH DOUBLE ACUTE chars[0xF6]= 0x00F6; // LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7]= 0x00F7; // DIVISION SIGN chars[0xF8]= 0x0159; // LATIN SMALL LETTER R WITH CARON chars[0xF9]= 0x016F; //LATIN SMALL LETTER U WITH RING ABOVE chars[0xFA]= 0x00FA; // LATIN SMALL LETTER U WITH ACUTE chars[0xFB]= 0x0171; // LATIN SMALL LETTER U WITH DOUBLE ACUTE chars[0xFC]= 0x00FC; //LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD]= 0x00FD; // LATIN SMALL LETTER Y WITH ACUTE chars[0xFE]= 0x0163; //LATIN SMALL LETTER T WITH CEDILLA chars[0xFF]= 0x02D9; // DOT ABOVE } public static char decode(byte b){ return chars[b & 0xff]; } }
7,418
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_7.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_7.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-7 char * into a Unicode char * */ public class ISO8859_7 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; chars[0xA1 ]=0x02BD; chars[0xA2 ]=0x02BC; chars[0xA3 ]=0x00A3; chars[0xA6 ]=0x00A6; chars[0xA7 ]=0x00A7; chars[0xA8 ]=0x00A8; chars[0xA9 ]=0x00A9; chars[0xAB ]=0x00AB; chars[0xAC ]=0x00AC; chars[0xAD ]=0x00AD; chars[0xAF ]=0x2015; chars[0xB0 ]=0x00B0; chars[0xB1 ]=0x00B1; chars[0xB2 ]=0x00B2; chars[0xB3 ]=0x00B3; chars[0xB4 ]=0x0384; chars[0xB5 ]=0x0385; chars[0xB6 ]=0x0386; chars[0xB7 ]=0x00B7; chars[0xB8 ]=0x0388; chars[0xB9 ]=0x0389; chars[0xBA ]=0x038A; chars[0xBB ]=0x00BB; chars[0xBC ]=0x038C; chars[0xBD ]=0x00BD; chars[0xBE ]=0x038E; chars[0xBF ]=0x038F; chars[0xC0 ]=0x0390; chars[0xC1 ]=0x0391; chars[0xC2 ]=0x0392; chars[0xC3 ]=0x0393; chars[0xC4 ]=0x0394; chars[0xC5 ]=0x0395; chars[0xC6 ]=0x0396; chars[0xC7 ]=0x0397; chars[0xC8 ]=0x0398; chars[0xC9 ]=0x0399; chars[0xCA ]=0x039A; chars[0xCB ]=0x039B; chars[0xCC ]=0x039C; chars[0xCD ]=0x039D; chars[0xCE ]=0x039E; chars[0xCF ]=0x039F; chars[0xD0 ]=0x03A0; chars[0xD1 ]=0x03A1; chars[0xD3 ]=0x03A3; chars[0xD4 ]=0x03A4; chars[0xD5 ]=0x03A5; chars[0xD6 ]=0x03A6; chars[0xD7 ]=0x03A7; chars[0xD8 ]=0x03A8; chars[0xD9 ]=0x03A9; chars[0xDA ]=0x03AA; chars[0xDB ]=0x03AB; chars[0xDC ]=0x03AC; chars[0xDD ]=0x03AD; chars[0xDE ]=0x03AE; chars[0xDF ]=0x03AF; chars[0xE0 ]=0x03B0; chars[0xE1 ]=0x03B1; chars[0xE2 ]=0x03B2; chars[0xE3 ]=0x03B3; chars[0xE4 ]=0x03B4; chars[0xE5 ]=0x03B5; chars[0xE6 ]=0x03B6; chars[0xE7 ]=0x03B7; chars[0xE8 ]=0x03B8; chars[0xE9 ]=0x03B9; chars[0xEA ]=0x03BA; chars[0xEB ]=0x03BB; chars[0xEC ]=0x03BC; chars[0xED ]=0x03BD; chars[0xEE ]=0x03BE; chars[0xEF ]=0x03BF; chars[0xF0 ]=0x03C0; chars[0xF1 ]=0x03C1; chars[0xF2 ]=0x03C2; chars[0xF3 ]=0x03C3; chars[0xF4 ]=0x03C4; chars[0xF5 ]=0x03C5; chars[0xF6 ]=0x03C6; chars[0xF7 ]=0x03C7; chars[0xF8 ]=0x03C8; chars[0xF9 ]=0x03C9; chars[0xFA ]=0x03CA; chars[0xFB ]=0x03CB; chars[0xFC ]=0x03CC; chars[0xFD ]=0x03CD; chars[0xFE ]=0x03CE; } public static char decode(byte b){ return chars[b & 0xff]; } }
3,988
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_9.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_9.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-9 char * into a Unicode char * */ public class ISO8859_9 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; chars[0xA1 ]=0x00A1; chars[0xA2 ]=0x00A2; chars[0xA3 ]=0x00A3; chars[0xA4 ]=0x00A4; chars[0xA5 ]=0x00A5; chars[0xA6 ]=0x00A6; chars[0xA7 ]=0x00A7; chars[0xA8 ]=0x00A8; chars[0xA9 ]=0x00A9; chars[0xAA ]=0x00AA; chars[0xAB ]=0x00AB; chars[0xAC ]=0x00AC; chars[0xAD ]=0x00AD; chars[0xAE ]=0x00AE; chars[0xAF ]=0x00AF; chars[0xB0 ]=0x00B0; chars[0xB1 ]=0x00B1; chars[0xB2 ]=0x00B2; chars[0xB3 ]=0x00B3; chars[0xB4 ]=0x00B4; chars[0xB5 ]=0x00B5; chars[0xB6 ]=0x00B6; chars[0xB7 ]=0x00B7; chars[0xB8 ]=0x00B8; chars[0xB9 ]=0x00B9; chars[0xBA ]=0x00BA; chars[0xBB ]=0x00BB; chars[0xBC ]=0x00BC; chars[0xBD ]=0x00BD; chars[0xBE ]=0x00BE; chars[0xBF ]=0x00BF; chars[0xC0 ]=0x00C0; chars[0xC1 ]=0x00C1; chars[0xC2 ]=0x00C2; chars[0xC3 ]=0x00C3; chars[0xC4 ]=0x00C4; chars[0xC5 ]=0x00C5; chars[0xC6 ]=0x00C6; chars[0xC7 ]=0x00C7; chars[0xC8 ]=0x00C8; chars[0xC9 ]=0x00C9; chars[0xCA ]=0x00CA; chars[0xCB ]=0x00CB; chars[0xCC ]=0x00CC; chars[0xCD ]=0x00CD; chars[0xCE ]=0x00CE; chars[0xCF ]=0x00CF; chars[0xD0 ]=0x011E; chars[0xD1 ]=0x00D1; chars[0xD2 ]=0x00D2; chars[0xD3 ]=0x00D3; chars[0xD4 ]=0x00D4; chars[0xD5 ]=0x00D5; chars[0xD6 ]=0x00D6; chars[0xD7 ]=0x00D7; chars[0xD8 ]=0x00D8; chars[0xD9 ]=0x00D9; chars[0xDA ]=0x00DA; chars[0xDB ]=0x00DB; chars[0xDC ]=0x00DC; chars[0xDD ]=0x0130; chars[0xDE ]=0x015E; chars[0xDF ]=0x00DF; chars[0xE0 ]=0x00E0; chars[0xE1 ]=0x00E1; chars[0xE2 ]=0x00E2; chars[0xE3 ]=0x00E3; chars[0xE4 ]=0x00E4; chars[0xE5 ]=0x00E5; chars[0xE6 ]=0x00E6; chars[0xE7 ]=0x00E7; chars[0xE8 ]=0x00E8; chars[0xE9 ]=0x00E9; chars[0xEA ]=0x00EA; chars[0xEB ]=0x00EB; chars[0xEC ]=0x00EC; chars[0xED ]=0x00ED; chars[0xEE ]=0x00EE; chars[0xEF ]=0x00EF; chars[0xF0 ]=0x011F; chars[0xF1 ]=0x00F1; chars[0xF2 ]=0x00F2; chars[0xF3 ]=0x00F3; chars[0xF4 ]=0x00F4; chars[0xF5 ]=0x00F5; chars[0xF6 ]=0x00F6; chars[0xF7 ]=0x00F7; chars[0xF8 ]=0x00F8; chars[0xF9 ]=0x00F9; chars[0xFA ]=0x00FA; chars[0xFB ]=0x00FB; chars[0xFC ]=0x00FC; chars[0xFD ]=0x0131; chars[0xFE ]=0x015F; chars[0xFF ]=0x00FF; } public static char decode(byte b){ return chars[b & 0xff]; } }
4,162
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_6.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_6.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-6 char * into a Unicode char * */ public class ISO8859_6 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; chars[0xA4 ]=0x00A4; chars[0xAC ]=0x060C; chars[0xAD ]=0x00AD; chars[0xBB ]=0x061B; chars[0xBF ]=0x061F; chars[0xC1 ]=0x0621; chars[0xC2 ]=0x0622; chars[0xC3 ]=0x0623; chars[0xC4 ]=0x0624; chars[0xC5 ]=0x0625; chars[0xC6 ]=0x0626; chars[0xC7 ]=0x0627; chars[0xC8 ]=0x0628; chars[0xC9 ]=0x0629; chars[0xCA ]=0x062A; chars[0xCB ]=0x062B; chars[0xCC ]=0x062C; chars[0xCD ]=0x062D; chars[0xCE ]=0x062E; chars[0xCF ]=0x062F; chars[0xD0 ]=0x0630; chars[0xD1 ]=0x0631; chars[0xD2 ]=0x0632; chars[0xD3 ]=0x0633; chars[0xD4 ]=0x0634; chars[0xD5 ]=0x0635; chars[0xD6 ]=0x0636; chars[0xD7 ]=0x0637; chars[0xD8 ]=0x0638; chars[0xD9 ]=0x0639; chars[0xDA ]=0x063A; chars[0xE0 ]=0x0640; chars[0xE1 ]=0x0641; chars[0xE2 ]=0x0642; chars[0xE3 ]=0x0643; chars[0xE4 ]=0x0644; chars[0xE5 ]=0x0645; chars[0xE6 ]=0x0646; chars[0xE7 ]=0x0647; chars[0xE8 ]=0x0648; chars[0xE9 ]=0x0649; chars[0xEA ]=0x064A; chars[0xEB ]=0x064B; chars[0xEC ]=0x064C; chars[0xED ]=0x064D; chars[0xEE ]=0x064E; chars[0xEF ]=0x064F; chars[0xF0 ]=0x0650; chars[0xF1 ]=0x0651; chars[0xF2 ]=0x0652; } public static char decode(byte b){ return chars[b & 0xff]; } }
2,810
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1258.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1258.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1258 char * into a Unicode char * */ public class WIN1258 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0192 ;// LATIN SMALL LETTER F WITH HOOK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x88 ]=0x02C6 ;// MODIFIER LETTER CIRCUMFLEX ACCENT chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8C ]=0x0152 ;// LATIN CAPITAL LIGATURE OE chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x98 ]=0x02DC ;// SMALL TILDE chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9C ]=0x0153 ;// LATIN SMALL LIGATURE OE chars[0x9F ]=0x0178 ;// LATIN CAPITAL LETTER Y WITH DIAERESIS chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x00A1 ;// INVERTED EXCLAMATION MARK chars[0xA2 ]=0x00A2 ;// CENT SIGN chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x00A5 ;// YEN SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x00AA ;// FEMININE ORDINAL INDICATOR chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x00AF ;// MACRON chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00B8 ;// CEDILLA chars[0xB9 ]=0x00B9 ;// SUPERSCRIPT ONE chars[0xBA ]=0x00BA ;// MASCULINE ORDINAL INDICATOR chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x00BC ;// VULGAR FRACTION ONE QUARTER chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x00BE ;// VULGAR FRACTION THREE QUARTERS chars[0xBF ]=0x00BF ;// INVERTED QUESTION MARK chars[0xC0 ]=0x00C0 ;// LATIN CAPITAL LETTER A WITH GRAVE chars[0xC1 ]=0x00C1 ;// LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2 ]=0x00C2 ;// LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC3 ]=0x0102 ;// LATIN CAPITAL LETTER A WITH BREVE chars[0xC4 ]=0x00C4 ;// LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x00C5 ;// LATIN CAPITAL LETTER A WITH RING ABOVE chars[0xC6 ]=0x00C6 ;// LATIN CAPITAL LETTER AE chars[0xC7 ]=0x00C7 ;// LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8 ]=0x00C8 ;// LATIN CAPITAL LETTER E WITH GRAVE chars[0xC9 ]=0x00C9 ;// LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x00CA ;// LATIN CAPITAL LETTER E WITH CIRCUMFLEX chars[0xCB ]=0x00CB ;// LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC ]=0x0300 ;// COMBINING GRAVE ACCENT chars[0xCD ]=0x00CD ;// LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE ]=0x00CE ;// LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF ]=0x00CF ;// LATIN CAPITAL LETTER I WITH DIAERESIS chars[0xD0 ]=0x0110 ;// LATIN CAPITAL LETTER D WITH STROKE chars[0xD1 ]=0x00D1 ;// LATIN CAPITAL LETTER N WITH TILDE chars[0xD2 ]=0x0309 ;// COMBINING HOOK ABOVE chars[0xD3 ]=0x00D3 ;// LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x00D4 ;// LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5 ]=0x01A0 ;// LATIN CAPITAL LETTER O WITH HORN chars[0xD6 ]=0x00D6 ;// LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xD8 ]=0x00D8 ;// LATIN CAPITAL LETTER O WITH STROKE chars[0xD9 ]=0x00D9 ;// LATIN CAPITAL LETTER U WITH GRAVE chars[0xDA ]=0x00DA ;// LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB ]=0x00DB ;// LATIN CAPITAL LETTER U WITH CIRCUMFLEX chars[0xDC ]=0x00DC ;// LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x01AF ;// LATIN CAPITAL LETTER U WITH HORN chars[0xDE ]=0x0303 ;// COMBINING TILDE chars[0xDF ]=0x00DF ;// LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x00E0 ;// LATIN SMALL LETTER A WITH GRAVE chars[0xE1 ]=0x00E1 ;// LATIN SMALL LETTER A WITH ACUTE chars[0xE2 ]=0x00E2 ;// LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3 ]=0x0103 ;// LATIN SMALL LETTER A WITH BREVE chars[0xE4 ]=0x00E4 ;// LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x00E5 ;// LATIN SMALL LETTER A WITH RING ABOVE chars[0xE6 ]=0x00E6 ;// LATIN SMALL LETTER AE chars[0xE7 ]=0x00E7 ;// LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x00E8 ;// LATIN SMALL LETTER E WITH GRAVE chars[0xE9 ]=0x00E9 ;// LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x00EA ;// LATIN SMALL LETTER E WITH CIRCUMFLEX chars[0xEB ]=0x00EB ;// LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x0301 ;// COMBINING ACUTE ACCENT chars[0xED ]=0x00ED ;// LATIN SMALL LETTER I WITH ACUTE chars[0xEE ]=0x00EE ;// LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x00EF ;// LATIN SMALL LETTER I WITH DIAERESIS chars[0xF0 ]=0x0111 ;// LATIN SMALL LETTER D WITH STROKE chars[0xF1 ]=0x00F1 ;// LATIN SMALL LETTER N WITH TILDE chars[0xF2 ]=0x0323 ;// COMBINING DOT BELOW chars[0xF3 ]=0x00F3 ;// LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x00F4 ;// LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x01A1 ;// LATIN SMALL LETTER O WITH HORN chars[0xF6 ]=0x00F6 ;// LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7 ;// DIVISION SIGN chars[0xF8 ]=0x00F8 ;// LATIN SMALL LETTER O WITH STROKE chars[0xF9 ]=0x00F9 ;// LATIN SMALL LETTER U WITH GRAVE chars[0xFA ]=0x00FA ;// LATIN SMALL LETTER U WITH ACUTE chars[0xFB ]=0x00FB ;// LATIN SMALL LETTER U WITH CIRCUMFLEX chars[0xFC ]=0x00FC ;// LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x01B0 ;// LATIN SMALL LETTER U WITH HORN chars[0xFE ]=0x20AB ;// DONG SIGN chars[0xFF ]=0x00FF ;// LATIN SMALL LETTER Y WITH DIAERESIS } public static char decode(byte b){ return chars[b & 0xff]; } }
8,476
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1255.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1255.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1255 char * into a Unicode char * */ public class WIN1255 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0192 ;// LATIN SMALL LETTER F WITH HOOK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x88 ]=0x02C6 ;// MODIFIER LETTER CIRCUMFLEX ACCENT chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x98 ]=0x02DC ;// SMALL TILDE chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x00A1 ;// INVERTED EXCLAMATION MARK chars[0xA2 ]=0x00A2 ;// CENT SIGN chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x20AA ;// NEW SHEQEL SIGN chars[0xA5 ]=0x00A5 ;// YEN SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x00AF ;// MACRON chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00B8 ;// CEDILLA chars[0xB9 ]=0x00B9 ;// SUPERSCRIPT ONE chars[0xBA ]=0x00F7 ;// DIVISION SIGN chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x00BC ;// VULGAR FRACTION ONE QUARTER chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x00BE ;// VULGAR FRACTION THREE QUARTERS chars[0xBF ]=0x00BF ;// INVERTED QUESTION MARK chars[0xC0 ]=0x05B0 ;// HEBREW POINT SHEVA chars[0xC1 ]=0x05B1 ;// HEBREW POINT HATAF SEGOL chars[0xC2 ]=0x05B2 ;// HEBREW POINT HATAF PATAH chars[0xC3 ]=0x05B3 ;// HEBREW POINT HATAF QAMATS chars[0xC4 ]=0x05B4 ;// HEBREW POINT HIRIQ chars[0xC5 ]=0x05B5 ;// HEBREW POINT TSERE chars[0xC6 ]=0x05B6 ;// HEBREW POINT SEGOL chars[0xC7 ]=0x05B7 ;// HEBREW POINT PATAH chars[0xC8 ]=0x05B8 ;// HEBREW POINT QAMATS chars[0xC9 ]=0x05B9 ;// HEBREW POINT HOLAM chars[0xCB ]=0x05BB ;// HEBREW POINT QUBUTS chars[0xCC ]=0x05BC ;// HEBREW POINT DAGESH OR MAPIQ chars[0xCD ]=0x05BD ;// HEBREW POINT METEG chars[0xCE ]=0x05BE ;// HEBREW PUNCTUATION MAQAF chars[0xCF ]=0x05BF ;// HEBREW POINT RAFE chars[0xD0 ]=0x05C0 ;// HEBREW PUNCTUATION PASEQ chars[0xD1 ]=0x05C1 ;// HEBREW POINT SHIN DOT chars[0xD2 ]=0x05C2 ;// HEBREW POINT SIN DOT chars[0xD3 ]=0x05C3 ;// HEBREW PUNCTUATION SOF PASUQ chars[0xD4 ]=0x05F0 ;// HEBREW LIGATURE YIDDISH DOUBLE VAV chars[0xD5 ]=0x05F1 ;// HEBREW LIGATURE YIDDISH VAV YOD chars[0xD6 ]=0x05F2 ;// HEBREW LIGATURE YIDDISH DOUBLE YOD chars[0xD7 ]=0x05F3 ;// HEBREW PUNCTUATION GERESH chars[0xD8 ]=0x05F4 ;// HEBREW PUNCTUATION GERSHAYIM chars[0xE0 ]=0x05D0 ;// HEBREW LETTER ALEF chars[0xE1 ]=0x05D1 ;// HEBREW LETTER BET chars[0xE2 ]=0x05D2 ;// HEBREW LETTER GIMEL chars[0xE3 ]=0x05D3 ;// HEBREW LETTER DALET chars[0xE4 ]=0x05D4 ;// HEBREW LETTER HE chars[0xE5 ]=0x05D5 ;// HEBREW LETTER VAV chars[0xE6 ]=0x05D6 ;// HEBREW LETTER ZAYIN chars[0xE7 ]=0x05D7 ;// HEBREW LETTER HET chars[0xE8 ]=0x05D8 ;// HEBREW LETTER TET chars[0xE9 ]=0x05D9 ;// HEBREW LETTER YOD chars[0xEA ]=0x05DA ;// HEBREW LETTER FINAL KAF chars[0xEB ]=0x05DB ;// HEBREW LETTER KAF chars[0xEC ]=0x05DC ;// HEBREW LETTER LAMED chars[0xED ]=0x05DD ;// HEBREW LETTER FINAL MEM chars[0xEE ]=0x05DE ;// HEBREW LETTER MEM chars[0xEF ]=0x05DF ;// HEBREW LETTER FINAL NUN chars[0xF0 ]=0x05E0 ;// HEBREW LETTER NUN chars[0xF1 ]=0x05E1 ;// HEBREW LETTER SAMEKH chars[0xF2 ]=0x05E2 ;// HEBREW LETTER AYIN chars[0xF3 ]=0x05E3 ;// HEBREW LETTER FINAL PE chars[0xF4 ]=0x05E4 ;// HEBREW LETTER PE chars[0xF5 ]=0x05E5 ;// HEBREW LETTER FINAL TSADI chars[0xF6 ]=0x05E6 ;// HEBREW LETTER TSADI chars[0xF7 ]=0x05E7 ;// HEBREW LETTER QOF chars[0xF8 ]=0x05E8 ;// HEBREW LETTER RESH chars[0xF9 ]=0x05E9 ;// HEBREW LETTER SHIN chars[0xFA ]=0x05EA ;// HEBREW LETTER TAV chars[0xFD ]=0x200E ;// LEFT-TO-RIGHT MARK chars[0xFE ]=0x200F ;// RIGHT-TO-LEFT MARK } public static char decode(byte b){ return chars[b & 0xff]; } }
6,964
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_13.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_13.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; public class ISO8859_13 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0 ; chars[0xA1 ]=0x201D ; chars[0xA2 ]=0x00A2 ; chars[0xA3 ]=0x00A3; chars[0xA4 ]=0x00A4; chars[0xA5 ]=0x201E; chars[0xA6 ]=0x00A6; chars[0xA7 ]=0x00A7; chars[0xA8 ]=0x00D8; chars[0xA9 ]=0x00A9; chars[0xAA ]=0x0156; chars[0xAB ]=0x00AB; chars[0xAC ]=0x00AC; chars[0xAD ]=0x00AD; chars[0xAE ]=0x00AE; chars[0xAF ]=0x00C6; chars[0xB0 ]=0x00B0; chars[0xB1 ]=0x00B1; chars[0xB2 ]=0x00B2; chars[0xB3 ]=0x00B3; chars[0xB4 ]=0x201C; chars[0xB5 ]=0x00B5; chars[0xB6 ]=0x00B6; chars[0xB7 ]=0x00B7; chars[0xB8 ]=0x00F8; chars[0xB9 ]=0x00B9; chars[0xBA ]=0x0157 ;//LATIN SMALL LETTER R WITH CEDILLA chars[0xBB ]=0x00BB; chars[0xBC ]=0x00BC; chars[0xBD ]=0x00BD; chars[0xBE ]=0x00BE; chars[0xBF ]=0x00E6 ;//LATIN SMALL LETTER AE chars[0xC0 ]=0x0104 ;//LATIN CAPITAL LETTER A WITH OGONEK chars[0xC1 ]=0x012E ;//LATIN CAPITAL LETTER I WITH OGONEK chars[0xC2 ]=0x0100 ;//LATIN CAPITAL LETTER A WITH MACRON chars[0xC3 ]=0x0106 ;//LATIN CAPITAL LETTER C WITH ACUTE chars[0xC4 ]=0x00C4 ;//LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x00C5 ;//LATIN CAPITAL LETTER A WITH RING ABOVE chars[0xC6 ]=0x0118 ;//LATIN CAPITAL LETTER E WITH OGONEK chars[0xC7 ]=0x0112 ;//LATIN CAPITAL LETTER E WITH MACRON chars[0xC8 ]=0x010C ;//LATIN CAPITAL LETTER C WITH CARON chars[0xC9 ]=0x00C9 ;//LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x0179 ;//LATIN CAPITAL LETTER Z WITH ACUTE chars[0xCB ]=0x0116 ;//LATIN CAPITAL LETTER E WITH DOT ABOVE chars[0xCC ]=0x0122 ;//LATIN CAPITAL LETTER G WITH CEDILLA chars[0xCD ]=0x0136 ;//LATIN CAPITAL LETTER K WITH CEDILLA chars[0xCE ]=0x012A ;//LATIN CAPITAL LETTER I WITH MACRON chars[0xCF ]=0x013B ;//LATIN CAPITAL LETTER L WITH CEDILLA chars[0xD0 ]=0x0160 ;//LATIN CAPITAL LETTER S WITH CARON chars[0xD1 ]=0x0143 ;//LATIN CAPITAL LETTER N WITH ACUTE chars[0xD2 ]=0x0145 ;//LATIN CAPITAL LETTER N WITH CEDILLA chars[0xD3 ]=0x00D3 ;//LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x014C ;//LATIN CAPITAL LETTER O WITH MACRON chars[0xD5 ]=0x00D5 ;//LATIN CAPITAL LETTER O WITH TILDE chars[0xD6 ]=0x00D6 ;//LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7 ; chars[0xD8 ]=0x0172 ;//LATIN CAPITAL LETTER U WITH OGONEK chars[0xD9 ]=0x0141 ;//LATIN CAPITAL LETTER L WITH STROKE chars[0xDA ]=0x015A ;//LATIN CAPITAL LETTER S WITH ACUTE chars[0xDB ]=0x016A ;//LATIN CAPITAL LETTER U WITH MACRON chars[0xDC ]=0x00DC ;//LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x017B ;//LATIN CAPITAL LETTER Z WITH DOT ABOVE chars[0xDE ]=0x017D ;//LATIN CAPITAL LETTER Z WITH CARON chars[0xDF ]=0x00DF ;//LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x0105 ;//LATIN SMALL LETTER A WITH OGONEK chars[0xE1 ]=0x012F ;//LATIN SMALL LETTER I WITH OGONEK chars[0xE2 ]=0x0101 ;//LATIN SMALL LETTER A WITH MACRON chars[0xE3 ]=0x0107 ;//LATIN SMALL LETTER C WITH ACUTE chars[0xE4 ]=0x00E4 ;//LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x00E5 ;//LATIN SMALL LETTER A WITH RING ABOVE chars[0xE6 ]=0x0119 ;//LATIN SMALL LETTER E WITH OGONEK chars[0xE7 ]=0x0113 ;//LATIN SMALL LETTER E WITH MACRON chars[0xE8 ]=0x010D ;//LATIN SMALL LETTER C WITH CARON chars[0xE9 ]=0x00E9 ;//LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x017A ;//LATIN SMALL LETTER Z WITH ACUTE chars[0xEB ]=0x0117 ;//LATIN SMALL LETTER E WITH DOT ABOVE chars[0xEC ]=0x0123 ;//LATIN SMALL LETTER G WITH CEDILLA chars[0xED ]=0x0137 ;//LATIN SMALL LETTER K WITH CEDILLA chars[0xEE ]=0x012B ;//LATIN SMALL LETTER I WITH MACRON chars[0xEF ]=0x013C ;//LATIN SMALL LETTER L WITH CEDILLA chars[0xF0 ]=0x0161 ;//LATIN SMALL LETTER S WITH CARON chars[0xF1 ]=0x0144 ;//LATIN SMALL LETTER N WITH ACUTE chars[0xF2 ]=0x0146 ;//LATIN SMALL LETTER N WITH CEDILLA chars[0xF3 ]=0x00F3 ;//LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x014D ;//LATIN SMALL LETTER O WITH MACRON chars[0xF5 ]=0x00F5 ;//LATIN SMALL LETTER O WITH TILDE chars[0xF6 ]=0x00F6 ;//LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7 ; chars[0xF8 ]=0x0173 ;//LATIN SMALL LETTER U WITH OGONEK chars[0xF9 ]=0x0142 ;//LATIN SMALL LETTER L WITH STROKE chars[0xFA ]=0x015B ;//LATIN SMALL LETTER S WITH ACUTE chars[0xFB ]=0x016B ;//LATIN SMALL LETTER U WITH MACRON chars[0xFC ]=0x00FC ;//LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x017C ;//LATIN SMALL LETTER Z WITH DOT ABOVE chars[0xFE ]=0x017E ;//LATIN SMALL LETTER Z WITH CARON chars[0xFF ]=0x2019; } public static char decode(byte b){ return chars[b & 0xff]; } }
6,350
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1257.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1257.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1257 char * into a Unicode char * */ public class WIN1257 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8D ]=0x00A8 ;// DIAERESIS chars[0x8E ]=0x02C7 ;// CARON chars[0x8F ]=0x00B8 ;// CEDILLA chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9D ]=0x00AF ;// MACRON chars[0x9E ]=0x02DB ;// OGONEK chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA2 ]=0x00A2 ;// CENT SIGN chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00D8 ;// LATIN CAPITAL LETTER O WITH STROKE chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x0156 ;// LATIN CAPITAL LETTER R WITH CEDILLA chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x00C6 ;// LATIN CAPITAL LETTER AE chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00F8 ;// LATIN SMALL LETTER O WITH STROKE chars[0xB9 ]=0x00B9 ;// SUPERSCRIPT ONE chars[0xBA ]=0x0157 ;// LATIN SMALL LETTER R WITH CEDILLA chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x00BC ;// VULGAR FRACTION ONE QUARTER chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x00BE ;// VULGAR FRACTION THREE QUARTERS chars[0xBF ]=0x00E6 ;// LATIN SMALL LETTER AE chars[0xC0 ]=0x0104 ;// LATIN CAPITAL LETTER A WITH OGONEK chars[0xC1 ]=0x012E ;// LATIN CAPITAL LETTER I WITH OGONEK chars[0xC2 ]=0x0100 ;// LATIN CAPITAL LETTER A WITH MACRON chars[0xC3 ]=0x0106 ;// LATIN CAPITAL LETTER C WITH ACUTE chars[0xC4 ]=0x00C4 ;// LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x00C5 ;// LATIN CAPITAL LETTER A WITH RING ABOVE chars[0xC6 ]=0x0118 ;// LATIN CAPITAL LETTER E WITH OGONEK chars[0xC7 ]=0x0112 ;// LATIN CAPITAL LETTER E WITH MACRON chars[0xC8 ]=0x010C ;// LATIN CAPITAL LETTER C WITH CARON chars[0xC9 ]=0x00C9 ;// LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x0179 ;// LATIN CAPITAL LETTER Z WITH ACUTE chars[0xCB ]=0x0116 ;// LATIN CAPITAL LETTER E WITH DOT ABOVE chars[0xCC ]=0x0122 ;// LATIN CAPITAL LETTER G WITH CEDILLA chars[0xCD ]=0x0136 ;// LATIN CAPITAL LETTER K WITH CEDILLA chars[0xCE ]=0x012A ;// LATIN CAPITAL LETTER I WITH MACRON chars[0xCF ]=0x013B ;// LATIN CAPITAL LETTER L WITH CEDILLA chars[0xD0 ]=0x0160 ;// LATIN CAPITAL LETTER S WITH CARON chars[0xD1 ]=0x0143 ;// LATIN CAPITAL LETTER N WITH ACUTE chars[0xD2 ]=0x0145 ;// LATIN CAPITAL LETTER N WITH CEDILLA chars[0xD3 ]=0x00D3 ;// LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x014C ;// LATIN CAPITAL LETTER O WITH MACRON chars[0xD5 ]=0x00D5 ;// LATIN CAPITAL LETTER O WITH TILDE chars[0xD6 ]=0x00D6 ;// LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xD8 ]=0x0172 ;// LATIN CAPITAL LETTER U WITH OGONEK chars[0xD9 ]=0x0141 ;// LATIN CAPITAL LETTER L WITH STROKE chars[0xDA ]=0x015A ;// LATIN CAPITAL LETTER S WITH ACUTE chars[0xDB ]=0x016A ;// LATIN CAPITAL LETTER U WITH MACRON chars[0xDC ]=0x00DC ;// LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x017B ;// LATIN CAPITAL LETTER Z WITH DOT ABOVE chars[0xDE ]=0x017D ;// LATIN CAPITAL LETTER Z WITH CARON chars[0xDF ]=0x00DF ;// LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x0105 ;// LATIN SMALL LETTER A WITH OGONEK chars[0xE1 ]=0x012F ;// LATIN SMALL LETTER I WITH OGONEK chars[0xE2 ]=0x0101 ;// LATIN SMALL LETTER A WITH MACRON chars[0xE3 ]=0x0107 ;// LATIN SMALL LETTER C WITH ACUTE chars[0xE4 ]=0x00E4 ;// LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x00E5 ;// LATIN SMALL LETTER A WITH RING ABOVE chars[0xE6 ]=0x0119 ;// LATIN SMALL LETTER E WITH OGONEK chars[0xE7 ]=0x0113 ;// LATIN SMALL LETTER E WITH MACRON chars[0xE8 ]=0x010D ;// LATIN SMALL LETTER C WITH CARON chars[0xE9 ]=0x00E9 ;// LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x017A ;// LATIN SMALL LETTER Z WITH ACUTE chars[0xEB ]=0x0117 ;// LATIN SMALL LETTER E WITH DOT ABOVE chars[0xEC ]=0x0123 ;// LATIN SMALL LETTER G WITH CEDILLA chars[0xED ]=0x0137 ;// LATIN SMALL LETTER K WITH CEDILLA chars[0xEE ]=0x012B ;// LATIN SMALL LETTER I WITH MACRON chars[0xEF ]=0x013C ;// LATIN SMALL LETTER L WITH CEDILLA chars[0xF0 ]=0x0161 ;// LATIN SMALL LETTER S WITH CARON chars[0xF1 ]=0x0144 ;// LATIN SMALL LETTER N WITH ACUTE chars[0xF2 ]=0x0146 ;// LATIN SMALL LETTER N WITH CEDILLA chars[0xF3 ]=0x00F3 ;// LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x014D ;// LATIN SMALL LETTER O WITH MACRON chars[0xF5 ]=0x00F5 ;// LATIN SMALL LETTER O WITH TILDE chars[0xF6 ]=0x00F6 ;// LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7 ;// DIVISION SIGN chars[0xF8 ]=0x0173 ;// LATIN SMALL LETTER U WITH OGONEK chars[0xF9 ]=0x0142 ;// LATIN SMALL LETTER L WITH STROKE chars[0xFA ]=0x015B ;// LATIN SMALL LETTER S WITH ACUTE chars[0xFB ]=0x016B ;// LATIN SMALL LETTER U WITH MACRON chars[0xFC ]=0x00FC ;// LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x017C ;// LATIN SMALL LETTER Z WITH DOT ABOVE chars[0xFE ]=0x017E ;// LATIN SMALL LETTER Z WITH CARON chars[0xFF ]=0x02D9 ;// DOT ABOVE } public static char decode(byte b){ return chars[b & 0xff]; } }
8,356
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
UTF8Char.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/UTF8Char.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * UTF 8 char range finder. * Creation date: (3/3/04 6:01:49 PM) * @author: */ public class UTF8Char { static final byte[] charLen = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, -1, -1, }; static public int byteCount(int n) { return charLen[n]; } }
2,046
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1252.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1252.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1252 char * into a Unicode char * */ public class WIN1252 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0192 ;// LATIN SMALL LETTER F WITH HOOK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x88 ]=0x02C6 ;// MODIFIER LETTER CIRCUMFLEX ACCENT chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8A ]=0x0160 ;// LATIN CAPITAL LETTER S WITH CARON chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8C ]=0x0152 ;// LATIN CAPITAL LIGATURE OE chars[0x8E ]=0x017D ;// LATIN CAPITAL LETTER Z WITH CARON chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x98 ]=0x02DC ;// SMALL TILDE chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9A ]=0x0161 ;// LATIN SMALL LETTER S WITH CARON chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9C ]=0x0153 ;// LATIN SMALL LIGATURE OE chars[0x9E ]=0x017E ;// LATIN SMALL LETTER Z WITH CARON chars[0x9F ]=0x0178 ;// LATIN CAPITAL LETTER Y WITH DIAERESIS chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x00A1 ;// INVERTED EXCLAMATION MARK chars[0xA2 ]=0x00A2 ;// CENT SIGN chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x00A5 ;// YEN SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x00AA ;// FEMININE ORDINAL INDICATOR chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x00AF ;// MACRON chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00B8 ;// CEDILLA chars[0xB9 ]=0x00B9 ;// SUPERSCRIPT ONE chars[0xBA ]=0x00BA ;// MASCULINE ORDINAL INDICATOR chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x00BC ;// VULGAR FRACTION ONE QUARTER chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x00BE ;// VULGAR FRACTION THREE QUARTERS chars[0xBF ]=0x00BF ;// INVERTED QUESTION MARK chars[0xC0 ]=0x00C0 ;// LATIN CAPITAL LETTER A WITH GRAVE chars[0xC1 ]=0x00C1 ;// LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2 ]=0x00C2 ;// LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC3 ]=0x00C3 ;// LATIN CAPITAL LETTER A WITH TILDE chars[0xC4 ]=0x00C4 ;// LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x00C5 ;// LATIN CAPITAL LETTER A WITH RING ABOVE chars[0xC6 ]=0x00C6 ;// LATIN CAPITAL LETTER AE chars[0xC7 ]=0x00C7 ;// LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8 ]=0x00C8 ;// LATIN CAPITAL LETTER E WITH GRAVE chars[0xC9 ]=0x00C9 ;// LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x00CA ;// LATIN CAPITAL LETTER E WITH CIRCUMFLEX chars[0xCB ]=0x00CB ;// LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC ]=0x00CC ;// LATIN CAPITAL LETTER I WITH GRAVE chars[0xCD ]=0x00CD ;// LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE ]=0x00CE ;// LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF ]=0x00CF ;// LATIN CAPITAL LETTER I WITH DIAERESIS chars[0xD0 ]=0x00D0 ;// LATIN CAPITAL LETTER ETH chars[0xD1 ]=0x00D1 ;// LATIN CAPITAL LETTER N WITH TILDE chars[0xD2 ]=0x00D2 ;// LATIN CAPITAL LETTER O WITH GRAVE chars[0xD3 ]=0x00D3 ;// LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x00D4 ;// LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5 ]=0x00D5 ;// LATIN CAPITAL LETTER O WITH TILDE chars[0xD6 ]=0x00D6 ;// LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xD8 ]=0x00D8 ;// LATIN CAPITAL LETTER O WITH STROKE chars[0xD9 ]=0x00D9 ;// LATIN CAPITAL LETTER U WITH GRAVE chars[0xDA ]=0x00DA ;// LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB ]=0x00DB ;// LATIN CAPITAL LETTER U WITH CIRCUMFLEX chars[0xDC ]=0x00DC ;// LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x00DD ;// LATIN CAPITAL LETTER Y WITH ACUTE chars[0xDE ]=0x00DE ;// LATIN CAPITAL LETTER THORN chars[0xDF ]=0x00DF ;// LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x00E0 ;// LATIN SMALL LETTER A WITH GRAVE chars[0xE1 ]=0x00E1 ;// LATIN SMALL LETTER A WITH ACUTE chars[0xE2 ]=0x00E2 ;// LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3 ]=0x00E3 ;// LATIN SMALL LETTER A WITH TILDE chars[0xE4 ]=0x00E4 ;// LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x00E5 ;// LATIN SMALL LETTER A WITH RING ABOVE chars[0xE6 ]=0x00E6 ;// LATIN SMALL LETTER AE chars[0xE7 ]=0x00E7 ;// LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x00E8 ;// LATIN SMALL LETTER E WITH GRAVE chars[0xE9 ]=0x00E9 ;// LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x00EA ;// LATIN SMALL LETTER E WITH CIRCUMFLEX chars[0xEB ]=0x00EB ;// LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x00EC ;// LATIN SMALL LETTER I WITH GRAVE chars[0xED ]=0x00ED ;// LATIN SMALL LETTER I WITH ACUTE chars[0xEE ]=0x00EE ;// LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x00EF ;// LATIN SMALL LETTER I WITH DIAERESIS chars[0xF0 ]=0x00F0 ;// LATIN SMALL LETTER ETH chars[0xF1 ]=0x00F1 ;// LATIN SMALL LETTER N WITH TILDE chars[0xF2 ]=0x00F2 ;// LATIN SMALL LETTER O WITH GRAVE chars[0xF3 ]=0x00F3 ;// LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x00F4 ;// LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x00F5 ;// LATIN SMALL LETTER O WITH TILDE chars[0xF6 ]=0x00F6 ;// LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7 ;// DIVISION SIGN chars[0xF8 ]=0x00F8 ;// LATIN SMALL LETTER O WITH STROKE chars[0xF9 ]=0x00F9 ;// LATIN SMALL LETTER U WITH GRAVE chars[0xFA ]=0x00FA ;// LATIN SMALL LETTER U WITH ACUTE chars[0xFB ]=0x00FB ;// LATIN SMALL LETTER U WITH CIRCUMFLEX chars[0xFC ]=0x00FC ;// LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x00FD ;// LATIN SMALL LETTER Y WITH ACUTE chars[0xFE ]=0x00FE ;// LATIN SMALL LETTER THORN chars[0xFF ]=0x00FF ;// LATIN SMALL LETTER Y WITH DIAERESIS } public static char decode(byte b){ return chars[b & 0xff]; } }
8,801
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_8.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_8.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-8 char * into a Unicode char * */ public class ISO8859_8 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xAA ]=0x00D7; chars[0xAB ]=0x00AB; chars[0xAC ]=0x00AC; chars[0xAD ]=0x00AD; chars[0xAE ]=0x00AE; chars[0xAF ]=0x203E; chars[0xB0 ]=0x00B0; chars[0xB1 ]=0x00B1; chars[0xB2 ]=0x00B2; chars[0xB3 ]=0x00B3; chars[0xB4 ]=0x00B4; chars[0xB5 ]=0x00B5; chars[0xB6 ]=0x00B6; chars[0xB7 ]=0x00B7; chars[0xB8 ]=0x00B8; chars[0xB9 ]=0x00B9; chars[0xBA ]=0x00F7; chars[0xBB ]=0x00BB; chars[0xBC ]=0x00BC; chars[0xBD ]=0x00BD; chars[0xBE ]=0x00BE; chars[0xDF ]=0x2017; chars[0xE0 ]=0x05D0; chars[0xE1 ]=0x05D1; chars[0xE2 ]=0x05D2; chars[0xE3 ]=0x05D3; chars[0xE4 ]=0x05D4; chars[0xE5 ]=0x05D5; chars[0xE6 ]=0x05D6; chars[0xE7 ]=0x05D7; chars[0xE8 ]=0x05D8; chars[0xE9 ]=0x05D9; chars[0xEA ]=0x05DA; chars[0xEB ]=0x05DB; chars[0xEC ]=0x05DC; chars[0xED ]=0x05DD; chars[0xEE ]=0x05DE; chars[0xEF ]=0x05DF; chars[0xF0 ]=0x05E0; chars[0xF1 ]=0x05E1; chars[0xF2 ]=0x05E2; chars[0xF3 ]=0x05E3; chars[0xF4 ]=0x05E4; chars[0xF5 ]=0x05E5; chars[0xF6 ]=0x05E6; chars[0xF7 ]=0x05E7; chars[0xF8 ]=0x05E8; chars[0xF9 ]=0x05E9; chars[0xFA ]=0x05EA; } public static char decode(byte b){ return chars[b & 0xff]; } }
2,752
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_3.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_3.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-3 char * into a Unicode char * */ public class ISO8859_3 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; // NO-BREAK SPACE chars[0xA1 ]=0x0126; // LATIN CAPITAL LETTER H WITH STROKE chars[0xA2 ]=0x02D8; // BREVE chars[0xA3 ]=0x00A3; // POUND SIGN chars[0xA4 ]=0x00A4; // CURRENCY SIGN chars[0xA6 ]=0x0124; // LATIN CAPITAL LETTER H WITH CIRCUMFLEX chars[0xA7 ]=0x00A7; // SECTION SIGN chars[0xA8 ]=0x00A8; // DIAERESIS chars[0xA9 ]=0x0130; // LATIN CAPITAL LETTER I WITH DOT ABOVE chars[0xAA ]=0x015E; // LATIN CAPITAL LETTER S WITH CEDILLA chars[0xAB ]=0x011E; // LATIN CAPITAL LETTER G WITH BREVE chars[0xAC ]=0x0134; // LATIN CAPITAL LETTER J WITH CIRCUMFLEX chars[0xAD ]=0x00AD; // SOFT HYPHEN chars[0xAF ]=0x017B; // LATIN CAPITAL LETTER Z WITH DOT ABOVE chars[0xB0 ]=0x00B0; // DEGREE SIGN chars[0xB1 ]=0x0127; // LATIN SMALL LETTER H WITH STROKE chars[0xB2 ]=0x00B2; // SUPERSCRIPT TWO chars[0xB3 ]=0x00B3; // SUPERSCRIPT THREE chars[0xB4 ]=0x00B4; // ACUTE ACCENT chars[0xB5 ]=0x00B5; // MICRO SIGN chars[0xB6 ]=0x0125; // LATIN SMALL LETTER H WITH CIRCUMFLEX chars[0xB7 ]=0x00B7; // MIDDLE DOT chars[0xB8 ]=0x00B8; // CEDILLA chars[0xB9 ]=0x0131; // LATIN SMALL LETTER DOTLESS I chars[0xBA ]=0x015F; // LATIN SMALL LETTER S WITH CEDILLA chars[0xBB ]=0x011F; // LATIN SMALL LETTER G WITH BREVE chars[0xBC ]=0x0135; // LATIN SMALL LETTER J WITH CIRCUMFLEX chars[0xBD ]=0x00BD; // VULGAR FRACTION ONE HALF chars[0xBF ]=0x017C; // LATIN SMALL LETTER Z WITH DOT ABOVE chars[0xC0 ]=0x00C0; // LATIN CAPITAL LETTER A WITH GRAVE chars[0xC1 ]=0x00C1; // LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2 ]=0x00C2; // LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC4 ]=0x00C4; // LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x010A; // LATIN CAPITAL LETTER C WITH DOT ABOVE chars[0xC6 ]=0x0108; // LATIN CAPITAL LETTER C WITH CIRCUMFLEX chars[0xC7 ]=0x00C7; // LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8 ]=0x00C8; // LATIN CAPITAL LETTER E WITH GRAVE chars[0xC9 ]=0x00C9; // LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x00CA; // LATIN CAPITAL LETTER E WITH CIRCUMFLEX chars[0xCB ]=0x00CB; // LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC ]=0x00CC; // LATIN CAPITAL LETTER I WITH GRAVE chars[0xCD ]=0x00CD; // LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE ]=0x00CE; // LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF ]=0x00CF; // LATIN CAPITAL LETTER I WITH DIAERESIS chars[0xD1 ]=0x00D1; // LATIN CAPITAL LETTER N WITH TILDE chars[0xD2 ]=0x00D2; // LATIN CAPITAL LETTER O WITH GRAVE chars[0xD3 ]=0x00D3; // LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x00D4; // LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5 ]=0x0120; // LATIN CAPITAL LETTER G WITH DOT ABOVE chars[0xD6 ]=0x00D6; // LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7; // MULTIPLICATION SIGN chars[0xD8 ]=0x011C; // LATIN CAPITAL LETTER G WITH CIRCUMFLEX chars[0xD9 ]=0x00D9; // LATIN CAPITAL LETTER U WITH GRAVE chars[0xDA ]=0x00DA; // LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB ]=0x00DB; // LATIN CAPITAL LETTER U WITH CIRCUMFLEX chars[0xDC ]=0x00DC; // LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x016C; // LATIN CAPITAL LETTER U WITH BREVE chars[0xDE ]=0x015C; // LATIN CAPITAL LETTER S WITH CIRCUMFLEX chars[0xDF ]=0x00DF; // LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x00E0; // LATIN SMALL LETTER A WITH GRAVE chars[0xE1 ]=0x00E1; // LATIN SMALL LETTER A WITH ACUTE chars[0xE2 ]=0x00E2; // LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE4 ]=0x00E4; // LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x010B; // LATIN SMALL LETTER C WITH DOT ABOVE chars[0xE6 ]=0x0109; // LATIN SMALL LETTER C WITH CIRCUMFLEX chars[0xE7 ]=0x00E7; // LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x00E8; // LATIN SMALL LETTER E WITH GRAVE chars[0xE9 ]=0x00E9; // LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x00EA; // LATIN SMALL LETTER E WITH CIRCUMFLEX chars[0xEB ]=0x00EB; // LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x00EC; // LATIN SMALL LETTER I WITH GRAVE chars[0xED ]=0x00ED; // LATIN SMALL LETTER I WITH ACUTE chars[0xEE ]=0x00EE; // LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x00EF; // LATIN SMALL LETTER I WITH DIAERESIS chars[0xF1 ]=0x00F1; // LATIN SMALL LETTER N WITH TILDE chars[0xF2 ]=0x00F2; // LATIN SMALL LETTER O WITH GRAVE chars[0xF3 ]=0x00F3; // LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x00F4; // LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x0121; // LATIN SMALL LETTER G WITH DOT ABOVE chars[0xF6 ]=0x00F6; // LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7; // DIVISION SIGN chars[0xF8 ]=0x011D; // LATIN SMALL LETTER G WITH CIRCUMFLEX chars[0xF9 ]=0x00F9; // LATIN SMALL LETTER U WITH GRAVE chars[0xFA ]=0x00FA; // LATIN SMALL LETTER U WITH ACUTE chars[0xFB ]=0x00FB; // LATIN SMALL LETTER U WITH CIRCUMFLEX chars[0xFC ]=0x00FC; // LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x016D; // LATIN SMALL LETTER U WITH BREVE chars[0xFE ]=0x015D; // LATIN SMALL LETTER S WITH CIRCUMFLEX chars[0xFF ]=0x02D9; // } public static char decode(byte b){ return chars[b & 0xff]; } }
6,959
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_14.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_14.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; public class ISO8859_14 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0 ;//NO-BREAK SPACE chars[0xA1 ]=0x1E02 ;//LATIN CAPITAL LETTER B WITH DOT ABOVE chars[0xA2 ]=0x1E03 ;//LATIN SMALL LETTER B WITH DOT ABOVE chars[0xA3 ]=0x00A3 ;//POUND SIGN chars[0xA4 ]=0x010A ;//LATIN CAPITAL LETTER C WITH DOT ABOVE chars[0xA5 ]=0x010B ;//LATIN SMALL LETTER C WITH DOT ABOVE chars[0xA6 ]=0x1E0A ;//LATIN CAPITAL LETTER D WITH DOT ABOVE chars[0xA7 ]=0x00A7 ;//SECTION SIGN chars[0xA8 ]=0x1E80 ;//LATIN CAPITAL LETTER W WITH GRAVE chars[0xA9 ]=0x00A9 ;//COPYRIGHT SIGN chars[0xAA ]=0x1E82 ;//LATIN CAPITAL LETTER W WITH ACUTE chars[0xAB ]=0x1E0B ;//LATIN SMALL LETTER D WITH DOT ABOVE chars[0xAC ]=0x1EF2 ;//LATIN CAPITAL LETTER Y WITH GRAVE chars[0xAD ]=0x00AD ;//SOFT HYPHEN chars[0xAE ]=0x00AE ;//REGISTERED SIGN chars[0xAF ]=0x0178 ;//LATIN CAPITAL LETTER Y WITH DIAERESIS chars[0xB0 ]=0x1E1E ;//LATIN CAPITAL LETTER F WITH DOT ABOVE chars[0xB1 ]=0x1E1F ;//LATIN SMALL LETTER F WITH DOT ABOVE chars[0xB2 ]=0x0120 ;//LATIN CAPITAL LETTER G WITH DOT ABOVE chars[0xB3 ]=0x0121 ;//LATIN SMALL LETTER G WITH DOT ABOVE chars[0xB4 ]=0x1E40 ;//LATIN CAPITAL LETTER M WITH DOT ABOVE chars[0xB5 ]=0x1E41 ;//LATIN SMALL LETTER M WITH DOT ABOVE chars[0xB6 ]=0x00B6 ;//PILCROW SIGN chars[0xB7 ]=0x1E56 ;//LATIN CAPITAL LETTER P WITH DOT ABOVE chars[0xB8 ]=0x1E81 ;//LATIN SMALL LETTER W WITH GRAVE chars[0xB9 ]=0x1E57 ;//LATIN SMALL LETTER P WITH DOT ABOVE chars[0xBA ]=0x1E83 ;//LATIN SMALL LETTER W WITH ACUTE chars[0xBB ]=0x1E60 ;//LATIN CAPITAL LETTER S WITH DOT ABOVE chars[0xBC ]=0x1EF3 ;//LATIN SMALL LETTER Y WITH GRAVE chars[0xBD ]=0x1E84 ;//LATIN CAPITAL LETTER W WITH DIAERESIS chars[0xBE ]=0x1E85 ;//LATIN SMALL LETTER W WITH DIAERESIS chars[0xBF ]=0x1E61 ;//LATIN SMALL LETTER S WITH DOT ABOVE chars[0xC0 ]=0x00C0 ;//LATIN CAPITAL LETTER A WITH GRAVE chars[0xC1 ]=0x00C1 ;//LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2 ]=0x00C2 ;//LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC3 ]=0x00C3 ;//LATIN CAPITAL LETTER A WITH TILDE chars[0xC4 ]=0x00C4 ;//LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x00C5 ;//LATIN CAPITAL LETTER A WITH RING ABOVE chars[0xC6 ]=0x00C6 ;//LATIN CAPITAL LETTER AE chars[0xC7 ]=0x00C7 ;//LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8 ]=0x00C8 ;//LATIN CAPITAL LETTER E WITH GRAVE chars[0xC9 ]=0x00C9 ;//LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x00CA ;//LATIN CAPITAL LETTER E WITH CIRCUMFLEX chars[0xCB ]=0x00CB ;//LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC ]=0x00CC ;//LATIN CAPITAL LETTER I WITH GRAVE chars[0xCD ]=0x00CD ;//LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE ]=0x00CE ;//LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF ]=0x00CF ;//LATIN CAPITAL LETTER I WITH DIAERESIS chars[0xD0 ]=0x0174 ;//LATIN CAPITAL LETTER W WITH CIRCUMFLEX chars[0xD1 ]=0x00D1 ;//LATIN CAPITAL LETTER N WITH TILDE chars[0xD2 ]=0x00D2 ;//LATIN CAPITAL LETTER O WITH GRAVE chars[0xD3 ]=0x00D3 ;//LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x00D4 ;//LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5 ]=0x00D5 ;//LATIN CAPITAL LETTER O WITH TILDE chars[0xD6 ]=0x00D6 ;//LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x1E6A ;//LATIN CAPITAL LETTER T WITH DOT ABOVE chars[0xD8 ]=0x00D8 ;//LATIN CAPITAL LETTER O WITH STROKE chars[0xD9 ]=0x00D9 ;//LATIN CAPITAL LETTER U WITH GRAVE chars[0xDA ]=0x00DA ;//LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB ]=0x00DB ;//LATIN CAPITAL LETTER U WITH CIRCUMFLEX chars[0xDC ]=0x00DC ;//LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x00DD ;//LATIN CAPITAL LETTER Y WITH ACUTE chars[0xDE ]=0x0176 ;//LATIN CAPITAL LETTER Y WITH CIRCUMFLEX chars[0xDF ]=0x00DF ;//LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x00E0 ;//LATIN SMALL LETTER A WITH GRAVE chars[0xE1 ]=0x00E1 ;//LATIN SMALL LETTER A WITH ACUTE chars[0xE2 ]=0x00E2 ;//LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3 ]=0x00E3 ;//LATIN SMALL LETTER A WITH TILDE chars[0xE4 ]=0x00E4 ;//LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x00E5 ;//LATIN SMALL LETTER A WITH RING ABOVE chars[0xE6 ]=0x00E6 ;//LATIN SMALL LETTER AE chars[0xE7 ]=0x00E7 ;//LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x00E8 ;//LATIN SMALL LETTER E WITH GRAVE chars[0xE9 ]=0x00E9 ;//LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x00EA ;//LATIN SMALL LETTER E WITH CIRCUMFLEX chars[0xEB ]=0x00EB ;//LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x00EC ;//LATIN SMALL LETTER I WITH GRAVE chars[0xED ]=0x00ED ;//LATIN SMALL LETTER I WITH ACUTE chars[0xEE ]=0x00EE ;//LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x00EF ;//LATIN SMALL LETTER I WITH DIAERESIS chars[0xF0 ]=0x0175 ;//LATIN SMALL LETTER W WITH CIRCUMFLEX chars[0xF1 ]=0x00F1 ;//LATIN SMALL LETTER N WITH TILDE chars[0xF2 ]=0x00F2 ;//LATIN SMALL LETTER O WITH GRAVE chars[0xF3 ]=0x00F3 ;//LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x00F4 ;//LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x00F5 ;//LATIN SMALL LETTER O WITH TILDE chars[0xF6 ]=0x00F6 ;//LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x1E6B ;//LATIN SMALL LETTER T WITH DOT ABOVE chars[0xF8 ]=0x00F8 ;//LATIN SMALL LETTER O WITH STROKE chars[0xF9 ]=0x00F9 ;//LATIN SMALL LETTER U WITH GRAVE chars[0xFA ]=0x00FA ;//LATIN SMALL LETTER U WITH ACUTE chars[0xFB ]=0x00FB ;//LATIN SMALL LETTER U WITH CIRCUMFLEX chars[0xFC ]=0x00FC ;//LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x00FD ;//LATIN SMALL LETTER Y WITH ACUTE chars[0xFE ]=0x0177 ;//LATIN SMALL LETTER Y WITH CIRCUMFLEX chars[0xFF ]=0x00FF ;//LATIN SMALL LETTER Y WITH DIAERESIS } public static char decode(byte b){ return chars[b & 0xff]; } }
7,480
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_11.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_11.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; public class ISO8859_11 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA1 ]=0x0E01 ;//THAI CHARACTER KO KAI chars[0xA2 ]=0x0E02 ;//THAI CHARACTER KHO KHAI chars[0xA3 ]=0x0E03 ;//THAI CHARACTER KHO KHUAT chars[0xA4 ]=0x0E04 ;//THAI CHARACTER KHO KHWAI chars[0xA5 ]=0x0E05 ;//THAI CHARACTER KHO KHON chars[0xA6 ]=0x0E06 ;//THAI CHARACTER KHO RAKHANG chars[0xA7 ]=0x0E07 ;//THAI CHARACTER NGO NGU chars[0xA8 ]=0x0E08 ;//THAI CHARACTER CHO CHAN chars[0xA9 ]=0x0E09 ;//THAI CHARACTER CHO CHING chars[0xAA ]=0x0E0A ;//THAI CHARACTER CHO CHANG chars[0xAB ]=0x0E0B ;//THAI CHARACTER SO SO chars[0xAC ]=0x0E0C ;//THAI CHARACTER CHO CHOE chars[0xAD ]=0x0E0D ;//THAI CHARACTER YO YING chars[0xAE ]=0x0E0E ;//THAI CHARACTER DO CHADA chars[0xAF ]=0x0E0F ;//THAI CHARACTER TO PATAK chars[0xB0 ]=0x0E10 ;//THAI CHARACTER THO THAN chars[0xB1 ]=0x0E11 ;//THAI CHARACTER THO NANGMONTHO chars[0xB2 ]=0x0E12 ;//THAI CHARACTER THO PHUTHAO chars[0xB3 ]=0x0E13 ;//THAI CHARACTER NO NEN chars[0xB4 ]=0x0E14 ;//THAI CHARACTER DO DEK chars[0xB5 ]=0x0E15 ;//THAI CHARACTER TO TAO chars[0xB6 ]=0x0E16 ;//THAI CHARACTER THO THUNG chars[0xB7 ]=0x0E17 ;//THAI CHARACTER THO THAHAN chars[0xB8 ]=0x0E18 ;//THAI CHARACTER THO THONG chars[0xB9 ]=0x0E19 ;//THAI CHARACTER NO NU chars[0xBA ]=0x0E1A ;//THAI CHARACTER BO BAIMAI chars[0xBB ]=0x0E1B ;//THAI CHARACTER PO PLA chars[0xBC ]=0x0E1C ;//THAI CHARACTER PHO PHUNG chars[0xBD ]=0x0E1D ;//THAI CHARACTER FO FA chars[0xBE ]=0x0E1E ;//THAI CHARACTER PHO PHAN chars[0xBF ]=0x0E1F ;//THAI CHARACTER FO FAN chars[0xC0 ]=0x0E20 ;//THAI CHARACTER PHO SAMPHAO chars[0xC1 ]=0x0E21 ;//THAI CHARACTER MO MA chars[0xC2 ]=0x0E22 ;//THAI CHARACTER YO YAK chars[0xC3 ]=0x0E23 ;//THAI CHARACTER RO RUA chars[0xC4 ]=0x0E24 ;//THAI CHARACTER RU chars[0xC5 ]=0x0E25 ;//THAI CHARACTER LO LING chars[0xC6 ]=0x0E26 ;//THAI CHARACTER LU chars[0xC7 ]=0x0E27 ;//THAI CHARACTER WO WAEN chars[0xC8 ]=0x0E28 ;//THAI CHARACTER SO SALA chars[0xC9 ]=0x0E29 ;//THAI CHARACTER SO RUSI chars[0xCA ]=0x0E2A ;//THAI CHARACTER SO SUA chars[0xCB ]=0x0E2B ;//THAI CHARACTER HO HIP chars[0xCC ]=0x0E2C ;//THAI CHARACTER LO CHULA chars[0xCD ]=0x0E2D ;//THAI CHARACTER O ANG chars[0xCE ]=0x0E2E ;//THAI CHARACTER HO NOKHUK chars[0xCF ]=0x0E2F ;//THAI CHARACTER PAIYANNOI chars[0xD0 ]=0x0E30 ;//THAI CHARACTER SARA A chars[0xD1 ]=0x0E31 ;//THAI CHARACTER MAI HAN-AKAT chars[0xD2 ]=0x0E32 ;//THAI CHARACTER SARA AA chars[0xD3 ]=0x0E33 ;//THAI CHARACTER SARA AM chars[0xD4 ]=0x0E34 ;//THAI CHARACTER SARA I chars[0xD5 ]=0x0E35 ;//THAI CHARACTER SARA II chars[0xD6 ]=0x0E36 ;//THAI CHARACTER SARA UE chars[0xD7 ]=0x0E37 ;//THAI CHARACTER SARA UEE chars[0xD8 ]=0x0E38 ;//THAI CHARACTER SARA U chars[0xD9 ]=0x0E39 ;//THAI CHARACTER SARA UU chars[0xDA ]=0x0E3A ;//THAI CHARACTER PHINTHU chars[0xDF ]=0x0E3F ;//THAI CURRENCY SYMBOL BAHT chars[0xE0 ]=0x0E40 ;//THAI CHARACTER SARA E chars[0xE1 ]=0x0E41 ;//THAI CHARACTER SARA AE chars[0xE2 ]=0x0E42 ;//THAI CHARACTER SARA O chars[0xE3 ]=0x0E43 ;//THAI CHARACTER SARA AI MAIMUAN chars[0xE4 ]=0x0E44 ;//THAI CHARACTER SARA AI MAIMALAI chars[0xE5 ]=0x0E45 ;//THAI CHARACTER LAKKHANGYAO chars[0xE6 ]=0x0E46 ;//THAI CHARACTER MAIYAMOK chars[0xE7 ]=0x0E47 ;//THAI CHARACTER MAITAIKHU chars[0xE8 ]=0x0E48 ;//THAI CHARACTER MAI EK chars[0xE9 ]=0x0E49 ;//THAI CHARACTER MAI THO chars[0xEA ]=0x0E4A ;//THAI CHARACTER MAI TRI chars[0xEB ]=0x0E4B ;//THAI CHARACTER MAI CHATTAWA chars[0xEC ]=0x0E4C ;//THAI CHARACTER THANTHAKHAT chars[0xED ]=0x0E4D ;//THAI CHARACTER NIKHAHIT chars[0xEE ]=0x0E4E ;//THAI CHARACTER YAMAKKAN chars[0xEF ]=0x0E4F ;//THAI CHARACTER FONGMAN chars[0xF0 ]=0x0E50 ;//THAI DIGIT ZERO chars[0xF1 ]=0x0E51 ;//THAI DIGIT ONE chars[0xF2 ]=0x0E52 ;//THAI DIGIT TWO chars[0xF3 ]=0x0E53 ;//THAI DIGIT THREE chars[0xF4 ]=0x0E54 ;//THAI DIGIT FOUR chars[0xF5 ]=0x0E55 ;//THAI DIGIT FIVE chars[0xF6 ]=0x0E56 ;//THAI DIGIT SIX chars[0xF7 ]=0x0E57 ;//THAI DIGIT SEVEN chars[0xF8 ]=0x0E58 ;//THAI DIGIT EIGHT chars[0xF9 ]=0x0E59 ;//THAI DIGIT NINE chars[0xFA ]=0x0E5A ;//THAI CHARACTER ANGKHANKHU chars[0xFB ]=0x0E5B ;//THAI CHARACTER KHOMUT } public static char decode(byte b){ return chars[b & 0xff]; } }
5,960
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1251.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1251.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * This class contains method to map a windows-1251 char * into a Unicode char * */ public class WIN1251 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x0402 ;// CYRILLIC CAPITAL LETTER DJE chars[0x81 ]=0x0403 ;// CYRILLIC CAPITAL LETTER GJE chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0453 ;// CYRILLIC SMALL LETTER GJE chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x88 ]=0x20AC ;// EURO SIGN chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8A ]=0x0409 ;// CYRILLIC CAPITAL LETTER LJE chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8C ]=0x040A ;// CYRILLIC CAPITAL LETTER NJE chars[0x8D ]=0x040C ;// CYRILLIC CAPITAL LETTER KJE chars[0x8E ]=0x040B ;// CYRILLIC CAPITAL LETTER TSHE chars[0x8F ]=0x040F ;// CYRILLIC CAPITAL LETTER DZHE chars[0x90 ]=0x0452 ;// CYRILLIC SMALL LETTER DJE chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9A ]=0x0459 ;// CYRILLIC SMALL LETTER LJE chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9C ]=0x045A ;// CYRILLIC SMALL LETTER NJE chars[0x9D ]=0x045C ;// CYRILLIC SMALL LETTER KJE chars[0x9E ]=0x045B ;// CYRILLIC SMALL LETTER TSHE chars[0x9F ]=0x045F ;// CYRILLIC SMALL LETTER DZHE chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x040E ;// CYRILLIC CAPITAL LETTER SHORT U chars[0xA2 ]=0x045E ;// CYRILLIC SMALL LETTER SHORT U chars[0xA3 ]=0x0408 ;// CYRILLIC CAPITAL LETTER JE chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x0490 ;// CYRILLIC CAPITAL LETTER GHE WITH UPTURN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x0401 ;// CYRILLIC CAPITAL LETTER IO chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x0404 ;// CYRILLIC CAPITAL LETTER UKRAINIAN IE chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x0407 ;// CYRILLIC CAPITAL LETTER YI chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x0406 ;// CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I chars[0xB3 ]=0x0456 ;// CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I chars[0xB4 ]=0x0491 ;// CYRILLIC SMALL LETTER GHE WITH UPTURN chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x0451 ;// CYRILLIC SMALL LETTER IO chars[0xB9 ]=0x2116 ;// NUMERO SIGN chars[0xBA ]=0x0454 ;// CYRILLIC SMALL LETTER UKRAINIAN IE chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x0458 ;// CYRILLIC SMALL LETTER JE chars[0xBD ]=0x0405 ;// CYRILLIC CAPITAL LETTER DZE chars[0xBE ]=0x0455 ;// CYRILLIC SMALL LETTER DZE chars[0xBF ]=0x0457 ;// CYRILLIC SMALL LETTER YI chars[0xC0 ]=0x0410 ;// CYRILLIC CAPITAL LETTER A chars[0xC1 ]=0x0411 ;// CYRILLIC CAPITAL LETTER BE chars[0xC2 ]=0x0412 ;// CYRILLIC CAPITAL LETTER VE chars[0xC3 ]=0x0413 ;// CYRILLIC CAPITAL LETTER GHE chars[0xC4 ]=0x0414 ;// CYRILLIC CAPITAL LETTER DE chars[0xC5 ]=0x0415 ;// CYRILLIC CAPITAL LETTER IE chars[0xC6 ]=0x0416 ;// CYRILLIC CAPITAL LETTER ZHE chars[0xC7 ]=0x0417 ;// CYRILLIC CAPITAL LETTER ZE chars[0xC8 ]=0x0418 ;// CYRILLIC CAPITAL LETTER I chars[0xC9 ]=0x0419 ;// CYRILLIC CAPITAL LETTER SHORT I chars[0xCA ]=0x041A ;// CYRILLIC CAPITAL LETTER KA chars[0xCB ]=0x041B ;// CYRILLIC CAPITAL LETTER EL chars[0xCC ]=0x041C ;// CYRILLIC CAPITAL LETTER EM chars[0xCD ]=0x041D ;// CYRILLIC CAPITAL LETTER EN chars[0xCE ]=0x041E ;// CYRILLIC CAPITAL LETTER O chars[0xCF ]=0x041F ;// CYRILLIC CAPITAL LETTER PE chars[0xD0 ]=0x0420 ;// CYRILLIC CAPITAL LETTER ER chars[0xD1 ]=0x0421 ;// CYRILLIC CAPITAL LETTER ES chars[0xD2 ]=0x0422 ;// CYRILLIC CAPITAL LETTER TE chars[0xD3 ]=0x0423 ;// CYRILLIC CAPITAL LETTER U chars[0xD4 ]=0x0424 ;// CYRILLIC CAPITAL LETTER EF chars[0xD5 ]=0x0425 ;// CYRILLIC CAPITAL LETTER HA chars[0xD6 ]=0x0426 ;// CYRILLIC CAPITAL LETTER TSE chars[0xD7 ]=0x0427 ;// CYRILLIC CAPITAL LETTER CHE chars[0xD8 ]=0x0428 ;// CYRILLIC CAPITAL LETTER SHA chars[0xD9 ]=0x0429 ;// CYRILLIC CAPITAL LETTER SHCHA chars[0xDA ]=0x042A ;// CYRILLIC CAPITAL LETTER HARD SIGN chars[0xDB ]=0x042B ;// CYRILLIC CAPITAL LETTER YERU chars[0xDC ]=0x042C ;// CYRILLIC CAPITAL LETTER SOFT SIGN chars[0xDD ]=0x042D ;// CYRILLIC CAPITAL LETTER E chars[0xDE ]=0x042E ;// CYRILLIC CAPITAL LETTER YU chars[0xDF ]=0x042F ;// CYRILLIC CAPITAL LETTER YA chars[0xE0 ]=0x0430 ;// CYRILLIC SMALL LETTER A chars[0xE1 ]=0x0431 ;// CYRILLIC SMALL LETTER BE chars[0xE2 ]=0x0432 ;// CYRILLIC SMALL LETTER VE chars[0xE3 ]=0x0433 ;// CYRILLIC SMALL LETTER GHE chars[0xE4 ]=0x0434 ;// CYRILLIC SMALL LETTER DE chars[0xE5 ]=0x0435 ;// CYRILLIC SMALL LETTER IE chars[0xE6 ]=0x0436 ;// CYRILLIC SMALL LETTER ZHE chars[0xE7 ]=0x0437 ;// CYRILLIC SMALL LETTER ZE chars[0xE8 ]=0x0438 ;// CYRILLIC SMALL LETTER I chars[0xE9 ]=0x0439 ;// CYRILLIC SMALL LETTER SHORT I chars[0xEA ]=0x043A ;// CYRILLIC SMALL LETTER KA chars[0xEB ]=0x043B ;// CYRILLIC SMALL LETTER EL chars[0xEC ]=0x043C ;// CYRILLIC SMALL LETTER EM chars[0xED ]=0x043D ;// CYRILLIC SMALL LETTER EN chars[0xEE ]=0x043E ;// CYRILLIC SMALL LETTER O chars[0xEF ]=0x043F ;// CYRILLIC SMALL LETTER PE chars[0xF0 ]=0x0440 ;// CYRILLIC SMALL LETTER ER chars[0xF1 ]=0x0441 ;// CYRILLIC SMALL LETTER ES chars[0xF2 ]=0x0442 ;// CYRILLIC SMALL LETTER TE chars[0xF3 ]=0x0443 ;// CYRILLIC SMALL LETTER U chars[0xF4 ]=0x0444 ;// CYRILLIC SMALL LETTER EF chars[0xF5 ]=0x0445 ;// CYRILLIC SMALL LETTER HA chars[0xF6 ]=0x0446 ;// CYRILLIC SMALL LETTER TSE chars[0xF7 ]=0x0447 ;// CYRILLIC SMALL LETTER CHE chars[0xF8 ]=0x0448 ;// CYRILLIC SMALL LETTER SHA chars[0xF9 ]=0x0449 ;// CYRILLIC SMALL LETTER SHCHA chars[0xFA ]=0x044A ;// CYRILLIC SMALL LETTER HARD SIGN chars[0xFB ]=0x044B ;// CYRILLIC SMALL LETTER YERU chars[0xFC ]=0x044C ;// CYRILLIC SMALL LETTER SOFT SIGN chars[0xFD ]=0x044D ;// CYRILLIC SMALL LETTER E chars[0xFE ]=0x044E ;// CYRILLIC SMALL LETTER YU chars[0xFF ]=0x044F ;// CYRILLIC SMALL LETTER YA } public static char decode(byte b){ return chars[b & 0xff]; } }
8,825
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_5.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_5.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-5 char * into a Unicode char * */ public class ISO8859_5 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; chars[0xA1 ]=0x0401; chars[0xA2 ]=0x0402; chars[0xA3 ]=0x0403; chars[0xA4 ]=0x0404; chars[0xA5 ]=0x0405; chars[0xA6 ]=0x0406; chars[0xA7 ]=0x0407; chars[0xA8 ]=0x0408; chars[0xA9 ]=0x0409; chars[0xAA ]=0x040A; chars[0xAB ]=0x040B; chars[0xAC ]=0x040C; chars[0xAD ]=0x00AD; chars[0xAE ]=0x040E; chars[0xAF ]=0x040F; chars[0xB0 ]=0x0410; chars[0xB1 ]=0x0411; chars[0xB2 ]=0x0412; chars[0xB3 ]=0x0413; chars[0xB4 ]=0x0414; chars[0xB5 ]=0x0415; chars[0xB6 ]=0x0416; chars[0xB7 ]=0x0417; chars[0xB8 ]=0x0418; chars[0xB9 ]=0x0419; chars[0xBA ]=0x041A; chars[0xBB ]=0x041B; chars[0xBC ]=0x041C; chars[0xBD ]=0x041D; chars[0xBE ]=0x041E; chars[0xBF ]=0x041F; chars[0xC0 ]=0x0420; chars[0xC1 ]=0x0421; chars[0xC2 ]=0x0422; chars[0xC3 ]=0x0423; chars[0xC4 ]=0x0424; chars[0xC5 ]=0x0425; chars[0xC6 ]=0x0426; chars[0xC7 ]=0x0427; chars[0xC8 ]=0x0428; chars[0xC9 ]=0x0429; chars[0xCA ]=0x042A; chars[0xCB ]=0x042B; chars[0xCC ]=0x042C; chars[0xCD ]=0x042D; chars[0xCE ]=0x042E; chars[0xCF ]=0x042F; chars[0xD0 ]=0x0430; chars[0xD1 ]=0x0431; chars[0xD2 ]=0x0432; chars[0xD3 ]=0x0433; chars[0xD4 ]=0x0434; chars[0xD5 ]=0x0435; chars[0xD6 ]=0x0436; chars[0xD7 ]=0x0437; chars[0xD8 ]=0x0438; chars[0xD9 ]=0x0439; chars[0xDA ]=0x043A; chars[0xDB ]=0x043B; chars[0xDC ]=0x043C; chars[0xDD ]=0x043D; chars[0xDE ]=0x043E; chars[0xDF ]=0x043F; chars[0xE0 ]=0x0440; chars[0xE1 ]=0x0441; chars[0xE2 ]=0x0442; chars[0xE3 ]=0x0443; chars[0xE4 ]=0x0444; chars[0xE5 ]=0x0445; chars[0xE6 ]=0x0446; chars[0xE7 ]=0x0447; chars[0xE8 ]=0x0448; chars[0xE9 ]=0x0449; chars[0xEA ]=0x044A; chars[0xEB ]=0x044B; chars[0xEC ]=0x044C; chars[0xED ]=0x044D; chars[0xEE ]=0x044E; chars[0xEF ]=0x044F; chars[0xF0 ]=0x2116; chars[0xF1 ]=0x0451; chars[0xF2 ]=0x0452; chars[0xF3 ]=0x0453; chars[0xF4 ]=0x0454; chars[0xF5 ]=0x0455; chars[0xF6 ]=0x0456; chars[0xF7 ]=0x0457; chars[0xF8 ]=0x0458; chars[0xF9 ]=0x0459; chars[0xFA ]=0x045A; chars[0xFB ]=0x045B; chars[0xFC ]=0x045C; chars[0xFD ]=0x00A7; chars[0xFE ]=0x045E; chars[0xFF ]=0x045F; } public static char decode(byte b){ return chars[b & 0xff]; } }
4,162
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XMLChar.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/XMLChar.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * XimpleWare's XMLChar implementation. * Creation date: (2/9/04 6:27:46 PM) */ public class XMLChar { /** * XMLChar constructor comment. */ // // Constants // /** Character flags. */ private static final byte[] UNI_CHARS = new byte[0x10000]; /** Valid character mask. */ public static final int XML_VALID = 0x01; /** Space character mask. */ public static final int XML_SPACE = 0x02; /** Name start character mask. */ public static final int XML_NAME_START = 0x04; /** Name character mask. */ public static final int XML_NAME = 0x08; /** Pubid character mask. */ public static final int XML_PUBID = 0x10; /** * Content character mask. Special characters are those that can * be considered the start of markup, such as '&lt;' and '&amp;'. * The various newline characters are considered special as well. * All other valid XML characters can be considered content. * <p> * This is an optimization for the inner loop of character scanning. */ public static final int XML_CONTENT = 0x20; /** NCName start character mask. */ public static final int XML_NCNAME_START = 0x40; /** NCName character mask. */ public static final int XML_NCNAME = 0x80; // // Static initialization // static { // // [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | // [#xE000-#xFFFD] | [#x10000-#x10FFFF] // int xmlCharRange[][] = { { 0x0009, 0x000A }, { 0x000D, 0x000D }, { 0x0020, 0xD7FF }, { 0xE000, 0xFFFD }, }; // // [3] S ::= (#x20 | #x9 | #xD | #xA)+ // int xmlSpaceChar[] = { 0x0020, 0x0009, 0x000D, 0x000A, }; // // [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | // CombiningChar | Extender // int xmlNameChar[] = { 0x002D, 0x002E, // '-' and '.' }; // // [5] Name ::= (Letter | '_' | ':') (NameChar)* // int xmlNameStartChar[] = { 0x003A, 0x005F, // ':' and '_' }; // // [13] PubidChar ::= #x20 | 0xD | 0xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] // int xmlPubidChar[] = { 0x000A, 0x000D, 0x0020, 0x0021, 0x0023, 0x0024, 0x0025, 0x003D, 0x005F }; int xmlPubidRange[][] = { { 0x0027, 0x003B }, { 0x003F, 0x005A }, { 0x0061, 0x007A } }; // // [84] Letter ::= BaseChar | Ideographic // int xmlLetterRange[][] = { // BaseChar { 0x0041, 0x005A }, { 0x0061, 0x007A }, { 0x00C0, 0x00D6 }, { 0x00D8, 0x00F6 }, { 0x00F8, 0x0131 }, { 0x0134, 0x013E }, { 0x0141, 0x0148 }, { 0x014A, 0x017E }, { 0x0180, 0x01C3 }, { 0x01CD, 0x01F0 }, { 0x01F4, 0x01F5 }, { 0x01FA, 0x0217 }, { 0x0250, 0x02A8 }, { 0x02BB, 0x02C1 }, { 0x0388, 0x038A }, { 0x038E, 0x03A1 }, { 0x03A3, 0x03CE }, { 0x03D0, 0x03D6 }, { 0x03E2, 0x03F3 }, { 0x0401, 0x040C }, { 0x040E, 0x044F }, { 0x0451, 0x045C }, { 0x045E, 0x0481 }, { 0x0490, 0x04C4 }, { 0x04C7, 0x04C8 }, { 0x04CB, 0x04CC }, { 0x04D0, 0x04EB }, { 0x04EE, 0x04F5 }, { 0x04F8, 0x04F9 }, { 0x0531, 0x0556 }, { 0x0561, 0x0586 }, { 0x05D0, 0x05EA }, { 0x05F0, 0x05F2 }, { 0x0621, 0x063A }, { 0x0641, 0x064A }, { 0x0671, 0x06B7 }, { 0x06BA, 0x06BE }, { 0x06C0, 0x06CE }, { 0x06D0, 0x06D3 }, { 0x06E5, 0x06E6 }, { 0x0905, 0x0939 }, { 0x0958, 0x0961 }, { 0x0985, 0x098C }, { 0x098F, 0x0990 }, { 0x0993, 0x09A8 }, { 0x09AA, 0x09B0 }, { 0x09B6, 0x09B9 }, { 0x09DC, 0x09DD }, { 0x09DF, 0x09E1 }, { 0x09F0, 0x09F1 }, { 0x0A05, 0x0A0A }, { 0x0A0F, 0x0A10 }, { 0x0A13, 0x0A28 }, { 0x0A2A, 0x0A30 }, { 0x0A32, 0x0A33 }, { 0x0A35, 0x0A36 }, { 0x0A38, 0x0A39 }, { 0x0A59, 0x0A5C }, { 0x0A72, 0x0A74 }, { 0x0A85, 0x0A8B }, { 0x0A8F, 0x0A91 }, { 0x0A93, 0x0AA8 }, { 0x0AAA, 0x0AB0 }, { 0x0AB2, 0x0AB3 }, { 0x0AB5, 0x0AB9 }, { 0x0B05, 0x0B0C }, { 0x0B0F, 0x0B10 }, { 0x0B13, 0x0B28 }, { 0x0B2A, 0x0B30 }, { 0x0B32, 0x0B33 }, { 0x0B36, 0x0B39 }, { 0x0B5C, 0x0B5D }, { 0x0B5F, 0x0B61 }, { 0x0B85, 0x0B8A }, { 0x0B8E, 0x0B90 }, { 0x0B92, 0x0B95 }, { 0x0B99, 0x0B9A }, { 0x0B9E, 0x0B9F }, { 0x0BA3, 0x0BA4 }, { 0x0BA8, 0x0BAA }, { 0x0BAE, 0x0BB5 }, { 0x0BB7, 0x0BB9 }, { 0x0C05, 0x0C0C }, { 0x0C0E, 0x0C10 }, { 0x0C12, 0x0C28 }, { 0x0C2A, 0x0C33 }, { 0x0C35, 0x0C39 }, { 0x0C60, 0x0C61 }, { 0x0C85, 0x0C8C }, { 0x0C8E, 0x0C90 }, { 0x0C92, 0x0CA8 }, { 0x0CAA, 0x0CB3 }, { 0x0CB5, 0x0CB9 }, { 0x0CE0, 0x0CE1 }, { 0x0D05, 0x0D0C }, { 0x0D0E, 0x0D10 }, { 0x0D12, 0x0D28 }, { 0x0D2A, 0x0D39 }, { 0x0D60, 0x0D61 }, { 0x0E01, 0x0E2E }, { 0x0E32, 0x0E33 }, { 0x0E40, 0x0E45 }, { 0x0E81, 0x0E82 }, { 0x0E87, 0x0E88 }, { 0x0E94, 0x0E97 }, { 0x0E99, 0x0E9F }, { 0x0EA1, 0x0EA3 }, { 0x0EAA, 0x0EAB }, { 0x0EAD, 0x0EAE }, { 0x0EB2, 0x0EB3 }, { 0x0EC0, 0x0EC4 }, { 0x0F40, 0x0F47 }, { 0x0F49, 0x0F69 }, { 0x10A0, 0x10C5 }, { 0x10D0, 0x10F6 }, { 0x1102, 0x1103 }, { 0x1105, 0x1107 }, { 0x110B, 0x110C }, { 0x110E, 0x1112 }, { 0x1154, 0x1155 }, { 0x115F, 0x1161 }, { 0x116D, 0x116E }, { 0x1172, 0x1173 }, { 0x11AE, 0x11AF }, { 0x11B7, 0x11B8 }, { 0x11BC, 0x11C2 }, { 0x1E00, 0x1E9B }, { 0x1EA0, 0x1EF9 }, { 0x1F00, 0x1F15 }, { 0x1F18, 0x1F1D }, { 0x1F20, 0x1F45 }, { 0x1F48, 0x1F4D }, { 0x1F50, 0x1F57 }, { 0x1F5F, 0x1F7D }, { 0x1F80, 0x1FB4 }, { 0x1FB6, 0x1FBC }, { 0x1FC2, 0x1FC4 }, { 0x1FC6, 0x1FCC }, { 0x1FD0, 0x1FD3 }, { 0x1FD6, 0x1FDB }, { 0x1FE0, 0x1FEC }, { 0x1FF2, 0x1FF4 }, { 0x1FF6, 0x1FFC }, { 0x212A, 0x212B }, { 0x2180, 0x2182 }, { 0x3041, 0x3094 }, { 0x30A1, 0x30FA }, { 0x3105, 0x312C }, { 0xAC00, 0xD7A3 }, // Ideographic { 0x3021, 0x3029 }, { 0x4E00, 0x9FA5 }, }; int xmlLetterChar[] = { // BaseChar 0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5, 0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C, 0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E, 0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E, 0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x212E, // Ideographic 0x3007, }; // // [87] CombiningChar ::= ... // int xmlCombiningCharRange[][] = { { 0x0300, 0x0345 }, { 0x0360, 0x0361 }, { 0x0483, 0x0486 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 }, { 0x05BB, 0x05BD }, { 0x05C1, 0x05C2 }, { 0x064B, 0x0652 }, { 0x06D6, 0x06DC }, { 0x06DD, 0x06DF }, { 0x06E0, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, { 0x0901, 0x0903 }, { 0x093E, 0x094C }, { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0983 }, { 0x09C0, 0x09C4 }, { 0x09C7, 0x09C8 }, { 0x09CB, 0x09CD }, { 0x09E2, 0x09E3 }, { 0x0A40, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A83 }, { 0x0ABE, 0x0AC5 }, { 0x0AC7, 0x0AC9 }, { 0x0ACB, 0x0ACD }, { 0x0B01, 0x0B03 }, { 0x0B3E, 0x0B43 }, { 0x0B47, 0x0B48 }, { 0x0B4B, 0x0B4D }, { 0x0B56, 0x0B57 }, { 0x0B82, 0x0B83 }, { 0x0BBE, 0x0BC2 }, { 0x0BC6, 0x0BC8 }, { 0x0BCA, 0x0BCD }, { 0x0C01, 0x0C03 }, { 0x0C3E, 0x0C44 }, { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0C82, 0x0C83 }, { 0x0CBE, 0x0CC4 }, { 0x0CC6, 0x0CC8 }, { 0x0CCA, 0x0CCD }, { 0x0CD5, 0x0CD6 }, { 0x0D02, 0x0D03 }, { 0x0D3E, 0x0D43 }, { 0x0D46, 0x0D48 }, { 0x0D4A, 0x0D4D }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F71, 0x0F84 }, { 0x0F86, 0x0F8B }, { 0x0F90, 0x0F95 }, { 0x0F99, 0x0FAD }, { 0x0FB1, 0x0FB7 }, { 0x20D0, 0x20DC }, { 0x302A, 0x302F }, }; int xmlCombiningCharChar[] = { 0x05BF, 0x05C4, 0x0670, 0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF, 0x09D7, 0x0A02, 0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7, 0x0D57, 0x0E31, 0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F, 0x0F97, 0x0FB9, 0x20E1, 0x3099, 0x309A, }; // // [88] Digit ::= ... // int xmlDigitRange[][] = { { 0x0030, 0x0039 }, { 0x0660, 0x0669 }, { 0x06F0, 0x06F9 }, { 0x0966, 0x096F }, { 0x09E6, 0x09EF }, { 0x0A66, 0x0A6F }, { 0x0AE6, 0x0AEF }, { 0x0B66, 0x0B6F }, { 0x0BE7, 0x0BEF }, { 0x0C66, 0x0C6F }, { 0x0CE6, 0x0CEF }, { 0x0D66, 0x0D6F }, { 0x0E50, 0x0E59 }, { 0x0ED0, 0x0ED9 }, { 0x0F20, 0x0F29 }, }; // // [89] Extender ::= ... // int xmlExtenderRange[][] = { { 0x3031, 0x3035 }, { 0x309D, 0x309E }, { 0x30FC, 0x30FE }, }; int xmlExtenderChar[] = { 0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005, }; // // SpecialChar ::= '<', '&', '\n', '\r', ']' // //int specialChar[] = { // '<', '&', '\n', '\r', ']', //}; int xmlSpecialChar[] = { '<', '&', ']' }; // // Static Initialization of all chars and their masks // // set valid characters for (int i = 0; i < xmlCharRange.length; i++) { for (int j = xmlCharRange[i][0]; j <= xmlCharRange[i][1]; j++) { UNI_CHARS[j] |= XML_VALID | XML_CONTENT; } } // remove special characters for (int i = 0; i < xmlSpecialChar.length; i++) { UNI_CHARS[xmlSpecialChar[i]] = (byte) (UNI_CHARS[xmlSpecialChar[i]] & ~XML_CONTENT); } // set space characters for (int i = 0; i < xmlSpaceChar.length; i++) { UNI_CHARS[xmlSpaceChar[i]] |= XML_SPACE; } // set name start characters for (int i = 0; i < xmlNameStartChar.length; i++) { UNI_CHARS[xmlNameStartChar[i]] |= XML_NAME_START | XML_NAME | XML_NCNAME_START | XML_NCNAME; } for (int i = 0; i < xmlLetterRange.length; i++) { for (int j = xmlLetterRange[i][0]; j <= xmlLetterRange[i][1]; j++) { UNI_CHARS[j] |= XML_NAME_START | XML_NAME | XML_NCNAME_START | XML_NCNAME; } } for (int i = 0; i < xmlLetterChar.length; i++) { UNI_CHARS[xmlLetterChar[i]] |= XML_NAME_START | XML_NAME | XML_NCNAME_START | XML_NCNAME; } // set name characters for (int i = 0; i < xmlNameChar.length; i++) { UNI_CHARS[xmlNameChar[i]] |= XML_NAME | XML_NCNAME; } for (int i = 0; i < xmlDigitRange.length; i++) { for (int j = xmlDigitRange[i][0]; j <= xmlDigitRange[i][1]; j++) { UNI_CHARS[j] |= XML_NAME | XML_NCNAME; } } for (int i = 0; i < xmlCombiningCharRange.length; i++) { for (int j = xmlCombiningCharRange[i][0]; j <= xmlCombiningCharRange[i][1]; j++) { UNI_CHARS[j] |= XML_NAME | XML_NCNAME; } } for (int i = 0; i < xmlCombiningCharChar.length; i++) { UNI_CHARS[xmlCombiningCharChar[i]] |= XML_NAME | XML_NCNAME; } for (int i = 0; i < xmlExtenderRange.length; i++) { for (int j = xmlExtenderRange[i][0]; j <= xmlExtenderRange[i][1]; j++) { UNI_CHARS[j] |= XML_NAME | XML_NCNAME; } } for (int i = 0; i < xmlExtenderChar.length; i++) { UNI_CHARS[xmlExtenderChar[i]] |= XML_NAME | XML_NCNAME; } // remove ':' from allowable XML_NCNAME_START and XML_NCNAME chars UNI_CHARS[':'] &= ~(XML_NCNAME_START | XML_NCNAME); // set Pubid characters for (int i = 0; i < xmlPubidChar.length; i++) { UNI_CHARS[xmlPubidChar[i]] |= XML_PUBID; } for (int i = 0; i < xmlPubidRange.length; i++) { for (int j = xmlPubidRange[i][0]; j <= xmlPubidRange[i][1]; j++) { UNI_CHARS[j] |= XML_PUBID; } } } /** * Returns the high surrogate from a Unicode scalar value * * @param c * The Unicode scalar value to "split". */ public static char highSurrogate(int c) { //H = (S - 0x10000) / 0x400 + 0xD800 return (char) ((c >> 10) + 0xd7c0); } /** * Returns true if the specified character can be considered XML content. * * @param c * The character to check. */ public static boolean isContentChar(int c) { return (c < 0x10000 && (UNI_CHARS[c] & XML_CONTENT) != 0) || (0x10000 <= c && c <= 0x10FFFF); } /** * Returns whether the given Unicode scalar value is a high surrogate * * @param c * The character to check. */ public static boolean isHighSurrogate(int c) { return (0xD800 <= c && c <= 0xDBFF); } /** * Returns true if the specified character is invalid. * * @param c * The character to check. */ public static boolean isInvalidChar(int c) { return ((c < 0x10000) && (UNI_CHARS[c] & XML_VALID) == 0) || (c >= 0x10ffff); } /** * Returns whether the given Unicode scalar value is a low surrogate * * @param c * The character to check. */ public static boolean isLowSurrogate(int c) { return (0xDC00 <= c && c <= 0xDFFF); } /** * Returns true if the specified character can be considered markup. * Markup characters include '&lt;', '&amp;', and '%'. * * @param c The character to check. */ public static boolean isMarkupChar(int c) { return c == '<' || c == '&' || c == '%'; } /** * Returns true if the specified character is a valid name * character as defined by production [4] in the XML 1.0 * specification. * * @param c The character to check. */ public static boolean isNameChar(int c) { return c < 0x10000 && (UNI_CHARS[c] & XML_NAME) != 0; } /** * Returns true if the specified character is a valid name start * character as defined by production [5] in the XML 1.0 * specification. * * @param c The character to check. */ public static boolean isNameStartChar(int c) { return c < 0x10000 && (UNI_CHARS[c] & XML_NAME_START) != 0; } /** * Returns true if the specified character is a valid NCName * character as defined by production [5] in Namespaces in XML * recommendation. * * @param c The character to check. */ public static boolean isNCNameChar(int c) { return c < 0x10000 && (UNI_CHARS[c] & XML_NCNAME) != 0; } /** * Returns true if the specified character is a valid NCName start * character as defined by production [4] in Namespaces in XML * recommendation. * * @param c The character to check. */ public static boolean isNCNameStartChar(int c) { return c < 0x10000 && (UNI_CHARS[c] & XML_NCNAME_START) != 0; } /* * [7] Nmtoken ::= (NameChar)+ * * Check to see if a string is a valid Nmtoken according to [7] * in the XML 1.0 Recommendation * * @param nmToken string to check * @return true if nmtoken is a valid Nmtoken */ public static boolean isNmtoken(String nmToken) { if (nmToken.length() == 0) return false; for (int i = 0; i < nmToken.length(); i++ ) if(!isNameChar( nmToken.charAt(i))) return false; return true; } /** * Returns true if the specified character is a valid Pubid * character as defined by production [13] in the XML 1.0 * specification. * * @param c The character to check. */ public static boolean isPubidChar(int c) { return c < 0x10000 && (UNI_CHARS[c] & XML_PUBID) != 0; } /** * Returns true if the specified character is a space character * as defined by production [3] in the XML 1.0 specification. * * @param c The character to check. */ public static boolean isSpaceChar(int c) { return c <= 0x20 && (UNI_CHARS[c] & XML_SPACE) != 0; } /** * Returns true if the specified character is a supplemental character. * * @param c The character to check. */ public static boolean isSupplementalChar(int c) { return (c >= 0x10000 && c <= 0x10FFFF); } /** * Returns true if the specified character is valid. This method * also checks the surrogate character range from 0x10000 to 0x10FFFF. * <p> * If the program chooses to apply the mask directly to the * <code>UNI_CHARS</code> array, then they are responsible for checking * the surrogate character range. * * @param c The character to check. */ public static boolean isValidChar(int c) { return (c < 0x10000 && (UNI_CHARS[c] & XML_VALID) != 0) || (0x10000 <= c && c <= 0x10FFFF); } /** * Returns the low surrogate from a Unicode scalar value * * @param c The Unicode scalar value to "split". */ public static char lowSurrogate(int c) { //L = (S - 0x10000) % 0x400 + 0xDC00 return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00); } /** * Returns Unicode scalar value corresponding to the given * surrogates. * * @param hi The high surrogate. * @param lo The low surrogate. */ public static int scalarValueSurrogate(char hi, char lo) { //N = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000 return ((hi - 0xd800) << 10) + lo - 0x2400; } }
19,093
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1256.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1256.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1256 char * into a Unicode char * */ public class WIN1256 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x81 ]=0x067E ;// ARABIC LETTER PEH chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0192 ;// LATIN SMALL LETTER F WITH HOOK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x88 ]=0x02C6 ;// MODIFIER LETTER CIRCUMFLEX ACCENT chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8A ]=0x0679 ;// ARABIC LETTER TTEH chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8C ]=0x0152 ;// LATIN CAPITAL LIGATURE OE chars[0x8D ]=0x0686 ;// ARABIC LETTER TCHEH chars[0x8E ]=0x0698 ;// ARABIC LETTER JEH chars[0x8F ]=0x0688 ;// ARABIC LETTER DDAL chars[0x90 ]=0x06AF ;// ARABIC LETTER GAF chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x98 ]=0x06A9 ;// ARABIC LETTER KEHEH chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9A ]=0x0691 ;// ARABIC LETTER RREH chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9C ]=0x0153 ;// LATIN SMALL LIGATURE OE chars[0x9D ]=0x200C ;// ZERO WIDTH NON-JOINER chars[0x9E ]=0x200D ;// ZERO WIDTH JOINER chars[0x9F ]=0x06BA ;// ARABIC LETTER NOON GHUNNA chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x060C ;// ARABIC COMMA chars[0xA2 ]=0x00A2 ;// CENT SIGN chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x00A5 ;// YEN SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x06BE ;// ARABIC LETTER HEH DOACHASHMEE chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x00AF ;// MACRON chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00B8 ;// CEDILLA chars[0xB9 ]=0x00B9 ;// SUPERSCRIPT ONE chars[0xBA ]=0x061B ;// ARABIC SEMICOLON chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x00BC ;// VULGAR FRACTION ONE QUARTER chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x00BE ;// VULGAR FRACTION THREE QUARTERS chars[0xBF ]=0x061F ;// ARABIC QUESTION MARK chars[0xC0 ]=0x06C1 ;// ARABIC LETTER HEH GOAL chars[0xC1 ]=0x0621 ;// ARABIC LETTER HAMZA chars[0xC2 ]=0x0622 ;// ARABIC LETTER ALEF WITH MADDA ABOVE chars[0xC3 ]=0x0623 ;// ARABIC LETTER ALEF WITH HAMZA ABOVE chars[0xC4 ]=0x0624 ;// ARABIC LETTER WAW WITH HAMZA ABOVE chars[0xC5 ]=0x0625 ;// ARABIC LETTER ALEF WITH HAMZA BELOW chars[0xC6 ]=0x0626 ;// ARABIC LETTER YEH WITH HAMZA ABOVE chars[0xC7 ]=0x0627 ;// ARABIC LETTER ALEF chars[0xC8 ]=0x0628 ;// ARABIC LETTER BEH chars[0xC9 ]=0x0629 ;// ARABIC LETTER TEH MARBUTA chars[0xCA ]=0x062A ;// ARABIC LETTER TEH chars[0xCB ]=0x062B ;// ARABIC LETTER THEH chars[0xCC ]=0x062C ;// ARABIC LETTER JEEM chars[0xCD ]=0x062D ;// ARABIC LETTER HAH chars[0xCE ]=0x062E ;// ARABIC LETTER KHAH chars[0xCF ]=0x062F ;// ARABIC LETTER DAL chars[0xD0 ]=0x0630 ;// ARABIC LETTER THAL chars[0xD1 ]=0x0631 ;// ARABIC LETTER REH chars[0xD2 ]=0x0632 ;// ARABIC LETTER ZAIN chars[0xD3 ]=0x0633 ;// ARABIC LETTER SEEN chars[0xD4 ]=0x0634 ;// ARABIC LETTER SHEEN chars[0xD5 ]=0x0635 ;// ARABIC LETTER SAD chars[0xD6 ]=0x0636 ;// ARABIC LETTER DAD chars[0xD7 ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xD8 ]=0x0637 ;// ARABIC LETTER TAH chars[0xD9 ]=0x0638 ;// ARABIC LETTER ZAH chars[0xDA ]=0x0639 ;// ARABIC LETTER AIN chars[0xDB ]=0x063A ;// ARABIC LETTER GHAIN chars[0xDC ]=0x0640 ;// ARABIC TATWEEL chars[0xDD ]=0x0641 ;// ARABIC LETTER FEH chars[0xDE ]=0x0642 ;// ARABIC LETTER QAF chars[0xDF ]=0x0643 ;// ARABIC LETTER KAF chars[0xE0 ]=0x00E0 ;// LATIN SMALL LETTER A WITH GRAVE chars[0xE1 ]=0x0644 ;// ARABIC LETTER LAM chars[0xE2 ]=0x00E2 ;// LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3 ]=0x0645 ;// ARABIC LETTER MEEM chars[0xE4 ]=0x0646 ;// ARABIC LETTER NOON chars[0xE5 ]=0x0647 ;// ARABIC LETTER HEH chars[0xE6 ]=0x0648 ;// ARABIC LETTER WAW chars[0xE7 ]=0x00E7 ;// LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x00E8 ;// LATIN SMALL LETTER E WITH GRAVE chars[0xE9 ]=0x00E9 ;// LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x00EA ;// LATIN SMALL LETTER E WITH CIRCUMFLEX chars[0xEB ]=0x00EB ;// LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x0649 ;// ARABIC LETTER ALEF MAKSURA chars[0xED ]=0x064A ;// ARABIC LETTER YEH chars[0xEE ]=0x00EE ;// LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x00EF ;// LATIN SMALL LETTER I WITH DIAERESIS chars[0xF0 ]=0x064B ;// ARABIC FATHATAN chars[0xF1 ]=0x064C ;// ARABIC DAMMATAN chars[0xF2 ]=0x064D ;// ARABIC KASRATAN chars[0xF3 ]=0x064E ;// ARABIC FATHA chars[0xF4 ]=0x00F4 ;// LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x064F ;// ARABIC DAMMA chars[0xF6 ]=0x0650 ;// ARABIC KASRA chars[0xF7 ]=0x00F7 ;// DIVISION SIGN chars[0xF8 ]=0x0651 ;// ARABIC SHADDA chars[0xF9 ]=0x00F9 ;// LATIN SMALL LETTER U WITH GRAVE chars[0xFA ]=0x0652 ;// ARABIC SUKUN chars[0xFB ]=0x00FB ;// LATIN SMALL LETTER U WITH CIRCUMFLEX chars[0xFC ]=0x00FC ;// LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x200E ;// LEFT-TO-RIGHT MARK chars[0xFE ]=0x200F ;// RIGHT-TO-LEFT MARK chars[0xFF ]=0x06D2 ;// ARABIC LETTER YEH BARREE } public static char decode(byte b){ return chars[b & 0xff]; } }
8,324
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1253.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1253.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1253 char * into a Unicode char * */ public class WIN1253 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0192 ;// LATIN SMALL LETTER F WITH HOOK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x0385 ;// GREEK DIALYTIKA TONOS chars[0xA2 ]=0x0386 ;// GREEK CAPITAL LETTER ALPHA WITH TONOS chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x00A5 ;// YEN SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x2015 ;// HORIZONTAL BAR chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x0384 ;// GREEK TONOS chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x0388 ;// GREEK CAPITAL LETTER EPSILON WITH TONOS chars[0xB9 ]=0x0389 ;// GREEK CAPITAL LETTER ETA WITH TONOS chars[0xBA ]=0x038A ;// GREEK CAPITAL LETTER IOTA WITH TONOS chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x038C ;// GREEK CAPITAL LETTER OMICRON WITH TONOS chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x038E ;// GREEK CAPITAL LETTER UPSILON WITH TONOS chars[0xBF ]=0x038F ;// GREEK CAPITAL LETTER OMEGA WITH TONOS chars[0xC0 ]=0x0390 ;// GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS chars[0xC1 ]=0x0391 ;// GREEK CAPITAL LETTER ALPHA chars[0xC2 ]=0x0392 ;// GREEK CAPITAL LETTER BETA chars[0xC3 ]=0x0393 ;// GREEK CAPITAL LETTER GAMMA chars[0xC4 ]=0x0394 ;// GREEK CAPITAL LETTER DELTA chars[0xC5 ]=0x0395 ;// GREEK CAPITAL LETTER EPSILON chars[0xC6 ]=0x0396 ;// GREEK CAPITAL LETTER ZETA chars[0xC7 ]=0x0397 ;// GREEK CAPITAL LETTER ETA chars[0xC8 ]=0x0398 ;// GREEK CAPITAL LETTER THETA chars[0xC9 ]=0x0399 ;// GREEK CAPITAL LETTER IOTA chars[0xCA ]=0x039A ;// GREEK CAPITAL LETTER KAPPA chars[0xCB ]=0x039B ;// GREEK CAPITAL LETTER LAMDA chars[0xCC ]=0x039C ;// GREEK CAPITAL LETTER MU chars[0xCD ]=0x039D ;// GREEK CAPITAL LETTER NU chars[0xCE ]=0x039E ;// GREEK CAPITAL LETTER XI chars[0xCF ]=0x039F ;// GREEK CAPITAL LETTER OMICRON chars[0xD0 ]=0x03A0 ;// GREEK CAPITAL LETTER PI chars[0xD1 ]=0x03A1 ;// GREEK CAPITAL LETTER RHO chars[0xD3 ]=0x03A3 ;// GREEK CAPITAL LETTER SIGMA chars[0xD4 ]=0x03A4 ;// GREEK CAPITAL LETTER TAU chars[0xD5 ]=0x03A5 ;// GREEK CAPITAL LETTER UPSILON chars[0xD6 ]=0x03A6 ;// GREEK CAPITAL LETTER PHI chars[0xD7 ]=0x03A7 ;// GREEK CAPITAL LETTER CHI chars[0xD8 ]=0x03A8 ;// GREEK CAPITAL LETTER PSI chars[0xD9 ]=0x03A9 ;// GREEK CAPITAL LETTER OMEGA chars[0xDA ]=0x03AA ;// GREEK CAPITAL LETTER IOTA WITH DIALYTIKA chars[0xDB ]=0x03AB ;// GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA chars[0xDC ]=0x03AC ;// GREEK SMALL LETTER ALPHA WITH TONOS chars[0xDD ]=0x03AD ;// GREEK SMALL LETTER EPSILON WITH TONOS chars[0xDE ]=0x03AE ;// GREEK SMALL LETTER ETA WITH TONOS chars[0xDF ]=0x03AF ;// GREEK SMALL LETTER IOTA WITH TONOS chars[0xE0 ]=0x03B0 ;// GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS chars[0xE1 ]=0x03B1 ;// GREEK SMALL LETTER ALPHA chars[0xE2 ]=0x03B2 ;// GREEK SMALL LETTER BETA chars[0xE3 ]=0x03B3 ;// GREEK SMALL LETTER GAMMA chars[0xE4 ]=0x03B4 ;// GREEK SMALL LETTER DELTA chars[0xE5 ]=0x03B5 ;// GREEK SMALL LETTER EPSILON chars[0xE6 ]=0x03B6 ;// GREEK SMALL LETTER ZETA chars[0xE7 ]=0x03B7 ;// GREEK SMALL LETTER ETA chars[0xE8 ]=0x03B8 ;// GREEK SMALL LETTER THETA chars[0xE9 ]=0x03B9 ;// GREEK SMALL LETTER IOTA chars[0xEA ]=0x03BA ;// GREEK SMALL LETTER KAPPA chars[0xEB ]=0x03BB ;// GREEK SMALL LETTER LAMDA chars[0xEC ]=0x03BC ;// GREEK SMALL LETTER MU chars[0xED ]=0x03BD ;// GREEK SMALL LETTER NU chars[0xEE ]=0x03BE ;// GREEK SMALL LETTER XI chars[0xEF ]=0x03BF ;// GREEK SMALL LETTER OMICRON chars[0xF0 ]=0x03C0 ;// GREEK SMALL LETTER PI chars[0xF1 ]=0x03C1 ;// GREEK SMALL LETTER RHO chars[0xF2 ]=0x03C2 ;// GREEK SMALL LETTER FINAL SIGMA chars[0xF3 ]=0x03C3 ;// GREEK SMALL LETTER SIGMA chars[0xF4 ]=0x03C4 ;// GREEK SMALL LETTER TAU chars[0xF5 ]=0x03C5 ;// GREEK SMALL LETTER UPSILON chars[0xF6 ]=0x03C6 ;// GREEK SMALL LETTER PHI chars[0xF7 ]=0x03C7 ;// GREEK SMALL LETTER CHI chars[0xF8 ]=0x03C8 ;// GREEK SMALL LETTER PSI chars[0xF9 ]=0x03C9 ;// GREEK SMALL LETTER OMEGA chars[0xFA ]=0x03CA ;// GREEK SMALL LETTER IOTA WITH DIALYTIKA chars[0xFB ]=0x03CB ;// GREEK SMALL LETTER UPSILON WITH DIALYTIKA chars[0xFC ]=0x03CC ;// GREEK SMALL LETTER OMICRON WITH TONOS chars[0xFD ]=0x03CD ;// GREEK SMALL LETTER UPSILON WITH TONOS chars[0xFE ]=0x03CE ;// GREEK SMALL LETTER OMEGA WITH TONOS } public static char decode(byte b){ return chars[b & 0xff]; } }
7,856
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_10.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_10.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-10 char * into a Unicode char * */ public class ISO8859_10 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; chars[0xA1 ]=0x0104; chars[0xA2 ]=0x0112; chars[0xA3 ]=0x0122; chars[0xA4 ]=0x012A; chars[0xA5 ]=0x0128; chars[0xA6 ]=0x0136; chars[0xA7 ]=0x00A7; chars[0xA8 ]=0x013B; chars[0xA9 ]=0x0110; chars[0xAA ]=0x0160; chars[0xAB ]=0x0166; chars[0xAC ]=0x017D; chars[0xAD ]=0x00AD; chars[0xAE ]=0x016A; chars[0xAF ]=0x014A; chars[0xB0 ]=0x00B0; chars[0xB1 ]=0x0105; chars[0xB2 ]=0x0113; chars[0xB3 ]=0x0123; chars[0xB4 ]=0x012B; chars[0xB5 ]=0x0129; chars[0xB6 ]=0x0137; chars[0xB7 ]=0x00B7; chars[0xB8 ]=0x013CA; chars[0xB9 ]=0x0111; chars[0xBA ]=0x0161; chars[0xBB ]=0x0167; chars[0xBC ]=0x017E; chars[0xBD ]=0x2015; chars[0xBE ]=0x016B; chars[0xBF ]=0x014B; chars[0xC0 ]=0x0100; chars[0xC1 ]=0x00C1; chars[0xC2 ]=0x00C2; chars[0xC3 ]=0x00C3; chars[0xC4 ]=0x00C4; chars[0xC5 ]=0x00C5; chars[0xC6 ]=0x00C6; chars[0xC7 ]=0x012E; chars[0xC8 ]=0x010C; chars[0xC9 ]=0x00C9; chars[0xCA ]=0x0118; chars[0xCB ]=0x00CB; chars[0xCC ]=0x0116; chars[0xCD ]=0x00CD; chars[0xCE ]=0x00CE; chars[0xCF ]=0x00CF; chars[0xD0 ]=0x00D0; chars[0xD1 ]=0x0145; chars[0xD2 ]=0x014C; chars[0xD3 ]=0x00D3; chars[0xD4 ]=0x00D4; chars[0xD5 ]=0x00D5; chars[0xD6 ]=0x00D6; chars[0xD7 ]=0x0168; chars[0xD8 ]=0x00D8; chars[0xD9 ]=0x0172; chars[0xDA ]=0x00DA; chars[0xDB ]=0x00DB; chars[0xDC ]=0x00DC; chars[0xDD ]=0x00DD; chars[0xDE ]=0x00DE; chars[0xDF ]=0x00DF; chars[0xE0 ]=0x0101; chars[0xE1 ]=0x00E1; chars[0xE2 ]=0x00E2; chars[0xE3 ]=0x00E3; chars[0xE4 ]=0x00E4; chars[0xE5 ]=0x00E5; chars[0xE6 ]=0x00E6; chars[0xE7 ]=0x012F; chars[0xE8 ]=0x010D; chars[0xE9 ]=0x00E9; chars[0xEA ]=0x0119; chars[0xEB ]=0x00EB; chars[0xEC ]=0x0117; chars[0xED ]=0x00ED; chars[0xEE ]=0x00EE; chars[0xEF ]=0x00EF; chars[0xF0 ]=0x00F0; chars[0xF1 ]=0x0146; chars[0xF2 ]=0x014D; chars[0xF3 ]=0x00F3; chars[0xF4 ]=0x00F4; chars[0xF5 ]=0x00F5; chars[0xF6 ]=0x00F6; chars[0xF7 ]=0x0169; chars[0xF8 ]=0x00F8; chars[0xF9 ]=0x0173; chars[0xFA ]=0x00FA; chars[0xFB ]=0x00FB; chars[0xFC ]=0x00FC; chars[0xFD ]=0x00FD; chars[0xFE ]=0x00FE; chars[0xFF ]=0x0138; } public static char decode(byte b){ return chars[b & 0xff]; } }
4,169
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_4.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_4.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a ISO-8859-4 char * into a Unicode char * */ public class ISO8859_4 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0xA0 ]=0x00A0; chars[0xA1 ]=0x0104; chars[0xA2 ]=0x0138; chars[0xA3 ]=0x0156; chars[0xA4 ]=0x00A4; chars[0xA5 ]=0x0128; chars[0xA6 ]=0x013B; chars[0xA7 ]=0x00A7; chars[0xA8 ]=0x00A8; chars[0xA9 ]=0x0160; chars[0xAA ]=0x0112; chars[0xAB ]=0x0122; chars[0xAC ]=0x0166; chars[0xAD ]=0x00AD; chars[0xAE ]=0x017D; chars[0xAF ]=0x00AF; chars[0xB0 ]=0x00B0; chars[0xB1 ]=0x0105; chars[0xB2 ]=0x02DB; chars[0xB3 ]=0x0157; chars[0xB4 ]=0x00B4; chars[0xB5 ]=0x0129; chars[0xB6 ]=0x013C; chars[0xB7 ]=0x02C7; chars[0xB8 ]=0x00B8; chars[0xB9 ]=0x0161; chars[0xBA ]=0x0113; chars[0xBB ]=0x0123; chars[0xBC ]=0x0167; chars[0xBD ]=0x014A; chars[0xBE ]=0x017E; chars[0xBF ]=0x014B; chars[0xC0 ]=0x0100; chars[0xC1 ]=0x00C1; chars[0xC2 ]=0x00C2; chars[0xC3 ]=0x00C3; chars[0xC4 ]=0x00C4; chars[0xC5 ]=0x00C5; chars[0xC6 ]=0x00C6; chars[0xC7 ]=0x012E; chars[0xC8 ]=0x010C; chars[0xC9 ]=0x00C9; chars[0xCA ]=0x0118; chars[0xCB ]=0x00CB; chars[0xCC ]=0x0116; chars[0xCD ]=0x00CD; chars[0xCE ]=0x00CE; chars[0xCF ]=0x012A; chars[0xD0 ]=0x0110; chars[0xD1 ]=0x0145; chars[0xD2 ]=0x014C; chars[0xD3 ]=0x0136; chars[0xD4 ]=0x00D4; chars[0xD5 ]=0x00D5; chars[0xD6 ]=0x00D6; chars[0xD7 ]=0x00D7; chars[0xD8 ]=0x00D8; chars[0xD9 ]=0x0172; chars[0xDA ]=0x00DA; chars[0xDB ]=0x00DB; chars[0xDC ]=0x00DC; chars[0xDD ]=0x0168; chars[0xDE ]=0x016A; chars[0xDF ]=0x00DF; chars[0xE0 ]=0x0101; chars[0xE1 ]=0x00E1; chars[0xE2 ]=0x00E2; chars[0xE3 ]=0x00E3; chars[0xE4 ]=0x00E4; chars[0xE5 ]=0x00E5; chars[0xE6 ]=0x00E6; chars[0xE7 ]=0x012F; chars[0xE8 ]=0x010D; chars[0xE9 ]=0x00E9; chars[0xEA ]=0x0119; chars[0xEB ]=0x00EB; chars[0xEC ]=0x0117; chars[0xED ]=0x00ED; chars[0xEE ]=0x00EE; chars[0xEF ]=0x012B; chars[0xF0 ]=0x0111; chars[0xF1 ]=0x0146; chars[0xF2 ]=0x014D; chars[0xF3 ]=0x0137; chars[0xF4 ]=0x00F4; chars[0xF5 ]=0x00F5; chars[0xF6 ]=0x00F6; chars[0xF7 ]=0x00F7; chars[0xF8 ]=0x00F8; chars[0xF9 ]=0x0173; chars[0xFA ]=0x00FA; chars[0xFB ]=0x00FB; chars[0xFC ]=0x00FC; chars[0xFD ]=0x0169; chars[0xFE ]=0x016B; chars[0xFF ]=0x02D9; } public static char decode(byte b){ return chars[b & 0xff]; } }
4,160
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1250.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1250.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1250 char * into a Unicode char * */ public class WIN1250 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8A ]=0x0160 ;// LATIN CAPITAL LETTER S WITH CARON chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8C ]=0x015A ;// LATIN CAPITAL LETTER S WITH ACUTE chars[0x8D ]=0x0164 ;// LATIN CAPITAL LETTER T WITH CARON chars[0x8E ]=0x017D ;// LATIN CAPITAL LETTER Z WITH CARON chars[0x8F ]=0x0179 ;// LATIN CAPITAL LETTER Z WITH ACUTE chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9A ]=0x0161 ;// LATIN SMALL LETTER S WITH CARON chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9C ]=0x015B ;// LATIN SMALL LETTER S WITH ACUTE chars[0x9D ]=0x0165 ;// LATIN SMALL LETTER T WITH CARON chars[0x9E ]=0x017E ;// LATIN SMALL LETTER Z WITH CARON chars[0x9F ]=0x017A ;// LATIN SMALL LETTER Z WITH ACUTE chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x02C7 ;// CARON chars[0xA2 ]=0x02D8 ;// BREVE chars[0xA3 ]=0x0141 ;// LATIN CAPITAL LETTER L WITH STROKE chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x0104 ;// LATIN CAPITAL LETTER A WITH OGONEK chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x015E ;// LATIN CAPITAL LETTER S WITH CEDILLA chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x017B ;// LATIN CAPITAL LETTER Z WITH DOT ABOVE chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x02DB ;// OGONEK chars[0xB3 ]=0x0142 ;// LATIN SMALL LETTER L WITH STROKE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00B8 ;// CEDILLA chars[0xB9 ]=0x0105 ;// LATIN SMALL LETTER A WITH OGONEK chars[0xBA ]=0x015F ;// LATIN SMALL LETTER S WITH CEDILLA chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x013D ;// LATIN CAPITAL LETTER L WITH CARON chars[0xBD ]=0x02DD ;// DOUBLE ACUTE ACCENT chars[0xBE ]=0x013E ;// LATIN SMALL LETTER L WITH CARON chars[0xBF ]=0x017C ;// LATIN SMALL LETTER Z WITH DOT ABOVE chars[0xC0 ]=0x0154 ;// LATIN CAPITAL LETTER R WITH ACUTE chars[0xC1 ]=0x00C1 ;// LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2 ]=0x00C2 ;// LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC3 ]=0x0102 ;// LATIN CAPITAL LETTER A WITH BREVE chars[0xC4 ]=0x00C4 ;// LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x0139 ;// LATIN CAPITAL LETTER L WITH ACUTE chars[0xC6 ]=0x0106 ;// LATIN CAPITAL LETTER C WITH ACUTE chars[0xC7 ]=0x00C7 ;// LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8 ]=0x010C ;// LATIN CAPITAL LETTER C WITH CARON chars[0xC9 ]=0x00C9 ;// LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x0118 ;// LATIN CAPITAL LETTER E WITH OGONEK chars[0xCB ]=0x00CB ;// LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC ]=0x011A ;// LATIN CAPITAL LETTER E WITH CARON chars[0xCD ]=0x00CD ;// LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE ]=0x00CE ;// LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF ]=0x010E ;// LATIN CAPITAL LETTER D WITH CARON chars[0xD0 ]=0x0110 ;// LATIN CAPITAL LETTER D WITH STROKE chars[0xD1 ]=0x0143 ;// LATIN CAPITAL LETTER N WITH ACUTE chars[0xD2 ]=0x0147 ;// LATIN CAPITAL LETTER N WITH CARON chars[0xD3 ]=0x00D3 ;// LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x00D4 ;// LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5 ]=0x0150 ;// LATIN CAPITAL LETTER O WITH DOUBLE ACUTE chars[0xD6 ]=0x00D6 ;// LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xD8 ]=0x0158 ;// LATIN CAPITAL LETTER R WITH CARON chars[0xD9 ]=0x016E ;// LATIN CAPITAL LETTER U WITH RING ABOVE chars[0xDA ]=0x00DA ;// LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB ]=0x0170 ;// LATIN CAPITAL LETTER U WITH DOUBLE ACUTE chars[0xDC ]=0x00DC ;// LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x00DD ;// LATIN CAPITAL LETTER Y WITH ACUTE chars[0xDE ]=0x0162 ;// LATIN CAPITAL LETTER T WITH CEDILLA chars[0xDF ]=0x00DF ;// LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x0155 ;// LATIN SMALL LETTER R WITH ACUTE chars[0xE1 ]=0x00E1 ;// LATIN SMALL LETTER A WITH ACUTE chars[0xE2 ]=0x00E2 ;// LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3 ]=0x0103 ;// LATIN SMALL LETTER A WITH BREVE chars[0xE4 ]=0x00E4 ;// LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x013A ;// LATIN SMALL LETTER L WITH ACUTE chars[0xE6 ]=0x0107 ;// LATIN SMALL LETTER C WITH ACUTE chars[0xE7 ]=0x00E7 ;// LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x010D ;// LATIN SMALL LETTER C WITH CARON chars[0xE9 ]=0x00E9 ;// LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x0119 ;// LATIN SMALL LETTER E WITH OGONEK chars[0xEB ]=0x00EB ;// LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x011B ;// LATIN SMALL LETTER E WITH CARON chars[0xED ]=0x00ED ;// LATIN SMALL LETTER I WITH ACUTE chars[0xEE ]=0x00EE ;// LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x010F ;// LATIN SMALL LETTER D WITH CARON chars[0xF0 ]=0x0111 ;// LATIN SMALL LETTER D WITH STROKE chars[0xF1 ]=0x0144 ;// LATIN SMALL LETTER N WITH ACUTE chars[0xF2 ]=0x0148 ;// LATIN SMALL LETTER N WITH CARON chars[0xF3 ]=0x00F3 ;// LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x00F4 ;// LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x0151 ;// LATIN SMALL LETTER O WITH DOUBLE ACUTE chars[0xF6 ]=0x00F6 ;// LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7 ;// DIVISION SIGN chars[0xF8 ]=0x0159 ;// LATIN SMALL LETTER R WITH CARON chars[0xF9 ]=0x016F ;// LATIN SMALL LETTER U WITH RING ABOVE chars[0xFA ]=0x00FA ;// LATIN SMALL LETTER U WITH ACUTE chars[0xFB ]=0x0171 ;// LATIN SMALL LETTER U WITH DOUBLE ACUTE chars[0xFC ]=0x00FC ;// LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x00FD ;// LATIN SMALL LETTER Y WITH ACUTE chars[0xFE ]=0x0163 ;// LATIN SMALL LETTER T WITH CEDILLA chars[0xFF ]=0x02D9 ;// DOT ABOVE } public static char decode(byte b){ return chars[b & 0xff]; } }
8,976
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
WIN1254.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/WIN1254.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; /** * this class contains method to map a windows-1254 char * into a Unicode char * */ public class WIN1254 { static final char[] chars = new char[0x100]; static { for (int i=0;i<128;i++){ chars[i] = (char)i; } for (int i=128;i<256;i++){ chars[i]=0xfffd; } chars[0x80 ]=0x20AC ;// EURO SIGN chars[0x82 ]=0x201A ;// SINGLE LOW-9 QUOTATION MARK chars[0x83 ]=0x0192 ;// LATIN SMALL LETTER F WITH HOOK chars[0x84 ]=0x201E ;// DOUBLE LOW-9 QUOTATION MARK chars[0x85 ]=0x2026 ;// HORIZONTAL ELLIPSIS chars[0x86 ]=0x2020 ;// DAGGER chars[0x87 ]=0x2021 ;// DOUBLE DAGGER chars[0x88 ]=0x02C6 ;// MODIFIER LETTER CIRCUMFLEX ACCENT chars[0x89 ]=0x2030 ;// PER MILLE SIGN chars[0x8A ]=0x0160 ;// LATIN CAPITAL LETTER S WITH CARON chars[0x8B ]=0x2039 ;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK chars[0x8C ]=0x0152 ;// LATIN CAPITAL LIGATURE OE chars[0x91 ]=0x2018 ;// LEFT SINGLE QUOTATION MARK chars[0x92 ]=0x2019 ;// RIGHT SINGLE QUOTATION MARK chars[0x93 ]=0x201C ;// LEFT DOUBLE QUOTATION MARK chars[0x94 ]=0x201D ;// RIGHT DOUBLE QUOTATION MARK chars[0x95 ]=0x2022 ;// BULLET chars[0x96 ]=0x2013 ;// EN DASH chars[0x97 ]=0x2014 ;// EM DASH chars[0x98 ]=0x02DC ;// SMALL TILDE chars[0x99 ]=0x2122 ;// TRADE MARK SIGN chars[0x9A ]=0x0161 ;// LATIN SMALL LETTER S WITH CARON chars[0x9B ]=0x203A ;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK chars[0x9C ]=0x0153 ;// LATIN SMALL LIGATURE OE chars[0x9F ]=0x0178 ;// LATIN CAPITAL LETTER Y WITH DIAERESIS chars[0xA0 ]=0x00A0 ;// NO-BREAK SPACE chars[0xA1 ]=0x00A1 ;// INVERTED EXCLAMATION MARK chars[0xA2 ]=0x00A2 ;// CENT SIGN chars[0xA3 ]=0x00A3 ;// POUND SIGN chars[0xA4 ]=0x00A4 ;// CURRENCY SIGN chars[0xA5 ]=0x00A5 ;// YEN SIGN chars[0xA6 ]=0x00A6 ;// BROKEN BAR chars[0xA7 ]=0x00A7 ;// SECTION SIGN chars[0xA8 ]=0x00A8 ;// DIAERESIS chars[0xA9 ]=0x00A9 ;// COPYRIGHT SIGN chars[0xAA ]=0x00AA ;// FEMININE ORDINAL INDICATOR chars[0xAB ]=0x00AB ;// LEFT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xAC ]=0x00AC ;// NOT SIGN chars[0xAD ]=0x00AD ;// SOFT HYPHEN chars[0xAE ]=0x00AE ;// REGISTERED SIGN chars[0xAF ]=0x00AF ;// MACRON chars[0xB0 ]=0x00B0 ;// DEGREE SIGN chars[0xB1 ]=0x00B1 ;// PLUS-MINUS SIGN chars[0xB2 ]=0x00B2 ;// SUPERSCRIPT TWO chars[0xB3 ]=0x00B3 ;// SUPERSCRIPT THREE chars[0xB4 ]=0x00B4 ;// ACUTE ACCENT chars[0xB5 ]=0x00B5 ;// MICRO SIGN chars[0xB6 ]=0x00B6 ;// PILCROW SIGN chars[0xB7 ]=0x00B7 ;// MIDDLE DOT chars[0xB8 ]=0x00B8 ;// CEDILLA chars[0xB9 ]=0x00B9 ;// SUPERSCRIPT ONE chars[0xBA ]=0x00BA ;// MASCULINE ORDINAL INDICATOR chars[0xBB ]=0x00BB ;// RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK chars[0xBC ]=0x00BC ;// VULGAR FRACTION ONE QUARTER chars[0xBD ]=0x00BD ;// VULGAR FRACTION ONE HALF chars[0xBE ]=0x00BE ;// VULGAR FRACTION THREE QUARTERS chars[0xBF ]=0x00BF ;// INVERTED QUESTION MARK chars[0xC0 ]=0x00C0 ;// LATIN CAPITAL LETTER A WITH GRAVE chars[0xC1 ]=0x00C1 ;// LATIN CAPITAL LETTER A WITH ACUTE chars[0xC2 ]=0x00C2 ;// LATIN CAPITAL LETTER A WITH CIRCUMFLEX chars[0xC3 ]=0x00C3 ;// LATIN CAPITAL LETTER A WITH TILDE chars[0xC4 ]=0x00C4 ;// LATIN CAPITAL LETTER A WITH DIAERESIS chars[0xC5 ]=0x00C5 ;// LATIN CAPITAL LETTER A WITH RING ABOVE chars[0xC6 ]=0x00C6 ;// LATIN CAPITAL LETTER AE chars[0xC7 ]=0x00C7 ;// LATIN CAPITAL LETTER C WITH CEDILLA chars[0xC8 ]=0x00C8 ;// LATIN CAPITAL LETTER E WITH GRAVE chars[0xC9 ]=0x00C9 ;// LATIN CAPITAL LETTER E WITH ACUTE chars[0xCA ]=0x00CA ;// LATIN CAPITAL LETTER E WITH CIRCUMFLEX chars[0xCB ]=0x00CB ;// LATIN CAPITAL LETTER E WITH DIAERESIS chars[0xCC ]=0x00CC ;// LATIN CAPITAL LETTER I WITH GRAVE chars[0xCD ]=0x00CD ;// LATIN CAPITAL LETTER I WITH ACUTE chars[0xCE ]=0x00CE ;// LATIN CAPITAL LETTER I WITH CIRCUMFLEX chars[0xCF ]=0x00CF ;// LATIN CAPITAL LETTER I WITH DIAERESIS chars[0xD0 ]=0x011E ;// LATIN CAPITAL LETTER G WITH BREVE chars[0xD1 ]=0x00D1 ;// LATIN CAPITAL LETTER N WITH TILDE chars[0xD2 ]=0x00D2 ;// LATIN CAPITAL LETTER O WITH GRAVE chars[0xD3 ]=0x00D3 ;// LATIN CAPITAL LETTER O WITH ACUTE chars[0xD4 ]=0x00D4 ;// LATIN CAPITAL LETTER O WITH CIRCUMFLEX chars[0xD5 ]=0x00D5 ;// LATIN CAPITAL LETTER O WITH TILDE chars[0xD6 ]=0x00D6 ;// LATIN CAPITAL LETTER O WITH DIAERESIS chars[0xD7 ]=0x00D7 ;// MULTIPLICATION SIGN chars[0xD8 ]=0x00D8 ;// LATIN CAPITAL LETTER O WITH STROKE chars[0xD9 ]=0x00D9 ;// LATIN CAPITAL LETTER U WITH GRAVE chars[0xDA ]=0x00DA ;// LATIN CAPITAL LETTER U WITH ACUTE chars[0xDB ]=0x00DB ;// LATIN CAPITAL LETTER U WITH CIRCUMFLEX chars[0xDC ]=0x00DC ;// LATIN CAPITAL LETTER U WITH DIAERESIS chars[0xDD ]=0x0130 ;// LATIN CAPITAL LETTER I WITH DOT ABOVE chars[0xDE ]=0x015E ;// LATIN CAPITAL LETTER S WITH CEDILLA chars[0xDF ]=0x00DF ;// LATIN SMALL LETTER SHARP S chars[0xE0 ]=0x00E0 ;// LATIN SMALL LETTER A WITH GRAVE chars[0xE1 ]=0x00E1 ;// LATIN SMALL LETTER A WITH ACUTE chars[0xE2 ]=0x00E2 ;// LATIN SMALL LETTER A WITH CIRCUMFLEX chars[0xE3 ]=0x00E3 ;// LATIN SMALL LETTER A WITH TILDE chars[0xE4 ]=0x00E4 ;// LATIN SMALL LETTER A WITH DIAERESIS chars[0xE5 ]=0x00E5 ;// LATIN SMALL LETTER A WITH RING ABOVE chars[0xE6 ]=0x00E6 ;// LATIN SMALL LETTER AE chars[0xE7 ]=0x00E7 ;// LATIN SMALL LETTER C WITH CEDILLA chars[0xE8 ]=0x00E8 ;// LATIN SMALL LETTER E WITH GRAVE chars[0xE9 ]=0x00E9 ;// LATIN SMALL LETTER E WITH ACUTE chars[0xEA ]=0x00EA ;// LATIN SMALL LETTER E WITH CIRCUMFLEX chars[0xEB ]=0x00EB ;// LATIN SMALL LETTER E WITH DIAERESIS chars[0xEC ]=0x00EC ;// LATIN SMALL LETTER I WITH GRAVE chars[0xED ]=0x00ED ;// LATIN SMALL LETTER I WITH ACUTE chars[0xEE ]=0x00EE ;// LATIN SMALL LETTER I WITH CIRCUMFLEX chars[0xEF ]=0x00EF ;// LATIN SMALL LETTER I WITH DIAERESIS chars[0xF0 ]=0x011F ;// LATIN SMALL LETTER G WITH BREVE chars[0xF1 ]=0x00F1 ;// LATIN SMALL LETTER N WITH TILDE chars[0xF2 ]=0x00F2 ;// LATIN SMALL LETTER O WITH GRAVE chars[0xF3 ]=0x00F3 ;// LATIN SMALL LETTER O WITH ACUTE chars[0xF4 ]=0x00F4 ;// LATIN SMALL LETTER O WITH CIRCUMFLEX chars[0xF5 ]=0x00F5 ;// LATIN SMALL LETTER O WITH TILDE chars[0xF6 ]=0x00F6 ;// LATIN SMALL LETTER O WITH DIAERESIS chars[0xF7 ]=0x00F7 ;// DIVISION SIGN chars[0xF8 ]=0x00F8 ;// LATIN SMALL LETTER O WITH STROKE chars[0xF9 ]=0x00F9 ;// LATIN SMALL LETTER U WITH GRAVE chars[0xFA ]=0x00FA ;// LATIN SMALL LETTER U WITH ACUTE chars[0xFB ]=0x00FB ;// LATIN SMALL LETTER U WITH CIRCUMFLEX chars[0xFC ]=0x00FC ;// LATIN SMALL LETTER U WITH DIAERESIS chars[0xFD ]=0x0131 ;// LATIN SMALL LETTER DOTLESS I chars[0xFE ]=0x015F ;// LATIN SMALL LETTER S WITH CEDILLA chars[0xFF ]=0x00FF ;// LATIN SMALL LETTER Y WITH DIAERESIS } public static char decode(byte b){ return chars[b & 0xff]; } }
8,704
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
ISO8859_15.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/parser/ISO8859_15.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.parser; public class ISO8859_15 { static final char[] chars = new char[0x100]; static { for (int i=0;i<256;i++){ chars[i] = (char)i; } chars[0xA4]= 0x20AC; chars[0xA6]= 0x0160; chars[0xA8]= 0x0161; chars[0xB4]= 0x017D; chars[0xB8]= 0x017E; chars[0xBC]= 0x0152; chars[0xBD]= 0x0153; chars[0xBE]= 0x0178; } public static char decode(byte b){ return chars[b & 0xff]; } }
1,355
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Expr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/Expr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * * This is the abstract class on which all XPath expressions * are based */ abstract public class Expr { abstract public boolean evalBoolean(VTDNavHuge vn); abstract public double evalNumber(VTDNavHuge vn); abstract public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge; abstract public String evalString(VTDNavHuge vn); abstract public void reset(VTDNavHuge vn); abstract public String toString(); abstract public boolean isNumerical(); abstract public boolean isNodeSet(); abstract public boolean isString(); abstract public boolean isBoolean(); abstract public boolean requireContextSize(); abstract public void setContextSize(int size); abstract public void setPosition(int pos); abstract public int adjust(int n); // to support computer context size // needs to add //abstract public boolean needContextSize(); //abstract public boolean SetContextSize(int contextSize); }
1,864
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Predicate.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/Predicate.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * LocationPathExpr uses this class to represent a predicate * */ public class Predicate implements LocationPathNode{ double d; // only supports a[1] style of location path for now public int count; public Expr expr; public Predicate(){ nextP = (Predicate) null; count = 0; d = 0; } public boolean eval(VTDNavHuge vn) { boolean b; count++; // increment the position expr.setPosition(count); if (expr.isNumerical()){ b = (expr.evalNumber(vn)== count); } else{ b = expr.evalBoolean(vn); } return b; } public void setIndex(double index) throws XPathEvalExceptionHuge{ if (index<=0) throw new XPathEvalExceptionHuge("Invalid index number"); d = (double) index; } public void reset(VTDNavHuge vn){ count = 0; expr.reset(vn); // is this really needed? } public Predicate nextP; public String toString(){ String s = "["+expr+"]"; if (nextP==null){ return s; } else { return s+nextP; } } // to support computer context size // needs to add public boolean requireContextSize(){ return expr.requireContextSize(); } public void setContextSize(int size){ expr.setContextSize(size); } public void adjust(int n){ expr.adjust(n); } }
2,176
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
VariableExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/VariableExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.NavExceptionHuge; import com.ximpleware.extended.VTDNavHuge; import com.ximpleware.extended.XPathEvalExceptionHuge; public class VariableExpr extends Expr { private String exprName; private Expr exprVal; public VariableExpr(String name, Expr e){ exprName = name; exprVal = e; } public int adjust(int n) { // TODO Auto-generated method stub return exprVal.adjust(n); } public boolean evalBoolean(VTDNavHuge vn) { // TODO Auto-generated method stub return exprVal.evalBoolean(vn); } public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge, NavExceptionHuge { // TODO Auto-generated method stub return exprVal.evalNodeSet(vn); } public double evalNumber(VTDNavHuge vn) { // TODO Auto-generated method stub return exprVal.evalNumber(vn); } public String evalString(VTDNavHuge vn) { // TODO Auto-generated method stub return exprVal.evalString(vn); } public boolean isBoolean() { // TODO Auto-generated method stub return exprVal.isBoolean(); } public boolean isNodeSet() { // TODO Auto-generated method stub return exprVal.isNodeSet(); } public boolean isNumerical() { // TODO Auto-generated method stub return exprVal.isNumerical(); } public boolean isString() { // TODO Auto-generated method stub return exprVal.isString(); } public boolean requireContextSize() { // TODO Auto-generated method stub return exprVal.requireContextSize(); } public void reset(VTDNavHuge vn) { // TODO Auto-generated method stub exprVal.reset(vn); } public void setContextSize(int size) { // TODO Auto-generated method stub exprVal.setContextSize(size); } public void setPosition(int pos) { // TODO Auto-generated method stub exprVal.setPosition(pos); } public String toString() { // TODO Auto-generated method stub return "$"+exprName; } }
2,843
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NumExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/NumExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * This class represent an XPath that is a double * */ public class NumExpr extends Expr{ public double dval; public NumExpr( double d){ dval = d; } public String toString(){ if (dval == (long) dval){ return ""+(long) dval; } return ""+dval; } public double eval(){ return dval; } public boolean isNodeSet(){ return false; } public boolean isNumerical(){ return true; } public boolean evalBoolean(VTDNavHuge vn){ if (dval == 0.0 || Double.isNaN(dval) ) return false; return true; } public double evalNumber(VTDNavHuge vn){ return dval;} public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge{ throw new XPathEvalExceptionHuge("NumExpr can't eval to a node set!"); } public String evalString(VTDNavHuge vn){ if (dval == (int) dval){ return ""+((int) dval); } return ""+dval; } public void reset(VTDNavHuge vn){}; public boolean isString(){ return false; } public boolean isBoolean(){ return false; } // to support computer context size // needs to add public boolean requireContextSize(){ return false; } public void setContextSize(int size){ } public void setPosition(int pos){ } public int adjust(int n){ return 0; } }
2,222
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
FuncName.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/FuncName.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; /** * * This class is used by lexer to detect built-in functions * then transport to the parser */ public class FuncName{ public int i; public static final int LAST = 0; public static final int POSITION =1; public static final int COUNT = 2; public static final int LOCAL_NAME =3; public static final int NAMESPACE_URI =4; public static final int NAME=5; public static final int STRING=6; public static final int CONCAT = 7; public static final int STARTS_WITH = 8; public static final int CONTAINS = 9; public static final int SUBSTRING_BEFORE = 10; public static final int SUBSTRING_AFTER =11; public static final int SUBSTRING = 12; public static final int STRING_LENGTH =13; public static final int NORMALIZE_SPACE =14; public static final int TRANSLATE =15; public static final int BOOLEAN =16; public static final int NOT = 17; public static final int TRUE =18; public static final int FALSE =19; public static final int LANG = 20; public static final int NUMBER = 21; public static final int SUM = 22; public static final int FLOOR =23; public static final int CEILING = 24; public static final int ROUND = 25; // added for 2.0 public static final int ABS = 26; public static final int ROUND_HALF_TO_EVEN = 27; public static final int ROUND_HALF_TO_ODD = 28; public static final int CODE_POINTS_TO_STRING = 29; public static final int COMPARE = 30; public static final int UPPER_CASE = 31; public static final int LOWER_CASE = 32; public static final int ENDS_WITH = 33; public static final int QNAME = 34; public static final int LOCAL_NAME_FROM_QNAME = 35; public static final int NAMESPACE_URI_FROM_QNAME = 36; public static final int NAMESPACE_URI_FOR_PREFIX = 37; public static final int RESOLVE_QNAME = 38; public static final int IRI_TO_URI = 39; public static final int ESCAPE_HTML_URI = 40; public static final int ENCODE_FOR_URI = 41; // String getFuncString(){ // switch(i){ // case FuncName.LAST: return "last"; // case FuncName.POSITION: return "position"; // case FuncName.COUNT: return "count"; // case FuncName.LOCAL_NAME: return "local-name"; // case FuncName.NAMESPACE_URI: return "namespace-uri"; // case FuncName.NAME: return "name"; // case FuncName.STRING: return "string"; // case FuncName.CONCAT: return "concat"; // case FuncName.STARTS_WITH: return "starts-with"; // case FuncName.CONTAINS: return "contains"; // case FuncName.SUBSTRING_BEFORE: return "substring-before"; // case FuncName.SUBSTRING_AFTER: return "substring-after"; // case FuncName.SUBSTRING: return "substring"; // case FuncName.STRING_LENGTH: return "string-length"; // case FuncName.NORMALIZE_SPACE: return "normalize-space"; // case FuncName.TRANSLATE: return "translate"; // case FuncName.BOOLEAN: return "boolean"; // case FuncName.NOT: return "not"; // case FuncName.TRUE: return "true"; // case FuncName.FALSE: return "false"; // case FuncName.LANG: return "lang"; // case FuncName.NUMBER: return "number"; // case FuncName.SUM: return "sum"; // case FuncName.FLOOR: return "floor"; // case FuncName.CEILING: return "ceiling"; // case FuncName.ROUND: return "round"; //// added for 2.0 // case FuncName.ABS: return "abs"; // case FuncName.ROUND_HALF_TO_EVEN : // return "round-half-to-even"; // case FuncName.ROUND_HALF_TO_ODD: // return "round-half-to-odd"; // case FuncName.CODE_POINTS_TO_STRING: // return "code-points-to-string"; // case FuncName.COMPARE: return "compare"; // case FuncName.UPPER_CASE: return "upper-case"; // case FuncName.LOWER_CASE: return "lower-case"; // case FuncName.ENDS_WITH: return "ends-with"; // case FuncName.QNAME: return "QName"; // case FuncName.LOCAL_NAME_FROM_QNAME: // return "local-name-from-QName"; // case FuncName.NAMESPACE_URI_FROM_QNAME: // return "namespace-uri-from-QName"; // case FuncName.NAMESPACE_URI_FOR_PREFIX: // return "namespace-uri-for-prefix"; // case FuncName.RESOLVE_QNAME: return "resolve-QName"; // case FuncName.IRI_TO_URI: return "iri-to-uri"; // case FuncName.ESCAPE_HTML_URI: return "escape-html-uri"; // default: return "encode-for-uri"; // } // } }
5,317
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Yylex.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/Yylex.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The following code was generated by JFlex 1.4.1 on 9/21/09 2:31 PM */ /* * Copyright (C) 2002-2009 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import java_cup.runtime.Symbol; import com.ximpleware.extended.parser.*; import com.ximpleware.extended.*; /** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.4.1 * on 9/21/09 2:31 PM from the specification file * <tt>C:/Documents and Settings/HP_Administrator/workspace/ximple-dev/com/ximpleware/extended/xpath/scanner.flex</tt> */ class Yylex extends sym implements java_cup.runtime.Scanner { /** This character denotes the end of file */ public static final int YYEOF = -1; /** initial size of the lookahead buffer */ private static final int ZZ_BUFFERSIZE = 16384; /** lexical states */ public static final int YYINITIAL = 0; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = "\11\0\1\1\1\1\2\0\1\1\22\0\1\1\1\20\1\55\1\0"+ "\1\21\1\0\1\0\1\56\1\11\1\12\1\22\1\6\1\10\1\4"+ "\1\5\1\23\12\2\1\3\1\0\1\16\1\17\1\15\1\0\1\7"+ "\15\0\1\53\2\0\1\52\11\0\1\13\1\0\1\14\1\0\1\0"+ "\1\0\1\31\1\47\1\41\1\24\1\43\1\50\1\44\1\46\1\25"+ "\2\0\1\35\1\27\1\32\1\30\1\40\1\0\1\33\1\36\1\37"+ "\1\42\1\26\1\45\1\54\1\0\1\51\1\0\1\34\uff83\0"; /** * Translates characters to character classes */ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); /** * Translates DFA states to action switch labels. */ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7"+ "\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17"+ "\1\20\1\4\1\21\1\22\1\23\7\1\1\24\12\1"+ "\2\4\1\0\2\3\1\25\1\26\1\27\1\30\1\31"+ "\4\1\1\32\35\1\1\0\1\33\1\0\1\1\1\34"+ "\1\35\2\1\1\36\1\37\55\1\1\0\1\40\2\1"+ "\1\0\1\41\12\1\1\0\1\42\36\1\2\0\1\1"+ "\1\0\1\43\6\1\1\0\1\44\1\0\1\45\3\1"+ "\2\0\1\1\1\0\1\46\2\0\31\1\1\47\3\1"+ "\1\0\1\1\1\50\6\1\1\0\1\51\1\1\1\52"+ "\11\1\1\0\1\53\1\1\2\0\6\1\1\0\1\54"+ "\1\0\1\55\1\0\1\56\6\1\1\0\1\57\5\1"+ "\1\0\1\1\1\60\3\1\2\0\6\1\1\0\1\61"+ "\1\1\1\0\1\62\25\1\1\0\1\63\3\1\3\0"+ "\1\64\1\1\1\0\1\65\4\1\1\0\1\66\3\1"+ "\2\0\14\1\1\0\1\67\3\1\1\70\1\0\1\71"+ "\7\1\1\0\1\72\1\1\2\0\1\1\2\0\7\1"+ "\1\0\1\1\1\73\1\0\1\74\1\1\2\0\3\1"+ "\1\0\1\75\2\1\2\0\1\1\2\0\1\1\1\0"+ "\1\76\1\1\1\0\1\77\1\1\1\0\1\100\3\1"+ "\1\0\1\1\1\101\1\0\1\102\5\1\1\0\1\103"+ "\2\1\1\0\1\104\2\1\1\0\1\105\1\1\1\0"+ "\1\106\7\1\1\0\1\107\34\1\1\0\1\1\1\110"+ "\1\1\1\0\1\111\1\1\1\0\1\112\24\1\1\0"+ "\1\113\4\1\1\0\1\114\5\1\1\0\1\115\4\1"+ "\1\0\1\116\2\1\2\0\5\1\1\0\1\117\5\1"+ "\1\0\1\120\2\1\1\0\1\121\3\1\2\0\1\1"+ "\4\0\2\1\1\0\1\122\2\1\1\0\1\123\1\1"+ "\1\0\1\124\1\0\1\125\14\1\1\0\1\126\1\1"+ "\1\0\1\127\2\1\2\0\2\1\1\130\1\0\1\131"+ "\1\0\1\132"; private static int [] zzUnpackAction() { int [] result = new int[612]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } private static int zzUnpackAction(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** * Translates a state to a row index in the transition table */ private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\57\0\136\0\215\0\274\0\274\0\353\0\274"+ "\0\274\0\274\0\274\0\274\0\274\0\274\0\u011a\0\u0149"+ "\0\274\0\u0178\0\274\0\274\0\u01a7\0\u01d6\0\u0205\0\u0234"+ "\0\u0263\0\u0292\0\u02c1\0\u02f0\0\274\0\u031f\0\u034e\0\u037d"+ "\0\u03ac\0\u03db\0\u040a\0\u0439\0\u0468\0\u0497\0\u04c6\0\u04f5"+ "\0\u0524\0\u0553\0\u0582\0\u05b1\0\57\0\274\0\274\0\274"+ "\0\274\0\u05e0\0\u060f\0\u063e\0\u066d\0\57\0\u069c\0\u06cb"+ "\0\u06fa\0\u0729\0\u0758\0\u0787\0\u07b6\0\u07e5\0\u0814\0\u0843"+ "\0\u0872\0\u08a1\0\u08d0\0\u08ff\0\u092e\0\u095d\0\u098c\0\u09bb"+ "\0\u09ea\0\u0a19\0\u0a48\0\u0a77\0\u0aa6\0\u0ad5\0\u0b04\0\u0b33"+ "\0\u0b62\0\u0b91\0\u0bc0\0\u04f5\0\274\0\u0524\0\u0bef\0\274"+ "\0\57\0\u0c1e\0\u0c4d\0\57\0\57\0\u0c7c\0\u0cab\0\u0cda"+ "\0\u0d09\0\u0d38\0\u0d67\0\u0d96\0\u0dc5\0\u0df4\0\u0e23\0\u0e52"+ "\0\u0e81\0\u0eb0\0\u0edf\0\u0f0e\0\u0f3d\0\u0f6c\0\u0f9b\0\u0fca"+ "\0\u0ff9\0\u1028\0\u1057\0\u1086\0\u10b5\0\u10e4\0\u1113\0\u1142"+ "\0\u1171\0\u11a0\0\u11cf\0\u11fe\0\u122d\0\u125c\0\u128b\0\u12ba"+ "\0\u12e9\0\u1318\0\u1347\0\u1376\0\u13a5\0\u13d4\0\u1403\0\u1432"+ "\0\u1461\0\u1490\0\u14bf\0\274\0\u14ee\0\u151d\0\u154c\0\274"+ "\0\u157b\0\u15aa\0\u15d9\0\u1608\0\u1637\0\u1666\0\u1695\0\u16c4"+ "\0\u16f3\0\u1722\0\u1751\0\274\0\u1780\0\u17af\0\u17de\0\u180d"+ "\0\u183c\0\u186b\0\u189a\0\u18c9\0\u18f8\0\u1927\0\u1956\0\u1985"+ "\0\u19b4\0\u19e3\0\u1a12\0\u1a41\0\u1a70\0\u1a9f\0\u1ace\0\u1afd"+ "\0\u1b2c\0\u1b5b\0\u1b8a\0\u1bb9\0\u1be8\0\u1c17\0\u1c46\0\u1c75"+ "\0\u1ca4\0\u1cd3\0\u1d02\0\u1d31\0\u1d60\0\u1d8f\0\274\0\u1dbe"+ "\0\u1ded\0\u1e1c\0\u1e4b\0\u1e7a\0\u1ea9\0\u1ed8\0\274\0\u1f07"+ "\0\274\0\u1f36\0\u1f65\0\u1f94\0\u1fc3\0\u1ff2\0\u2021\0\u2050"+ "\0\274\0\u207f\0\u20ae\0\u20dd\0\u210c\0\u213b\0\u216a\0\u2199"+ "\0\u21c8\0\u21f7\0\u2226\0\u2255\0\u2284\0\u22b3\0\u22e2\0\u2311"+ "\0\u2340\0\u236f\0\u239e\0\u23cd\0\u23fc\0\u242b\0\u245a\0\u2489"+ "\0\u24b8\0\u24e7\0\u2516\0\u2545\0\274\0\u2574\0\u25a3\0\u25d2"+ "\0\u2601\0\u2630\0\274\0\u265f\0\u268e\0\u26bd\0\u26ec\0\u271b"+ "\0\u274a\0\u2779\0\274\0\u27a8\0\274\0\u27d7\0\u2806\0\u2835"+ "\0\u2864\0\u2893\0\u28c2\0\u28f1\0\u2920\0\u294f\0\u297e\0\274"+ "\0\u29ad\0\u29dc\0\u2a0b\0\u2a3a\0\u2a69\0\u2a98\0\u2ac7\0\u2af6"+ "\0\u2b25\0\u2b54\0\274\0\u2b83\0\274\0\u2bb2\0\274\0\u2be1"+ "\0\u2c10\0\u2c3f\0\u2c6e\0\u2c9d\0\u2ccc\0\u2cfb\0\274\0\u2d2a"+ "\0\u2d59\0\u2d88\0\u2db7\0\u2de6\0\u2e15\0\u2e44\0\274\0\u2e73"+ "\0\u2ea2\0\u2ed1\0\u2f00\0\u2f2f\0\u2f5e\0\u2f8d\0\u2fbc\0\u2feb"+ "\0\u301a\0\u3049\0\u3078\0\274\0\u30a7\0\u30d6\0\274\0\u3105"+ "\0\u3134\0\u3163\0\u3192\0\u31c1\0\u31f0\0\u321f\0\u324e\0\u327d"+ "\0\u32ac\0\u32db\0\u330a\0\u3339\0\u3368\0\u3397\0\u33c6\0\u33f5"+ "\0\u3424\0\u3453\0\u3482\0\u34b1\0\u34e0\0\274\0\u350f\0\u353e"+ "\0\u356d\0\u359c\0\u35cb\0\u35fa\0\274\0\u3629\0\u3658\0\274"+ "\0\u3687\0\u36b6\0\u36e5\0\u3714\0\u3743\0\274\0\u3772\0\u37a1"+ "\0\u37d0\0\u37ff\0\u382e\0\u385d\0\u388c\0\u38bb\0\u38ea\0\u3919"+ "\0\u3948\0\u3977\0\u39a6\0\u39d5\0\u3a04\0\u3a33\0\u3a62\0\u3a91"+ "\0\274\0\u3ac0\0\u3aef\0\u3b1e\0\274\0\u3b4d\0\274\0\u3b7c"+ "\0\u3bab\0\u3bda\0\u3c09\0\u3c38\0\u3c67\0\u3c96\0\u3cc5\0\274"+ "\0\u3cf4\0\u3d23\0\u3d52\0\u3d81\0\u3db0\0\u3ddf\0\u3e0e\0\u3e3d"+ "\0\u3e6c\0\u3e9b\0\u3eca\0\u3ef9\0\u3f28\0\u3f57\0\u3f86\0\274"+ "\0\u3fb5\0\274\0\u3fe4\0\u4013\0\u4042\0\u4071\0\u40a0\0\u40cf"+ "\0\u40fe\0\274\0\u412d\0\u415c\0\u418b\0\u41ba\0\u41e9\0\u4218"+ "\0\u4247\0\u4276\0\u42a5\0\274\0\u42d4\0\u4303\0\274\0\u4332"+ "\0\u4361\0\274\0\u4390\0\u43bf\0\u43ee\0\u441d\0\u444c\0\274"+ "\0\u447b\0\274\0\u44aa\0\u44d9\0\u4508\0\u4537\0\u4566\0\u4595"+ "\0\274\0\u45c4\0\u45f3\0\u4622\0\274\0\u4651\0\u4680\0\u46af"+ "\0\274\0\u46de\0\u470d\0\274\0\u473c\0\u476b\0\u479a\0\u47c9"+ "\0\u47f8\0\u4827\0\u4856\0\u4885\0\274\0\u48b4\0\u48e3\0\u4912"+ "\0\u4941\0\u4970\0\u499f\0\u49ce\0\u49fd\0\u4a2c\0\u4a5b\0\u4a8a"+ "\0\u4ab9\0\u4ae8\0\u4b17\0\u4b46\0\u4b75\0\u4ba4\0\u4bd3\0\u4c02"+ "\0\u4c31\0\u4c60\0\u4c8f\0\u4cbe\0\u4ced\0\u4d1c\0\u4d4b\0\u4d7a"+ "\0\u4da9\0\u4dd8\0\u4e07\0\274\0\u4e36\0\u4e65\0\274\0\u4e94"+ "\0\u4ec3\0\274\0\u4ef2\0\u4f21\0\u4f50\0\u4f7f\0\u4fae\0\u4fdd"+ "\0\u500c\0\u503b\0\u506a\0\u5099\0\u50c8\0\u50f7\0\u5126\0\u5155"+ "\0\u5184\0\u51b3\0\u51e2\0\u5211\0\u5240\0\u526f\0\u529e\0\274"+ "\0\u52cd\0\u52fc\0\u532b\0\u535a\0\u5389\0\274\0\u53b8\0\u53e7"+ "\0\u5416\0\u5445\0\u5474\0\u54a3\0\274\0\u54d2\0\u5501\0\u5530"+ "\0\u555f\0\u558e\0\274\0\u55bd\0\u55ec\0\u561b\0\u564a\0\u5679"+ "\0\u56a8\0\u56d7\0\u5706\0\u5735\0\u5764\0\274\0\u5793\0\u57c2"+ "\0\u57f1\0\u5820\0\u584f\0\u587e\0\274\0\u58ad\0\u58dc\0\u590b"+ "\0\274\0\u593a\0\u5969\0\u5998\0\u59c7\0\u59f6\0\u5a25\0\u5a54"+ "\0\u5a83\0\u5ab2\0\u5ae1\0\u5b10\0\u5b3f\0\u5b6e\0\274\0\u5b9d"+ "\0\u5bcc\0\u5bfb\0\274\0\u5c2a\0\u5c59\0\274\0\u5c88\0\274"+ "\0\u5cb7\0\u5ce6\0\u5d15\0\u5d44\0\u5d73\0\u5da2\0\u5dd1\0\u5e00"+ "\0\u5e2f\0\u5e5e\0\u5e8d\0\u5ebc\0\u5eeb\0\274\0\u5f1a\0\u5f49"+ "\0\274\0\u5f78\0\u5fa7\0\u5fd6\0\u6005\0\u6034\0\u6063\0\274"+ "\0\u6092\0\274\0\u60c1\0\274"; private static int [] zzUnpackRowMap() { int [] result = new int[612]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } private static int zzUnpackRowMap(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } /** * The transition table of the DFA */ private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11"+ "\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21"+ "\1\22\1\23\1\24\1\25\1\26\1\27\1\2\1\30"+ "\1\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40"+ "\1\41\1\42\1\43\1\44\3\2\1\45\1\46\1\2"+ "\1\47\2\2\1\50\1\51\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\20\2\3\0\1\3\57\0"+ "\1\4\2\0\1\53\130\0\1\2\1\0\1\54\1\52"+ "\1\2\1\55\16\0\10\2\1\0\20\2\21\0\1\56"+ "\56\0\1\57\56\0\1\60\62\0\1\61\33\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\2\1\62\6\2"+ "\1\0\6\2\1\63\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\7\2\1\64\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\65"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\66\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\67\1\2"+ "\1\0\2\2\1\70\7\2\1\71\5\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\72\1\73"+ "\2\2\1\0\5\2\1\74\12\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\4\2\1\75\3\2\1\0"+ "\6\2\1\76\11\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\4\2\1\77\1\100\2\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\2\2\1\101\2\2\1\102\1\103\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\104"+ "\1\0\6\2\1\105\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\106\1\107\1\2\1\110"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\111\3\2\1\0\6\2\1\112\2\2"+ "\1\113\6\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\3\2\1\114\14\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\115\1\2"+ "\1\0\1\2\1\116\16\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\117\3\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\4\2"+ "\1\120\1\121\2\2\1\0\1\122\17\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\16\2"+ "\1\123\1\2\2\0\55\124\1\125\1\124\56\126\1\125"+ "\1\127\1\0\1\127\1\0\2\127\14\0\1\130\1\0"+ "\10\127\1\0\20\127\4\0\1\53\54\0\1\2\1\0"+ "\1\54\1\52\2\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\2\2\1\131"+ "\5\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\2\1\132\16\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\133"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\134\7\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\135\7\2\1\0"+ "\4\2\1\136\13\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\137\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\1\2\1\140\16\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\141\6\2\1\142\1\0\2\2\1\143"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\144\4\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\3\2\1\145\4\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\5\2\1\146\12\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\147"+ "\16\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\4\2\1\150\3\2\1\151\7\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\6\2\1\152"+ "\1\2\1\0\1\2\1\153\16\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\5\2\1\154\1\2\1\155"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\3\2\1\156\4\2\1\0\12\2\1\157\5\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\1\160\17\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\161\2\2\1\0\5\2\1\162"+ "\12\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\17\2\1\163\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\164\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\165\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\4\2\1\166\3\2\1\0\6\2\1\167"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\170\2\2\1\171\2\2\1\172\1\2\1\0\5\2"+ "\1\173\12\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\174\6\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\2\1\175\6\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\3\2\1\176\14\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\177\7\2\1\0"+ "\4\2\1\200\13\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\4\2\1\201\13\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\202"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\203\17\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\204"+ "\17\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\4\2\1\205\3\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\5\2\1\206\2\2\1\0"+ "\20\2\2\0\1\127\1\0\1\127\1\0\2\127\16\0"+ "\10\127\1\0\20\127\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\4\2\1\207\13\2\2\0"+ "\1\2\1\0\1\2\1\52\1\210\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\211\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\212\1\0"+ "\20\2\2\0\1\2\1\213\1\2\1\52\2\2\3\0"+ "\1\214\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\215"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\216\4\2\1\0\20\2\2\0\1\2\1\217"+ "\1\2\1\52\2\2\3\0\1\220\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\6\2\1\221\11\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\12\2\1\222"+ "\5\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\6\2\1\223\1\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\4\2\1\224\3\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\5\2\1\225\2\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\226"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\7\2\1\227\10\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\230"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\231\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\232\6\2\1\0\20\2"+ "\2\0\1\2\1\233\1\2\1\52\2\2\3\0\1\234"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\235\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\13\2\1\236\4\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\6\2\1\237\1\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\240\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\2\2\1\241\15\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\242\6\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\243\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\4\2\1\244\13\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\4\2\1\245\13\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\246\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\3\2\1\247\4\2\1\0\3\2"+ "\1\250\14\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\251\1\2\1\252\13\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\6\2"+ "\1\253\1\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\254\17\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\1\255\17\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\256\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\2"+ "\1\257\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\260\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\5\2\1\261\2\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\262\17\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\263\17\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\1\2\1\264\16\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\265\3\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\3\2"+ "\1\266\4\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\267\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\2\2\1\270\15\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\271\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\272\6\2\1\0\20\2\3\0\1\213\7\0\1\214"+ "\45\0\1\2\1\273\1\2\1\52\2\2\3\0\1\274"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\5\2\1\275\2\2\1\0\20\2"+ "\3\0\1\217\7\0\1\220\45\0\1\2\1\276\1\2"+ "\1\52\2\2\3\0\1\277\12\0\10\2\1\0\1\2"+ "\1\300\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\301\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\302\7\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\303\17\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\304\17\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\305"+ "\1\0\20\2\2\0\1\2\1\306\1\2\1\52\2\2"+ "\3\0\1\307\12\0\10\2\1\0\20\2\2\0\1\2"+ "\1\310\1\2\1\52\2\2\3\0\1\311\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\312\15\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\313\1\2"+ "\1\0\20\2\3\0\1\233\7\0\1\234\45\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\314\15\2\2\0\1\2\1\315\1\2\1\316\2\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\317\16\2"+ "\2\0\1\2\1\320\1\2\1\52\2\2\3\0\1\321"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\322\1\2"+ "\1\52\2\2\3\0\1\323\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\2\2\1\324\15\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\6\2\1\325\1\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\326\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\327\11\2"+ "\2\0\1\2\1\0\1\2\1\52\1\330\1\2\16\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\331\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\5\2\1\332"+ "\2\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\333\2\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\5\2\1\334"+ "\2\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\335\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\336"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\337\7\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\340\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\341\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\342\7\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\3\2\1\343\14\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\344\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\345"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\346\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\347"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\350\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\351\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\352\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\353\15\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\12\2\1\354\5\2\3\0\1\273"+ "\7\0\1\274\46\0\1\274\10\0\1\355\44\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\356"+ "\17\2\3\0\1\276\7\0\1\277\45\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\3\2\1\357"+ "\14\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\360\1\0\20\2\2\0\1\2\1\361\1\2"+ "\1\52\1\362\1\2\3\0\1\363\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\2\2\1\364\5\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\1\365\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\1\366\1\2\16\0"+ "\10\2\1\0\20\2\3\0\1\306\7\0\1\307\46\0"+ "\1\310\7\0\1\311\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\2\1\367\16\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\7\2\1\370\10\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\371\1\0\20\2\3\0\1\315"+ "\1\0\1\372\53\0\1\127\1\0\1\127\1\373\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\374"+ "\17\2\3\0\1\320\7\0\1\321\46\0\1\322\7\0"+ "\1\323\46\0\1\323\10\0\1\375\44\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\1\2\1\376\6\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\2\2\1\377\15\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\u0100"+ "\16\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\u0101\7\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\3\2\1\u0102\14\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\6\2"+ "\1\u0103\1\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\7\2\1\u0104\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\u0105"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u0106\15\2\2\0"+ "\1\2\1\u0107\1\2\1\52\2\2\3\0\1\u0108\12\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u0109\1\2\1\0\20\2\2\0"+ "\1\2\1\u010a\1\2\1\u010b\2\2\16\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\u010c\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\10\2\1\u010d\7\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\u010e\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u010f\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u0110\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\10\2\1\u0111\7\2"+ "\2\0\1\2\1\u0112\1\2\1\52\2\2\3\0\1\u0113"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\u0114\1\2"+ "\1\52\2\2\3\0\1\u0115\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\u0116\1\2\1\52\2\2\3\0\1\u0117"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\u0118\7\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\1\u0119\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\u011a\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\5\2"+ "\1\u011b\12\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u011c\6\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\5\2\1\u011d\2\2"+ "\1\0\20\2\2\0\1\2\1\u011e\1\2\1\52\2\2"+ "\3\0\1\u011f\12\0\10\2\1\0\20\2\3\0\1\361"+ "\7\0\1\363\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\11\2\1\u0120\6\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\6\2"+ "\1\u0121\11\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\6\2\1\u0122\1\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\4\2"+ "\1\u0123\13\2\2\0\1\2\1\0\1\2\1\52\1\u0124"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\u0125"+ "\1\2\1\52\1\u0126\1\2\3\0\1\u0127\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u0128\6\2\1\0\20\2\5\0\1\373"+ "\53\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u0129\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\u012a\3\2\1\0\20\2"+ "\2\0\1\2\1\u012b\1\2\1\u012c\2\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\2\1\u012d\16\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\2\1\u012e\6\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\u012f\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u0130\15\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\u0131\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0132\1\2"+ "\1\0\20\2\2\0\1\2\1\u0133\1\2\1\52\2\2"+ "\3\0\1\u0134\12\0\10\2\1\0\20\2\3\0\1\u0107"+ "\7\0\1\u0108\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\7\2\1\u0135\10\2\3\0\1\u010a"+ "\1\0\1\u0136\53\0\1\127\1\0\1\127\1\u0137\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\4\2"+ "\1\u0138\13\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u0139\6\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\1\u013a\1\2\16\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\u013b\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\6\2\1\u013c\1\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\u013d\6\2\1\0\20\2\3\0\1\u0112\7\0\1\u0113"+ "\46\0\1\u0114\7\0\1\u0115\46\0\1\u0116\7\0\1\u0117"+ "\45\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u013e\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\5\2\1\u013f\12\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\u0140\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u0141\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\14\2\1\u0142\3\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\4\2\1\u0143\13\2\3\0"+ "\1\u011e\7\0\1\u011f\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\u0144\2\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\1\u0145\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\5\2\1\u0146\2\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\5\2\1\u0147\2\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\10\2\1\u0148\7\2\3\0\1\u0125"+ "\7\0\1\u0127\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\u0149\17\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\6\2\1\u014a\1\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\2\2\1\u014b\15\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\6\2\1\u014c\1\2\1\0"+ "\20\2\3\0\1\u012b\1\0\1\u014d\53\0\1\127\1\0"+ "\1\127\1\u014e\2\127\14\0\1\130\1\0\10\127\1\0"+ "\20\127\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\2\1\u014f\6\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\6\2\1\u0150\1\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\2\1\u0151\6\2\1\0\20\2\2\0\1\2\1\u0152"+ "\1\2\1\52\2\2\3\0\1\u0153\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\u0154\1\2\1\52\2\2\3\0"+ "\1\u0155\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\u0156"+ "\16\2\3\0\1\u0133\7\0\1\u0134\45\0\1\2\1\u0157"+ "\1\2\1\52\2\2\3\0\1\u0158\12\0\10\2\1\0"+ "\20\2\5\0\1\u0137\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\u0159\2\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\2\2\1\u015a\15\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\13\2\1\u015b\4\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\11\2\1\u015c\6\2\2\0\1\2\1\u015d\1\2\1\52"+ "\2\2\3\0\1\u015e\12\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\6\2\1\u015f"+ "\1\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u0160\1\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\u0161"+ "\1\0\20\2\2\0\1\2\1\u0162\1\2\1\u0163\1\u0164"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u0165"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\6\2\1\u0166\11\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u0167"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\u0168\17\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\15\2\1\u0169\2\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\3\2"+ "\1\u016a\4\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\u016b\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\u016c\6\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u016d\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\7\2\1\u016e\10\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u016f\11\2"+ "\2\0\1\2\1\u0170\1\2\1\52\2\2\3\0\1\u0171"+ "\12\0\10\2\1\0\20\2\5\0\1\u014e\53\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0172\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\7\2\1\u0173\10\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0174\1\2"+ "\1\0\20\2\3\0\1\u0152\7\0\1\u0153\46\0\1\u0153"+ "\10\0\1\u0175\45\0\1\u0154\7\0\1\u0155\45\0\1\2"+ "\1\u0176\1\2\1\52\2\2\3\0\1\u0177\12\0\10\2"+ "\1\0\20\2\3\0\1\u0157\7\0\1\u0158\45\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\2"+ "\1\u0178\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\11\2\1\u0179\6\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\u017a\3\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\u017b\15\2\3\0\1\u015d"+ "\7\0\1\u015e\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\7\2\1\u017c\10\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u017d\15\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u017e\6\2\1\0\20\2\3\0\1\u0162"+ "\1\0\1\u017f\53\0\1\127\1\0\1\127\1\u0180\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\u0181\3\2"+ "\1\0\20\2\2\0\1\2\1\u0182\1\2\1\u0183\2\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\1\u0184\1\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\u0185\1\2\1\u0186\1\u0187\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\13\2\1\u0188\4\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\16\2"+ "\1\u0189\1\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\u018a\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\6\2"+ "\1\u018b\11\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\u018c\15\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u018d\1\2"+ "\1\0\20\2\2\0\1\2\1\u018e\1\2\1\52\1\u018f"+ "\1\2\3\0\1\u0190\12\0\10\2\1\0\20\2\2\0"+ "\1\2\1\u0191\1\2\1\52\2\2\3\0\1\u0192\12\0"+ "\10\2\1\0\20\2\3\0\1\u0170\7\0\1\u0171\45\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\7\2\1\u0193\10\2\2\0\1\2\1\u0194\1\2\1\u0195"+ "\1\u0196\1\2\16\0\10\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u0197\15\2\3\0\1\u0176\7\0\1\u0177\45\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\6\2"+ "\1\u0198\11\2\2\0\1\2\1\u0199\1\2\1\52\2\2"+ "\3\0\1\u019a\12\0\10\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\u019b\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\u019c\4\2\1\0\20\2\2\0\1\2\1\u019d"+ "\1\2\1\u019e\1\u019f\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\u01a0\1\2\1\u01a1\1\u01a2\1\2\16\0"+ "\10\2\1\0\20\2\2\0\1\2\1\u01a3\1\2\1\52"+ "\2\2\3\0\1\u01a4\12\0\10\2\1\0\20\2\5\0"+ "\1\u0180\53\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\u01a5\1\0\20\2\3\0\1\u0182\1\0\1\u01a6"+ "\53\0\1\127\1\0\1\127\1\u01a7\2\127\14\0\1\130"+ "\1\0\10\127\1\0\20\127\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\u01a8\16\2"+ "\3\0\1\u0185\1\0\1\u01a9\53\0\1\127\1\0\1\127"+ "\1\u01aa\2\127\14\0\1\130\1\0\10\127\1\0\20\127"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\5\2\1\u01ab\12\2\2\0\1\2\1\0\1\2"+ "\1\52\1\u01ac\1\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\5\2\1\u01ad"+ "\2\2\1\0\20\2\2\0\1\2\1\u01ae\1\2\1\52"+ "\1\u01af\1\2\3\0\1\u01b0\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\u01b1\1\2\1\52\2\2\3\0\1\u01b2"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\11\2\1\u01b3\6\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\7\2\1\u01b4\10\2\3\0\1\u018e\7\0\1\u0190"+ "\45\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u01b5\2\2\1\0\12\2\1\u01b6\5\2\3\0\1\u0191"+ "\7\0\1\u0192\45\0\1\2\1\0\1\2\1\52\1\u01b7"+ "\1\2\16\0\10\2\1\0\20\2\3\0\1\u0194\1\0"+ "\1\u01b8\53\0\1\127\1\0\1\127\1\u01b9\2\127\14\0"+ "\1\130\1\0\10\127\1\0\20\127\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\u01ba"+ "\16\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\2\1\u01bb\16\2\2\0\1\2\1\u01bc"+ "\1\2\1\52\2\2\3\0\1\u01bd\12\0\10\2\1\0"+ "\20\2\3\0\1\u0199\7\0\1\u019a\45\0\1\2\1\0"+ "\1\2\1\52\1\u01be\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\1\u01bf\17\2\3\0\1\u019d\1\0\1\u01c0\53\0"+ "\1\127\1\0\1\127\1\u01c1\2\127\14\0\1\130\1\0"+ "\10\127\1\0\20\127\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\2\1\u01c2\16\2\3\0"+ "\1\u01a0\1\0\1\u01c3\53\0\1\127\1\0\1\127\1\u01c4"+ "\2\127\14\0\1\130\1\0\10\127\1\0\20\127\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\u01c5"+ "\3\2\1\0\20\2\3\0\1\u01a3\7\0\1\u01a4\45\0"+ "\1\2\1\0\1\2\1\52\1\u01c6\1\2\16\0\10\2"+ "\1\0\20\2\5\0\1\u01a7\53\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\3\2\1\u01c7\14\2"+ "\5\0\1\u01aa\53\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\7\2\1\u01c8\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\u01c9"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\u01ca\4\2\1\0\20\2\3\0\1\u01ae\7\0"+ "\1\u01b0\45\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\13\2\1\u01cb\4\2\3\0\1\u01b1\7\0"+ "\1\u01b2\45\0\1\2\1\u01cc\1\2\1\52\2\2\3\0"+ "\1\u01cd\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\u01ce"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\13\2\1\u01cf\4\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u01d0"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\2\1\u01d1\6\2\1\0\20\2\5\0\1\u01b9\53\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\u01d2"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\1\u01d3\1\2\16\0\10\2\1\0\20\2\3\0\1\u01bc"+ "\7\0\1\u01bd\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\5\2\1\u01d4\12\2\2\0\1\2"+ "\1\0\1\2\1\52\1\u01d5\1\2\16\0\10\2\1\0"+ "\20\2\5\0\1\u01c1\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\2\1\u01d6\6\2\1\0\20\2\5\0"+ "\1\u01c4\53\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\u01d7\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\u01d8\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u01d9\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\u01da\6\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\4\2"+ "\1\u01db\3\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u01dc\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\u01dd\1\0\20\2\3\0\1\u01cc\7\0\1\u01cd\45\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\11\2\1\u01de\6\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u01df\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\13\2\1\u01e0\4\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u01e1\1\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\12\2\1\u01e2\5\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u01e3\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\u01e4"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\5\2\1\u01e5\12\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\12\2"+ "\1\u01e6\5\2\2\0\1\2\1\0\1\2\1\52\1\u01e7"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u01e8"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\4\2\1\u01e9\13\2\2\0\1\2\1\u01ea"+ "\1\2\1\52\1\u01eb\1\2\3\0\1\u01ec\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\1\u01ed"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\u01ee"+ "\1\2\1\52\2\2\3\0\1\u01ef\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\4\2\1\u01f0\3\2\1\0\20\2\2\0\1\2\1\u01f1"+ "\1\2\1\52\2\2\3\0\1\u01f2\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\6\2\1\u01f3\11\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\4\2\1\u01f4\3\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\2\1\u01f5\16\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\u01f6\17\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\4\2"+ "\1\u01f7\3\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\u01f8\6\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\u01f9\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\u01fa\17\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\2"+ "\1\u01fb\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\u01fc\17\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u01fd"+ "\11\2\3\0\1\u01ea\7\0\1\u01ec\45\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\13\2\1\u01fe"+ "\4\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\4\2\1\u01ff\3\2\1\0\6\2\1\u0200\11\2\3\0"+ "\1\u01ee\7\0\1\u01ef\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\3\2\1\u0201\4\2\1\0\20\2\3\0"+ "\1\u01f1\7\0\1\u01f2\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\u0202\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\u0203\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\2\2\1\u0204\15\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\1\2\1\u0205\6\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\u0206\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\u0207\1\2"+ "\1\52\2\2\3\0\1\u0208\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\u0209\6\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\u020a\6\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\u020b\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\13\2\1\u020c\4\2"+ "\2\0\1\2\1\u020d\1\2\1\52\2\2\3\0\1\u020e"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\u020f\2\2\1\u0210\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\u0211\7\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\2\2\1\u0212\5\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\1\u0213\1\2\16\0"+ "\10\2\1\0\20\2\2\0\1\2\1\u0214\1\2\1\52"+ "\2\2\3\0\1\u0215\12\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\6\2\1\u0216\11\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\u0217\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0218\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\2\1\u0219\16\2\3\0\1\u0207"+ "\7\0\1\u0208\45\0\1\2\1\u021a\1\2\1\52\2\2"+ "\3\0\1\u021b\12\0\10\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u021c\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\u021d\17\2\2\0\1\2\1\u021e"+ "\1\2\1\u021f\2\2\16\0\10\2\1\0\20\2\3\0"+ "\1\u020d\7\0\1\u020e\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\u0220\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\u0221\3\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\u0222\7\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u0223"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\15\2\1\u0224\2\2\3\0\1\u0214\7\0"+ "\1\u0215\45\0\1\2\1\u0225\1\2\1\52\2\2\3\0"+ "\1\u0226\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\5\2\1\u0227"+ "\12\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\7\2\1\u0228\10\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\u0229"+ "\15\2\3\0\1\u021a\7\0\1\u021b\45\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\7\2\1\u022a"+ "\10\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\13\2\1\u022b\4\2\3\0\1\u021e\1\0"+ "\1\u022c\53\0\1\127\1\0\1\127\1\u022d\2\127\14\0"+ "\1\130\1\0\10\127\1\0\20\127\2\0\1\2\1\0"+ "\1\2\1\52\1\u022e\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\3\2"+ "\1\u022f\4\2\1\0\20\2\2\0\1\2\1\u0230\1\2"+ "\1\52\2\2\3\0\1\u0231\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\6\2"+ "\1\u0232\1\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\16\2\1\u0233\1\2"+ "\3\0\1\u0225\7\0\1\u0226\45\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\4\2\1\u0234\13\2"+ "\2\0\1\2\1\u0235\1\2\1\u0236\2\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\7\2\1\u0237\1\0\20\2\2\0\1\2\1\u0238"+ "\1\2\1\u0239\2\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\u023a\1\2\1\u023b\2\2\16\0\10\2\1\0"+ "\20\2\5\0\1\u022d\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\3\2\1\u023c\14\2\2\0"+ "\1\2\1\0\1\2\1\52\1\u023d\1\2\16\0\10\2"+ "\1\0\20\2\3\0\1\u0230\7\0\1\u0231\45\0\1\2"+ "\1\u023e\1\2\1\52\2\2\3\0\1\u023f\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\5\2\1\u0240\2\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u0241\15\2\3\0\1\u0235\1\0\1\u0242\53\0\1\127"+ "\1\0\1\127\1\u0243\2\127\14\0\1\130\1\0\10\127"+ "\1\0\20\127\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u0244\6\2\1\0\20\2\3\0\1\u0238"+ "\1\0\1\u0245\53\0\1\127\1\0\1\127\1\u0246\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\3\0\1\u023a"+ "\1\0\1\u0247\53\0\1\127\1\0\1\127\1\u0248\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\u0249\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\15\2\1\u024a\2\2\3\0\1\u023e\7\0"+ "\1\u023f\45\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\u024b\4\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\1\2\1\u024c\6\2\1\0"+ "\20\2\5\0\1\u0243\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u024d\1\2\1\0\20\2\5\0"+ "\1\u0246\56\0\1\u0248\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\u024e\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\16\2\1\u024f\1\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\u0250\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\u0251"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\7\2\1\u0252\10\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\13\2\1\u0253\4\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\u0254\2\2\1\0\20\2\2\0"+ "\1\2\1\u0255\1\2\1\52\2\2\3\0\1\u0256\12\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u0257\1\2\1\0\20\2\2\0"+ "\1\2\1\u0258\1\2\1\52\2\2\3\0\1\u0259\12\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\2\1\u025a\6\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\3\2\1\u025b"+ "\4\2\1\0\20\2\3\0\1\u0255\7\0\1\u0256\45\0"+ "\1\2\1\u025c\1\2\1\52\2\2\3\0\1\u025d\12\0"+ "\10\2\1\0\20\2\3\0\1\u0258\7\0\1\u0259\45\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\17\2\1\u025e\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\u025f\11\2\3\0\1\u025c"+ "\7\0\1\u025d\46\0\1\u025d\10\0\1\u0260\44\0\1\2"+ "\1\u0261\1\2\1\52\2\2\3\0\1\u0262\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\u0263\1\2\1\52\2\2"+ "\3\0\1\u0264\12\0\10\2\1\0\20\2\3\0\1\u0261"+ "\7\0\1\u0262\46\0\1\u0263\7\0\1\u0264\45\0"; private static int [] zzUnpackTrans() { int [] result = new int[24816]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; } private static int zzUnpackTrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; private static final int ZZ_NO_MATCH = 1; private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\1\0\3\1\2\11\1\1\7\11\2\1\1\11\1\1"+ "\2\11\10\1\1\11\14\1\1\0\3\1\4\11\42\1"+ "\1\0\1\11\1\0\1\1\1\11\62\1\1\0\1\11"+ "\2\1\1\0\1\11\12\1\1\0\1\11\36\1\2\0"+ "\1\1\1\0\1\11\6\1\1\0\1\11\1\0\1\11"+ "\3\1\2\0\1\1\1\0\1\11\2\0\31\1\1\11"+ "\3\1\1\0\1\1\1\11\6\1\1\0\1\11\1\1"+ "\1\11\11\1\1\0\1\11\1\1\2\0\6\1\1\0"+ "\1\11\1\0\1\11\1\0\1\11\6\1\1\0\1\11"+ "\5\1\1\0\1\1\1\11\3\1\2\0\6\1\1\0"+ "\1\11\1\1\1\0\1\11\25\1\1\0\1\11\3\1"+ "\3\0\1\11\1\1\1\0\1\11\4\1\1\0\1\11"+ "\3\1\2\0\14\1\1\0\1\11\3\1\1\11\1\0"+ "\1\11\7\1\1\0\1\11\1\1\2\0\1\1\2\0"+ "\7\1\1\0\1\1\1\11\1\0\1\11\1\1\2\0"+ "\3\1\1\0\1\11\2\1\2\0\1\1\2\0\1\1"+ "\1\0\1\11\1\1\1\0\1\11\1\1\1\0\1\11"+ "\3\1\1\0\1\1\1\11\1\0\1\11\5\1\1\0"+ "\1\11\2\1\1\0\1\11\2\1\1\0\1\11\1\1"+ "\1\0\1\11\7\1\1\0\1\11\34\1\1\0\1\1"+ "\1\11\1\1\1\0\1\11\1\1\1\0\1\11\24\1"+ "\1\0\1\11\4\1\1\0\1\11\5\1\1\0\1\11"+ "\4\1\1\0\1\11\2\1\2\0\5\1\1\0\1\11"+ "\5\1\1\0\1\11\2\1\1\0\1\11\3\1\2\0"+ "\1\1\4\0\2\1\1\0\1\11\2\1\1\0\1\11"+ "\1\1\1\0\1\11\1\0\1\11\14\1\1\0\1\11"+ "\1\1\1\0\1\11\2\1\2\0\2\1\1\11\1\0"+ "\1\11\1\0\1\11"; private static int [] zzUnpackAttribute() { int [] result = new int[612]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } private static int zzUnpackAttribute(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** the input device */ private java.io.Reader zzReader; /** the current state of the DFA */ private int zzState; /** the current lexical state */ private int zzLexicalState = YYINITIAL; /** this buffer contains the current text to be matched and is the source of the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; /** the textposition at the last accepting state */ private int zzMarkedPos; /** the textposition at the last state to be included in yytext */ private int zzPushbackPos; /** the current text position in the buffer */ private int zzCurrentPos; /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; /** endRead marks the last character in the buffer, that has been read from input */ private int zzEndRead; /** number of newlines encountered up to the start of the matched text */ private int yyline; /** the number of characters up to the start of the matched text */ private int yychar; /** * the number of characters from the last newline up to the start of the * matched text */ private int yycolumn; /** * zzAtBOL == true <=> the scanner is currently at the beginning of a line */ private boolean zzAtBOL = true; /** zzAtEOF == true <=> the scanner is at the EOF */ private boolean zzAtEOF; /** denotes if the user-EOF-code has already been executed */ private boolean zzEOFDone; /* user code: */ private Symbol sym(int sym) { return new Symbol(sym); } private Symbol sym(int sym, Object val) { return new Symbol(sym, val); } int isName; NameType name; FuncName fname; Ntest ntest; AxisType at; int len; String literal; Double number; int colonPosition; public int getOffset(){ return yychar; } /* public void report_error(String message, Object info) { //throw new XPathParseException("Syntax error during parsing"); } public void report_fatal_error(String message, Object info) throws XPathParseException{ throw new XPathParseExceptionHuge("Syntax error during parsing: "+ message); } public void syntax_error(Symbol cur_token) { } public void unrecovered_syntax_error(Symbol cur_token) throws XPathParseException{ throw new XPathParseExceptionHuge("XPath Syntax error: "+cur_token); }*/ /** * Creates a new scanner * There is also a java.io.InputStream version of this constructor. * * @param in the java.io.Reader to read input from. */ Yylex(java.io.Reader in) { isName = 1; colonPosition = -1; this.zzReader = in; } /** * Creates a new scanner. * There is also java.io.Reader version of this constructor. * * @param in the java.io.Inputstream to read input from. */ Yylex(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 138) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * Refills the input buffer. * * @return <code>false</code>, iff there was new input. * * @exception java.io.IOException if any I/O-Error occurs */ private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead-zzStartRead); /* translate stored positions */ zzEndRead-= zzStartRead; zzCurrentPos-= zzStartRead; zzMarkedPos-= zzStartRead; zzPushbackPos-= zzStartRead; zzStartRead = 0; } /* is the buffer big enough? */ if (zzCurrentPos >= zzBuffer.length) { /* if not: blow it up */ char newBuffer[] = new char[zzCurrentPos*2]; System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); zzBuffer = newBuffer; } /* finally: fill the buffer with new input */ int numRead = zzReader.read(zzBuffer, zzEndRead, zzBuffer.length-zzEndRead); if (numRead < 0) { return true; } else { zzEndRead+= numRead; return false; } } /** * Closes the input stream. */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); } /** * Resets the scanner to read from a new input stream. * Does not close the old reader. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>ZZ_INITIAL</tt>. * * @param reader the new input stream */ public final void yyreset(java.io.Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = zzPushbackPos = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; } /** * Returns the current lexical state. */ public final int yystate() { return zzLexicalState; } /** * Enters a new lexical state * * @param newState the new lexical state */ public final void yybegin(int newState) { zzLexicalState = newState; } /** * Returns the text matched by the current regular expression. */ public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); } /** * Returns the character at position <tt>pos</tt> from the * matched text. * * It is equivalent to yytext().charAt(pos), but faster * * @param pos the position of the character to fetch. * A value from 0 to yylength()-1. * * @return the character at position pos */ public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; } /** * Returns the length of the matched text region. */ public final int yylength() { return zzMarkedPos-zzStartRead; } /** * Reports an error that occured while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } /** * Contains user EOF-code, which will be executed exactly once, * when the end of file is reached */ private void zzDoEOF() throws java.io.IOException { if (!zzEOFDone) { zzEOFDone = true; yyclose(); } } /** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */ public java_cup.runtime.Symbol next_token() throws java.io.IOException, XPathParseExceptionHuge { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; yychar+= zzMarkedPosL-zzStartRead; zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = zzLexicalState; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 57: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CONTAINS; fname = new FuncName(); fname.i = FuncName.CONTAINS; return sym(FNAME,fname); } case 91: break; case 74: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STRING_LENGTH; fname = new FuncName(); fname.i = FuncName.STRING_LENGTH; return sym(FNAME,fname); } case 92: break; case 55: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.POSITION; fname = new FuncName(); fname.i = FuncName.POSITION; return sym(FNAME,fname); } case 93: break; case 28: { isName = 0; len = yytext().length(); name = new NameType(); if (!XMLChar.isNCNameStartChar(yytext().charAt(0))) throw new XPathParseExceptionHuge("Invalid char in name token: "+yytext()+ "@position 0"); for(int i=1;i<len-2;i++){ if (!XMLChar.isNCNameChar(yytext().charAt(i))) throw new XPathParseExceptionHuge("Invalid char in name token: "+yytext()+ "@position "+i); } name.prefix = yytext().substring(0,len-2); name.localname = "*"; //System.out.println("NAME "+name+ " returned"); return sym(NAME,name); } case 94: break; case 26: { if (isName == 0) { isName = 1 ; return sym(OR); } else { isName = 0; name = new NameType(); name.qname = "or"; return sym(NAME,name); } } case 95: break; case 24: { isName = 1 ; return sym(NE); } case 96: break; case 31: { if (isName == 0) { isName = 1 ; return sym(AND); } else { isName = 0; name = new NameType(); name.qname = "add"; return sym(NAME,name); } } case 97: break; case 12: { isName = 1 ; /*System.out.println( "[ returned");*/ return sym(LB); } case 98: break; case 85: { isName = 1; at = new AxisType(); at.i = AxisType.DESCENDANT_OR_SELF; return sym(AXISNAME,at); } case 99: break; case 62: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.IRI_TO_URI; fname = new FuncName(); fname.i = FuncName.IRI_TO_URI; return sym(FNAME,fname); } case 100: break; case 11: { isName = 0 ; return sym(RP); } case 101: break; case 64: { isName =0; at = new AxisType(); at.i = AxisType.NAMESPACE; return sym(AXISNAME,at); } case 102: break; case 37: { isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.LAST; return sym(FNAME,fname); } case 103: break; case 18: { if (isName ==0){ isName = 1; //System.out.println("returned a MULT"); return sym(MULT); } else { isName = 0; name = new NameType(); name.qname = "*"; return sym(NAME,name); } } case 104: break; case 89: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX; return sym(FNAME,fname); } case 105: break; case 71: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STARTS_WITH; fname = new FuncName(); fname.i = FuncName.STARTS_WITH; return sym(FNAME,fname); } case 106: break; case 8: { isName = 1 ; return sym(AT); } case 107: break; case 6: { isName = 0 ; /*System.out.println(". returned ");*/ return sym(DOT); } case 108: break; case 66: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOWER_CASE; fname = new FuncName(); fname.i = FuncName.LOWER_CASE; return sym(FNAME,fname); } case 109: break; case 36: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LANG; fname = new FuncName(); fname.i = FuncName.LANG; return sym(FNAME,fname); } case 110: break; case 79: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING_BEFORE; fname = new FuncName(); fname.i = FuncName.SUBSTRING_BEFORE; return sym(FNAME,fname); } case 111: break; case 35: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAME; fname = new FuncName(); fname.i = FuncName.NAME; return sym(FNAME,fname); } case 112: break; case 39: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.NODE; ntest.arg = null; return sym(NTEST,ntest); } case 113: break; case 44: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.FALSE; fname = new FuncName(); fname.i = FuncName.FALSE; return sym(FNAME,fname); } case 114: break; case 65: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOCAL_NAME; fname = new FuncName(); fname.i = FuncName.LOCAL_NAME; return sym(FNAME,fname); } case 115: break; case 48: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STRING; fname = new FuncName(); fname.i = FuncName.STRING; return sym(FNAME,fname); } case 116: break; case 14: { isName = 1 ; return sym(GT); } case 117: break; case 56: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.COMMENT; ntest.arg = null; return sym(NTEST,ntest); } case 118: break; case 54: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.BOOLEAN; fname = new FuncName(); fname.i = FuncName.BOOLEAN; return sym(FNAME,fname); } case 119: break; case 16: { isName = 1 ; return sym(EQ); } case 120: break; case 75: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ENCODE_FOR_URI; fname = new FuncName(); fname.i = FuncName.ENCODE_FOR_URI; return sym(FNAME,fname); } case 121: break; case 63: { isName = 1; at = new AxisType(); at.i = AxisType.ATTRIBUTE; return sym(AXISNAME,at); } case 122: break; case 3: { isName = 0; number = new Double(yytext()); //System.out.println("number returned ==> "+ Double.parseDouble(yytext())); return sym(NUMBER,number); } case 123: break; case 45: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.FLOOR; fname = new FuncName(); fname.i = FuncName.FLOOR; return sym(FNAME,fname); } case 124: break; case 34: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUM; fname = new FuncName(); fname.i = FuncName.SUM; return sym(FNAME,fname); } case 125: break; case 30: { if (isName == 0) { isName = 1 ; return sym(MOD); } else { isName = 0; name = new NameType(); name.qname = "mod"; //System.out.println("returned a NAME "+yytext()); return sym(NAME,name); } } case 126: break; case 29: { if (isName == 0 ) { isName = 1 ; return sym(DIV); } else { isName = 0; name = new NameType(); name.qname = "div"; return sym(NAME,name); } } case 127: break; case 27: { isName = 0; len = yytext().length(); literal = yytext().substring(1, len-1); return sym(LITERAL,literal); } case 128: break; case 19: { isName = 1 ; //System.out.println("SLASH returned "); return sym(SLASH); } case 129: break; case 32: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ABS; fname = new FuncName(); fname.i = FuncName.ABS; return sym(FNAME,fname); } case 130: break; case 15: { isName = 1 ; return sym(LT); } case 131: break; case 90: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FROM_QNAME; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI_FROM_QNAME; return sym(FNAME,fname); } case 132: break; case 25: { isName = 1 ; //System.out.println("DSLASH returned "); return sym(DSLASH); } case 133: break; case 4: { throw new XPathParseExceptionHuge("Invalid char in XPath Expression"); } case 134: break; case 88: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = null; return sym(NTEST,ntest); } case 135: break; case 13: { isName = 0 ; return sym(RB); } case 136: break; case 77: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING_AFTER; fname = new FuncName(); fname.i = FuncName.SUBSTRING_AFTER; return sym(FNAME,fname); } case 137: break; case 38: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.TRUE; fname = new FuncName(); fname.i = FuncName.TRUE; return sym(FNAME,fname); } case 138: break; case 53: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CEILING; fname = new FuncName(); fname.i = FuncName.CEILING; return sym(FNAME,fname); } case 139: break; case 17: { isName = 1; return sym(DOLLAR); } case 140: break; case 61: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ENDS_WITH; fname = new FuncName(); fname.i = FuncName.ENDS_WITH; return sym(FNAME,fname); } case 141: break; case 86: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOCAL_NAME_FROM_QNAME; fname = new FuncName(); fname.i = FuncName.LOCAL_NAME_FROM_QNAME; return sym(FNAME,fname); } case 142: break; case 1: { isName = 0; name = new NameType(); //name.qname = new String(yytext()); //System.out.println("returned a NAME ==>" + yytext()); //if (yytext().charAt(0) =='-'){ // throw new XPathParseException("Invalid char in name token:"+yytext()); //} name.qname = new String(yytext()); if (!XMLChar.isNCNameStartChar(name.qname.charAt(0))) throw new XPathParseExceptionHuge("Invalid char in name token: "+yytext()+ "@position 0"); for(int i=1;i<name.qname.length();i++){ if (!XMLChar.isNCNameChar(name.qname.charAt(i)) && name.qname.charAt(i)!=':' ) throw new XPathParseExceptionHuge("Invalid char in name token: "+yytext()+ "@position "+i); if (name.qname.charAt(i)==':'){ colonPosition = i; } } if (colonPosition != -1){ name.prefix = yytext().substring(0,colonPosition); name.localname = yytext().substring(colonPosition+1); } colonPosition = -1; return sym(NAME,name); } case 143: break; case 21: { isName = 0 ; return sym(DDOT); } case 144: break; case 83: { isName = 1; at = new AxisType(); at.i = AxisType.PRECEDING_SIBLING; return sym(AXISNAME,at); } case 145: break; case 72: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI; return sym(FNAME,fname); } case 146: break; case 10: { isName = 1 ; return sym(LP); } case 147: break; case 7: { isName = 1 ; return sym(ADD); } case 148: break; case 60: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.TRANSLATE; fname = new FuncName(); fname.i = FuncName.TRANSLATE; return sym(FNAME,fname); } case 149: break; case 82: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_EVEN; fname = new FuncName(); fname.i = FuncName.ROUND_HALF_TO_EVEN; return sym(FNAME,fname); } case 150: break; case 43: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.COUNT; fname = new FuncName(); fname.i = FuncName.COUNT; return sym(FNAME,fname); } case 151: break; case 67: { isName = 1; at = new AxisType(); at.i = AxisType.PRECEDING; return sym(AXISNAME,at); } case 152: break; case 52: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.COMPARE; fname = new FuncName(); fname.i = FuncName.COMPARE; return sym(FNAME,fname); } case 153: break; case 9: { isName = 1 ; return sym(COMMA); } case 154: break; case 49: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CONCAT; fname = new FuncName(); fname.i = FuncName.CONCAT; return sym(FNAME,fname); } case 155: break; case 58: { isName = 1; at = new AxisType(); at.i = AxisType.ANCESTOR; return sym(AXISNAME,at); } case 156: break; case 50: { isName = 1; at = new AxisType(); at.i = AxisType.CHILD; return sym(AXISNAME,at); } case 157: break; case 46: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.QNAME; fname = new FuncName(); fname.i = FuncName.QNAME; return sym(FNAME,fname); } case 158: break; case 20: { isName = 1 ; return sym(UNION) ; } case 159: break; case 84: { isName = 1; at = new AxisType(); at.i = AxisType.FOLLOWING_SIBLING; return sym(AXISNAME,at); } case 160: break; case 5: { isName = 1 ; return sym(SUB); } case 161: break; case 33: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NOT; fname = new FuncName(); fname.i = FuncName.NOT; return sym(FNAME,fname); } case 162: break; case 47: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NUMBER; fname = new FuncName(); fname.i = FuncName.NUMBER; return sym(FNAME,fname); } case 163: break; case 68: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.UPPER_CASE; fname = new FuncName(); fname.i = FuncName.UPPER_CASE; return sym(FNAME,fname); } case 164: break; case 42: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.TEXT; ntest.arg = null; return sym(NTEST,ntest); } case 165: break; case 69: { isName = 1; at = new AxisType(); at.i = AxisType.FOLLOWING; return sym(AXISNAME,at); } case 166: break; case 81: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_ODD; fname = new FuncName(); fname.i = FuncName.ROUND_HALF_TO_ODD; return sym(FNAME,fname); } case 167: break; case 22: { isName = 1 ; return sym(GE); } case 168: break; case 51: { isName = 1; at = new AxisType(); at.i = AxisType.PARENT; return sym(AXISNAME,at); } case 169: break; case 87: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CODE_POINTS_TO_STRING; fname = new FuncName(); fname.i = FuncName.CODE_POINTS_TO_STRING; return sym(FNAME,fname); } case 170: break; case 73: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.RESOLVE_QNAME; fname = new FuncName(); fname.i = FuncName.RESOLVE_QNAME; return sym(FNAME,fname); } case 171: break; case 80: { isName = 1; at = new AxisType(); at.i = AxisType.ANCESTOR_OR_SELF; return sym(AXISNAME,at); } case 172: break; case 2: { /* eat white space */ } case 173: break; case 76: { isName =1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NORMALIZE_SPACE; fname = new FuncName(); fname.i = FuncName.NORMALIZE_SPACE; return sym(FNAME,fname); } case 174: break; case 40: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND; fname = new FuncName(); fname.i = FuncName.ROUND; return sym(FNAME,fname); } case 175: break; case 41: { isName = 1; at = new AxisType(); at.i = AxisType.SELF; //System.out.println("SELF:: returned"); return sym(AXISNAME,at); } case 176: break; case 59: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING; fname = new FuncName(); fname.i = FuncName.SUBSTRING; return sym(FNAME,fname); } case 177: break; case 70: { isName = 1; at = new AxisType(); at.i = AxisType.DESCENDANT; return sym(AXISNAME,at); } case 178: break; case 78: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ESCAPE_HTML_URI; fname = new FuncName(); fname.i = FuncName.ESCAPE_HTML_URI; return sym(FNAME,fname); } case 179: break; case 23: { isName = 1 ; return sym(LE); } case 180: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; zzDoEOF(); { return new java_cup.runtime.Symbol(sym.EOF); } } else { zzScanError(ZZ_NO_MATCH); } } } } }
77,992
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
LocationPathNode.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/LocationPathNode.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * This interface defines the method that * Step, NodeTest, and Predicate all implement * */ public interface LocationPathNode{ public boolean eval(VTDNavHuge vn) throws NavExceptionHuge; }
1,086
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
AxisType.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/AxisType.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; /** * * This class is used by Yylex to detect axis type * and transport to the parser * */ public class AxisType{ public int i; public static final int CHILD=0; public static final int ANCESTOR =3; public static final int ANCESTOR_OR_SELF =12; public static final int ATTRIBUTE = 8; public static final int DESCENDANT=1; public static final int DESCENDANT_OR_SELF=11; public static final int FOLLOWING =6; public static final int FOLLOWING_SIBLING =4; public static final int NAMESPACE =9; public static final int PARENT= 2; public static final int PRECEDING =7; public static final int PRECEDING_SIBLING=5; public static final int SELF =10; public AxisType (){ } public String getAxisString(){ switch (i){ case 0: return "child::"; case 1: return "descendent::"; case 2: return "parent::"; case 3: return "ancestor::"; case 4: return "following-sibling::"; case 5: return "preceding-sibling::"; case 6: return "following::"; case 7: return "preceding::"; case 8: return "attribute::"; case 9: return "namespace::"; case 10: return "self::"; case 11: return "descendant-or-self::"; default: return "ancestor-or-self::"; } } }
2,125
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NameType.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/NameType.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; /** * This class is used by lexer to represent a NAME object * */ public class NameType{ public String qname; public String prefix; public String localname; public NameType(){ qname = null; prefix = null; localname =null; } }
1,106
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Alist.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/Alist.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * * This class implements the argumentList for FuncExpr * which is basically a linked-list of expressions */ public class Alist { public Expr e; public Alist next; public Alist (){ next = null; } public String toString(){ Alist temp = this; String s = ""; while(temp!=null){ s = s+temp.e; temp = temp.next; if (temp!=null) s = s+" ,"; } return s; } public void reset(VTDNavHuge vn){ Alist temp = this; while(temp!=null){ temp.e.reset(vn); temp = temp.next; } } }
1,430
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
parser.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/parser.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //---------------------------------------------------- // The following code was generated by CUP v0.10k // Fri Sep 25 13:10:55 PDT 2009 //---------------------------------------------------- package com.ximpleware.extended.xpath; import java_cup.runtime.*; import com.ximpleware.extended.*; import java.util.*; /** CUP v0.10k generated parser. * @version Fri Sep 25 13:10:55 PDT 2009 */ public class parser extends java_cup.runtime.lr_parser { /** Default constructor. */ public parser() {super();} /** Constructor which sets the default scanner. */ public parser(java_cup.runtime.Scanner s) {super(s);} /** Production table. */ protected static final short _production_table[][] = unpackFromStrings(new String[] { "\000\102\000\002\005\003\000\002\002\004\000\002\006" + "\003\000\002\006\005\000\002\010\003\000\002\010\005" + "\000\002\007\003\000\002\007\005\000\002\007\005\000" + "\002\011\003\000\002\011\005\000\002\011\005\000\002" + "\011\005\000\002\011\005\000\002\012\003\000\002\012" + "\005\000\002\012\005\000\002\013\003\000\002\013\005" + "\000\002\013\005\000\002\013\005\000\002\014\003\000" + "\002\014\004\000\002\020\003\000\002\020\005\000\002" + "\015\003\000\002\015\003\000\002\015\005\000\002\015" + "\005\000\002\016\003\000\002\016\004\000\002\022\003" + "\000\002\022\005\000\002\022\003\000\002\022\003\000" + "\002\022\003\000\002\003\006\000\002\021\002\000\002" + "\021\003\000\002\021\005\000\002\023\003\000\002\024" + "\003\000\002\024\003\000\002\033\003\000\002\033\004" + "\000\002\033\003\000\002\032\003\000\002\032\005\000" + "\002\032\003\000\002\030\005\000\002\030\003\000\002" + "\027\003\000\002\027\003\000\002\037\002\000\002\037" + "\004\000\002\025\003\000\002\025\003\000\002\026\002" + "\000\002\026\003\000\002\031\003\000\002\031\003\000" + "\002\034\004\000\002\035\005\000\002\036\005\000\002" + "\017\004\000\002\004\003" }); /** Access to production table. */ public short[][] production_table() {return _production_table;} /** Parse-action table. */ protected static final short[][] _action_table = unpackFromStrings(new String[] { "\000\141\000\036\005\045\006\021\007\017\010\042\012" + "\016\025\004\026\006\035\037\036\032\037\036\040\024" + "\041\uffc8\042\uffc8\043\043\001\002\000\062\002\uffd6\004" + "\uffd6\005\uffd6\006\021\007\017\010\042\011\uffd6\013\uffd6" + "\015\uffd6\016\uffd6\017\uffd6\020\uffd6\021\uffd6\022\uffd6\023" + "\uffd6\024\uffd6\027\uffd6\030\uffd6\031\uffd6\032\uffd6\033\uffd6" + "\041\uffc8\042\uffc8\043\043\001\002\000\032\002\ufffb\011" + "\ufffb\013\ufffb\015\ufffb\016\120\017\117\020\122\021\121" + "\022\ufffb\023\ufffb\031\ufffb\032\ufffb\001\002\000\016\006" + "\021\007\017\010\042\041\uffc8\042\uffc8\043\043\001\002" + "\000\046\002\uffd4\004\uffd4\005\uffd4\011\uffd4\013\uffd4\015" + "\uffd4\016\uffd4\017\uffd4\020\uffd4\021\uffd4\022\uffd4\023\uffd4" + "\024\uffd4\027\uffd4\030\uffd4\031\uffd4\032\uffd4\033\uffd4\001" + "\002\000\054\002\uffde\004\uffde\005\uffde\011\uffde\013\uffde" + "\014\uffde\015\uffde\016\uffde\017\uffde\020\uffde\021\uffde\022" + "\uffde\023\uffde\024\uffde\025\uffde\026\uffde\027\uffde\030\uffde" + "\031\uffde\032\uffde\033\uffde\001\002\000\016\002\uffff\011" + "\uffff\013\uffff\015\uffff\031\132\032\uffff\001\002\000\006" + "\041\136\042\134\001\002\000\006\041\uffc9\042\uffc9\001" + "\002\000\014\002\001\011\001\013\001\015\001\032\130" + "\001\002\000\022\002\ufffd\011\ufffd\013\ufffd\015\ufffd\022" + "\114\023\115\031\ufffd\032\ufffd\001\002\000\036\005\045" + "\006\021\007\017\010\042\012\016\025\004\026\006\035" + "\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043\043" + "\001\002\000\052\002\uffc5\004\uffc5\005\uffc5\011\uffc5\013" + "\uffc5\015\uffc5\016\uffc5\017\uffc5\020\uffc5\021\uffc5\022\uffc5" + "\023\uffc5\024\uffc5\025\uffc5\026\uffc5\027\uffc5\030\uffc5\031" + "\uffc5\032\uffc5\033\uffc5\001\002\000\046\002\uffd7\004\uffd7" + "\005\uffd7\011\uffd7\013\uffd7\015\uffd7\016\uffd7\017\uffd7\020" + "\uffd7\021\uffd7\022\uffd7\023\uffd7\024\uffd7\027\uffd7\030\uffd7" + "\031\uffd7\032\uffd7\033\uffd7\001\002\000\052\002\uffc6\004" + "\uffc6\005\uffc6\011\uffc6\013\uffc6\015\uffc6\016\uffc6\017\uffc6" + "\020\uffc6\021\uffc6\022\uffc6\023\uffc6\024\uffc6\025\uffc6\026" + "\uffc6\027\uffc6\030\uffc6\031\uffc6\032\uffc6\033\uffc6\001\002" + "\000\036\002\ufff8\004\107\005\106\011\ufff8\013\ufff8\015" + "\ufff8\016\ufff8\017\ufff8\020\ufff8\021\ufff8\022\ufff8\023\ufff8" + "\031\ufff8\032\ufff8\001\002\000\044\002\ufff0\004\ufff0\005" + "\ufff0\011\ufff0\013\ufff0\015\ufff0\016\ufff0\017\ufff0\020\ufff0" + "\021\ufff0\022\ufff0\023\ufff0\024\ufff0\027\ufff0\030\ufff0\031" + "\ufff0\032\ufff0\001\002\000\004\012\uffc0\001\002\000\004" + "\012\077\001\002\000\052\002\uffd3\004\uffd3\005\uffd3\011" + "\uffd3\013\uffd3\015\uffd3\016\uffd3\017\uffd3\020\uffd3\021\uffd3" + "\022\uffd3\023\uffd3\024\uffd3\025\074\026\073\027\uffd3\030" + "\uffd3\031\uffd3\032\uffd3\033\uffd3\001\002\000\046\002\uffe8" + "\004\uffe8\005\uffe8\011\uffe8\013\uffe8\015\uffe8\016\uffe8\017" + "\uffe8\020\uffe8\021\uffe8\022\uffe8\023\uffe8\024\uffe8\027\uffe8" + "\030\uffe8\031\uffe8\032\uffe8\033\uffe8\001\002\000\054\002" + "\uffe4\004\uffe4\005\uffe4\011\uffe4\013\uffe4\014\uffe4\015\uffe4" + "\016\uffe4\017\uffe4\020\uffe4\021\uffe4\022\uffe4\023\uffe4\024" + "\uffe4\025\uffe4\026\uffe4\027\uffe4\030\uffe4\031\uffe4\032\uffe4" + "\033\uffe4\001\002\000\046\002\uffea\004\uffea\005\uffea\011" + "\uffea\013\uffea\015\uffea\016\uffea\017\uffea\020\uffea\021\uffea" + "\022\uffea\023\uffea\024\uffea\027\uffea\030\uffea\031\uffea\032" + "\uffea\033\071\001\002\000\054\002\uffdf\004\uffdf\005\uffdf" + "\011\uffdf\013\uffdf\014\uffdf\015\uffdf\016\uffdf\017\uffdf\020" + "\uffdf\021\uffdf\022\uffdf\023\uffdf\024\uffdf\025\uffdf\026\uffdf" + "\027\uffdf\030\uffdf\031\uffdf\032\uffdf\033\uffdf\001\002\000" + "\054\002\uffe2\004\uffe2\005\uffe2\011\uffe2\013\uffe2\014\uffe2" + "\015\uffe2\016\uffe2\017\uffe2\020\uffe2\021\uffe2\022\uffe2\023" + "\uffe2\024\uffe2\025\uffe2\026\uffe2\027\uffe2\030\uffe2\031\uffe2" + "\032\uffe2\033\uffe2\001\002\000\054\002\uffe7\004\uffe7\005" + "\uffe7\011\uffe7\013\uffe7\014\064\015\uffe7\016\uffe7\017\uffe7" + "\020\uffe7\021\uffe7\022\uffe7\023\uffe7\024\uffe7\025\063\026" + "\062\027\uffe7\030\uffe7\031\uffe7\032\uffe7\033\uffe7\001\002" + "\000\004\002\060\001\002\000\054\002\uffe0\004\uffe0\005" + "\uffe0\011\uffe0\013\uffe0\014\uffe0\015\uffe0\016\uffe0\017\uffe0" + "\020\uffe0\021\uffe0\022\uffe0\023\uffe0\024\uffe0\025\uffe0\026" + "\uffe0\027\uffe0\030\uffe0\031\uffe0\032\uffe0\033\uffe0\001\002" + "\000\004\042\057\001\002\000\046\002\uffd1\004\uffd1\005" + "\uffd1\011\uffd1\013\uffd1\015\uffd1\016\uffd1\017\uffd1\020\uffd1" + "\021\uffd1\022\uffd1\023\uffd1\024\uffd1\027\uffd1\030\uffd1\031" + "\uffd1\032\uffd1\033\uffd1\001\002\000\052\002\uffcf\004\uffcf" + "\005\uffcf\011\uffcf\013\uffcf\015\uffcf\016\uffcf\017\uffcf\020" + "\uffcf\021\uffcf\022\uffcf\023\uffcf\024\uffcf\025\uffcf\026\uffcf" + "\027\uffcf\030\uffcf\031\uffcf\032\uffcf\033\uffcf\001\002\000" + "\006\041\uffc7\042\uffc7\001\002\000\006\041\uffca\042\uffca" + "\001\002\000\044\002\uffec\004\uffec\005\uffec\011\uffec\013" + "\uffec\015\uffec\016\uffec\017\uffec\020\uffec\021\uffec\022\uffec" + "\023\uffec\024\uffec\027\uffec\030\uffec\031\uffec\032\uffec\001" + "\002\000\036\005\045\006\021\007\017\010\042\012\016" + "\025\004\026\006\035\037\036\032\037\036\040\024\041" + "\uffc8\042\uffc8\043\043\001\002\000\044\002\ufff3\004\ufff3" + "\005\ufff3\011\ufff3\013\ufff3\015\ufff3\016\ufff3\017\ufff3\020" + "\ufff3\021\ufff3\022\ufff3\023\ufff3\024\051\027\052\030\050" + "\031\ufff3\032\ufff3\001\002\000\046\002\uffd8\004\uffd8\005" + "\uffd8\011\uffd8\013\uffd8\015\uffd8\016\uffd8\017\uffd8\020\uffd8" + "\021\uffd8\022\uffd8\023\uffd8\024\uffd8\027\uffd8\030\uffd8\031" + "\uffd8\032\uffd8\033\uffd8\001\002\000\036\005\045\006\021" + "\007\017\010\042\012\016\025\004\026\006\035\037\036" + "\032\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002" + "\000\036\005\045\006\021\007\017\010\042\012\016\025" + "\004\026\006\035\037\036\032\037\036\040\024\041\uffc8" + "\042\uffc8\043\043\001\002\000\036\005\045\006\021\007" + "\017\010\042\012\016\025\004\026\006\035\037\036\032" + "\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002\000" + "\044\002\uffee\004\uffee\005\uffee\011\uffee\013\uffee\015\uffee" + "\016\uffee\017\uffee\020\uffee\021\uffee\022\uffee\023\uffee\024" + "\uffee\027\uffee\030\uffee\031\uffee\032\uffee\001\002\000\044" + "\002\uffef\004\uffef\005\uffef\011\uffef\013\uffef\015\uffef\016" + "\uffef\017\uffef\020\uffef\021\uffef\022\uffef\023\uffef\024\uffef" + "\027\uffef\030\uffef\031\uffef\032\uffef\001\002\000\044\002" + "\uffed\004\uffed\005\uffed\011\uffed\013\uffed\015\uffed\016\uffed" + "\017\uffed\020\uffed\021\uffed\022\uffed\023\uffed\024\uffed\027" + "\uffed\030\uffed\031\uffed\032\uffed\001\002\000\044\002\uffeb" + "\004\uffeb\005\uffeb\011\uffeb\013\uffeb\015\uffeb\016\uffeb\017" + "\uffeb\020\uffeb\021\uffeb\022\uffeb\023\uffeb\024\uffeb\027\uffeb" + "\030\uffeb\031\uffeb\032\uffeb\001\002\000\054\002\uffc1\004" + "\uffc1\005\uffc1\011\uffc1\013\uffc1\014\uffc1\015\uffc1\016\uffc1" + "\017\uffc1\020\uffc1\021\uffc1\022\uffc1\023\uffc1\024\uffc1\025" + "\uffc1\026\uffc1\027\uffc1\030\uffc1\031\uffc1\032\uffc1\033\uffc1" + "\001\002\000\004\002\000\001\002\000\054\002\uffe3\004" + "\uffe3\005\uffe3\011\uffe3\013\uffe3\014\uffe3\015\uffe3\016\uffe3" + "\017\uffe3\020\uffe3\021\uffe3\022\uffe3\023\uffe3\024\uffe3\025" + "\uffe3\026\uffe3\027\uffe3\030\uffe3\031\uffe3\032\uffe3\033\uffe3" + "\001\002\000\016\006\021\007\017\010\042\041\uffc8\042" + "\uffc8\043\043\001\002\000\016\006\021\007\017\010\042" + "\041\uffc8\042\uffc8\043\043\001\002\000\036\005\045\006" + "\021\007\017\010\042\012\016\025\004\026\006\035\037" + "\036\032\037\036\040\024\041\uffc8\042\uffc8\043\043\001" + "\002\000\004\015\066\001\002\000\054\002\uffc2\004\uffc2" + "\005\uffc2\011\uffc2\013\uffc2\014\uffc2\015\uffc2\016\uffc2\017" + "\uffc2\020\uffc2\021\uffc2\022\uffc2\023\uffc2\024\uffc2\025\uffc2" + "\026\uffc2\027\uffc2\030\uffc2\031\uffc2\032\uffc2\033\uffc2\001" + "\002\000\046\002\uffe6\004\uffe6\005\uffe6\011\uffe6\013\uffe6" + "\015\uffe6\016\uffe6\017\uffe6\020\uffe6\021\uffe6\022\uffe6\023" + "\uffe6\024\uffe6\027\uffe6\030\uffe6\031\uffe6\032\uffe6\033\uffe6" + "\001\002\000\046\002\uffe5\004\uffe5\005\uffe5\011\uffe5\013" + "\uffe5\015\uffe5\016\uffe5\017\uffe5\020\uffe5\021\uffe5\022\uffe5" + "\023\uffe5\024\uffe5\027\uffe5\030\uffe5\031\uffe5\032\uffe5\033" + "\uffe5\001\002\000\034\006\021\007\017\010\042\012\016" + "\025\004\026\006\035\037\036\032\037\036\040\024\041" + "\uffc8\042\uffc8\043\043\001\002\000\044\002\uffe9\004\uffe9" + "\005\uffe9\011\uffe9\013\uffe9\015\uffe9\016\uffe9\017\uffe9\020" + "\uffe9\021\uffe9\022\uffe9\023\uffe9\024\uffe9\027\uffe9\030\uffe9" + "\031\uffe9\032\uffe9\001\002\000\016\006\021\007\017\010" + "\042\041\uffc8\042\uffc8\043\043\001\002\000\016\006\021" + "\007\017\010\042\041\uffc8\042\uffc8\043\043\001\002\000" + "\046\002\uffd2\004\uffd2\005\uffd2\011\uffd2\013\uffd2\015\uffd2" + "\016\uffd2\017\uffd2\020\uffd2\021\uffd2\022\uffd2\023\uffd2\024" + "\uffd2\027\uffd2\030\uffd2\031\uffd2\032\uffd2\033\uffd2\001\002" + "\000\046\002\uffc3\004\uffc3\005\uffc3\011\uffc3\013\uffc3\015" + "\uffc3\016\uffc3\017\uffc3\020\uffc3\021\uffc3\022\uffc3\023\uffc3" + "\024\uffc3\027\uffc3\030\uffc3\031\uffc3\032\uffc3\033\uffc3\001" + "\002\000\040\005\045\006\021\007\017\010\042\012\016" + "\013\uffdc\025\004\026\006\035\037\036\032\037\036\040" + "\024\041\uffc8\042\uffc8\043\043\001\002\000\004\013\105" + "\001\002\000\006\011\103\013\uffdb\001\002\000\006\011" + "\uffd9\013\uffd9\001\002\000\040\005\045\006\021\007\017" + "\010\042\012\016\013\uffdc\025\004\026\006\035\037\036" + "\032\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002" + "\000\004\013\uffda\001\002\000\054\002\uffdd\004\uffdd\005" + "\uffdd\011\uffdd\013\uffdd\014\uffdd\015\uffdd\016\uffdd\017\uffdd" + "\020\uffdd\021\uffdd\022\uffdd\023\uffdd\024\uffdd\025\uffdd\026" + "\uffdd\027\uffdd\030\uffdd\031\uffdd\032\uffdd\033\uffdd\001\002" + "\000\036\005\045\006\021\007\017\010\042\012\016\025" + "\004\026\006\035\037\036\032\037\036\040\024\041\uffc8" + "\042\uffc8\043\043\001\002\000\036\005\045\006\021\007" + "\017\010\042\012\016\025\004\026\006\035\037\036\032" + "\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002\000" + "\044\002\ufff2\004\ufff2\005\ufff2\011\ufff2\013\ufff2\015\ufff2" + "\016\ufff2\017\ufff2\020\ufff2\021\ufff2\022\ufff2\023\ufff2\024" + "\051\027\052\030\050\031\ufff2\032\ufff2\001\002\000\044" + "\002\ufff1\004\ufff1\005\ufff1\011\ufff1\013\ufff1\015\ufff1\016" + "\ufff1\017\ufff1\020\ufff1\021\ufff1\022\ufff1\023\ufff1\024\051" + "\027\052\030\050\031\ufff1\032\ufff1\001\002\000\004\013" + "\113\001\002\000\054\002\uffe1\004\uffe1\005\uffe1\011\uffe1" + "\013\uffe1\014\uffe1\015\uffe1\016\uffe1\017\uffe1\020\uffe1\021" + "\uffe1\022\uffe1\023\uffe1\024\uffe1\025\uffe1\026\uffe1\027\uffe1" + "\030\uffe1\031\uffe1\032\uffe1\033\uffe1\001\002\000\036\005" + "\045\006\021\007\017\010\042\012\016\025\004\026\006" + "\035\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043" + "\043\001\002\000\036\005\045\006\021\007\017\010\042" + "\012\016\025\004\026\006\035\037\036\032\037\036\040" + "\024\041\uffc8\042\uffc8\043\043\001\002\000\032\002\ufff9" + "\011\ufff9\013\ufff9\015\ufff9\016\120\017\117\020\122\021" + "\121\022\ufff9\023\ufff9\031\ufff9\032\ufff9\001\002\000\036" + "\005\045\006\021\007\017\010\042\012\016\025\004\026" + "\006\035\037\036\032\037\036\040\024\041\uffc8\042\uffc8" + "\043\043\001\002\000\036\005\045\006\021\007\017\010" + "\042\012\016\025\004\026\006\035\037\036\032\037\036" + "\040\024\041\uffc8\042\uffc8\043\043\001\002\000\036\005" + "\045\006\021\007\017\010\042\012\016\025\004\026\006" + "\035\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043" + "\043\001\002\000\036\005\045\006\021\007\017\010\042" + "\012\016\025\004\026\006\035\037\036\032\037\036\040" + "\024\041\uffc8\042\uffc8\043\043\001\002\000\036\002\ufff4" + "\004\107\005\106\011\ufff4\013\ufff4\015\ufff4\016\ufff4\017" + "\ufff4\020\ufff4\021\ufff4\022\ufff4\023\ufff4\031\ufff4\032\ufff4" + "\001\002\000\036\002\ufff5\004\107\005\106\011\ufff5\013" + "\ufff5\015\ufff5\016\ufff5\017\ufff5\020\ufff5\021\ufff5\022\ufff5" + "\023\ufff5\031\ufff5\032\ufff5\001\002\000\036\002\ufff6\004" + "\107\005\106\011\ufff6\013\ufff6\015\ufff6\016\ufff6\017\ufff6" + "\020\ufff6\021\ufff6\022\ufff6\023\ufff6\031\ufff6\032\ufff6\001" + "\002\000\036\002\ufff7\004\107\005\106\011\ufff7\013\ufff7" + "\015\ufff7\016\ufff7\017\ufff7\020\ufff7\021\ufff7\022\ufff7\023" + "\ufff7\031\ufff7\032\ufff7\001\002\000\032\002\ufffa\011\ufffa" + "\013\ufffa\015\ufffa\016\120\017\117\020\122\021\121\022" + "\ufffa\023\ufffa\031\ufffa\032\ufffa\001\002\000\036\005\045" + "\006\021\007\017\010\042\012\016\025\004\026\006\035" + "\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043\043" + "\001\002\000\016\002\ufffe\011\ufffe\013\ufffe\015\ufffe\031" + "\132\032\ufffe\001\002\000\036\005\045\006\021\007\017" + "\010\042\012\016\025\004\026\006\035\037\036\032\037" + "\036\040\024\041\uffc8\042\uffc8\043\043\001\002\000\022" + "\002\ufffc\011\ufffc\013\ufffc\015\ufffc\022\114\023\115\031" + "\ufffc\032\ufffc\001\002\000\054\002\uffce\004\uffce\005\uffce" + "\011\uffce\013\uffce\014\uffce\015\uffce\016\uffce\017\uffce\020" + "\uffce\021\uffce\022\uffce\023\uffce\024\uffce\025\uffce\026\uffce" + "\027\uffce\030\uffce\031\uffce\032\uffce\033\uffce\001\002\000" + "\054\002\uffcc\004\uffcc\005\uffcc\011\uffcc\013\uffcc\014\064" + "\015\uffcc\016\uffcc\017\uffcc\020\uffcc\021\uffcc\022\uffcc\023" + "\uffcc\024\uffcc\025\uffcc\026\uffcc\027\uffcc\030\uffcc\031\uffcc" + "\032\uffcc\033\uffcc\001\002\000\054\002\uffcd\004\uffcd\005" + "\uffcd\011\uffcd\013\uffcd\014\uffcd\015\uffcd\016\uffcd\017\uffcd" + "\020\uffcd\021\uffcd\022\uffcd\023\uffcd\024\uffcd\025\uffcd\026" + "\uffcd\027\uffcd\030\uffcd\031\uffcd\032\uffcd\033\uffcd\001\002" + "\000\054\002\uffcc\004\uffcc\005\uffcc\011\uffcc\013\uffcc\014" + "\064\015\uffcc\016\uffcc\017\uffcc\020\uffcc\021\uffcc\022\uffcc" + "\023\uffcc\024\uffcc\025\uffcc\026\uffcc\027\uffcc\030\uffcc\031" + "\uffcc\032\uffcc\033\uffcc\001\002\000\052\002\uffd0\004\uffd0" + "\005\uffd0\011\uffd0\013\uffd0\015\uffd0\016\uffd0\017\uffd0\020" + "\uffd0\021\uffd0\022\uffd0\023\uffd0\024\uffd0\025\uffd0\026\uffd0" + "\027\uffd0\030\uffd0\031\uffd0\032\uffd0\033\uffd0\001\002\000" + "\052\002\uffcb\004\uffcb\005\uffcb\011\uffcb\013\uffcb\015\uffcb" + "\016\uffcb\017\uffcb\020\uffcb\021\uffcb\022\uffcb\023\uffcb\024" + "\uffcb\025\uffcb\026\uffcb\027\uffcb\030\uffcb\031\uffcb\032\uffcb" + "\033\uffcb\001\002\000\046\002\uffc4\004\uffc4\005\uffc4\011" + "\uffc4\013\uffc4\015\uffc4\016\uffc4\017\uffc4\020\uffc4\021\uffc4" + "\022\uffc4\023\uffc4\024\uffc4\027\uffc4\030\uffc4\031\uffc4\032" + "\uffc4\033\uffc4\001\002\000\046\002\uffd5\004\uffd5\005\uffd5" + "\011\uffd5\013\uffd5\015\uffd5\016\uffd5\017\uffd5\020\uffd5\021" + "\uffd5\022\uffd5\023\uffd5\024\uffd5\027\uffd5\030\uffd5\031\uffd5" + "\032\uffd5\033\uffd5\001\002" }); /** Access to parse-action table. */ public short[][] action_table() {return _action_table;} /** <code>reduce_goto</code> table. */ protected static final short[][] _reduce_table = unpackFromStrings(new String[] { "\000\141\000\062\003\007\004\024\005\034\006\013\007" + "\014\010\010\011\004\012\021\013\045\014\022\015\030" + "\016\033\017\032\020\043\022\027\024\026\025\011\026" + "\012\030\025\031\040\032\046\033\017\034\006\035\037" + "\001\001\000\016\025\011\026\012\030\025\031\040\032" + "\142\035\037\001\001\000\002\001\001\000\016\025\011" + "\026\012\030\025\031\040\032\141\035\037\001\001\000" + "\002\001\001\000\002\001\001\000\002\001\001\000\004" + "\027\134\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\062\003\007\004\024\005\111\006\013" + "\007\014\010\010\011\004\012\021\013\045\014\022\015" + "\030\016\033\017\032\020\043\022\027\024\026\025\011" + "\026\012\030\025\031\040\032\046\033\017\034\006\035" + "\037\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\004\036\060\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\044\003\007\004\024\014\055\015\030\016" + "\033\017\032\020\043\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\002\001\001\000\044\003\007" + "\004\024\014\054\015\030\016\033\017\032\020\043\022" + "\027\024\026\025\011\026\012\030\025\031\040\032\046" + "\033\017\034\006\035\037\001\001\000\044\003\007\004" + "\024\014\053\015\030\016\033\017\032\020\043\022\027" + "\024\026\025\011\026\012\030\025\031\040\032\046\033" + "\017\034\006\035\037\001\001\000\044\003\007\004\024" + "\014\052\015\030\016\033\017\032\020\043\022\027\024" + "\026\025\011\026\012\030\025\031\040\032\046\033\017" + "\034\006\035\037\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\016\025\011\026" + "\012\030\025\031\040\032\067\035\037\001\001\000\016" + "\025\011\026\012\030\025\031\040\032\066\035\037\001" + "\001\000\062\003\007\004\024\005\064\006\013\007\014" + "\010\010\011\004\012\021\013\045\014\022\015\030\016" + "\033\017\032\020\043\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\042\003\007\004\024\015\030\016" + "\033\017\032\020\071\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\016\025\011\026\012\030\025" + "\031\040\032\075\035\037\001\001\000\016\025\011\026" + "\012\030\025\031\040\032\074\035\037\001\001\000\002" + "\001\001\000\002\001\001\000\066\003\007\004\024\005" + "\101\006\013\007\014\010\010\011\004\012\021\013\045" + "\014\022\015\030\016\033\017\032\020\043\021\077\022" + "\027\023\100\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\066\003\007" + "\004\024\005\101\006\013\007\014\010\010\011\004\012" + "\021\013\045\014\022\015\030\016\033\017\032\020\043" + "\021\103\022\027\023\100\024\026\025\011\026\012\030" + "\025\031\040\032\046\033\017\034\006\035\037\001\001" + "\000\002\001\001\000\002\001\001\000\046\003\007\004" + "\024\013\110\014\022\015\030\016\033\017\032\020\043" + "\022\027\024\026\025\011\026\012\030\025\031\040\032" + "\046\033\017\034\006\035\037\001\001\000\046\003\007" + "\004\024\013\107\014\022\015\030\016\033\017\032\020" + "\043\022\027\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\052\003\007\004\024\011\126\012\021\013\045\014" + "\022\015\030\016\033\017\032\020\043\022\027\024\026" + "\025\011\026\012\030\025\031\040\032\046\033\017\034" + "\006\035\037\001\001\000\052\003\007\004\024\011\115" + "\012\021\013\045\014\022\015\030\016\033\017\032\020" + "\043\022\027\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\002\001" + "\001\000\050\003\007\004\024\012\125\013\045\014\022" + "\015\030\016\033\017\032\020\043\022\027\024\026\025" + "\011\026\012\030\025\031\040\032\046\033\017\034\006" + "\035\037\001\001\000\050\003\007\004\024\012\124\013" + "\045\014\022\015\030\016\033\017\032\020\043\022\027" + "\024\026\025\011\026\012\030\025\031\040\032\046\033" + "\017\034\006\035\037\001\001\000\050\003\007\004\024" + "\012\123\013\045\014\022\015\030\016\033\017\032\020" + "\043\022\027\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\050\003" + "\007\004\024\012\122\013\045\014\022\015\030\016\033" + "\017\032\020\043\022\027\024\026\025\011\026\012\030" + "\025\031\040\032\046\033\017\034\006\035\037\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\056\003\007\004\024" + "\007\014\010\130\011\004\012\021\013\045\014\022\015" + "\030\016\033\017\032\020\043\022\027\024\026\025\011" + "\026\012\030\025\031\040\032\046\033\017\034\006\035" + "\037\001\001\000\002\001\001\000\054\003\007\004\024" + "\007\132\011\004\012\021\013\045\014\022\015\030\016" + "\033\017\032\020\043\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\002\001\001\000\006\036\136" + "\037\137\001\001\000\002\001\001\000\006\036\136\037" + "\140\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001" }); /** Access to <code>reduce_goto</code> table. */ public short[][] reduce_table() {return _reduce_table;} /** Instance of action encapsulation class. */ protected CUP$parser$actions action_obj; /** Action encapsulation object initializer. */ protected void init_actions() { action_obj = new CUP$parser$actions(this); } /** Invoke a user supplied parse action. */ public java_cup.runtime.Symbol do_action( int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top) throws java.lang.Exception { /* call code in generated class */ return action_obj.CUP$parser$do_action(act_num, parser, stack, top); } /** Indicates start state. */ public int start_state() {return 0;} /** Indicates start production. */ public int start_production() {return 1;} /** <code>EOF</code> Symbol index. */ public int EOF_sym() {return 0;} /** <code>error</code> Symbol index. */ public int error_sym() {return 1;} public Hashtable nsHash; public Hashtable symbolHash; Step tempStep; NodeTest tempNt; LocationPathExpr tempLPExpr; // ExprList tmpEL1, tmpEL2; public parser (java.io.Reader input) { super(new Yylex(input)); nsHash = null; } public parser (java.io.InputStream input) { super(new Yylex(input)); } public static void main(String args[]){ try { parser p = new parser(System.in); Object result = p.parse().value; //System.out.println(((Expr)result).evalNumber(null)); //System.out.println(((Expr)result)); } catch (Exception e) { System.out.println("caught: "+e); } } public void report_error(String message, Object info) { //throw new XPathParseException("Syntax error during parsing"); } public void report_fatal_error(String message, Object info) throws XPathParseExceptionHuge{ throw new XPathParseExceptionHuge("Syntax error during parsing: "+ message); } public void syntax_error(Symbol cur_token) { } public void unrecovered_syntax_error(Symbol cur_token) throws XPathParseExceptionHuge{ Yylex scanner = (Yylex)getScanner(); throw new XPathParseExceptionHuge("XPath Syntax error: "+cur_token, scanner.getOffset()); } } /** Cup generated class to encapsulate user supplied action code.*/ class CUP$parser$actions { private final parser parser; /** Constructor */ CUP$parser$actions(parser parser) { this.parser = parser; } /** Method with the actual generated action code. */ public final java_cup.runtime.Symbol CUP$parser$do_action( int CUP$parser$act_num, java_cup.runtime.lr_parser CUP$parser$parser, java.util.Stack CUP$parser$stack, int CUP$parser$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$parser$result; /* select the action based on the action number */ switch (CUP$parser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // FunctionName ::= FNAME { FuncName RESULT = null; int fnleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int fnright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; FuncName fn = (FuncName)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = fn; CUP$parser$result = new java_cup.runtime.Symbol(2/*FunctionName*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // VariableReference ::= DOLLAR NAME { Expr RESULT = null; int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; NameType n = (NameType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; if (parser.symbolHash.get(n.qname)==null) throw new XPathParseExceptionHuge("variableExpression not declared ==> $"+n.qname); RESULT = new VariableExpr(n.qname, (Expr)parser.symbolHash.get(n.qname)); CUP$parser$result = new java_cup.runtime.Symbol(13/*VariableReference*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // Predicate ::= LB Expr RB { Predicate RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Predicate(); RESULT.expr= e; CUP$parser$result = new java_cup.runtime.Symbol(28/*Predicate*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // AbbreviatedRelativeLocationPath ::= Step DSLASH RelativeLocationPath { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setNodeTest(parser.tempNt); s.setNextStep(RESULT); RESULT.setPrevStep(s); RESULT.setNextStep(rlp); rlp.setPrevStep(RESULT); RESULT = s; CUP$parser$result = new java_cup.runtime.Symbol(27/*AbbreviatedRelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath { Step RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setNodeTest(parser.tempNt); RESULT.setNextStep(rlp); rlp.setPrevStep(RESULT); CUP$parser$result = new java_cup.runtime.Symbol(26/*AbbreviatedAbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // AbbreviatedStep ::= DDOT { Step RESULT = null; RESULT = new Step(); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setAxisType(AxisType.PARENT); RESULT.setNodeTest(parser.tempNt); // System.out.println("result " + RESULT.toString()); CUP$parser$result = new java_cup.runtime.Symbol(23/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // AbbreviatedStep ::= DOT { Step RESULT = null; RESULT = new Step(); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setAxisType(AxisType.SELF); RESULT.setNodeTest(parser.tempNt); CUP$parser$result = new java_cup.runtime.Symbol(23/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // AbbreviatedAxisSpecifier ::= AT { AxisType RESULT = null; RESULT = new AxisType(); RESULT.i = AxisType.ATTRIBUTE; CUP$parser$result = new java_cup.runtime.Symbol(20/*AbbreviatedAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // AbbreviatedAxisSpecifier ::= { AxisType RESULT = null; RESULT = new AxisType(); RESULT.i = AxisType.CHILD; CUP$parser$result = new java_cup.runtime.Symbol(20/*AbbreviatedAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // AxisSpecifier ::= AbbreviatedAxisSpecifier { AxisType RESULT = null; int aasleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aasright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; AxisType aas = (AxisType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = aas; CUP$parser$result = new java_cup.runtime.Symbol(19/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // AxisSpecifier ::= AXISNAME { AxisType RESULT = null; int anleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int anright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; AxisType an = (AxisType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = an; CUP$parser$result = new java_cup.runtime.Symbol(19/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // PredicateList ::= Predicate PredicateList { Predicate RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Predicate p = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int plleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int plright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Predicate pl = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; p.nextP = pl; RESULT = p; CUP$parser$result = new java_cup.runtime.Symbol(29/*PredicateList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // PredicateList ::= { Predicate RESULT = null; RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(29/*PredicateList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // nodetest ::= NTEST { NodeTest RESULT = null; int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Ntest n2 = (Ntest)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new NodeTest(); RESULT.setTestType(n2.i); CUP$parser$result = new java_cup.runtime.Symbol(21/*nodetest*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // nodetest ::= NAME { NodeTest RESULT = null; int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; NameType n = (NameType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new NodeTest(); RESULT.setTestType(NodeTest.NAMETEST); RESULT.setNodeName(n.qname); if (n.localname!=null){ RESULT.setNodeNameNS(n.prefix,n.localname); if (parser.nsHash==null || parser.nsHash.get(n.prefix) ==null) throw new XPathParseExceptionHuge("No URL found for prefix:"+n.prefix); RESULT.URL = (String) parser.nsHash.get(n.prefix); } CUP$parser$result = new java_cup.runtime.Symbol(21/*nodetest*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // Step ::= AbbreviatedStep { Step RESULT = null; int absleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int absright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step abs = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = abs; //System.out.println(" step 4"); CUP$parser$result = new java_cup.runtime.Symbol(22/*Step*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // Step ::= AxisSpecifier nodetest PredicateList { Step RESULT = null; int asleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int asright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; AxisType as = (AxisType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ntleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int ntright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; NodeTest nt = (NodeTest)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int plleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int plright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Predicate pl = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(as.i); if ( (as.i== AxisType.ATTRIBUTE || as.i == AxisType.DESCENDANT || as.i == AxisType.PRECEDING || as.i == AxisType.FOLLOWING || as.i == AxisType.FOLLOWING_SIBLING || as.i == AxisType.PRECEDING_SIBLING) && (nt.testType>1)){ Yylex scanner = (Yylex)parser.getScanner(); throw new XPathParseExceptionHuge(as.getAxisString()+" axis can't operate on"+ " node(), comment(), pi(), or text()", scanner.getOffset()); } RESULT.setNodeTest(nt); RESULT.setPredicate(pl); //System.out.println(" Step 3 "); CUP$parser$result = new java_cup.runtime.Symbol(22/*Step*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // RelativeLocationPath ::= AbbreviatedRelativeLocationPath { Step RESULT = null; int arlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int arlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step arlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = arlp; CUP$parser$result = new java_cup.runtime.Symbol(24/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // RelativeLocationPath ::= Step SLASH RelativeLocationPath { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; //if (s == rlp) throw new XPathParseException("$1 = $3!!!!"); s.nextS = rlp; rlp.prevS = s; RESULT= s; CUP$parser$result = new java_cup.runtime.Symbol(24/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // RelativeLocationPath ::= Step { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = s; CUP$parser$result = new java_cup.runtime.Symbol(24/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // AbsoluteLocationPath ::= AbbreviatedAbsoluteLocationPath { Step RESULT = null; int aalpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aalpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step aalp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = aalp; CUP$parser$result = new java_cup.runtime.Symbol(25/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // AbsoluteLocationPath ::= SLASH RelativeLocationPath { Step RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = rlp; CUP$parser$result = new java_cup.runtime.Symbol(25/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // AbsoluteLocationPath ::= SLASH { Step RESULT = null; RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(25/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // LocationPath ::= AbsoluteLocationPath { LocationPathExpr RESULT = null; int alpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int alpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step alp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new LocationPathExpr(); RESULT.setPathType(LocationPathExpr.ABSOLUTE_PATH); //System.out.println(" absolute "); RESULT.setStep(alp); //startStep = currentStep=null; CUP$parser$result = new java_cup.runtime.Symbol(18/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // LocationPath ::= RelativeLocationPath { LocationPathExpr RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new LocationPathExpr(); RESULT.setStep(rlp); CUP$parser$result = new java_cup.runtime.Symbol(18/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // Argument ::= Expr { Expr RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = e; CUP$parser$result = new java_cup.runtime.Symbol(17/*Argument*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // ArgumentList ::= Argument COMMA ArgumentList { Alist RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int alleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int alright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Alist(); RESULT.e = a; RESULT.next = al; CUP$parser$result = new java_cup.runtime.Symbol(15/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // ArgumentList ::= Argument { Alist RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Alist(); RESULT.e = a; CUP$parser$result = new java_cup.runtime.Symbol(15/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // ArgumentList ::= { Alist RESULT = null; RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(15/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // FunctionCall ::= FunctionName LP ArgumentList RP { FuncExpr RESULT = null; int fnleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int fnright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; FuncName fn = (FuncName)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int alleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int alright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new FuncExpr(fn.i, al); CUP$parser$result = new java_cup.runtime.Symbol(1/*FunctionCall*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // PrimaryExpr ::= FunctionCall { Expr RESULT = null; int fcleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int fcright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; FuncExpr fc = (FuncExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = fc; CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // PrimaryExpr ::= NUMBER { Expr RESULT = null; int neleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int neright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Double ne = (Double)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new NumExpr(ne.doubleValue()); CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // PrimaryExpr ::= LITERAL { Expr RESULT = null; int leleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int leright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String le = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new LiteralExpr(le); CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // PrimaryExpr ::= LP Expr RP { Expr RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = e; CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // PrimaryExpr ::= VariableReference { Expr RESULT = null; int veleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int veright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ve = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ve; CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // FilterExpr ::= FilterExpr Predicate { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Predicate p = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new FilterExpr(fe, p); CUP$parser$result = new java_cup.runtime.Symbol(12/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // FilterExpr ::= PrimaryExpr { Expr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = pe; CUP$parser$result = new java_cup.runtime.Symbol(12/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // PathExpr ::= FilterExpr DSLASH RelativeLocationPath { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; parser.tempStep = new Step(); parser.tempStep.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep.setNodeTest(parser.tempNt); parser.tempStep.setNextStep(rlp); rlp.setPrevStep(parser.tempStep); /*parser.tempStep2 = new Step(); parser.tempNt = new NodeTest(); parser.tempStep2.setAxisType(AxisType.SELF); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep2.setNodeTest(parser.tempNt); parser.tempStep2.setNextStep(parser.tempStep); parser.tempStep.setPrevStep(parser.tempStep2);*/ parser.tempLPExpr = new LocationPathExpr(); parser.tempLPExpr.setStep(parser.tempStep); RESULT = new PathExpr(fe, parser.tempLPExpr); CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // PathExpr ::= FilterExpr SLASH RelativeLocationPath { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; parser.tempLPExpr = new LocationPathExpr(); parser.tempLPExpr.setStep(rlp); RESULT = new PathExpr(fe, parser.tempLPExpr); CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // PathExpr ::= FilterExpr { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = fe; CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // PathExpr ::= LocationPath { Expr RESULT = null; int lpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int lpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; LocationPathExpr lp = (LocationPathExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = lp; CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // UnionExpr ::= PathExpr UNION UnionExpr { UnionExpr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int uneleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int uneright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; UnionExpr une = (UnionExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new UnionExpr(pe); RESULT.next = une; CUP$parser$result = new java_cup.runtime.Symbol(14/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // UnionExpr ::= PathExpr { UnionExpr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new UnionExpr(pe); CUP$parser$result = new java_cup.runtime.Symbol(14/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // UnaryExpr ::= SUB UnaryExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new UnaryExpr( BinaryExpr.SUB, ue); CUP$parser$result = new java_cup.runtime.Symbol(10/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // UnaryExpr ::= UnionExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; UnionExpr ue = (UnionExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ue; CUP$parser$result = new java_cup.runtime.Symbol(10/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // MultiplicativeExpr ::= MultiplicativeExpr MOD UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.MOD, ue); CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // MultiplicativeExpr ::= MultiplicativeExpr DIV UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.DIV, ue); CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // MultiplicativeExpr ::= MultiplicativeExpr MULT UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.MULT, ue); CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // MultiplicativeExpr ::= UnaryExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ue; CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // AdditiveExpr ::= AdditiveExpr SUB MultiplicativeExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ae, BinaryExpr.SUB, me); CUP$parser$result = new java_cup.runtime.Symbol(8/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // AdditiveExpr ::= AdditiveExpr ADD MultiplicativeExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ae, BinaryExpr.ADD, me); CUP$parser$result = new java_cup.runtime.Symbol(8/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // AdditiveExpr ::= MultiplicativeExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = me; CUP$parser$result = new java_cup.runtime.Symbol(8/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // RelationalExpr ::= RelationalExpr GE AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.GE, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // RelationalExpr ::= RelationalExpr LE AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.LE, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // RelationalExpr ::= RelationalExpr GT AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.GT, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // RelationalExpr ::= RelationalExpr LT AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.LT, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // RelationalExpr ::= AdditiveExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ae; CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // EqualityExpr ::= EqualityExpr NE RelationalExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ee, BinaryExpr.NE, re); CUP$parser$result = new java_cup.runtime.Symbol(5/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // EqualityExpr ::= EqualityExpr EQ RelationalExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ee, BinaryExpr.EQ, re); CUP$parser$result = new java_cup.runtime.Symbol(5/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // EqualityExpr ::= RelationalExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = re; CUP$parser$result = new java_cup.runtime.Symbol(5/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // AndExpr ::= AndExpr AND EqualityExpr { Expr RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(a, BinaryExpr.AND, ee); CUP$parser$result = new java_cup.runtime.Symbol(6/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // AndExpr ::= EqualityExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ee; CUP$parser$result = new java_cup.runtime.Symbol(6/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // OrExpr ::= OrExpr OR AndExpr { Expr RESULT = null; int oleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int oright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr o = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(o,BinaryExpr.OR,a); CUP$parser$result = new java_cup.runtime.Symbol(4/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // OrExpr ::= AndExpr { Expr RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = a; CUP$parser$result = new java_cup.runtime.Symbol(4/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // $START ::= Expr EOF { Object RESULT = null; int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr start_val = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = start_val; CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } /* ACCEPT */ CUP$parser$parser.done_parsing(); return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // Expr ::= OrExpr { Expr RESULT = null; int oleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int oright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr o = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = o; CUP$parser$result = new java_cup.runtime.Symbol(3/*Expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } }
90,420
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Ntest.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/Ntest.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; /** * Lexer use this class to represent a type of node test * * */ public class Ntest{ public int i; public String arg; public final static int COMMENT = 5; public final static int TEXT = 2; public final static int PROCESSING_INSTRUCTION = 3; public final static int NODE = 1; // public String getNtestString(){ // switch (i){ // case 1: return "node("; // case 2: return "text("; // case 3: return "processing-instruction("; // case 5: return "comment("; // default: return "invalid node type!!!"; // } // } }
1,398
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
UnaryExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/UnaryExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * Parser use this class to represent Unary Expr * */ public class UnaryExpr extends Expr { public int op; public Expr operand; public UnaryExpr (int o, Expr e){ op = o; operand = e; } public String toString(){ return "-"+operand; } public boolean evalBoolean(VTDNavHuge vn){ return operand.evalBoolean(vn); } public double evalNumber(VTDNavHuge vn){ return -1*operand.evalNumber(vn);} public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge{ throw new XPathEvalExceptionHuge("UnaryExpr can't eval to a node set!"); } public String evalString(VTDNavHuge vn){ double dval = operand.evalNumber(vn); if (dval == (int) dval){ return ""+((int) dval); } return ""+dval; } public void reset(VTDNavHuge vn){ operand.reset(vn); } public boolean isNodeSet(){ return false; } public boolean isNumerical(){ return true; } public boolean isString(){ return false; } public boolean isBoolean(){ return false; } // to support computer context size // needs to add public boolean requireContextSize(){ return operand.requireContextSize(); } public void setContextSize(int size){ operand.setContextSize(size); } public void setPosition (int pos){ operand.setPosition(pos); } public int adjust(int n){ return 0; } }
2,300
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
sym.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/sym.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //---------------------------------------------------- // The following code was generated by CUP v0.10k // Fri Sep 25 13:10:55 PDT 2009 //---------------------------------------------------- package com.ximpleware.extended.xpath; /** CUP generated class containing symbol constants. */ public class sym { /* terminals */ public static final int MOD = 22; public static final int AND = 23; public static final int AXISNAME = 33; public static final int NE = 17; public static final int LT = 13; public static final int OR = 24; public static final int DOLLAR = 27; public static final int LP = 8; public static final int SLASH = 19; public static final int RP = 9; public static final int NTEST = 31; public static final int NAME = 32; public static final int AT = 6; public static final int LITERAL = 29; public static final int GT = 12; public static final int LE = 15; public static final int SUB = 3; public static final int LB = 10; public static final int FNAME = 30; public static final int RB = 11; public static final int COMMA = 7; public static final int NUMBER = 28; public static final int MULT = 18; public static final int EOF = 0; public static final int DIV = 21; public static final int ADD = 2; public static final int UNION = 25; public static final int GE = 14; public static final int error = 1; public static final int DOT = 4; public static final int EQ = 16; public static final int DDOT = 5; public static final int DSLASH = 20; public static final int UMINUS = 26; }
2,414
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Step.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/Step.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; import com.ximpleware.extended.xpath.Predicate; /** * A step is a part of location path as defined in * Xpath spec * */ public class Step implements LocationPathNode{ public int axis_type; public NodeTest nt; public Predicate p,pt;// linked list public Step nextS; // points to next step public int position; // position public Step prevS; // points to the prev step public Object o; //AutoPilot goes here boolean ft; // first time public Step(){ nextS = prevS = (Step)null; p = pt = null; nt = null; ft = true; position = 1; } public void reset(VTDNavHuge vn){ ft = true; resetP(vn); position = 1; } public void resetP(VTDNavHuge vn){ Predicate temp = p; while(temp!=null){ temp.reset(vn); temp = temp.nextP; } } public void resetP(VTDNavHuge vn, Predicate p1){ Predicate temp = p; while(temp!=p1){ temp.reset(vn); temp = temp.nextP; } } public void adjust(int n){ Predicate temp = p; while(temp!=null){ temp.adjust(n); temp = temp.nextP; } } public NodeTest getNodeTest(){ return this.nt; } public Step getNextStep(){ return nextS; } public void setNextStep(Step s){ nextS = s; } public boolean get_ft(){ return ft; } public void set_ft(boolean b){ ft = b; } public Step getPrevStep(){ return prevS; } public void setPrevStep(Step s){ prevS = s; } public void setNodeTest(NodeTest n){ nt = n; } public void setPredicate(Predicate p1){ if (p == null){ p = pt = p1; } else { pt.nextP = p1; pt = pt.nextP; } } public boolean eval(VTDNavHuge vn)throws NavExceptionHuge{ /*boolean result = this.nt.eval(vn); if (result == false) return false; return evalPredicates(vn);*/ return nt.eval(vn) && evalPredicates(vn); } public boolean eval(VTDNavHuge vn, Predicate p) throws NavExceptionHuge{ return nt.eval(vn) && evalPredicates(vn,p); } public boolean evalPredicates(VTDNavHuge vn) throws NavExceptionHuge { Predicate temp = this.p; while(temp!=null) { if (temp.eval(vn)== false) return false; temp = temp.nextP; } return true; } public boolean evalPredicates(VTDNavHuge vn, Predicate p) throws NavExceptionHuge { Predicate temp = this.p; while(temp!=p) { if (temp.eval(vn)== false) return false; temp = temp.nextP; } return true; } public void setAxisType(int st){ axis_type = st; } public String toString(){ String s; if (p == null) s = axisName(axis_type) + nt; else s = axisName(axis_type) + nt + " "+ p ; if (nextS == null) return s; else return s+"/"+nextS.toString(); } public String axisName(int i){ switch(i){ case AxisType.CHILD: return "child::"; case AxisType.DESCENDANT: return "descendant::"; case AxisType.PARENT: return "parent::"; case AxisType.FOLLOWING_SIBLING: return "following-sibling::"; case AxisType.PRECEDING_SIBLING: return "preceding-sibling::"; case AxisType.FOLLOWING: return "following::"; case AxisType.PRECEDING: return "preceding::"; case AxisType.ATTRIBUTE: return "attribute::"; case AxisType.NAMESPACE: return "namespace::"; case AxisType.SELF: return "self::"; case AxisType.DESCENDANT_OR_SELF: return "descendant-or-self::"; case AxisType.ANCESTOR: return "ancestor::"; default: return "ancestor-or-self::"; } } }
4,407
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
UnsupportedException.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/UnsupportedException.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; /** * This exception is thrown when a feature is not supported. * */ public class UnsupportedException extends RuntimeException{ public UnsupportedException(String s){ super(s); } }
1,039
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
LiteralExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/extended/xpath/LiteralExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.extended.xpath; import com.ximpleware.extended.*; /** * This class represents a literal string XPath expression * */ public class LiteralExpr extends Expr { public String s; public LiteralExpr (String st){ s = st; } public String toString(){ boolean b = true; for(int i = 0;i<s.length();i++){ if (s.charAt(i) == '\''){ b = false; break; } } if (b == true) return "\""+s+"\""; else return "'" + s + "'"; } public boolean evalBoolean(VTDNavHuge vn){ return s.length() != 0; } public double evalNumber(VTDNavHuge vn){ try { double dval = Double.parseDouble(s); return dval; }catch (NumberFormatException e){ return Double.NaN; } } public int evalNodeSet(VTDNavHuge vn) throws XPathEvalExceptionHuge{ throw new XPathEvalExceptionHuge("LiteralExpr can't eval to a node set!"); } public String evalString(VTDNavHuge vn){ return s; } public void reset(VTDNavHuge vn){ } public boolean isNodeSet(){ return false; } public boolean isNumerical(){ return false; } public boolean isString(){ return true; } public boolean isBoolean(){ return false; } // to support computer context size // needs to add public boolean requireContextSize(){ return false; } public void setContextSize(int size){ } public void setPosition(int pos){ } public int adjust(int n){ return 0; } }
2,326
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Predicate.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/Predicate.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * LocationPathExpr uses this class to represent a predicate * */ public class Predicate /*implements LocationPathNode*/{ double d; // only supports a[1] style of location path for now public Predicate nextP; public int count; public Expr expr; public int type; public Step s; public FilterExpr fe; public boolean requireContext; public final static int simple=0; public final static int complex=1; public Predicate(){ nextP = (Predicate) null; count = 0; d = 0; requireContext = false; type = complex; } final public boolean eval2(VTDNav vn) { boolean b; count++; // increment the position expr.setPosition(count); if (expr.isNumerical()){ b = (expr.evalNumber(vn)== count); } else{ b = expr.evalBoolean(vn); } return b; } final public boolean eval(VTDNav vn){ count++; switch (type){ case simple: if (d<count) return false; else if(d==count){ if (s!=null){ s.out_of_range=true; }else fe.out_of_range=true; return true; } default: boolean b; expr.setPosition(count); if (expr.isNumerical()){ b = (expr.evalNumber(vn)== count); } else{ b = expr.evalBoolean(vn); } return b; } } final public void setIndex(double index) throws XPathEvalException{ if (index<=0) throw new XPathEvalException("Invalid index number"); d = (double) index; } final public void reset(VTDNav vn){ count = 0; expr.reset(vn); // is this really needed? } final public String toString(){ String s = "["+expr+"]"; if (nextP==null){ return s; } else { return s+nextP; } } // to support computer context size // needs to add final public boolean requireContextSize(){ return expr.requireContextSize(); } final public void setContextSize(int size){ expr.setContextSize(size); } final public void adjust(int n){ expr.adjust(n); } /*public void markCacheable(){ expr.markCacheable(); }*/ }
2,956
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
VariableExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/VariableExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; public class VariableExpr extends Expr { private String exprName; private Expr exprVal; public VariableExpr(String name, Expr e){ exprName = name; exprVal = e; //cacheable =false; } final public int adjust(int n) { // TODO Auto-generated method stub return exprVal.adjust(n); } final public boolean evalBoolean(VTDNav vn) { // TODO Auto-generated method stub return exprVal.evalBoolean(vn); } final public int evalNodeSet(VTDNav vn) throws XPathEvalException, NavException { // TODO Auto-generated method stub return exprVal.evalNodeSet(vn); } final public double evalNumber(VTDNav vn) { // TODO Auto-generated method stub return exprVal.evalNumber(vn); } final public String evalString(VTDNav vn) { // TODO Auto-generated method stub return exprVal.evalString(vn); } final public boolean isBoolean() { // TODO Auto-generated method stub return exprVal.isBoolean(); } final public boolean isNodeSet() { // TODO Auto-generated method stub return exprVal.isNodeSet(); } final public boolean isNumerical() { // TODO Auto-generated method stub return exprVal.isNumerical(); } final public boolean isString() { // TODO Auto-generated method stub return exprVal.isString(); } final public boolean requireContextSize() { // TODO Auto-generated method stub return exprVal.requireContextSize(); } final public void reset(VTDNav vn) { // TODO Auto-generated method stub exprVal.reset(vn); } final public void setContextSize(int size) { // TODO Auto-generated method stub exprVal.setContextSize(size); } final public void setPosition(int pos) { // TODO Auto-generated method stub exprVal.setPosition(pos); } final public String toString() { // TODO Auto-generated method stub return "$"+exprName; } final public boolean isFinal(){ return exprVal.isFinal(); } final public void markCacheable(){ exprVal.markCacheable(); } final public void markCacheable2(){ exprVal.markCacheable2(); } final public void clearCache(){ exprVal.clearCache(); } }
3,056
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NumExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/NumExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * This class represent an XPath that is a double * */ public class NumExpr extends Expr{ public double dval; public NumExpr( double d){ dval = d; //cacheable =false; } final public String toString(){ if (dval == (long) dval){ return ""+(long) dval; } return ""+dval; } final public double eval(){ return dval; } final public boolean isNodeSet(){ return false; } final public boolean isNumerical(){ return true; } final public boolean evalBoolean(VTDNav vn){ if (dval == 0.0 || Double.isNaN(dval) ) return false; return true; } final public double evalNumber(VTDNav vn){ return dval;} final public int evalNodeSet(VTDNav vn) throws XPathEvalException{ throw new XPathEvalException("NumExpr can't eval to a node set!"); } final public String evalString(VTDNav vn){ if (dval == (int) dval){ return ""+((int) dval); } return ""+dval; } final public void reset(VTDNav vn){}; final public boolean isString(){ return false; } final public boolean isBoolean(){ return false; } // to support computer context size // needs to add final public boolean requireContextSize(){ return false; } final public void setContextSize(int size){ } final public void setPosition(int pos){ } final public int adjust(int n){ return 0; } final public boolean isFinal(){ return true; } /*final public boolean isConstant(){ return true; }*/ /*final public void markCacheable(){ } final public void markCacheable2(){}*/ }
2,494
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XSLParser.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/XSLParser.java
/* * Copyright (C) 2002-2011 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //---------------------------------------------------- // The following code was generated by CUP v0.10k // Fri Feb 11 18:18:03 PST 2011 //---------------------------------------------------- package com.ximpleware.xpath; import java_cup.runtime.*; import com.ximpleware.*; import com.ximpleware.xpath.*; import java.io.*; import java.util.*; /** CUP v0.10k generated parser. * @version Fri Feb 11 18:18:03 PST 2011 */ public class XSLParser extends java_cup.runtime.lr_parser { /** Default constructor. */ public XSLParser() {super();} /** Constructor which sets the default scanner. */ public XSLParser(java_cup.runtime.Scanner s) {super(s);} /** Production table. */ protected static final short _production_table[][] = unpackFromStrings(new String[] { "\000\110\000\002\007\003\000\002\002\004\000\002\010" + "\003\000\002\010\005\000\002\012\003\000\002\012\005" + "\000\002\011\003\000\002\011\005\000\002\011\005\000" + "\002\013\003\000\002\013\005\000\002\013\005\000\002" + "\013\005\000\002\013\005\000\002\014\003\000\002\014" + "\005\000\002\014\005\000\002\015\003\000\002\015\005" + "\000\002\015\005\000\002\015\005\000\002\016\003\000" + "\002\016\004\000\002\022\003\000\002\022\005\000\002" + "\017\003\000\002\017\003\000\002\017\005\000\002\017" + "\005\000\002\020\003\000\002\020\004\000\002\024\003" + "\000\002\024\005\000\002\024\003\000\002\024\003\000" + "\002\024\003\000\002\003\006\000\002\004\006\000\002" + "\023\002\000\002\023\003\000\002\023\005\000\002\025" + "\003\000\002\026\003\000\002\026\003\000\002\026\003" + "\000\002\027\003\000\002\027\005\000\002\027\005\000" + "\002\036\003\000\002\036\004\000\002\036\003\000\002" + "\035\003\000\002\035\005\000\002\035\003\000\002\033" + "\005\000\002\033\003\000\002\032\003\000\002\032\003" + "\000\002\042\002\000\002\042\004\000\002\030\003\000" + "\002\030\003\000\002\031\002\000\002\031\003\000\002" + "\034\003\000\002\034\003\000\002\037\004\000\002\040" + "\005\000\002\041\005\000\002\021\004\000\002\005\003" + "\000\002\006\003" }); /** Access to production table. */ public short[][] production_table() {return _production_table;} /** Parse-action table. */ protected static final short[][] _action_table = unpackFromStrings(new String[] { "\000\154\000\040\005\050\006\022\007\020\010\045\012" + "\017\025\004\026\006\035\042\036\034\037\041\040\026" + "\041\025\042\uffc3\043\uffc3\044\046\001\002\000\062\002" + "\uffd1\004\uffd1\005\uffd1\006\022\007\020\010\045\011\uffd1" + "\013\uffd1\015\uffd1\016\uffd1\017\uffd1\020\uffd1\021\uffd1\022" + "\uffd1\023\uffd1\024\uffd1\027\uffd1\030\uffd1\031\uffd1\032\uffd1" + "\033\uffd1\042\uffc3\043\uffc3\044\046\001\002\000\032\002" + "\ufffb\011\ufffb\013\ufffb\015\ufffb\016\133\017\132\020\135" + "\021\134\022\ufffb\023\ufffb\031\ufffb\032\ufffb\001\002\000" + "\016\006\022\007\020\010\045\042\uffc3\043\uffc3\044\046" + "\001\002\000\046\002\uffcf\004\uffcf\005\uffcf\011\uffcf\013" + "\uffcf\015\uffcf\016\uffcf\017\uffcf\020\uffcf\021\uffcf\022\uffcf" + "\023\uffcf\024\uffcf\027\uffcf\030\uffcf\031\uffcf\032\uffcf\033" + "\uffcf\001\002\000\054\002\uffde\004\uffde\005\uffde\011\uffde" + "\013\uffde\014\uffde\015\uffde\016\uffde\017\uffde\020\uffde\021" + "\uffde\022\uffde\023\uffde\024\uffde\025\uffde\026\uffde\027\uffde" + "\030\uffde\031\uffde\032\uffde\033\uffde\001\002\000\006\042" + "\151\043\147\001\002\000\016\002\uffff\011\uffff\013\uffff" + "\015\uffff\031\145\032\uffff\001\002\000\006\042\uffc4\043" + "\uffc4\001\002\000\014\002\001\011\001\013\001\015\001" + "\032\143\001\002\000\046\002\uffd5\004\uffd5\005\uffd5\011" + "\uffd5\013\uffd5\015\uffd5\016\uffd5\017\uffd5\020\uffd5\021\uffd5" + "\022\uffd5\023\uffd5\024\uffd5\027\uffd5\030\uffd5\031\uffd5\032" + "\uffd5\033\uffd5\001\002\000\022\002\ufffd\011\ufffd\013\ufffd" + "\015\ufffd\022\127\023\130\031\ufffd\032\ufffd\001\002\000" + "\040\005\050\006\022\007\020\010\045\012\017\025\004" + "\026\006\035\042\036\034\037\041\040\026\041\025\042" + "\uffc3\043\uffc3\044\046\001\002\000\052\002\uffc0\004\uffc0" + "\005\uffc0\011\uffc0\013\uffc0\015\uffc0\016\uffc0\017\uffc0\020" + "\uffc0\021\uffc0\022\uffc0\023\uffc0\024\uffc0\025\uffc0\026\uffc0" + "\027\uffc0\030\uffc0\031\uffc0\032\uffc0\033\uffc0\001\002\000" + "\046\002\uffd6\004\uffd6\005\uffd6\011\uffd6\013\uffd6\015\uffd6" + "\016\uffd6\017\uffd6\020\uffd6\021\uffd6\022\uffd6\023\uffd6\024" + "\uffd6\027\uffd6\030\uffd6\031\uffd6\032\uffd6\033\uffd6\001\002" + "\000\052\002\uffc1\004\uffc1\005\uffc1\011\uffc1\013\uffc1\015" + "\uffc1\016\uffc1\017\uffc1\020\uffc1\021\uffc1\022\uffc1\023\uffc1" + "\024\uffc1\025\uffc1\026\uffc1\027\uffc1\030\uffc1\031\uffc1\032" + "\uffc1\033\uffc1\001\002\000\036\002\ufff8\004\122\005\121" + "\011\ufff8\013\ufff8\015\ufff8\016\ufff8\017\ufff8\020\ufff8\021" + "\ufff8\022\ufff8\023\ufff8\031\ufff8\032\ufff8\001\002\000\044" + "\002\ufff0\004\ufff0\005\ufff0\011\ufff0\013\ufff0\015\ufff0\016" + "\ufff0\017\ufff0\020\ufff0\021\ufff0\022\ufff0\023\ufff0\024\ufff0" + "\027\ufff0\030\ufff0\031\ufff0\032\ufff0\001\002\000\004\012" + "\uffba\001\002\000\004\012\uffbb\001\002\000\004\012\116" + "\001\002\000\052\002\uffce\004\uffce\005\uffce\011\uffce\013" + "\uffce\015\uffce\016\uffce\017\uffce\020\uffce\021\uffce\022\uffce" + "\023\uffce\024\uffce\025\113\026\112\027\uffce\030\uffce\031" + "\uffce\032\uffce\033\uffce\001\002\000\046\002\uffe8\004\uffe8" + "\005\uffe8\011\uffe8\013\uffe8\015\uffe8\016\uffe8\017\uffe8\020" + "\uffe8\021\uffe8\022\uffe8\023\uffe8\024\uffe8\027\uffe8\030\uffe8" + "\031\uffe8\032\uffe8\033\uffe8\001\002\000\054\002\uffe4\004" + "\uffe4\005\uffe4\011\uffe4\013\uffe4\014\uffe4\015\uffe4\016\uffe4" + "\017\uffe4\020\uffe4\021\uffe4\022\uffe4\023\uffe4\024\uffe4\025" + "\uffe4\026\uffe4\027\uffe4\030\uffe4\031\uffe4\032\uffe4\033\uffe4" + "\001\002\000\046\002\uffea\004\uffea\005\uffea\011\uffea\013" + "\uffea\015\uffea\016\uffea\017\uffea\020\uffea\021\uffea\022\uffea" + "\023\uffea\024\uffea\027\uffea\030\uffea\031\uffea\032\uffea\033" + "\110\001\002\000\054\002\uffdf\004\uffdf\005\uffdf\011\uffdf" + "\013\uffdf\014\uffdf\015\uffdf\016\uffdf\017\uffdf\020\uffdf\021" + "\uffdf\022\uffdf\023\uffdf\024\uffdf\025\uffdf\026\uffdf\027\uffdf" + "\030\uffdf\031\uffdf\032\uffdf\033\uffdf\001\002\000\054\002" + "\uffe2\004\uffe2\005\uffe2\011\uffe2\013\uffe2\014\uffe2\015\uffe2" + "\016\uffe2\017\uffe2\020\uffe2\021\uffe2\022\uffe2\023\uffe2\024" + "\uffe2\025\uffe2\026\uffe2\027\uffe2\030\uffe2\031\uffe2\032\uffe2" + "\033\uffe2\001\002\000\054\002\uffe7\004\uffe7\005\uffe7\011" + "\uffe7\013\uffe7\014\103\015\uffe7\016\uffe7\017\uffe7\020\uffe7" + "\021\uffe7\022\uffe7\023\uffe7\024\uffe7\025\102\026\101\027" + "\uffe7\030\uffe7\031\uffe7\032\uffe7\033\uffe7\001\002\000\004" + "\012\071\001\002\000\004\002\070\001\002\000\054\002" + "\uffe0\004\uffe0\005\uffe0\011\uffe0\013\uffe0\014\uffe0\015\uffe0" + "\016\uffe0\017\uffe0\020\uffe0\021\uffe0\022\uffe0\023\uffe0\024" + "\uffe0\025\uffe0\026\uffe0\027\uffe0\030\uffe0\031\uffe0\032\uffe0" + "\033\uffe0\001\002\000\004\043\067\001\002\000\046\002" + "\uffcc\004\uffcc\005\uffcc\011\uffcc\013\uffcc\015\uffcc\016\uffcc" + "\017\uffcc\020\uffcc\021\uffcc\022\uffcc\023\uffcc\024\uffcc\027" + "\uffcc\030\uffcc\031\uffcc\032\uffcc\033\uffcc\001\002\000\052" + "\002\uffca\004\uffca\005\uffca\011\uffca\013\uffca\015\uffca\016" + "\uffca\017\uffca\020\uffca\021\uffca\022\uffca\023\uffca\024\uffca" + "\025\uffca\026\uffca\027\uffca\030\uffca\031\uffca\032\uffca\033" + "\uffca\001\002\000\006\042\uffc2\043\uffc2\001\002\000\006" + "\042\uffc5\043\uffc5\001\002\000\044\002\uffec\004\uffec\005" + "\uffec\011\uffec\013\uffec\015\uffec\016\uffec\017\uffec\020\uffec" + "\021\uffec\022\uffec\023\uffec\024\uffec\027\uffec\030\uffec\031" + "\uffec\032\uffec\001\002\000\040\005\050\006\022\007\020" + "\010\045\012\017\025\004\026\006\035\042\036\034\037" + "\041\040\026\041\025\042\uffc3\043\uffc3\044\046\001\002" + "\000\052\002\uffd4\004\uffd4\005\uffd4\011\uffd4\013\uffd4\015" + "\uffd4\016\uffd4\017\uffd4\020\uffd4\021\uffd4\022\uffd4\023\uffd4" + "\024\uffd4\025\063\026\062\027\uffd4\030\uffd4\031\uffd4\032" + "\uffd4\033\uffd4\001\002\000\044\002\ufff3\004\ufff3\005\ufff3" + "\011\ufff3\013\ufff3\015\ufff3\016\ufff3\017\ufff3\020\ufff3\021" + "\ufff3\022\ufff3\023\ufff3\024\055\027\056\030\054\031\ufff3" + "\032\ufff3\001\002\000\046\002\uffd7\004\uffd7\005\uffd7\011" + "\uffd7\013\uffd7\015\uffd7\016\uffd7\017\uffd7\020\uffd7\021\uffd7" + "\022\uffd7\023\uffd7\024\uffd7\027\uffd7\030\uffd7\031\uffd7\032" + "\uffd7\033\uffd7\001\002\000\040\005\050\006\022\007\020" + "\010\045\012\017\025\004\026\006\035\042\036\034\037" + "\041\040\026\041\025\042\uffc3\043\uffc3\044\046\001\002" + "\000\040\005\050\006\022\007\020\010\045\012\017\025" + "\004\026\006\035\042\036\034\037\041\040\026\041\025" + "\042\uffc3\043\uffc3\044\046\001\002\000\040\005\050\006" + "\022\007\020\010\045\012\017\025\004\026\006\035\042" + "\036\034\037\041\040\026\041\025\042\uffc3\043\uffc3\044" + "\046\001\002\000\044\002\uffee\004\uffee\005\uffee\011\uffee" + "\013\uffee\015\uffee\016\uffee\017\uffee\020\uffee\021\uffee\022" + "\uffee\023\uffee\024\uffee\027\uffee\030\uffee\031\uffee\032\uffee" + "\001\002\000\044\002\uffef\004\uffef\005\uffef\011\uffef\013" + "\uffef\015\uffef\016\uffef\017\uffef\020\uffef\021\uffef\022\uffef" + "\023\uffef\024\uffef\027\uffef\030\uffef\031\uffef\032\uffef\001" + "\002\000\044\002\uffed\004\uffed\005\uffed\011\uffed\013\uffed" + "\015\uffed\016\uffed\017\uffed\020\uffed\021\uffed\022\uffed\023" + "\uffed\024\uffed\027\uffed\030\uffed\031\uffed\032\uffed\001\002" + "\000\016\006\022\007\020\010\045\042\uffc3\043\uffc3\044" + "\046\001\002\000\016\006\022\007\020\010\045\042\uffc3" + "\043\uffc3\044\046\001\002\000\046\002\uffd3\004\uffd3\005" + "\uffd3\011\uffd3\013\uffd3\015\uffd3\016\uffd3\017\uffd3\020\uffd3" + "\021\uffd3\022\uffd3\023\uffd3\024\uffd3\027\uffd3\030\uffd3\031" + "\uffd3\032\uffd3\033\uffd3\001\002\000\046\002\uffd2\004\uffd2" + "\005\uffd2\011\uffd2\013\uffd2\015\uffd2\016\uffd2\017\uffd2\020" + "\uffd2\021\uffd2\022\uffd2\023\uffd2\024\uffd2\027\uffd2\030\uffd2" + "\031\uffd2\032\uffd2\033\uffd2\001\002\000\044\002\uffeb\004" + "\uffeb\005\uffeb\011\uffeb\013\uffeb\015\uffeb\016\uffeb\017\uffeb" + "\020\uffeb\021\uffeb\022\uffeb\023\uffeb\024\uffeb\027\uffeb\030" + "\uffeb\031\uffeb\032\uffeb\001\002\000\054\002\uffbc\004\uffbc" + "\005\uffbc\011\uffbc\013\uffbc\014\uffbc\015\uffbc\016\uffbc\017" + "\uffbc\020\uffbc\021\uffbc\022\uffbc\023\uffbc\024\uffbc\025\uffbc" + "\026\uffbc\027\uffbc\030\uffbc\031\uffbc\032\uffbc\033\uffbc\001" + "\002\000\004\002\000\001\002\000\042\005\050\006\022" + "\007\020\010\045\012\017\013\uffdb\025\004\026\006\035" + "\042\036\034\037\041\040\026\041\025\042\uffc3\043\uffc3" + "\044\046\001\002\000\004\013\077\001\002\000\006\011" + "\075\013\uffda\001\002\000\006\011\uffd8\013\uffd8\001\002" + "\000\042\005\050\006\022\007\020\010\045\012\017\013" + "\uffdb\025\004\026\006\035\042\036\034\037\041\040\026" + "\041\025\042\uffc3\043\uffc3\044\046\001\002\000\004\013" + "\uffd9\001\002\000\052\002\uffdc\004\uffdc\005\uffdc\011\uffdc" + "\013\uffdc\015\uffdc\016\uffdc\017\uffdc\020\uffdc\021\uffdc\022" + "\uffdc\023\uffdc\024\uffdc\025\uffdc\026\uffdc\027\uffdc\030\uffdc" + "\031\uffdc\032\uffdc\033\uffdc\001\002\000\054\002\uffe3\004" + "\uffe3\005\uffe3\011\uffe3\013\uffe3\014\uffe3\015\uffe3\016\uffe3" + "\017\uffe3\020\uffe3\021\uffe3\022\uffe3\023\uffe3\024\uffe3\025" + "\uffe3\026\uffe3\027\uffe3\030\uffe3\031\uffe3\032\uffe3\033\uffe3" + "\001\002\000\016\006\022\007\020\010\045\042\uffc3\043" + "\uffc3\044\046\001\002\000\016\006\022\007\020\010\045" + "\042\uffc3\043\uffc3\044\046\001\002\000\040\005\050\006" + "\022\007\020\010\045\012\017\025\004\026\006\035\042" + "\036\034\037\041\040\026\041\025\042\uffc3\043\uffc3\044" + "\046\001\002\000\004\015\105\001\002\000\054\002\uffbd" + "\004\uffbd\005\uffbd\011\uffbd\013\uffbd\014\uffbd\015\uffbd\016" + "\uffbd\017\uffbd\020\uffbd\021\uffbd\022\uffbd\023\uffbd\024\uffbd" + "\025\uffbd\026\uffbd\027\uffbd\030\uffbd\031\uffbd\032\uffbd\033" + "\uffbd\001\002\000\046\002\uffe6\004\uffe6\005\uffe6\011\uffe6" + "\013\uffe6\015\uffe6\016\uffe6\017\uffe6\020\uffe6\021\uffe6\022" + "\uffe6\023\uffe6\024\uffe6\027\uffe6\030\uffe6\031\uffe6\032\uffe6" + "\033\uffe6\001\002\000\046\002\uffe5\004\uffe5\005\uffe5\011" + "\uffe5\013\uffe5\015\uffe5\016\uffe5\017\uffe5\020\uffe5\021\uffe5" + "\022\uffe5\023\uffe5\024\uffe5\027\uffe5\030\uffe5\031\uffe5\032" + "\uffe5\033\uffe5\001\002\000\036\006\022\007\020\010\045" + "\012\017\025\004\026\006\035\042\036\034\037\041\040" + "\026\041\025\042\uffc3\043\uffc3\044\046\001\002\000\044" + "\002\uffe9\004\uffe9\005\uffe9\011\uffe9\013\uffe9\015\uffe9\016" + "\uffe9\017\uffe9\020\uffe9\021\uffe9\022\uffe9\023\uffe9\024\uffe9" + "\027\uffe9\030\uffe9\031\uffe9\032\uffe9\001\002\000\016\006" + "\022\007\020\010\045\042\uffc3\043\uffc3\044\046\001\002" + "\000\016\006\022\007\020\010\045\042\uffc3\043\uffc3\044" + "\046\001\002\000\046\002\uffcd\004\uffcd\005\uffcd\011\uffcd" + "\013\uffcd\015\uffcd\016\uffcd\017\uffcd\020\uffcd\021\uffcd\022" + "\uffcd\023\uffcd\024\uffcd\027\uffcd\030\uffcd\031\uffcd\032\uffcd" + "\033\uffcd\001\002\000\046\002\uffbe\004\uffbe\005\uffbe\011" + "\uffbe\013\uffbe\015\uffbe\016\uffbe\017\uffbe\020\uffbe\021\uffbe" + "\022\uffbe\023\uffbe\024\uffbe\027\uffbe\030\uffbe\031\uffbe\032" + "\uffbe\033\uffbe\001\002\000\042\005\050\006\022\007\020" + "\010\045\012\017\013\uffdb\025\004\026\006\035\042\036" + "\034\037\041\040\026\041\025\042\uffc3\043\uffc3\044\046" + "\001\002\000\004\013\120\001\002\000\054\002\uffdd\004" + "\uffdd\005\uffdd\011\uffdd\013\uffdd\014\uffdd\015\uffdd\016\uffdd" + "\017\uffdd\020\uffdd\021\uffdd\022\uffdd\023\uffdd\024\uffdd\025" + "\uffdd\026\uffdd\027\uffdd\030\uffdd\031\uffdd\032\uffdd\033\uffdd" + "\001\002\000\040\005\050\006\022\007\020\010\045\012" + "\017\025\004\026\006\035\042\036\034\037\041\040\026" + "\041\025\042\uffc3\043\uffc3\044\046\001\002\000\040\005" + "\050\006\022\007\020\010\045\012\017\025\004\026\006" + "\035\042\036\034\037\041\040\026\041\025\042\uffc3\043" + "\uffc3\044\046\001\002\000\044\002\ufff2\004\ufff2\005\ufff2" + "\011\ufff2\013\ufff2\015\ufff2\016\ufff2\017\ufff2\020\ufff2\021" + "\ufff2\022\ufff2\023\ufff2\024\055\027\056\030\054\031\ufff2" + "\032\ufff2\001\002\000\044\002\ufff1\004\ufff1\005\ufff1\011" + "\ufff1\013\ufff1\015\ufff1\016\ufff1\017\ufff1\020\ufff1\021\ufff1" + "\022\ufff1\023\ufff1\024\055\027\056\030\054\031\ufff1\032" + "\ufff1\001\002\000\004\013\126\001\002\000\054\002\uffe1" + "\004\uffe1\005\uffe1\011\uffe1\013\uffe1\014\uffe1\015\uffe1\016" + "\uffe1\017\uffe1\020\uffe1\021\uffe1\022\uffe1\023\uffe1\024\uffe1" + "\025\uffe1\026\uffe1\027\uffe1\030\uffe1\031\uffe1\032\uffe1\033" + "\uffe1\001\002\000\040\005\050\006\022\007\020\010\045" + "\012\017\025\004\026\006\035\042\036\034\037\041\040" + "\026\041\025\042\uffc3\043\uffc3\044\046\001\002\000\040" + "\005\050\006\022\007\020\010\045\012\017\025\004\026" + "\006\035\042\036\034\037\041\040\026\041\025\042\uffc3" + "\043\uffc3\044\046\001\002\000\032\002\ufff9\011\ufff9\013" + "\ufff9\015\ufff9\016\133\017\132\020\135\021\134\022\ufff9" + "\023\ufff9\031\ufff9\032\ufff9\001\002\000\040\005\050\006" + "\022\007\020\010\045\012\017\025\004\026\006\035\042" + "\036\034\037\041\040\026\041\025\042\uffc3\043\uffc3\044" + "\046\001\002\000\040\005\050\006\022\007\020\010\045" + "\012\017\025\004\026\006\035\042\036\034\037\041\040" + "\026\041\025\042\uffc3\043\uffc3\044\046\001\002\000\040" + "\005\050\006\022\007\020\010\045\012\017\025\004\026" + "\006\035\042\036\034\037\041\040\026\041\025\042\uffc3" + "\043\uffc3\044\046\001\002\000\040\005\050\006\022\007" + "\020\010\045\012\017\025\004\026\006\035\042\036\034" + "\037\041\040\026\041\025\042\uffc3\043\uffc3\044\046\001" + "\002\000\036\002\ufff4\004\122\005\121\011\ufff4\013\ufff4" + "\015\ufff4\016\ufff4\017\ufff4\020\ufff4\021\ufff4\022\ufff4\023" + "\ufff4\031\ufff4\032\ufff4\001\002\000\036\002\ufff5\004\122" + "\005\121\011\ufff5\013\ufff5\015\ufff5\016\ufff5\017\ufff5\020" + "\ufff5\021\ufff5\022\ufff5\023\ufff5\031\ufff5\032\ufff5\001\002" + "\000\036\002\ufff6\004\122\005\121\011\ufff6\013\ufff6\015" + "\ufff6\016\ufff6\017\ufff6\020\ufff6\021\ufff6\022\ufff6\023\ufff6" + "\031\ufff6\032\ufff6\001\002\000\036\002\ufff7\004\122\005" + "\121\011\ufff7\013\ufff7\015\ufff7\016\ufff7\017\ufff7\020\ufff7" + "\021\ufff7\022\ufff7\023\ufff7\031\ufff7\032\ufff7\001\002\000" + "\032\002\ufffa\011\ufffa\013\ufffa\015\ufffa\016\133\017\132" + "\020\135\021\134\022\ufffa\023\ufffa\031\ufffa\032\ufffa\001" + "\002\000\040\005\050\006\022\007\020\010\045\012\017" + "\025\004\026\006\035\042\036\034\037\041\040\026\041" + "\025\042\uffc3\043\uffc3\044\046\001\002\000\016\002\ufffe" + "\011\ufffe\013\ufffe\015\ufffe\031\145\032\ufffe\001\002\000" + "\040\005\050\006\022\007\020\010\045\012\017\025\004" + "\026\006\035\042\036\034\037\041\040\026\041\025\042" + "\uffc3\043\uffc3\044\046\001\002\000\022\002\ufffc\011\ufffc" + "\013\ufffc\015\ufffc\022\127\023\130\031\ufffc\032\ufffc\001" + "\002\000\054\002\uffc9\004\uffc9\005\uffc9\011\uffc9\013\uffc9" + "\014\uffc9\015\uffc9\016\uffc9\017\uffc9\020\uffc9\021\uffc9\022" + "\uffc9\023\uffc9\024\uffc9\025\uffc9\026\uffc9\027\uffc9\030\uffc9" + "\031\uffc9\032\uffc9\033\uffc9\001\002\000\054\002\uffc7\004" + "\uffc7\005\uffc7\011\uffc7\013\uffc7\014\103\015\uffc7\016\uffc7" + "\017\uffc7\020\uffc7\021\uffc7\022\uffc7\023\uffc7\024\uffc7\025" + "\uffc7\026\uffc7\027\uffc7\030\uffc7\031\uffc7\032\uffc7\033\uffc7" + "\001\002\000\054\002\uffc8\004\uffc8\005\uffc8\011\uffc8\013" + "\uffc8\014\uffc8\015\uffc8\016\uffc8\017\uffc8\020\uffc8\021\uffc8" + "\022\uffc8\023\uffc8\024\uffc8\025\uffc8\026\uffc8\027\uffc8\030" + "\uffc8\031\uffc8\032\uffc8\033\uffc8\001\002\000\054\002\uffc7" + "\004\uffc7\005\uffc7\011\uffc7\013\uffc7\014\103\015\uffc7\016" + "\uffc7\017\uffc7\020\uffc7\021\uffc7\022\uffc7\023\uffc7\024\uffc7" + "\025\uffc7\026\uffc7\027\uffc7\030\uffc7\031\uffc7\032\uffc7\033" + "\uffc7\001\002\000\052\002\uffcb\004\uffcb\005\uffcb\011\uffcb" + "\013\uffcb\015\uffcb\016\uffcb\017\uffcb\020\uffcb\021\uffcb\022" + "\uffcb\023\uffcb\024\uffcb\025\uffcb\026\uffcb\027\uffcb\030\uffcb" + "\031\uffcb\032\uffcb\033\uffcb\001\002\000\052\002\uffc6\004" + "\uffc6\005\uffc6\011\uffc6\013\uffc6\015\uffc6\016\uffc6\017\uffc6" + "\020\uffc6\021\uffc6\022\uffc6\023\uffc6\024\uffc6\025\uffc6\026" + "\uffc6\027\uffc6\030\uffc6\031\uffc6\032\uffc6\033\uffc6\001\002" + "\000\046\002\uffbf\004\uffbf\005\uffbf\011\uffbf\013\uffbf\015" + "\uffbf\016\uffbf\017\uffbf\020\uffbf\021\uffbf\022\uffbf\023\uffbf" + "\024\uffbf\027\uffbf\030\uffbf\031\uffbf\032\uffbf\033\uffbf\001" + "\002\000\046\002\uffd0\004\uffd0\005\uffd0\011\uffd0\013\uffd0" + "\015\uffd0\016\uffd0\017\uffd0\020\uffd0\021\uffd0\022\uffd0\023" + "\uffd0\024\uffd0\027\uffd0\030\uffd0\031\uffd0\032\uffd0\033\uffd0" + "\001\002" }); /** Access to parse-action table. */ public short[][] action_table() {return _action_table;} /** <code>reduce_goto</code> table. */ protected static final short[][] _reduce_table = unpackFromStrings(new String[] { "\000\154\000\070\003\007\004\050\005\026\006\036\007" + "\037\010\013\011\015\012\011\013\004\014\022\015\051" + "\016\023\017\032\020\035\021\034\022\046\024\031\026" + "\030\027\014\030\010\031\012\033\027\034\043\035\052" + "\036\020\037\006\040\042\001\001\000\016\030\010\031" + "\012\033\027\034\043\035\155\040\042\001\001\000\002" + "\001\001\000\016\030\010\031\012\033\027\034\043\035" + "\154\040\042\001\001\000\002\001\001\000\002\001\001" + "\000\004\032\147\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\070\003\007\004\050\005\026\006\036\007\124\010" + "\013\011\015\012\011\013\004\014\022\015\051\016\023" + "\017\032\020\035\021\034\022\046\024\031\026\030\027" + "\014\030\010\031\012\033\027\034\043\035\052\036\020" + "\037\006\040\042\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\004\041" + "\077\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\052\003\007\004\050\005\026\006\036\016\065\017" + "\032\020\035\021\034\022\046\024\031\026\030\027\014" + "\030\010\031\012\033\027\034\043\035\052\036\020\037" + "\006\040\042\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\052\003\007\004\050\005\026\006" + "\036\016\060\017\032\020\035\021\034\022\046\024\031" + "\026\030\027\014\030\010\031\012\033\027\034\043\035" + "\052\036\020\037\006\040\042\001\001\000\052\003\007" + "\004\050\005\026\006\036\016\057\017\032\020\035\021" + "\034\022\046\024\031\026\030\027\014\030\010\031\012" + "\033\027\034\043\035\052\036\020\037\006\040\042\001" + "\001\000\052\003\007\004\050\005\026\006\036\016\056" + "\017\032\020\035\021\034\022\046\024\031\026\030\027" + "\014\030\010\031\012\033\027\034\043\035\052\036\020" + "\037\006\040\042\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\016\030\010\031\012\033\027" + "\034\043\035\064\040\042\001\001\000\016\030\010\031" + "\012\033\027\034\043\035\063\040\042\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\074\003\007\004\050\005\026" + "\006\036\007\073\010\013\011\015\012\011\013\004\014" + "\022\015\051\016\023\017\032\020\035\021\034\022\046" + "\023\071\024\031\025\072\026\030\027\014\030\010\031" + "\012\033\027\034\043\035\052\036\020\037\006\040\042" + "\001\001\000\002\001\001\000\002\001\001\000\002\001" + "\001\000\074\003\007\004\050\005\026\006\036\007\073" + "\010\013\011\015\012\011\013\004\014\022\015\051\016" + "\023\017\032\020\035\021\034\022\046\023\075\024\031" + "\025\072\026\030\027\014\030\010\031\012\033\027\034" + "\043\035\052\036\020\037\006\040\042\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\016\030" + "\010\031\012\033\027\034\043\035\106\040\042\001\001" + "\000\016\030\010\031\012\033\027\034\043\035\105\040" + "\042\001\001\000\070\003\007\004\050\005\026\006\036" + "\007\103\010\013\011\015\012\011\013\004\014\022\015" + "\051\016\023\017\032\020\035\021\034\022\046\024\031" + "\026\030\027\014\030\010\031\012\033\027\034\043\035" + "\052\036\020\037\006\040\042\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\050\003\007\004\050\005\026\006\036\017\032\020\035" + "\021\034\022\110\024\031\026\030\027\014\030\010\031" + "\012\033\027\034\043\035\052\036\020\037\006\040\042" + "\001\001\000\002\001\001\000\016\030\010\031\012\033" + "\027\034\043\035\114\040\042\001\001\000\016\030\010" + "\031\012\033\027\034\043\035\113\040\042\001\001\000" + "\002\001\001\000\002\001\001\000\074\003\007\004\050" + "\005\026\006\036\007\073\010\013\011\015\012\011\013" + "\004\014\022\015\051\016\023\017\032\020\035\021\034" + "\022\046\023\116\024\031\025\072\026\030\027\014\030" + "\010\031\012\033\027\034\043\035\052\036\020\037\006" + "\040\042\001\001\000\002\001\001\000\002\001\001\000" + "\054\003\007\004\050\005\026\006\036\015\123\016\023" + "\017\032\020\035\021\034\022\046\024\031\026\030\027" + "\014\030\010\031\012\033\027\034\043\035\052\036\020" + "\037\006\040\042\001\001\000\054\003\007\004\050\005" + "\026\006\036\015\122\016\023\017\032\020\035\021\034" + "\022\046\024\031\026\030\027\014\030\010\031\012\033" + "\027\034\043\035\052\036\020\037\006\040\042\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\060\003\007\004\050\005\026\006\036" + "\013\141\014\022\015\051\016\023\017\032\020\035\021" + "\034\022\046\024\031\026\030\027\014\030\010\031\012" + "\033\027\034\043\035\052\036\020\037\006\040\042\001" + "\001\000\060\003\007\004\050\005\026\006\036\013\130" + "\014\022\015\051\016\023\017\032\020\035\021\034\022" + "\046\024\031\026\030\027\014\030\010\031\012\033\027" + "\034\043\035\052\036\020\037\006\040\042\001\001\000" + "\002\001\001\000\056\003\007\004\050\005\026\006\036" + "\014\140\015\051\016\023\017\032\020\035\021\034\022" + "\046\024\031\026\030\027\014\030\010\031\012\033\027" + "\034\043\035\052\036\020\037\006\040\042\001\001\000" + "\056\003\007\004\050\005\026\006\036\014\137\015\051" + "\016\023\017\032\020\035\021\034\022\046\024\031\026" + "\030\027\014\030\010\031\012\033\027\034\043\035\052" + "\036\020\037\006\040\042\001\001\000\056\003\007\004" + "\050\005\026\006\036\014\136\015\051\016\023\017\032" + "\020\035\021\034\022\046\024\031\026\030\027\014\030" + "\010\031\012\033\027\034\043\035\052\036\020\037\006" + "\040\042\001\001\000\056\003\007\004\050\005\026\006" + "\036\014\135\015\051\016\023\017\032\020\035\021\034" + "\022\046\024\031\026\030\027\014\030\010\031\012\033" + "\027\034\043\035\052\036\020\037\006\040\042\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\064\003\007\004\050" + "\005\026\006\036\011\015\012\143\013\004\014\022\015" + "\051\016\023\017\032\020\035\021\034\022\046\024\031" + "\026\030\027\014\030\010\031\012\033\027\034\043\035" + "\052\036\020\037\006\040\042\001\001\000\002\001\001" + "\000\062\003\007\004\050\005\026\006\036\011\145\013" + "\004\014\022\015\051\016\023\017\032\020\035\021\034" + "\022\046\024\031\026\030\027\014\030\010\031\012\033" + "\027\034\043\035\052\036\020\037\006\040\042\001\001" + "\000\002\001\001\000\002\001\001\000\006\041\151\042" + "\152\001\001\000\002\001\001\000\006\041\151\042\153" + "\001\001\000\002\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001" }); /** Access to <code>reduce_goto</code> table. */ public short[][] reduce_table() {return _reduce_table;} /** Instance of action encapsulation class. */ protected CUP$XSLParser$actions action_obj; /** Action encapsulation object initializer. */ protected void init_actions() { action_obj = new CUP$XSLParser$actions(this); } /** Invoke a user supplied parse action. */ public java_cup.runtime.Symbol do_action( int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top) throws java.lang.Exception { /* call code in generated class */ return action_obj.CUP$XSLParser$do_action(act_num, parser, stack, top); } /** Indicates start state. */ public int start_state() {return 0;} /** Indicates start production. */ public int start_production() {return 1;} /** <code>EOF</code> Symbol index. */ public int EOF_sym() {return 0;} /** <code>error</code> Symbol index. */ public int error_sym() {return 1;} public Hashtable nsHash; public Hashtable symbolHash; Step tempStep; NodeTest tempNt; LocationPathExpr tempLPExpr; //ExprList tmpEL1, tmpEL2; public XSLParser (java.io.Reader input) { super(new XSLScanner(input)); nsHash = null; } public XSLParser (java.io.InputStream input) { super(new XSLScanner(input)); } public static void main(String args[]){ try { String s="//abc[document('',document(''))//a/b/c]"; s="./."; XSLParser p = new XSLParser(new StringReader(s)); Object result = p.parse().value; //System.out.println(((Expr)result).evalNumber(null)); System.out.println(((Expr)result)); } catch (Exception e) { System.out.println("caught: "+e); } } public void setStrictScanner(boolean b){ ((XSLScanner)getScanner()).setStrict(b); } public void report_error(String message, Object info) { //throw new XPathParseException("Syntax error during parsing"); } public void report_fatal_error(String message, Object info) throws XPathParseException{ throw new XPathParseException("Syntax error during parsing: "+ message); } public void syntax_error(Symbol cur_token) { } public void unrecovered_syntax_error(Symbol cur_token) throws XPathParseException{ XSLScanner scanner = (XSLScanner)getScanner(); throw new XPathParseException("XPath Syntax error: "+cur_token, scanner.getOffset()); } } /** Cup generated class to encapsulate user supplied action code.*/ class CUP$XSLParser$actions { private final XSLParser parser; /** Constructor */ CUP$XSLParser$actions(XSLParser parser) { this.parser = parser; } /** Method with the actual generated action code. */ public final java_cup.runtime.Symbol CUP$XSLParser$do_action( int CUP$XSLParser$act_num, java_cup.runtime.lr_parser CUP$XSLParser$parser, java.util.Stack CUP$XSLParser$stack, int CUP$XSLParser$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$XSLParser$result; /* select the action based on the action number */ switch (CUP$XSLParser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 71: // LocationPathFuncName ::= FNAME2 { FuncName RESULT = null; int fn2left = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int fn2right = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; FuncName fn2 = (FuncName)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT= fn2; CUP$XSLParser$result = new java_cup.runtime.Symbol(4/*LocationPathFuncName*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 70: // FunctionName ::= FNAME { FuncName RESULT = null; int fnleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int fnright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; FuncName fn = (FuncName)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = fn; CUP$XSLParser$result = new java_cup.runtime.Symbol(3/*FunctionName*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 69: // VariableReference ::= DOLLAR NAME { Expr RESULT = null; int nleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int nright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; NameType n = (NameType)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; if (parser.symbolHash.get(n.qname)==null) throw new XPathParseException("variableExpression not declared ==> $"+n.qname); RESULT = new VariableExpr(n.qname, (Expr)parser.symbolHash.get(n.qname)); CUP$XSLParser$result = new java_cup.runtime.Symbol(15/*VariableReference*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 68: // Predicate ::= LB Expr RB { Predicate RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; RESULT = new Predicate(); RESULT.expr= e; CUP$XSLParser$result = new java_cup.runtime.Symbol(31/*Predicate*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 67: // AbbreviatedRelativeLocationPath ::= Step DSLASH RelativeLocationPath { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setNodeTest(parser.tempNt); s.setNextStep(RESULT); RESULT.setPrevStep(s); RESULT.setNextStep(rlp); rlp.setPrevStep(RESULT); RESULT = s; CUP$XSLParser$result = new java_cup.runtime.Symbol(30/*AbbreviatedRelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 66: // AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath { Step RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setNodeTest(parser.tempNt); RESULT.setNextStep(rlp); rlp.setPrevStep(RESULT); CUP$XSLParser$result = new java_cup.runtime.Symbol(29/*AbbreviatedAbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // AbbreviatedStep ::= DDOT { Step RESULT = null; RESULT = new Step(); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setAxisType(AxisType.PARENT); RESULT.setNodeTest(parser.tempNt); // System.out.println("result " + RESULT.toString()); CUP$XSLParser$result = new java_cup.runtime.Symbol(26/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // AbbreviatedStep ::= DOT { Step RESULT = null; RESULT = new Step(); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setAxisType(AxisType.SELF); RESULT.setNodeTest(parser.tempNt); CUP$XSLParser$result = new java_cup.runtime.Symbol(26/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // AbbreviatedAxisSpecifier ::= AT { AxisType RESULT = null; RESULT = new AxisType(); RESULT.i = AxisType.ATTRIBUTE; CUP$XSLParser$result = new java_cup.runtime.Symbol(23/*AbbreviatedAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // AbbreviatedAxisSpecifier ::= { AxisType RESULT = null; RESULT = new AxisType(); RESULT.i = AxisType.CHILD; CUP$XSLParser$result = new java_cup.runtime.Symbol(23/*AbbreviatedAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // AxisSpecifier ::= AbbreviatedAxisSpecifier { AxisType RESULT = null; int aasleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aasright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; AxisType aas = (AxisType)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = aas; CUP$XSLParser$result = new java_cup.runtime.Symbol(22/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // AxisSpecifier ::= AXISNAME { AxisType RESULT = null; int anleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int anright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; AxisType an = (AxisType)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = an; CUP$XSLParser$result = new java_cup.runtime.Symbol(22/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // PredicateList ::= Predicate PredicateList { Predicate RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int pright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Predicate p = (Predicate)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; int plleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int plright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Predicate pl = (Predicate)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; p.nextP = pl; RESULT = p; CUP$XSLParser$result = new java_cup.runtime.Symbol(32/*PredicateList*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // PredicateList ::= { Predicate RESULT = null; RESULT = null; CUP$XSLParser$result = new java_cup.runtime.Symbol(32/*PredicateList*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // nodetest ::= NTEST { NodeTest RESULT = null; int n2left = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int n2right = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Ntest n2 = (Ntest)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new NodeTest(); if (n2.i!=3) RESULT.setTestType(n2.i); else { if (n2.arg ==null) RESULT.setTestType(n2.i); //PI0 else { RESULT.setTestType(4); //PI1 RESULT.setNodeName(n2.arg); } } CUP$XSLParser$result = new java_cup.runtime.Symbol(24/*nodetest*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // nodetest ::= NAME { NodeTest RESULT = null; int nleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int nright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; NameType n = (NameType)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new NodeTest(); RESULT.setTestType(NodeTest.NAMETEST); RESULT.setNodeName(n.qname); if (n.localname!=null){ RESULT.setNodeNameNS(n.prefix,n.localname); if (parser.nsHash==null || parser.nsHash.get(n.prefix) ==null) throw new XPathParseException("No URL found for prefix:"+n.prefix); RESULT.URL = (String) parser.nsHash.get(n.prefix); } CUP$XSLParser$result = new java_cup.runtime.Symbol(24/*nodetest*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // Step ::= AbbreviatedStep { Step RESULT = null; int absleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int absright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step abs = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = abs; //System.out.println(" step 4"); CUP$XSLParser$result = new java_cup.runtime.Symbol(25/*Step*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // Step ::= AxisSpecifier nodetest PredicateList { Step RESULT = null; int asleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int asright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; AxisType as = (AxisType)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int ntleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int ntright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; NodeTest nt = (NodeTest)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; int plleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int plright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Predicate pl = (Predicate)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(as.i); if ( (as.i== AxisType.ATTRIBUTE || as.i == AxisType.DESCENDANT || as.i == AxisType.PRECEDING || as.i == AxisType.FOLLOWING || as.i == AxisType.FOLLOWING_SIBLING || as.i == AxisType.PRECEDING_SIBLING || as.i == AxisType.NAMESPACE) && (nt.testType>1)){ XSLScanner scanner = (XSLScanner)parser.getScanner(); throw new XPathParseException(as.getAxisString()+" axis can't operate on"+ " comment(), pi(), or text()", scanner.getOffset()); } RESULT.setNodeTest(nt); RESULT.setPredicate(pl); //System.out.println(" Step 3 "); CUP$XSLParser$result = new java_cup.runtime.Symbol(25/*Step*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // RelativeLocationPath ::= AbbreviatedRelativeLocationPath { Step RESULT = null; int arlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int arlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step arlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = arlp; CUP$XSLParser$result = new java_cup.runtime.Symbol(27/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // RelativeLocationPath ::= Step SLASH RelativeLocationPath { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; //if (s == rlp) throw new XPathParseException("$1 = $3!!!!"); s.nextS = rlp; rlp.prevS = s; RESULT= s; CUP$XSLParser$result = new java_cup.runtime.Symbol(27/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // RelativeLocationPath ::= Step { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = s; CUP$XSLParser$result = new java_cup.runtime.Symbol(27/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // AbsoluteLocationPath ::= AbbreviatedAbsoluteLocationPath { Step RESULT = null; int aalpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aalpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step aalp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = aalp; CUP$XSLParser$result = new java_cup.runtime.Symbol(28/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // AbsoluteLocationPath ::= SLASH RelativeLocationPath { Step RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = rlp; CUP$XSLParser$result = new java_cup.runtime.Symbol(28/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // AbsoluteLocationPath ::= SLASH { Step RESULT = null; RESULT = null; CUP$XSLParser$result = new java_cup.runtime.Symbol(28/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // FunctionalLocationPath ::= LocationPathFunctionCall DSLASH RelativeLocationPath { LocationPathExpr RESULT = null; int lpfcleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int lpfcright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; FuncExpr lpfc = (FuncExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; parser.tempStep = new Step(); parser.tempStep.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep.setNodeTest(parser.tempNt); parser.tempStep.setNextStep(rlp); rlp.setPrevStep(parser.tempStep); RESULT = new FunctionalLocationPathExpr(lpfc); //RESULT.setFunc(lpfc); //RESULT.setPathType(LocationPathExpr.FUNC_PATH); RESULT.setStep(parser.tempStep); CUP$XSLParser$result = new java_cup.runtime.Symbol(21/*FunctionalLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // FunctionalLocationPath ::= LocationPathFunctionCall SLASH RelativeLocationPath { LocationPathExpr RESULT = null; int lpfcleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int lpfcright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; FuncExpr lpfc = (FuncExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new FunctionalLocationPathExpr(lpfc); //RESULT.setFunc(lpfc); //RESULT.setPathType(LocationPathExpr.FUNC_PATH); RESULT.setStep(rlp); CUP$XSLParser$result = new java_cup.runtime.Symbol(21/*FunctionalLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // FunctionalLocationPath ::= LocationPathFunctionCall { LocationPathExpr RESULT = null; int lpfcleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int lpfcright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; FuncExpr lpfc = (FuncExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new FunctionalLocationPathExpr(lpfc); //RESULT.setFunc(lpfc); //RESULT.setPathType(LocationPathExpr.FUNC_PATH); CUP$XSLParser$result = new java_cup.runtime.Symbol(21/*FunctionalLocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // LocationPath ::= FunctionalLocationPath { LocationPathExpr RESULT = null; int flpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int flpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; LocationPathExpr flp = (LocationPathExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = flp; CUP$XSLParser$result = new java_cup.runtime.Symbol(20/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // LocationPath ::= AbsoluteLocationPath { LocationPathExpr RESULT = null; int alpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int alpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step alp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new LocationPathExpr(); RESULT.setPathType(LocationPathExpr.ABSOLUTE_PATH); //System.out.println(" absolute "); RESULT.setStep(alp); //startStep = currentStep=null; CUP$XSLParser$result = new java_cup.runtime.Symbol(20/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // LocationPath ::= RelativeLocationPath { LocationPathExpr RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new LocationPathExpr(); RESULT.setStep(rlp); CUP$XSLParser$result = new java_cup.runtime.Symbol(20/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // Argument ::= Expr { Expr RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int eright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = e; CUP$XSLParser$result = new java_cup.runtime.Symbol(19/*Argument*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // ArgumentList ::= Argument COMMA ArgumentList { Alist RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int aright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int alleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int alright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new Alist(); RESULT.e = a; RESULT.next = al; CUP$XSLParser$result = new java_cup.runtime.Symbol(17/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // ArgumentList ::= Argument { Alist RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new Alist(); RESULT.e = a; CUP$XSLParser$result = new java_cup.runtime.Symbol(17/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // ArgumentList ::= { Alist RESULT = null; RESULT = null; CUP$XSLParser$result = new java_cup.runtime.Symbol(17/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // LocationPathFunctionCall ::= LocationPathFuncName LP ArgumentList RP { FuncExpr RESULT = null; int lpfnleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).left; int lpfnright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).right; FuncName lpfn = (FuncName)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).value; int alleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int alright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; FuncExpr tfe = new FuncExpr(lpfn.i, al); if (!tfe.checkArgumentCount()) throw new XPathParseException(" argument input for function "+tfe.fname()+" incorrect"); RESULT = tfe; CUP$XSLParser$result = new java_cup.runtime.Symbol(2/*LocationPathFunctionCall*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // FunctionCall ::= FunctionName LP ArgumentList RP { FuncExpr RESULT = null; int fnleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).left; int fnright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).right; FuncName fn = (FuncName)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).value; int alleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int alright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; FuncExpr tfe = new FuncExpr(fn.i, al); if (!tfe.checkArgumentCount()) throw new XPathParseException(" argument input for function "+tfe.fname()+" incorrect"); RESULT = tfe; CUP$XSLParser$result = new java_cup.runtime.Symbol(1/*FunctionCall*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-3)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // PrimaryExpr ::= FunctionCall { Expr RESULT = null; int fcleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int fcright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; FuncExpr fc = (FuncExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = fc; CUP$XSLParser$result = new java_cup.runtime.Symbol(18/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // PrimaryExpr ::= NUMBER { Expr RESULT = null; int neleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int neright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Double ne = (Double)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new NumExpr(ne.doubleValue()); CUP$XSLParser$result = new java_cup.runtime.Symbol(18/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // PrimaryExpr ::= LITERAL { Expr RESULT = null; int leleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int leright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; String le = (String)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new LiteralExpr(le); CUP$XSLParser$result = new java_cup.runtime.Symbol(18/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // PrimaryExpr ::= LP Expr RP { Expr RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; RESULT = e; CUP$XSLParser$result = new java_cup.runtime.Symbol(18/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // PrimaryExpr ::= VariableReference { Expr RESULT = null; int veleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int veright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ve = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = ve; CUP$XSLParser$result = new java_cup.runtime.Symbol(18/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // FilterExpr ::= FilterExpr Predicate { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int feright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; int pleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Predicate p = (Predicate)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new FilterExpr(fe, p); CUP$XSLParser$result = new java_cup.runtime.Symbol(14/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // FilterExpr ::= PrimaryExpr { Expr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int peright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = pe; CUP$XSLParser$result = new java_cup.runtime.Symbol(14/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // PathExpr ::= FilterExpr DSLASH RelativeLocationPath { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int feright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; parser.tempStep = new Step(); parser.tempStep.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep.setNodeTest(parser.tempNt); parser.tempStep.setNextStep(rlp); rlp.setPrevStep(parser.tempStep); /*parser.tempStep2 = new Step(); parser.tempNt = new NodeTest(); parser.tempStep2.setAxisType(AxisType.SELF); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep2.setNodeTest(parser.tempNt); parser.tempStep2.setNextStep(parser.tempStep); parser.tempStep.setPrevStep(parser.tempStep2);*/ parser.tempLPExpr = new LocationPathExpr(); parser.tempLPExpr.setStep(parser.tempStep); RESULT = new PathExpr(fe, parser.tempLPExpr); CUP$XSLParser$result = new java_cup.runtime.Symbol(13/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // PathExpr ::= FilterExpr SLASH RelativeLocationPath { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int feright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; parser.tempLPExpr = new LocationPathExpr(); parser.tempLPExpr.setStep(rlp); RESULT = new PathExpr(fe, parser.tempLPExpr); CUP$XSLParser$result = new java_cup.runtime.Symbol(13/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // PathExpr ::= FilterExpr { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int feright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = fe; CUP$XSLParser$result = new java_cup.runtime.Symbol(13/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // PathExpr ::= LocationPath { Expr RESULT = null; int lpleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int lpright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; LocationPathExpr lp = (LocationPathExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = lp; CUP$XSLParser$result = new java_cup.runtime.Symbol(13/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // UnionExpr ::= PathExpr UNION UnionExpr { UnionExpr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int peright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int uneleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int uneright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; UnionExpr une = (UnionExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new UnionExpr(pe); RESULT.next = une; CUP$XSLParser$result = new java_cup.runtime.Symbol(16/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // UnionExpr ::= PathExpr { UnionExpr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int peright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new UnionExpr(pe); CUP$XSLParser$result = new java_cup.runtime.Symbol(16/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // UnaryExpr ::= SUB UnaryExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new UnaryExpr( BinaryExpr.SUB, ue); CUP$XSLParser$result = new java_cup.runtime.Symbol(12/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // UnaryExpr ::= UnionExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; UnionExpr ue = (UnionExpr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = ue; CUP$XSLParser$result = new java_cup.runtime.Symbol(12/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // MultiplicativeExpr ::= MultiplicativeExpr MOD UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.MOD, ue); CUP$XSLParser$result = new java_cup.runtime.Symbol(11/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // MultiplicativeExpr ::= MultiplicativeExpr DIV UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.DIV, ue); CUP$XSLParser$result = new java_cup.runtime.Symbol(11/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // MultiplicativeExpr ::= MultiplicativeExpr MULT UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.MULT, ue); CUP$XSLParser$result = new java_cup.runtime.Symbol(11/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // MultiplicativeExpr ::= UnaryExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = ue; CUP$XSLParser$result = new java_cup.runtime.Symbol(11/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // AdditiveExpr ::= AdditiveExpr SUB MultiplicativeExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int meleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(ae, BinaryExpr.SUB, me); CUP$XSLParser$result = new java_cup.runtime.Symbol(10/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // AdditiveExpr ::= AdditiveExpr ADD MultiplicativeExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int meleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(ae, BinaryExpr.ADD, me); CUP$XSLParser$result = new java_cup.runtime.Symbol(10/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // AdditiveExpr ::= MultiplicativeExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = me; CUP$XSLParser$result = new java_cup.runtime.Symbol(10/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // RelationalExpr ::= RelationalExpr GE AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.GE, ae); CUP$XSLParser$result = new java_cup.runtime.Symbol(9/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // RelationalExpr ::= RelationalExpr LE AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.LE, ae); CUP$XSLParser$result = new java_cup.runtime.Symbol(9/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // RelationalExpr ::= RelationalExpr GT AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.GT, ae); CUP$XSLParser$result = new java_cup.runtime.Symbol(9/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // RelationalExpr ::= RelationalExpr LT AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.LT, ae); CUP$XSLParser$result = new java_cup.runtime.Symbol(9/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // RelationalExpr ::= AdditiveExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = ae; CUP$XSLParser$result = new java_cup.runtime.Symbol(9/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // EqualityExpr ::= EqualityExpr NE RelationalExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int eeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(ee, BinaryExpr.NE, re); CUP$XSLParser$result = new java_cup.runtime.Symbol(7/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // EqualityExpr ::= EqualityExpr EQ RelationalExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int eeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(ee, BinaryExpr.EQ, re); CUP$XSLParser$result = new java_cup.runtime.Symbol(7/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // EqualityExpr ::= RelationalExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = re; CUP$XSLParser$result = new java_cup.runtime.Symbol(7/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // AndExpr ::= AndExpr AND EqualityExpr { Expr RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int aright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int eeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int eeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(a, BinaryExpr.AND, ee); CUP$XSLParser$result = new java_cup.runtime.Symbol(8/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // AndExpr ::= EqualityExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int eeright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = ee; CUP$XSLParser$result = new java_cup.runtime.Symbol(8/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // OrExpr ::= OrExpr OR AndExpr { Expr RESULT = null; int oleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left; int oright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).right; Expr o = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).value; int aleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = new BinaryExpr(o,BinaryExpr.OR,a); CUP$XSLParser$result = new java_cup.runtime.Symbol(6/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-2)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // OrExpr ::= AndExpr { Expr RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = a; CUP$XSLParser$result = new java_cup.runtime.Symbol(6/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // $START ::= Expr EOF { Object RESULT = null; int start_valleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).right; Expr start_val = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).value; RESULT = start_val; CUP$XSLParser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-1)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } /* ACCEPT */ CUP$XSLParser$parser.done_parsing(); return CUP$XSLParser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // Expr ::= OrExpr { Expr RESULT = null; int oleft = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left; int oright = ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right; Expr o = (Expr)((java_cup.runtime.Symbol) CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).value; RESULT = o; CUP$XSLParser$result = new java_cup.runtime.Symbol(5/*Expr*/, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XSLParser$stack.elementAt(CUP$XSLParser$top-0)).right, RESULT); } return CUP$XSLParser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } }
103,982
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
FuncName.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/FuncName.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; /** * * This class is used by lexer to detect built-in functions * then transport to the parser */ public class FuncName{ public int i; public static final int LAST = 0; public static final int POSITION =1; public static final int COUNT = 2; public static final int LOCAL_NAME =3; public static final int NAMESPACE_URI =4; public static final int NAME=5; public static final int STRING=6; public static final int CONCAT = 7; public static final int STARTS_WITH = 8; public static final int CONTAINS = 9; public static final int SUBSTRING_BEFORE = 10; public static final int SUBSTRING_AFTER =11; public static final int SUBSTRING = 12; public static final int STRING_LENGTH =13; public static final int NORMALIZE_SPACE =14; public static final int TRANSLATE =15; public static final int BOOLEAN =16; public static final int NOT = 17; public static final int TRUE =18; public static final int FALSE =19; public static final int LANG = 20; public static final int NUMBER = 21; public static final int SUM = 22; public static final int FLOOR =23; public static final int CEILING = 24; public static final int ROUND = 25; // added for 2.0 public static final int ABS = 26; public static final int ROUND_HALF_TO_EVEN = 27; public static final int ROUND_HALF_TO_ODD = 28; public static final int CODE_POINTS_TO_STRING = 29; public static final int COMPARE = 30; public static final int UPPER_CASE = 31; public static final int LOWER_CASE = 32; public static final int ENDS_WITH = 33; public static final int QNAME = 34; public static final int LOCAL_NAME_FROM_QNAME = 35; public static final int NAMESPACE_URI_FROM_QNAME = 36; public static final int NAMESPACE_URI_FOR_PREFIX = 37; public static final int RESOLVE_QNAME = 38; public static final int IRI_TO_URI = 39; public static final int ESCAPE_HTML_URI = 40; public static final int ENCODE_FOR_URI = 41; public static final int MATCH_NAME = 42; public static final int MATCH_LOCAL_NAME = 43; public static final int NOT_MATCH_NAME = 44; public static final int NOT_MATCH_LOCAL_NAME = 45; public static final int CURRENT =46; public static final int GENERATE_ID = 47; public static final int FORMAT_NUMBER = 48; public static final int KEY = 49; public static final int ID =50; public static final int DOCUMENT =51; public static final int SYSTEM_PROPERTY =52; public static final int ELEMENT_AVAILABLE =53; public static final int FUNCTION_AVAILABLE = 54; // String getFuncString(){ // switch(i){ // case FuncName.LAST: return "last"; // case FuncName.POSITION: return "position"; // case FuncName.COUNT: return "count"; // case FuncName.LOCAL_NAME: return "local-name"; // case FuncName.NAMESPACE_URI: return "namespace-uri"; // case FuncName.NAME: return "name"; // case FuncName.STRING: return "string"; // case FuncName.CONCAT: return "concat"; // case FuncName.STARTS_WITH: return "starts-with"; // case FuncName.CONTAINS: return "contains"; // case FuncName.SUBSTRING_BEFORE: return "substring-before"; // case FuncName.SUBSTRING_AFTER: return "substring-after"; // case FuncName.SUBSTRING: return "substring"; // case FuncName.STRING_LENGTH: return "string-length"; // case FuncName.NORMALIZE_SPACE: return "normalize-space"; // case FuncName.TRANSLATE: return "translate"; // case FuncName.BOOLEAN: return "boolean"; // case FuncName.NOT: return "not"; // case FuncName.TRUE: return "true"; // case FuncName.FALSE: return "false"; // case FuncName.LANG: return "lang"; // case FuncName.NUMBER: return "number"; // case FuncName.SUM: return "sum"; // case FuncName.FLOOR: return "floor"; // case FuncName.CEILING: return "ceiling"; // case FuncName.ROUND: return "round"; //// added for 2.0 // case FuncName.ABS: return "abs"; // case FuncName.ROUND_HALF_TO_EVEN : // return "round-half-to-even"; // case FuncName.ROUND_HALF_TO_ODD: // return "round-half-to-odd"; // case FuncName.CODE_POINTS_TO_STRING: // return "code-points-to-string"; // case FuncName.COMPARE: return "compare"; // case FuncName.UPPER_CASE: return "upper-case"; // case FuncName.LOWER_CASE: return "lower-case"; // case FuncName.ENDS_WITH: return "ends-with"; // case FuncName.QNAME: return "QName"; // case FuncName.LOCAL_NAME_FROM_QNAME: // return "local-name-from-QName"; // case FuncName.NAMESPACE_URI_FROM_QNAME: // return "namespace-uri-from-QName"; // case FuncName.NAMESPACE_URI_FOR_PREFIX: // return "namespace-uri-for-prefix"; // case FuncName.RESOLVE_QNAME: return "resolve-QName"; // case FuncName.IRI_TO_URI: return "iri-to-uri"; // case FuncName.ESCAPE_HTML_URI: return "escape-html-uri"; // default: return "encode-for-uri"; // } //} }
5,876
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Yylex.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/Yylex.java
/* The following code was generated by JFlex 1.4.3 on 10/29/09 7:28 PM */ /* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import java_cup.runtime.Symbol; import com.ximpleware.parser.*; import com.ximpleware.*; /** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.4.3 * on 10/29/09 7:28 PM from the specification file * <tt>C:/Documents and Settings/HP_Administrator/workspace/ximple-dev/com/ximpleware/xpath/scanner.flex</tt> */ class Yylex extends sym implements java_cup.runtime.Scanner { /** This character denotes the end of file */ public static final int YYEOF = -1; /** initial size of the lookahead buffer */ private static final int ZZ_BUFFERSIZE = 16384; /** lexical states */ public static final int YYINITIAL = 0; /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l * at the beginning of a line * l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0 }; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = "\11\0\1\1\1\1\2\0\1\1\22\0\1\1\1\20\1\55\1\0"+ "\1\21\1\0\1\0\1\56\1\11\1\12\1\22\1\6\1\10\1\4"+ "\1\5\1\23\12\2\1\3\1\0\1\16\1\17\1\15\1\0\1\7"+ "\15\0\1\53\2\0\1\52\11\0\1\13\1\0\1\14\1\0\1\0"+ "\1\0\1\31\1\47\1\41\1\24\1\43\1\50\1\44\1\46\1\25"+ "\2\0\1\35\1\27\1\32\1\30\1\40\1\0\1\33\1\36\1\37"+ "\1\42\1\26\1\45\1\54\1\0\1\51\1\0\1\34\uff83\0"; /** * Translates characters to character classes */ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); /** * Translates DFA states to action switch labels. */ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7"+ "\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17"+ "\1\20\1\4\1\21\1\22\1\23\7\1\1\24\12\1"+ "\2\4\1\0\2\3\1\25\1\26\1\27\1\30\1\31"+ "\4\1\1\32\35\1\1\0\1\33\1\0\1\1\1\34"+ "\1\35\2\1\1\36\1\37\55\1\1\0\1\40\2\1"+ "\1\0\1\41\12\1\1\0\1\42\36\1\2\0\1\1"+ "\1\0\1\43\6\1\1\0\1\44\1\0\1\45\3\1"+ "\2\0\1\1\1\0\1\46\2\0\31\1\1\47\3\1"+ "\1\0\1\1\1\50\6\1\1\0\1\51\1\1\1\52"+ "\11\1\1\0\1\53\1\1\2\0\6\1\1\0\1\54"+ "\1\0\1\55\1\0\1\56\6\1\1\0\1\57\5\1"+ "\1\0\1\1\1\60\3\1\2\0\6\1\1\0\1\61"+ "\1\1\1\0\1\62\25\1\1\0\1\63\3\1\3\0"+ "\1\64\1\1\1\0\1\65\4\1\1\0\1\66\3\1"+ "\2\0\14\1\1\0\1\67\3\1\1\70\1\0\1\71"+ "\7\1\1\0\1\72\1\1\2\0\1\1\2\0\7\1"+ "\1\0\1\1\1\73\1\0\1\74\1\1\2\0\3\1"+ "\1\0\1\75\2\1\2\0\1\1\2\0\1\1\1\0"+ "\1\76\1\1\1\0\1\77\1\1\1\0\1\100\3\1"+ "\1\0\1\1\1\101\1\0\1\102\5\1\1\0\1\103"+ "\2\1\1\0\1\104\2\1\1\0\1\105\1\1\1\0"+ "\1\106\7\1\1\0\1\107\34\1\1\0\1\1\1\110"+ "\1\1\1\0\1\111\1\1\1\0\1\112\24\1\1\0"+ "\1\113\4\1\1\0\1\114\5\1\1\0\1\115\4\1"+ "\1\0\1\116\2\1\2\0\5\1\1\0\1\117\5\1"+ "\1\0\1\120\2\1\1\0\1\121\3\1\2\0\1\1"+ "\4\0\2\1\1\0\1\122\2\1\1\0\1\123\1\1"+ "\1\0\1\124\1\0\1\125\14\1\1\0\1\126\1\1"+ "\1\0\1\127\2\1\2\0\2\1\1\130\3\0\1\131"+ "\1\0\1\132\2\0\1\133\1\134"; private static int [] zzUnpackAction() { int [] result = new int[618]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } private static int zzUnpackAction(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** * Translates a state to a row index in the transition table */ private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\57\0\136\0\215\0\274\0\274\0\353\0\274"+ "\0\274\0\274\0\274\0\274\0\274\0\274\0\u011a\0\u0149"+ "\0\274\0\u0178\0\274\0\274\0\u01a7\0\u01d6\0\u0205\0\u0234"+ "\0\u0263\0\u0292\0\u02c1\0\u02f0\0\274\0\u031f\0\u034e\0\u037d"+ "\0\u03ac\0\u03db\0\u040a\0\u0439\0\u0468\0\u0497\0\u04c6\0\u04f5"+ "\0\u0524\0\u0553\0\u0582\0\u05b1\0\57\0\274\0\274\0\274"+ "\0\274\0\u05e0\0\u060f\0\u063e\0\u066d\0\57\0\u069c\0\u06cb"+ "\0\u06fa\0\u0729\0\u0758\0\u0787\0\u07b6\0\u07e5\0\u0814\0\u0843"+ "\0\u0872\0\u08a1\0\u08d0\0\u08ff\0\u092e\0\u095d\0\u098c\0\u09bb"+ "\0\u09ea\0\u0a19\0\u0a48\0\u0a77\0\u0aa6\0\u0ad5\0\u0b04\0\u0b33"+ "\0\u0b62\0\u0b91\0\u0bc0\0\u04f5\0\274\0\u0524\0\u0bef\0\274"+ "\0\57\0\u0c1e\0\u0c4d\0\57\0\57\0\u0c7c\0\u0cab\0\u0cda"+ "\0\u0d09\0\u0d38\0\u0d67\0\u0d96\0\u0dc5\0\u0df4\0\u0e23\0\u0e52"+ "\0\u0e81\0\u0eb0\0\u0edf\0\u0f0e\0\u0f3d\0\u0f6c\0\u0f9b\0\u0fca"+ "\0\u0ff9\0\u1028\0\u1057\0\u1086\0\u10b5\0\u10e4\0\u1113\0\u1142"+ "\0\u1171\0\u11a0\0\u11cf\0\u11fe\0\u122d\0\u125c\0\u128b\0\u12ba"+ "\0\u12e9\0\u1318\0\u1347\0\u1376\0\u13a5\0\u13d4\0\u1403\0\u1432"+ "\0\u1461\0\u1490\0\u14bf\0\274\0\u14ee\0\u151d\0\u154c\0\274"+ "\0\u157b\0\u15aa\0\u15d9\0\u1608\0\u1637\0\u1666\0\u1695\0\u16c4"+ "\0\u16f3\0\u1722\0\u1751\0\274\0\u1780\0\u17af\0\u17de\0\u180d"+ "\0\u183c\0\u186b\0\u189a\0\u18c9\0\u18f8\0\u1927\0\u1956\0\u1985"+ "\0\u19b4\0\u19e3\0\u1a12\0\u1a41\0\u1a70\0\u1a9f\0\u1ace\0\u1afd"+ "\0\u1b2c\0\u1b5b\0\u1b8a\0\u1bb9\0\u1be8\0\u1c17\0\u1c46\0\u1c75"+ "\0\u1ca4\0\u1cd3\0\u1d02\0\u1d31\0\u1d60\0\u1d8f\0\274\0\u1dbe"+ "\0\u1ded\0\u1e1c\0\u1e4b\0\u1e7a\0\u1ea9\0\u1ed8\0\274\0\u1f07"+ "\0\274\0\u1f36\0\u1f65\0\u1f94\0\u1fc3\0\u1ff2\0\u2021\0\u2050"+ "\0\274\0\u207f\0\u20ae\0\u20dd\0\u210c\0\u213b\0\u216a\0\u2199"+ "\0\u21c8\0\u21f7\0\u2226\0\u2255\0\u2284\0\u22b3\0\u22e2\0\u2311"+ "\0\u2340\0\u236f\0\u239e\0\u23cd\0\u23fc\0\u242b\0\u245a\0\u2489"+ "\0\u24b8\0\u24e7\0\u2516\0\u2545\0\274\0\u2574\0\u25a3\0\u25d2"+ "\0\u2601\0\u2630\0\274\0\u265f\0\u268e\0\u26bd\0\u26ec\0\u271b"+ "\0\u274a\0\u2779\0\274\0\u27a8\0\274\0\u27d7\0\u2806\0\u2835"+ "\0\u2864\0\u2893\0\u28c2\0\u28f1\0\u2920\0\u294f\0\u297e\0\274"+ "\0\u29ad\0\u29dc\0\u2a0b\0\u2a3a\0\u2a69\0\u2a98\0\u2ac7\0\u2af6"+ "\0\u2b25\0\u2b54\0\274\0\u2b83\0\274\0\u2bb2\0\274\0\u2be1"+ "\0\u2c10\0\u2c3f\0\u2c6e\0\u2c9d\0\u2ccc\0\u2cfb\0\274\0\u2d2a"+ "\0\u2d59\0\u2d88\0\u2db7\0\u2de6\0\u2e15\0\u2e44\0\274\0\u2e73"+ "\0\u2ea2\0\u2ed1\0\u2f00\0\u2f2f\0\u2f5e\0\u2f8d\0\u2fbc\0\u2feb"+ "\0\u301a\0\u3049\0\u3078\0\274\0\u30a7\0\u30d6\0\274\0\u3105"+ "\0\u3134\0\u3163\0\u3192\0\u31c1\0\u31f0\0\u321f\0\u324e\0\u327d"+ "\0\u32ac\0\u32db\0\u330a\0\u3339\0\u3368\0\u3397\0\u33c6\0\u33f5"+ "\0\u3424\0\u3453\0\u3482\0\u34b1\0\u34e0\0\274\0\u350f\0\u353e"+ "\0\u356d\0\u359c\0\u35cb\0\u35fa\0\274\0\u3629\0\u3658\0\274"+ "\0\u3687\0\u36b6\0\u36e5\0\u3714\0\u3743\0\274\0\u3772\0\u37a1"+ "\0\u37d0\0\u37ff\0\u382e\0\u385d\0\u388c\0\u38bb\0\u38ea\0\u3919"+ "\0\u3948\0\u3977\0\u39a6\0\u39d5\0\u3a04\0\u3a33\0\u3a62\0\u3a91"+ "\0\274\0\u3ac0\0\u3aef\0\u3b1e\0\274\0\u3b4d\0\274\0\u3b7c"+ "\0\u3bab\0\u3bda\0\u3c09\0\u3c38\0\u3c67\0\u3c96\0\u3cc5\0\274"+ "\0\u3cf4\0\u3d23\0\u3d52\0\u3d81\0\u3db0\0\u3ddf\0\u3e0e\0\u3e3d"+ "\0\u3e6c\0\u3e9b\0\u3eca\0\u3ef9\0\u3f28\0\u3f57\0\u3f86\0\274"+ "\0\u3fb5\0\274\0\u3fe4\0\u4013\0\u4042\0\u4071\0\u40a0\0\u40cf"+ "\0\u40fe\0\274\0\u412d\0\u415c\0\u418b\0\u41ba\0\u41e9\0\u4218"+ "\0\u4247\0\u4276\0\u42a5\0\274\0\u42d4\0\u4303\0\274\0\u4332"+ "\0\u4361\0\274\0\u4390\0\u43bf\0\u43ee\0\u441d\0\u444c\0\274"+ "\0\u447b\0\274\0\u44aa\0\u44d9\0\u4508\0\u4537\0\u4566\0\u4595"+ "\0\274\0\u45c4\0\u45f3\0\u4622\0\274\0\u4651\0\u4680\0\u46af"+ "\0\274\0\u46de\0\u470d\0\274\0\u473c\0\u476b\0\u479a\0\u47c9"+ "\0\u47f8\0\u4827\0\u4856\0\u4885\0\274\0\u48b4\0\u48e3\0\u4912"+ "\0\u4941\0\u4970\0\u499f\0\u49ce\0\u49fd\0\u4a2c\0\u4a5b\0\u4a8a"+ "\0\u4ab9\0\u4ae8\0\u4b17\0\u4b46\0\u4b75\0\u4ba4\0\u4bd3\0\u4c02"+ "\0\u4c31\0\u4c60\0\u4c8f\0\u4cbe\0\u4ced\0\u4d1c\0\u4d4b\0\u4d7a"+ "\0\u4da9\0\u4dd8\0\u4e07\0\274\0\u4e36\0\u4e65\0\274\0\u4e94"+ "\0\u4ec3\0\274\0\u4ef2\0\u4f21\0\u4f50\0\u4f7f\0\u4fae\0\u4fdd"+ "\0\u500c\0\u503b\0\u506a\0\u5099\0\u50c8\0\u50f7\0\u5126\0\u5155"+ "\0\u5184\0\u51b3\0\u51e2\0\u5211\0\u5240\0\u526f\0\u529e\0\274"+ "\0\u52cd\0\u52fc\0\u532b\0\u535a\0\u5389\0\274\0\u53b8\0\u53e7"+ "\0\u5416\0\u5445\0\u5474\0\u54a3\0\274\0\u54d2\0\u5501\0\u5530"+ "\0\u555f\0\u558e\0\274\0\u55bd\0\u55ec\0\u561b\0\u564a\0\u5679"+ "\0\u56a8\0\u56d7\0\u5706\0\u5735\0\u5764\0\274\0\u5793\0\u57c2"+ "\0\u57f1\0\u5820\0\u584f\0\u587e\0\274\0\u58ad\0\u58dc\0\u590b"+ "\0\274\0\u593a\0\u5969\0\u5998\0\u59c7\0\u59f6\0\u5a25\0\u5a54"+ "\0\u5a83\0\u5ab2\0\u5ae1\0\u5b10\0\u5b3f\0\u5b6e\0\274\0\u5b9d"+ "\0\u5bcc\0\u5bfb\0\274\0\u5c2a\0\u5c59\0\274\0\u5c88\0\274"+ "\0\u5cb7\0\u5ce6\0\u5d15\0\u5d44\0\u5d73\0\u5da2\0\u5dd1\0\u5e00"+ "\0\u5e2f\0\u5e5e\0\u5e8d\0\u5ebc\0\u5eeb\0\274\0\u5f1a\0\u5f49"+ "\0\274\0\u5f78\0\u5fa7\0\u5fd6\0\u6005\0\u6034\0\u6063\0\274"+ "\0\u6092\0\u60c1\0\u60f0\0\274\0\u611f\0\274\0\u614e\0\u617d"+ "\0\274\0\274"; private static int [] zzUnpackRowMap() { int [] result = new int[618]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } private static int zzUnpackRowMap(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } /** * The transition table of the DFA */ private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11"+ "\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21"+ "\1\22\1\23\1\24\1\25\1\26\1\27\1\2\1\30"+ "\1\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40"+ "\1\41\1\42\1\43\1\44\3\2\1\45\1\46\1\2"+ "\1\47\2\2\1\50\1\51\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\20\2\3\0\1\3\57\0"+ "\1\4\2\0\1\53\130\0\1\2\1\0\1\54\1\52"+ "\1\2\1\55\16\0\10\2\1\0\20\2\21\0\1\56"+ "\56\0\1\57\56\0\1\60\62\0\1\61\33\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\2\1\62\6\2"+ "\1\0\6\2\1\63\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\7\2\1\64\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\65"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\66\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\67\1\2"+ "\1\0\2\2\1\70\7\2\1\71\5\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\72\1\73"+ "\2\2\1\0\5\2\1\74\12\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\4\2\1\75\3\2\1\0"+ "\6\2\1\76\11\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\4\2\1\77\1\100\2\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\2\2\1\101\2\2\1\102\1\103\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\104"+ "\1\0\6\2\1\105\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\106\1\107\1\2\1\110"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\111\3\2\1\0\6\2\1\112\2\2"+ "\1\113\6\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\3\2\1\114\14\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\115\1\2"+ "\1\0\1\2\1\116\16\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\117\3\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\4\2"+ "\1\120\1\121\2\2\1\0\1\122\17\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\16\2"+ "\1\123\1\2\2\0\55\124\1\125\1\124\56\126\1\125"+ "\1\127\1\0\1\127\1\0\2\127\14\0\1\130\1\0"+ "\10\127\1\0\20\127\4\0\1\53\54\0\1\2\1\0"+ "\1\54\1\52\2\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\2\2\1\131"+ "\5\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\2\1\132\16\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\133"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\134\7\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\135\7\2\1\0"+ "\4\2\1\136\13\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\137\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\1\2\1\140\16\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\141\6\2\1\142\1\0\2\2\1\143"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\144\4\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\3\2\1\145\4\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\5\2\1\146\12\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\147"+ "\16\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\4\2\1\150\3\2\1\151\7\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\6\2\1\152"+ "\1\2\1\0\1\2\1\153\16\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\5\2\1\154\1\2\1\155"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\3\2\1\156\4\2\1\0\12\2\1\157\5\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\1\160\17\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\161\2\2\1\0\5\2\1\162"+ "\12\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\17\2\1\163\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\164\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\165\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\4\2\1\166\3\2\1\0\6\2\1\167"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\170\2\2\1\171\2\2\1\172\1\2\1\0\5\2"+ "\1\173\12\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\174\6\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\2\1\175\6\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\3\2\1\176\14\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\177\7\2\1\0"+ "\4\2\1\200\13\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\4\2\1\201\13\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\202"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\203\17\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\204"+ "\17\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\4\2\1\205\3\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\5\2\1\206\2\2\1\0"+ "\20\2\2\0\1\127\1\0\1\127\1\0\2\127\16\0"+ "\10\127\1\0\20\127\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\4\2\1\207\13\2\2\0"+ "\1\2\1\0\1\2\1\52\1\210\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\211\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\212\1\0"+ "\20\2\2\0\1\2\1\213\1\2\1\52\2\2\3\0"+ "\1\214\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\215"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\216\4\2\1\0\20\2\2\0\1\2\1\217"+ "\1\2\1\52\2\2\3\0\1\220\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\6\2\1\221\11\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\12\2\1\222"+ "\5\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\6\2\1\223\1\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\4\2\1\224\3\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\5\2\1\225\2\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\226"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\7\2\1\227\10\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\230"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\231\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\232\6\2\1\0\20\2"+ "\2\0\1\2\1\233\1\2\1\52\2\2\3\0\1\234"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\235\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\13\2\1\236\4\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\6\2\1\237\1\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\240\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\2\2\1\241\15\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\242\6\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\243\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\4\2\1\244\13\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\4\2\1\245\13\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\246\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\3\2\1\247\4\2\1\0\3\2"+ "\1\250\14\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\251\1\2\1\252\13\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\6\2"+ "\1\253\1\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\254\17\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\1\255\17\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\256\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\2"+ "\1\257\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\260\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\5\2\1\261\2\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\262\17\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\263\17\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\1\2\1\264\16\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\265\3\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\3\2"+ "\1\266\4\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\267\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\2\2\1\270\15\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\271\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\272\6\2\1\0\20\2\3\0\1\213\7\0\1\214"+ "\45\0\1\2\1\273\1\2\1\52\2\2\3\0\1\274"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\5\2\1\275\2\2\1\0\20\2"+ "\3\0\1\217\7\0\1\220\45\0\1\2\1\276\1\2"+ "\1\52\2\2\3\0\1\277\12\0\10\2\1\0\1\2"+ "\1\300\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\301\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\302\7\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\303\17\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\304\17\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\305"+ "\1\0\20\2\2\0\1\2\1\306\1\2\1\52\2\2"+ "\3\0\1\307\12\0\10\2\1\0\20\2\2\0\1\2"+ "\1\310\1\2\1\52\2\2\3\0\1\311\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\312\15\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\313\1\2"+ "\1\0\20\2\3\0\1\233\7\0\1\234\45\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\314\15\2\2\0\1\2\1\315\1\2\1\316\2\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\317\16\2"+ "\2\0\1\2\1\320\1\2\1\52\2\2\3\0\1\321"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\322\1\2"+ "\1\52\2\2\3\0\1\323\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\2\2\1\324\15\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\6\2\1\325\1\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\326\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\327\11\2"+ "\2\0\1\2\1\0\1\2\1\52\1\330\1\2\16\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\331\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\5\2\1\332"+ "\2\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\333\2\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\5\2\1\334"+ "\2\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\335\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\336"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\337\7\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\340\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\341\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\342\7\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\3\2\1\343\14\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\344\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\345"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\346\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\347"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\350\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\351\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\352\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\353\15\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\12\2\1\354\5\2\3\0\1\273"+ "\7\0\1\274\46\0\1\274\10\0\1\355\44\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\356"+ "\17\2\3\0\1\276\7\0\1\277\45\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\3\2\1\357"+ "\14\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\360\1\0\20\2\2\0\1\2\1\361\1\2"+ "\1\52\1\362\1\2\3\0\1\363\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\2\2\1\364\5\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\1\365\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\1\366\1\2\16\0"+ "\10\2\1\0\20\2\3\0\1\306\7\0\1\307\46\0"+ "\1\310\7\0\1\311\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\2\1\367\16\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\7\2\1\370\10\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\371\1\0\20\2\3\0\1\315"+ "\1\0\1\372\53\0\1\127\1\0\1\127\1\373\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\374"+ "\17\2\3\0\1\320\7\0\1\321\46\0\1\322\7\0"+ "\1\323\46\0\1\323\10\0\1\375\44\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\1\2\1\376\6\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\2\2\1\377\15\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\u0100"+ "\16\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\u0101\7\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\3\2\1\u0102\14\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\6\2"+ "\1\u0103\1\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\7\2\1\u0104\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\u0105"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u0106\15\2\2\0"+ "\1\2\1\u0107\1\2\1\52\2\2\3\0\1\u0108\12\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u0109\1\2\1\0\20\2\2\0"+ "\1\2\1\u010a\1\2\1\u010b\2\2\16\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\u010c\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\10\2\1\u010d\7\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\u010e\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u010f\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u0110\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\10\2\1\u0111\7\2"+ "\2\0\1\2\1\u0112\1\2\1\52\2\2\3\0\1\u0113"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\u0114\1\2"+ "\1\52\2\2\3\0\1\u0115\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\u0116\1\2\1\52\2\2\3\0\1\u0117"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\u0118\7\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\1\u0119\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\u011a\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\5\2"+ "\1\u011b\12\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u011c\6\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\5\2\1\u011d\2\2"+ "\1\0\20\2\2\0\1\2\1\u011e\1\2\1\52\2\2"+ "\3\0\1\u011f\12\0\10\2\1\0\20\2\3\0\1\361"+ "\7\0\1\363\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\11\2\1\u0120\6\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\6\2"+ "\1\u0121\11\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\6\2\1\u0122\1\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\4\2"+ "\1\u0123\13\2\2\0\1\2\1\0\1\2\1\52\1\u0124"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\u0125"+ "\1\2\1\52\1\u0126\1\2\3\0\1\u0127\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u0128\6\2\1\0\20\2\5\0\1\373"+ "\53\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u0129\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\u012a\3\2\1\0\20\2"+ "\2\0\1\2\1\u012b\1\2\1\u012c\2\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\2\1\u012d\16\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\1\2\1\u012e\6\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\4\2\1\u012f\3\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u0130\15\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\u0131\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0132\1\2"+ "\1\0\20\2\2\0\1\2\1\u0133\1\2\1\52\2\2"+ "\3\0\1\u0134\12\0\10\2\1\0\20\2\3\0\1\u0107"+ "\7\0\1\u0108\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\7\2\1\u0135\10\2\3\0\1\u010a"+ "\1\0\1\u0136\53\0\1\127\1\0\1\127\1\u0137\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\4\2"+ "\1\u0138\13\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u0139\6\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\1\u013a\1\2\16\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\u013b\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\6\2\1\u013c\1\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\u013d\6\2\1\0\20\2\3\0\1\u0112\7\0\1\u0113"+ "\46\0\1\u0114\7\0\1\u0115\46\0\1\u0116\7\0\1\u0117"+ "\45\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u013e\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\5\2\1\u013f\12\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\u0140\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u0141\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\14\2\1\u0142\3\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\4\2\1\u0143\13\2\3\0"+ "\1\u011e\7\0\1\u011f\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\u0144\2\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\1\u0145\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\5\2\1\u0146\2\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\5\2\1\u0147\2\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\10\2\1\u0148\7\2\3\0\1\u0125"+ "\7\0\1\u0127\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\u0149\17\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\6\2\1\u014a\1\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\2\2\1\u014b\15\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\6\2\1\u014c\1\2\1\0"+ "\20\2\3\0\1\u012b\1\0\1\u014d\53\0\1\127\1\0"+ "\1\127\1\u014e\2\127\14\0\1\130\1\0\10\127\1\0"+ "\20\127\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\2\1\u014f\6\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\6\2\1\u0150\1\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\2\1\u0151\6\2\1\0\20\2\2\0\1\2\1\u0152"+ "\1\2\1\52\2\2\3\0\1\u0153\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\u0154\1\2\1\52\2\2\3\0"+ "\1\u0155\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\u0156"+ "\16\2\3\0\1\u0133\7\0\1\u0134\45\0\1\2\1\u0157"+ "\1\2\1\52\2\2\3\0\1\u0158\12\0\10\2\1\0"+ "\20\2\5\0\1\u0137\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\u0159\2\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\2\2\1\u015a\15\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\13\2\1\u015b\4\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\11\2\1\u015c\6\2\2\0\1\2\1\u015d\1\2\1\52"+ "\2\2\3\0\1\u015e\12\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\6\2\1\u015f"+ "\1\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u0160\1\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\u0161"+ "\1\0\20\2\2\0\1\2\1\u0162\1\2\1\u0163\1\u0164"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u0165"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\6\2\1\u0166\11\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u0167"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\u0168\17\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\15\2\1\u0169\2\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\3\2"+ "\1\u016a\4\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\u016b\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\u016c\6\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u016d\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\7\2\1\u016e\10\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u016f\11\2"+ "\2\0\1\2\1\u0170\1\2\1\52\2\2\3\0\1\u0171"+ "\12\0\10\2\1\0\20\2\5\0\1\u014e\53\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0172\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\7\2\1\u0173\10\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0174\1\2"+ "\1\0\20\2\3\0\1\u0152\7\0\1\u0153\46\0\1\u0153"+ "\10\0\1\u0175\45\0\1\u0154\7\0\1\u0155\45\0\1\2"+ "\1\u0176\1\2\1\52\2\2\3\0\1\u0177\12\0\10\2"+ "\1\0\20\2\3\0\1\u0157\7\0\1\u0158\45\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\2"+ "\1\u0178\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\11\2\1\u0179\6\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\u017a\3\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\u017b\15\2\3\0\1\u015d"+ "\7\0\1\u015e\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\7\2\1\u017c\10\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u017d\15\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u017e\6\2\1\0\20\2\3\0\1\u0162"+ "\1\0\1\u017f\53\0\1\127\1\0\1\127\1\u0180\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\u0181\3\2"+ "\1\0\20\2\2\0\1\2\1\u0182\1\2\1\u0183\2\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\1\u0184\1\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\u0185\1\2\1\u0186\1\u0187\1\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\13\2\1\u0188\4\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\16\2"+ "\1\u0189\1\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\u018a\11\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\6\2"+ "\1\u018b\11\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\2\2\1\u018c\15\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u018d\1\2"+ "\1\0\20\2\2\0\1\2\1\u018e\1\2\1\52\1\u018f"+ "\1\2\3\0\1\u0190\12\0\10\2\1\0\20\2\2\0"+ "\1\2\1\u0191\1\2\1\52\2\2\3\0\1\u0192\12\0"+ "\10\2\1\0\20\2\3\0\1\u0170\7\0\1\u0171\45\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\7\2\1\u0193\10\2\2\0\1\2\1\u0194\1\2\1\u0195"+ "\1\u0196\1\2\16\0\10\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u0197\15\2\3\0\1\u0176\7\0\1\u0177\45\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\6\2"+ "\1\u0198\11\2\2\0\1\2\1\u0199\1\2\1\52\2\2"+ "\3\0\1\u019a\12\0\10\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\u019b\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\u019c\4\2\1\0\20\2\2\0\1\2\1\u019d"+ "\1\2\1\u019e\1\u019f\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\u01a0\1\2\1\u01a1\1\u01a2\1\2\16\0"+ "\10\2\1\0\20\2\2\0\1\2\1\u01a3\1\2\1\52"+ "\2\2\3\0\1\u01a4\12\0\10\2\1\0\20\2\5\0"+ "\1\u0180\53\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\u01a5\1\0\20\2\3\0\1\u0182\1\0\1\u01a6"+ "\53\0\1\127\1\0\1\127\1\u01a7\2\127\14\0\1\130"+ "\1\0\10\127\1\0\20\127\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\u01a8\16\2"+ "\3\0\1\u0185\1\0\1\u01a9\53\0\1\127\1\0\1\127"+ "\1\u01aa\2\127\14\0\1\130\1\0\10\127\1\0\20\127"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\5\2\1\u01ab\12\2\2\0\1\2\1\0\1\2"+ "\1\52\1\u01ac\1\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\5\2\1\u01ad"+ "\2\2\1\0\20\2\2\0\1\2\1\u01ae\1\2\1\52"+ "\1\u01af\1\2\3\0\1\u01b0\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\u01b1\1\2\1\52\2\2\3\0\1\u01b2"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\11\2\1\u01b3\6\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\7\2\1\u01b4\10\2\3\0\1\u018e\7\0\1\u0190"+ "\45\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u01b5\2\2\1\0\12\2\1\u01b6\5\2\3\0\1\u0191"+ "\7\0\1\u0192\45\0\1\2\1\0\1\2\1\52\1\u01b7"+ "\1\2\16\0\10\2\1\0\20\2\3\0\1\u0194\1\0"+ "\1\u01b8\53\0\1\127\1\0\1\127\1\u01b9\2\127\14\0"+ "\1\130\1\0\10\127\1\0\20\127\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\2\1\u01ba"+ "\16\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\2\1\u01bb\16\2\2\0\1\2\1\u01bc"+ "\1\2\1\52\2\2\3\0\1\u01bd\12\0\10\2\1\0"+ "\20\2\3\0\1\u0199\7\0\1\u019a\45\0\1\2\1\0"+ "\1\2\1\52\1\u01be\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\1\u01bf\17\2\3\0\1\u019d\1\0\1\u01c0\53\0"+ "\1\127\1\0\1\127\1\u01c1\2\127\14\0\1\130\1\0"+ "\10\127\1\0\20\127\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\2\1\u01c2\16\2\3\0"+ "\1\u01a0\1\0\1\u01c3\53\0\1\127\1\0\1\127\1\u01c4"+ "\2\127\14\0\1\130\1\0\10\127\1\0\20\127\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\u01c5"+ "\3\2\1\0\20\2\3\0\1\u01a3\7\0\1\u01a4\45\0"+ "\1\2\1\0\1\2\1\52\1\u01c6\1\2\16\0\10\2"+ "\1\0\20\2\5\0\1\u01a7\53\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\3\2\1\u01c7\14\2"+ "\5\0\1\u01aa\53\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\7\2\1\u01c8\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\u01c9"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\u01ca\4\2\1\0\20\2\3\0\1\u01ae\7\0"+ "\1\u01b0\45\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\13\2\1\u01cb\4\2\3\0\1\u01b1\7\0"+ "\1\u01b2\45\0\1\2\1\u01cc\1\2\1\52\2\2\3\0"+ "\1\u01cd\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\u01ce"+ "\15\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\13\2\1\u01cf\4\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u01d0"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\2\1\u01d1\6\2\1\0\20\2\5\0\1\u01b9\53\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\1\2\1\u01d2"+ "\6\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\1\u01d3\1\2\16\0\10\2\1\0\20\2\3\0\1\u01bc"+ "\7\0\1\u01bd\45\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\5\2\1\u01d4\12\2\2\0\1\2"+ "\1\0\1\2\1\52\1\u01d5\1\2\16\0\10\2\1\0"+ "\20\2\5\0\1\u01c1\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\2\1\u01d6\6\2\1\0\20\2\5\0"+ "\1\u01c4\53\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\7\2\1\u01d7\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\1\2\1\u01d8\16\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\5\2"+ "\1\u01d9\2\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\u01da\6\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\4\2"+ "\1\u01db\3\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\6\2\1\u01dc\11\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\u01dd\1\0\20\2\3\0\1\u01cc\7\0\1\u01cd\45\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\11\2\1\u01de\6\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u01df\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\13\2\1\u01e0\4\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u01e1\1\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\12\2\1\u01e2\5\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\2\2\1\u01e3\15\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\7\2\1\u01e4"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\5\2\1\u01e5\12\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\12\2"+ "\1\u01e6\5\2\2\0\1\2\1\0\1\2\1\52\1\u01e7"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u01e8"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\4\2\1\u01e9\13\2\2\0\1\2\1\u01ea"+ "\1\2\1\52\1\u01eb\1\2\3\0\1\u01ec\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\1\u01ed"+ "\1\2\16\0\10\2\1\0\20\2\2\0\1\2\1\u01ee"+ "\1\2\1\52\2\2\3\0\1\u01ef\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\4\2\1\u01f0\3\2\1\0\20\2\2\0\1\2\1\u01f1"+ "\1\2\1\52\2\2\3\0\1\u01f2\12\0\10\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\6\2\1\u01f3\11\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\4\2\1\u01f4\3\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\1\2\1\u01f5\16\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\1\u01f6\17\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\4\2"+ "\1\u01f7\3\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\u01f8\6\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\7\2"+ "\1\u01f9\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\1\u01fa\17\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\1\2"+ "\1\u01fb\16\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\u01fc\17\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u01fd"+ "\11\2\3\0\1\u01ea\7\0\1\u01ec\45\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\13\2\1\u01fe"+ "\4\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\4\2\1\u01ff\3\2\1\0\6\2\1\u0200\11\2\3\0"+ "\1\u01ee\7\0\1\u01ef\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\3\2\1\u0201\4\2\1\0\20\2\3\0"+ "\1\u01f1\7\0\1\u01f2\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\u0202\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\u0203\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\2\2\1\u0204\15\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\1\2\1\u0205\6\2\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\1\u0206\1\2"+ "\16\0\10\2\1\0\20\2\2\0\1\2\1\u0207\1\2"+ "\1\52\2\2\3\0\1\u0208\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\1\2"+ "\1\u0209\6\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\1\2\1\u020a\6\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\10\2"+ "\1\0\6\2\1\u020b\11\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\13\2\1\u020c\4\2"+ "\2\0\1\2\1\u020d\1\2\1\52\2\2\3\0\1\u020e"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\4\2\1\u020f\2\2\1\u0210\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\1\u0211\7\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\2\2\1\u0212\5\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\1\u0213\1\2\16\0"+ "\10\2\1\0\20\2\2\0\1\2\1\u0214\1\2\1\52"+ "\2\2\3\0\1\u0215\12\0\10\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\6\2\1\u0216\11\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\u0217\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u0218\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\2\1\u0219\16\2\3\0\1\u0207"+ "\7\0\1\u0208\45\0\1\2\1\u021a\1\2\1\52\2\2"+ "\3\0\1\u021b\12\0\10\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\6\2\1\u021c\1\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\1\u021d\17\2\2\0\1\2\1\u021e"+ "\1\2\1\u021f\2\2\16\0\10\2\1\0\20\2\3\0"+ "\1\u020d\7\0\1\u020e\45\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\7\2\1\u0220\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\4\2\1\u0221\3\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\u0222\7\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\6\2\1\u0223"+ "\11\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\15\2\1\u0224\2\2\3\0\1\u0214\7\0"+ "\1\u0215\45\0\1\2\1\u0225\1\2\1\52\2\2\3\0"+ "\1\u0226\12\0\10\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\5\2\1\u0227"+ "\12\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\7\2\1\u0228\10\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\2\2\1\u0229"+ "\15\2\3\0\1\u021a\7\0\1\u021b\45\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\10\2\1\0\7\2\1\u022a"+ "\10\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\13\2\1\u022b\4\2\3\0\1\u021e\1\0"+ "\1\u022c\53\0\1\127\1\0\1\127\1\u022d\2\127\14\0"+ "\1\130\1\0\10\127\1\0\20\127\2\0\1\2\1\0"+ "\1\2\1\52\1\u022e\1\2\16\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\3\2"+ "\1\u022f\4\2\1\0\20\2\2\0\1\2\1\u0230\1\2"+ "\1\52\2\2\3\0\1\u0231\12\0\10\2\1\0\20\2"+ "\2\0\1\2\1\0\1\2\1\52\2\2\16\0\6\2"+ "\1\u0232\1\2\1\0\20\2\2\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\16\2\1\u0233\1\2"+ "\3\0\1\u0225\7\0\1\u0226\45\0\1\2\1\0\1\2"+ "\1\52\2\2\16\0\10\2\1\0\4\2\1\u0234\13\2"+ "\2\0\1\2\1\u0235\1\2\1\u0236\2\2\16\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\7\2\1\u0237\1\0\20\2\2\0\1\2\1\u0238"+ "\1\2\1\u0239\2\2\16\0\10\2\1\0\20\2\2\0"+ "\1\2\1\u023a\1\2\1\u023b\2\2\16\0\10\2\1\0"+ "\20\2\5\0\1\u022d\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\3\2\1\u023c\14\2\2\0"+ "\1\2\1\0\1\2\1\52\1\u023d\1\2\16\0\10\2"+ "\1\0\20\2\3\0\1\u0230\7\0\1\u0231\45\0\1\2"+ "\1\u023e\1\2\1\52\2\2\3\0\1\u023f\12\0\10\2"+ "\1\0\20\2\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\5\2\1\u0240\2\2\1\0\20\2\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\10\2\1\0\2\2"+ "\1\u0241\15\2\3\0\1\u0235\1\0\1\u0242\53\0\1\127"+ "\1\0\1\127\1\u0243\2\127\14\0\1\130\1\0\10\127"+ "\1\0\20\127\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\1\2\1\u0244\6\2\1\0\20\2\3\0\1\u0238"+ "\1\0\1\u0245\53\0\1\127\1\0\1\127\1\u0246\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\3\0\1\u023a"+ "\1\0\1\u0247\53\0\1\127\1\0\1\127\1\u0248\2\127"+ "\14\0\1\130\1\0\10\127\1\0\20\127\2\0\1\2"+ "\1\0\1\2\1\52\2\2\16\0\7\2\1\u0249\1\0"+ "\20\2\2\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\10\2\1\0\15\2\1\u024a\2\2\3\0\1\u023e\7\0"+ "\1\u023f\45\0\1\2\1\0\1\2\1\52\2\2\16\0"+ "\3\2\1\u024b\4\2\1\0\20\2\2\0\1\2\1\0"+ "\1\2\1\52\2\2\16\0\1\2\1\u024c\6\2\1\0"+ "\20\2\5\0\1\u0243\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u024d\1\2\1\0\20\2\5\0"+ "\1\u0246\56\0\1\u0248\53\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\u024e\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\16\2\1\u024f\1\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\6\2\1\u0250\11\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\4\2\1\u0251"+ "\3\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\10\2\1\0\7\2\1\u0252\10\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\13\2\1\u0253\4\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\5\2\1\u0254\2\2\1\0\20\2\2\0"+ "\1\2\1\u0255\1\2\1\52\2\2\3\0\1\u0256\12\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\6\2\1\u0257\1\2\1\0\20\2\2\0"+ "\1\2\1\u0258\1\2\1\52\2\2\3\0\1\u0259\12\0"+ "\10\2\1\0\20\2\2\0\1\2\1\0\1\2\1\52"+ "\2\2\16\0\1\2\1\u025a\6\2\1\0\20\2\2\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\3\2\1\u025b"+ "\4\2\1\0\20\2\3\0\1\u0255\7\0\1\u0256\45\0"+ "\1\2\1\u025c\1\2\1\52\2\2\3\0\1\u025d\12\0"+ "\10\2\1\0\20\2\3\0\1\u0258\7\0\1\u0259\45\0"+ "\1\2\1\0\1\2\1\52\2\2\16\0\10\2\1\0"+ "\17\2\1\u025e\2\0\1\2\1\0\1\2\1\52\2\2"+ "\16\0\10\2\1\0\6\2\1\u025f\11\2\3\0\1\u025c"+ "\7\0\1\u025d\46\0\1\u025d\10\0\1\u0260\42\0\1\u0261"+ "\1\u0262\1\2\1\u0263\1\2\1\52\2\2\3\0\1\u0264"+ "\12\0\10\2\1\0\20\2\2\0\1\2\1\u0265\1\2"+ "\1\52\2\2\3\0\1\u0266\12\0\10\2\1\0\20\2"+ "\2\0\55\u0261\1\u0267\1\u0261\56\u0262\1\u0268\1\0\1\u0263"+ "\7\0\1\u0264\46\0\1\u0265\7\0\1\u0266\46\0\1\u0267"+ "\10\0\1\u0269\45\0\1\u0268\10\0\1\u026a\44\0"; private static int [] zzUnpackTrans() { int [] result = new int[25004]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; } private static int zzUnpackTrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; private static final int ZZ_NO_MATCH = 1; private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\1\0\3\1\2\11\1\1\7\11\2\1\1\11\1\1"+ "\2\11\10\1\1\11\14\1\1\0\3\1\4\11\42\1"+ "\1\0\1\11\1\0\1\1\1\11\62\1\1\0\1\11"+ "\2\1\1\0\1\11\12\1\1\0\1\11\36\1\2\0"+ "\1\1\1\0\1\11\6\1\1\0\1\11\1\0\1\11"+ "\3\1\2\0\1\1\1\0\1\11\2\0\31\1\1\11"+ "\3\1\1\0\1\1\1\11\6\1\1\0\1\11\1\1"+ "\1\11\11\1\1\0\1\11\1\1\2\0\6\1\1\0"+ "\1\11\1\0\1\11\1\0\1\11\6\1\1\0\1\11"+ "\5\1\1\0\1\1\1\11\3\1\2\0\6\1\1\0"+ "\1\11\1\1\1\0\1\11\25\1\1\0\1\11\3\1"+ "\3\0\1\11\1\1\1\0\1\11\4\1\1\0\1\11"+ "\3\1\2\0\14\1\1\0\1\11\3\1\1\11\1\0"+ "\1\11\7\1\1\0\1\11\1\1\2\0\1\1\2\0"+ "\7\1\1\0\1\1\1\11\1\0\1\11\1\1\2\0"+ "\3\1\1\0\1\11\2\1\2\0\1\1\2\0\1\1"+ "\1\0\1\11\1\1\1\0\1\11\1\1\1\0\1\11"+ "\3\1\1\0\1\1\1\11\1\0\1\11\5\1\1\0"+ "\1\11\2\1\1\0\1\11\2\1\1\0\1\11\1\1"+ "\1\0\1\11\7\1\1\0\1\11\34\1\1\0\1\1"+ "\1\11\1\1\1\0\1\11\1\1\1\0\1\11\24\1"+ "\1\0\1\11\4\1\1\0\1\11\5\1\1\0\1\11"+ "\4\1\1\0\1\11\2\1\2\0\5\1\1\0\1\11"+ "\5\1\1\0\1\11\2\1\1\0\1\11\3\1\2\0"+ "\1\1\4\0\2\1\1\0\1\11\2\1\1\0\1\11"+ "\1\1\1\0\1\11\1\0\1\11\14\1\1\0\1\11"+ "\1\1\1\0\1\11\2\1\2\0\2\1\1\11\3\0"+ "\1\11\1\0\1\11\2\0\2\11"; private static int [] zzUnpackAttribute() { int [] result = new int[618]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } private static int zzUnpackAttribute(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** the input device */ private java.io.Reader zzReader; /** the current state of the DFA */ private int zzState; /** the current lexical state */ private int zzLexicalState = YYINITIAL; /** this buffer contains the current text to be matched and is the source of the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; /** the textposition at the last accepting state */ private int zzMarkedPos; /** the current text position in the buffer */ private int zzCurrentPos; /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; /** endRead marks the last character in the buffer, that has been read from input */ private int zzEndRead; /** number of newlines encountered up to the start of the matched text */ private int yyline; /** the number of characters up to the start of the matched text */ private int yychar; /** * the number of characters from the last newline up to the start of the * matched text */ private int yycolumn; /** * zzAtBOL == true <=> the scanner is currently at the beginning of a line */ private boolean zzAtBOL = true; /** zzAtEOF == true <=> the scanner is at the EOF */ private boolean zzAtEOF; /** denotes if the user-EOF-code has already been executed */ private boolean zzEOFDone; /* user code: */ private Symbol sym(int sym) { return new Symbol(sym); } private Symbol sym(int sym, Object val) { return new Symbol(sym, val); } int isName; NameType name; FuncName fname; Ntest ntest; AxisType at; int len; String literal; Double number; int colonPosition; public int getOffset(){ return yychar; } public String getArgument(char c, String input){ int os1=input.indexOf(c), os2=input.lastIndexOf(c); return input.substring(os1+1, os2); } /* public void report_error(String message, Object info) { //throw new XPathParseException("Syntax error during parsing"); } public void report_fatal_error(String message, Object info) throws XPathParseException{ throw new XPathParseException("Syntax error during parsing: "+ message); } public void syntax_error(Symbol cur_token) { } public void unrecovered_syntax_error(Symbol cur_token) throws XPathParseException{ throw new XPathParseException("XPath Syntax error: "+cur_token); }*/ /** * Creates a new scanner * There is also a java.io.InputStream version of this constructor. * * @param in the java.io.Reader to read input from. */ Yylex(java.io.Reader in) { isName = 1; colonPosition = -1; this.zzReader = in; } /** * Creates a new scanner. * There is also java.io.Reader version of this constructor. * * @param in the java.io.Inputstream to read input from. */ Yylex(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 138) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * Refills the input buffer. * * @return <code>false</code>, iff there was new input. * * @exception java.io.IOException if any I/O-Error occurs */ private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead-zzStartRead); /* translate stored positions */ zzEndRead-= zzStartRead; zzCurrentPos-= zzStartRead; zzMarkedPos-= zzStartRead; zzStartRead = 0; } /* is the buffer big enough? */ if (zzCurrentPos >= zzBuffer.length) { /* if not: blow it up */ char newBuffer[] = new char[zzCurrentPos*2]; System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); zzBuffer = newBuffer; } /* finally: fill the buffer with new input */ int numRead = zzReader.read(zzBuffer, zzEndRead, zzBuffer.length-zzEndRead); if (numRead > 0) { zzEndRead+= numRead; return false; } // unlikely but not impossible: read 0 characters, but not at end of stream if (numRead == 0) { int c = zzReader.read(); if (c == -1) { return true; } else { zzBuffer[zzEndRead++] = (char) c; return false; } } // numRead < 0 return true; } /** * Closes the input stream. */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); } /** * Resets the scanner to read from a new input stream. * Does not close the old reader. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>ZZ_INITIAL</tt>. * * @param reader the new input stream */ public final void yyreset(java.io.Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEOFDone = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; } /** * Returns the current lexical state. */ public final int yystate() { return zzLexicalState; } /** * Enters a new lexical state * * @param newState the new lexical state */ public final void yybegin(int newState) { zzLexicalState = newState; } /** * Returns the text matched by the current regular expression. */ public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); } /** * Returns the character at position <tt>pos</tt> from the * matched text. * * It is equivalent to yytext().charAt(pos), but faster * * @param pos the position of the character to fetch. * A value from 0 to yylength()-1. * * @return the character at position pos */ public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; } /** * Returns the length of the matched text region. */ public final int yylength() { return zzMarkedPos-zzStartRead; } /** * Reports an error that occured while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } /** * Contains user EOF-code, which will be executed exactly once, * when the end of file is reached */ private void zzDoEOF() throws java.io.IOException { if (!zzEOFDone) { zzEOFDone = true; yyclose(); } } /** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */ public java_cup.runtime.Symbol next_token() throws java.io.IOException, XPathParseException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; yychar+= zzMarkedPosL-zzStartRead; zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = ZZ_LEXSTATE[zzLexicalState]; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 57: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CONTAINS; fname = new FuncName(); fname.i = FuncName.CONTAINS; return sym(FNAME,fname); } case 93: break; case 74: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STRING_LENGTH; fname = new FuncName(); fname.i = FuncName.STRING_LENGTH; return sym(FNAME,fname); } case 94: break; case 55: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.POSITION; fname = new FuncName(); fname.i = FuncName.POSITION; return sym(FNAME,fname); } case 95: break; case 26: { if (isName == 0) { isName = 1 ; return sym(OR); } else { isName = 0; name = new NameType(); name.qname = "or"; return sym(NAME,name); } } case 96: break; case 24: { isName = 1 ; return sym(NE); } case 97: break; case 31: { if (isName == 0) { isName = 1 ; return sym(AND); } else { isName = 0; name = new NameType(); name.qname = "add"; return sym(NAME,name); } } case 98: break; case 12: { isName = 1 ; /*System.out.println( "[ returned");*/ return sym(LB); } case 99: break; case 85: { isName = 1; at = new AxisType(); at.i = AxisType.DESCENDANT_OR_SELF; return sym(AXISNAME,at); } case 100: break; case 62: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.IRI_TO_URI; fname = new FuncName(); fname.i = FuncName.IRI_TO_URI; return sym(FNAME,fname); } case 101: break; case 11: { isName = 0 ; return sym(RP); } case 102: break; case 37: { isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.LAST; return sym(FNAME,fname); } case 103: break; case 18: { if (isName ==0){ isName = 1; //System.out.println("returned a MULT"); return sym(MULT); } else { isName = 0; name = new NameType(); name.qname = "*"; return sym(NAME,name); } } case 104: break; case 89: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX; return sym(FNAME,fname); } case 105: break; case 71: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STARTS_WITH; fname = new FuncName(); fname.i = FuncName.STARTS_WITH; return sym(FNAME,fname); } case 106: break; case 8: { isName = 1 ; return sym(AT); } case 107: break; case 88: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = null; //System.out.println(" !!!!!!!!!!!argument "); return sym(NTEST,ntest); } case 108: break; case 6: { isName = 0 ; /*System.out.println(". returned ");*/ return sym(DOT); } case 109: break; case 28: { isName = 0; len = yytext().length(); name = new NameType(); if (!XMLChar.isNCNameStartChar(yytext().charAt(0))) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position 0"); for(int i=1;i<len-2;i++){ if (!XMLChar.isNCNameChar(yytext().charAt(i))) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position "+i); } name.prefix = yytext().substring(0,len-2); name.localname = "*"; name.qname = new String(yytext()); //System.out.println("NAME "+name+ " returned"); return sym(NAME,name); } case 110: break; case 66: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOWER_CASE; fname = new FuncName(); fname.i = FuncName.LOWER_CASE; return sym(FNAME,fname); } case 111: break; case 36: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LANG; fname = new FuncName(); fname.i = FuncName.LANG; return sym(FNAME,fname); } case 112: break; case 79: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING_BEFORE; fname = new FuncName(); fname.i = FuncName.SUBSTRING_BEFORE; return sym(FNAME,fname); } case 113: break; case 35: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAME; fname = new FuncName(); fname.i = FuncName.NAME; return sym(FNAME,fname); } case 114: break; case 39: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.NODE; ntest.arg = null; return sym(NTEST,ntest); } case 115: break; case 44: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.FALSE; fname = new FuncName(); fname.i = FuncName.FALSE; return sym(FNAME,fname); } case 116: break; case 65: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOCAL_NAME; fname = new FuncName(); fname.i = FuncName.LOCAL_NAME; return sym(FNAME,fname); } case 117: break; case 48: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STRING; fname = new FuncName(); fname.i = FuncName.STRING; return sym(FNAME,fname); } case 118: break; case 14: { isName = 1 ; return sym(GT); } case 119: break; case 56: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.COMMENT; ntest.arg = null; return sym(NTEST,ntest); } case 120: break; case 54: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.BOOLEAN; fname = new FuncName(); fname.i = FuncName.BOOLEAN; return sym(FNAME,fname); } case 121: break; case 1: { isName = 0; name = new NameType(); //name.qname = new String(yytext()); //System.out.println("returned a NAME ==>" + yytext()); //if (yytext().charAt(0) =='-'){ // throw new XPathParseException("Invalid char in name token:"+yytext()); //} name.qname = new String(yytext()); if (!XMLChar.isNCNameStartChar(name.qname.charAt(0))) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position 0"); for(int i=1;i<name.qname.length();i++){ if (!XMLChar.isNCNameChar(name.qname.charAt(i)) && name.qname.charAt(i)!=':' ) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position "+i); if (name.qname.charAt(i)==':'){ colonPosition = i; } } if (colonPosition != -1){ name.prefix = yytext().substring(0,colonPosition); name.localname = yytext().substring(colonPosition+1); } colonPosition = -1; return sym(NAME,name); } case 122: break; case 16: { isName = 1 ; return sym(EQ); } case 123: break; case 75: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ENCODE_FOR_URI; fname = new FuncName(); fname.i = FuncName.ENCODE_FOR_URI; return sym(FNAME,fname); } case 124: break; case 4: { throw new XPathParseException("Invalid char in XPath Expression"); } case 125: break; case 63: { isName = 1; at = new AxisType(); at.i = AxisType.ATTRIBUTE; return sym(AXISNAME,at); } case 126: break; case 3: { isName = 0; number = new Double(yytext()); //System.out.println("number returned ==> "+ Double.parseDouble(yytext())); return sym(NUMBER,number); } case 127: break; case 45: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.FLOOR; fname = new FuncName(); fname.i = FuncName.FLOOR; return sym(FNAME,fname); } case 128: break; case 34: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUM; fname = new FuncName(); fname.i = FuncName.SUM; return sym(FNAME,fname); } case 129: break; case 30: { if (isName == 0) { isName = 1 ; return sym(MOD); } else { isName = 0; name = new NameType(); name.qname = "mod"; //System.out.println("returned a NAME "+yytext()); return sym(NAME,name); } } case 130: break; case 29: { if (isName == 0 ) { isName = 1 ; return sym(DIV); } else { isName = 0; name = new NameType(); name.qname = "div"; return sym(NAME,name); } } case 131: break; case 27: { isName = 0; len = yytext().length(); literal = yytext().substring(1, len-1); return sym(LITERAL,literal); } case 132: break; case 19: { isName = 1 ; //System.out.println("SLASH returned "); return sym(SLASH); } case 133: break; case 32: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ABS; fname = new FuncName(); fname.i = FuncName.ABS; return sym(FNAME,fname); } case 134: break; case 15: { isName = 1 ; return sym(LT); } case 135: break; case 90: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FROM_QNAME; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI_FROM_QNAME; return sym(FNAME,fname); } case 136: break; case 25: { isName = 1 ; //System.out.println("DSLASH returned "); return sym(DSLASH); } case 137: break; case 13: { isName = 0 ; return sym(RB); } case 138: break; case 77: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING_AFTER; fname = new FuncName(); fname.i = FuncName.SUBSTRING_AFTER; return sym(FNAME,fname); } case 139: break; case 38: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.TRUE; fname = new FuncName(); fname.i = FuncName.TRUE; return sym(FNAME,fname); } case 140: break; case 53: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CEILING; fname = new FuncName(); fname.i = FuncName.CEILING; return sym(FNAME,fname); } case 141: break; case 17: { isName = 1; return sym(DOLLAR); } case 142: break; case 61: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ENDS_WITH; fname = new FuncName(); fname.i = FuncName.ENDS_WITH; return sym(FNAME,fname); } case 143: break; case 86: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOCAL_NAME_FROM_QNAME; fname = new FuncName(); fname.i = FuncName.LOCAL_NAME_FROM_QNAME; return sym(FNAME,fname); } case 144: break; case 21: { isName = 0 ; return sym(DDOT); } case 145: break; case 83: { isName = 1; at = new AxisType(); at.i = AxisType.PRECEDING_SIBLING; return sym(AXISNAME,at); } case 146: break; case 72: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI; return sym(FNAME,fname); } case 147: break; case 10: { isName = 1 ; return sym(LP); } case 148: break; case 7: { isName = 1 ; return sym(ADD); } case 149: break; case 60: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.TRANSLATE; fname = new FuncName(); fname.i = FuncName.TRANSLATE; return sym(FNAME,fname); } case 150: break; case 82: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_EVEN; fname = new FuncName(); fname.i = FuncName.ROUND_HALF_TO_EVEN; return sym(FNAME,fname); } case 151: break; case 43: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.COUNT; fname = new FuncName(); fname.i = FuncName.COUNT; return sym(FNAME,fname); } case 152: break; case 67: { isName = 1; at = new AxisType(); at.i = AxisType.PRECEDING; return sym(AXISNAME,at); } case 153: break; case 52: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.COMPARE; fname = new FuncName(); fname.i = FuncName.COMPARE; return sym(FNAME,fname); } case 154: break; case 9: { isName = 1 ; return sym(COMMA); } case 155: break; case 49: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CONCAT; fname = new FuncName(); fname.i = FuncName.CONCAT; return sym(FNAME,fname); } case 156: break; case 58: { isName = 1; at = new AxisType(); at.i = AxisType.ANCESTOR; return sym(AXISNAME,at); } case 157: break; case 50: { isName = 1; at = new AxisType(); at.i = AxisType.CHILD; return sym(AXISNAME,at); } case 158: break; case 46: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.QNAME; fname = new FuncName(); fname.i = FuncName.QNAME; return sym(FNAME,fname); } case 159: break; case 20: { isName = 1 ; return sym(UNION) ; } case 160: break; case 84: { isName = 1; at = new AxisType(); at.i = AxisType.FOLLOWING_SIBLING; return sym(AXISNAME,at); } case 161: break; case 5: { isName = 1 ; return sym(SUB); } case 162: break; case 33: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NOT; fname = new FuncName(); fname.i = FuncName.NOT; return sym(FNAME,fname); } case 163: break; case 47: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NUMBER; fname = new FuncName(); fname.i = FuncName.NUMBER; return sym(FNAME,fname); } case 164: break; case 68: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.UPPER_CASE; fname = new FuncName(); fname.i = FuncName.UPPER_CASE; return sym(FNAME,fname); } case 165: break; case 42: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.TEXT; ntest.arg = null; return sym(NTEST,ntest); } case 166: break; case 69: { isName = 1; at = new AxisType(); at.i = AxisType.FOLLOWING; return sym(AXISNAME,at); } case 167: break; case 91: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = getArgument('"',yytext()); //System.out.println(" !!!!!!!!!!!argument ==>" +ntest.arg); return sym(NTEST,ntest); } case 168: break; case 81: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_ODD; fname = new FuncName(); fname.i = FuncName.ROUND_HALF_TO_ODD; return sym(FNAME,fname); } case 169: break; case 22: { isName = 1 ; return sym(GE); } case 170: break; case 51: { isName = 1; at = new AxisType(); at.i = AxisType.PARENT; return sym(AXISNAME,at); } case 171: break; case 87: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CODE_POINTS_TO_STRING; fname = new FuncName(); fname.i = FuncName.CODE_POINTS_TO_STRING; return sym(FNAME,fname); } case 172: break; case 73: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.RESOLVE_QNAME; fname = new FuncName(); fname.i = FuncName.RESOLVE_QNAME; return sym(FNAME,fname); } case 173: break; case 80: { isName = 1; at = new AxisType(); at.i = AxisType.ANCESTOR_OR_SELF; return sym(AXISNAME,at); } case 174: break; case 2: { /* eat white space */ } case 175: break; case 64: { isName =1; at = new AxisType(); at.i = AxisType.NAMESPACE; return sym(AXISNAME,at); } case 176: break; case 76: { isName =1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NORMALIZE_SPACE; fname = new FuncName(); fname.i = FuncName.NORMALIZE_SPACE; return sym(FNAME,fname); } case 177: break; case 40: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND; fname = new FuncName(); fname.i = FuncName.ROUND; return sym(FNAME,fname); } case 178: break; case 41: { isName = 1; at = new AxisType(); at.i = AxisType.SELF; //System.out.println("SELF:: returned"); return sym(AXISNAME,at); } case 179: break; case 92: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = getArgument('\'', yytext()); //System.out.println(" !!!!!!!!!!!argument ==>" +ntest.arg); return sym(NTEST,ntest); } case 180: break; case 59: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING; fname = new FuncName(); fname.i = FuncName.SUBSTRING; return sym(FNAME,fname); } case 181: break; case 70: { isName = 1; at = new AxisType(); at.i = AxisType.DESCENDANT; return sym(AXISNAME,at); } case 182: break; case 78: { isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ESCAPE_HTML_URI; fname = new FuncName(); fname.i = FuncName.ESCAPE_HTML_URI; return sym(FNAME,fname); } case 183: break; case 23: { isName = 1 ; return sym(LE); } case 184: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; zzDoEOF(); { return new java_cup.runtime.Symbol(sym.EOF); } } else { zzScanError(ZZ_NO_MATCH); } } } } /** * Converts an int token code into the name of the * token by reflection on the cup symbol class/interface sym * * This code was contributed by Karl Meissner <[email protected]> */ private String getTokenName(int token) { try { java.lang.reflect.Field [] classFields = sym.class.getFields(); for (int i = 0; i < classFields.length; i++) { if (classFields[i].getInt(null) == token) { return classFields[i].getName(); } } } catch (Exception e) { e.printStackTrace(System.err); } return "UNKNOWN TOKEN"; } /** * Same as next_token but also prints the token to standard out * for debugging. * * This code was contributed by Karl Meissner <[email protected]> */ public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException, XPathParseException { java_cup.runtime.Symbol s = next_token(); System.out.println( " --"+ yytext() + "--" + getTokenName(s.sym) + "--"); return s; } /** * Runs the scanner on input files. * * This main method is the debugging routine for the scanner. * It prints debugging information about each returned token to * System.out until the end of file is reached, or an error occured. * * @param argv the command line, contains the filenames to run * the scanner on. */ public static void main(String argv[]) { if (argv.length == 0) { System.out.println("Usage : java Yylex <inputfile>"); } else { for (int i = 0; i < argv.length; i++) { Yylex scanner = null; try { scanner = new Yylex( new java.io.FileReader(argv[i]) ); while ( !scanner.zzAtEOF ) scanner.debug_next_token(); } catch (java.io.FileNotFoundException e) { System.out.println("File not found : \""+argv[i]+"\""); } catch (java.io.IOException e) { System.out.println("IO error scanning file \""+argv[i]+"\""); System.out.println(e); } catch (Exception e) { System.out.println("Unexpected exception:"); e.printStackTrace(); } } } } }
80,956
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
LocationPathNode.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/LocationPathNode.java
/* * Copyright (C) 2002-2011 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * This interface defines the method that * Step, NodeTest, and Predicate all implement * */ public interface LocationPathNode{ public boolean eval(VTDNav vn) throws NavException; }
1,060
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
AxisType.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/AxisType.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; /** * * This class is used by Yylex to detect axis type * and transport to the parser * */ public class AxisType{ public int i; public static final int CHILD0=0;// more efficient than child public static final int CHILD=1; public static final int DESCENDANT_OR_SELF0=2; public static final int DESCENDANT0=3; public static final int PRECEDING0 =4; public static final int FOLLOWING0 =5; public static final int DESCENDANT_OR_SELF=6; public static final int DESCENDANT=7; public static final int PRECEDING =8; public static final int FOLLOWING =9; public static final int PARENT= 10; public static final int ANCESTOR =11; public static final int ANCESTOR_OR_SELF =12; public static final int SELF =13; public static final int FOLLOWING_SIBLING =14; public static final int FOLLOWING_SIBLING0 =15; public static final int PRECEDING_SIBLING=16; public static final int PRECEDING_SIBLING0=17; public static final int ATTRIBUTE = 18; public static final int NAMESPACE =19; public AxisType (){ } final public String getAxisString(){ switch (i){ case CHILD0: case CHILD: return "child::"; case DESCENDANT_OR_SELF0: return "descendant-or-self::"; case DESCENDANT0: return "descendent::"; case PRECEDING0: return "preceding::"; case FOLLOWING0: return "following::"; case DESCENDANT_OR_SELF: return "descendant-or-self::"; case DESCENDANT: return "descendent::"; case PRECEDING: return "preceding::"; case FOLLOWING: return "following::"; case PARENT: return "parent::"; case ANCESTOR: return "ancestor::"; case ANCESTOR_OR_SELF: return "ancestor-or-self::"; case SELF: return "self::"; case FOLLOWING_SIBLING: return "following-sibling::"; case FOLLOWING_SIBLING0: return "following-sibling::"; case PRECEDING_SIBLING: return "preceding-sibling::"; case PRECEDING_SIBLING0: return "preceding-sibling::"; case ATTRIBUTE: return "attribute::"; default: return "namespace::"; } } }
2,917
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
NameType.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/NameType.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; /** * This class is used by lexer to represent a NAME object * */ public class NameType{ public String qname; public String prefix; public String localname; public NameType(){ qname = null; prefix = null; localname =null; } }
1,097
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Alist.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/Alist.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * * This class implements the argumentList for FuncExpr * which is basically a linked-list of expressions */ public class Alist { public Expr e; public Alist next; public Alist (){ next = null; } final public String toString(){ Alist temp = this; String s = ""; while(temp!=null){ s = s+temp.e; temp = temp.next; if (temp!=null) s = s+" ,"; } return s; } final public void reset(VTDNav vn){ Alist temp = this; while(temp!=null){ temp.e.reset(vn); temp = temp.next; } } }
1,420
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
XSLScanner.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/XSLScanner.java
/* The following code was generated by JFlex 1.4.3 on 2/5/11 6:29 PM */ /* * Copyright (C) 2002-2011 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import java_cup.runtime.Symbol; import com.ximpleware.parser.*; import com.ximpleware.*; /** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.4.3 * on 2/5/11 6:29 PM from the specification file * <tt>C:/Users/Jimmy Zhang/workspace/ximple-dev/com/ximpleware/xpath/XSLScanner.flex</tt> */ class XSLScanner extends sym2 implements java_cup.runtime.Scanner { /** This character denotes the end of file */ public static final int YYEOF = -1; /** initial size of the lookahead buffer */ private static final int ZZ_BUFFERSIZE = 16384; /** lexical states */ public static final int YYINITIAL = 0; /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l * at the beginning of a line * l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0 }; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = "\11\0\1\1\1\1\2\0\1\1\22\0\1\1\1\20\1\57\1\0"+ "\1\21\1\0\1\0\1\60\1\11\1\12\1\22\1\6\1\10\1\4"+ "\1\5\1\23\12\2\1\3\1\0\1\16\1\17\1\15\1\0\1\7"+ "\15\0\1\53\2\0\1\52\11\0\1\13\1\0\1\14\1\0\1\0"+ "\1\0\1\31\1\47\1\41\1\24\1\43\1\50\1\44\1\46\1\25"+ "\1\0\1\55\1\35\1\27\1\32\1\30\1\40\1\0\1\33\1\36"+ "\1\37\1\42\1\26\1\45\1\54\1\56\1\51\1\0\1\34\uff83\0"; /** * Translates characters to character classes */ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); /** * Translates DFA states to action switch labels. */ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7"+ "\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17"+ "\1\20\1\4\1\21\1\22\1\23\7\1\1\24\14\1"+ "\2\4\1\0\2\3\1\25\1\26\1\27\1\30\1\31"+ "\5\1\1\32\40\1\1\0\1\33\1\0\1\1\1\34"+ "\1\35\3\1\1\36\1\37\61\1\1\0\1\40\2\1"+ "\1\0\1\41\12\1\1\0\1\42\34\1\1\0\1\43"+ "\5\1\2\0\1\1\1\0\1\44\6\1\1\0\1\45"+ "\1\0\1\46\3\1\2\0\1\1\1\0\1\47\2\0"+ "\34\1\1\50\3\1\1\0\1\1\1\51\6\1\1\0"+ "\1\52\1\1\1\53\11\1\1\0\1\54\2\1\2\0"+ "\7\1\1\0\1\55\1\0\1\56\1\0\1\57\7\1"+ "\1\0\1\60\5\1\1\0\1\1\1\61\3\1\2\0"+ "\6\1\1\0\1\62\2\1\1\0\1\63\27\1\1\0"+ "\1\64\3\1\3\0\1\65\1\1\1\0\1\66\1\0"+ "\1\67\5\1\1\0\1\70\1\1\1\0\1\71\2\1"+ "\2\0\14\1\1\0\1\72\3\1\1\73\1\0\1\74"+ "\10\1\1\0\1\75\1\1\2\0\1\1\2\0\7\1"+ "\1\0\1\1\1\76\1\0\1\77\1\1\2\0\3\1"+ "\1\0\1\100\3\1\2\0\1\1\2\0\1\1\1\0"+ "\1\101\1\1\1\0\1\102\1\1\1\0\1\103\3\1"+ "\1\0\1\1\1\104\1\0\1\105\5\1\1\0\1\106"+ "\2\1\1\0\1\107\3\1\1\0\1\110\1\1\1\0"+ "\1\111\7\1\1\0\1\112\10\1\1\0\1\113\24\1"+ "\1\0\1\1\1\114\1\1\1\0\1\115\1\1\1\0"+ "\1\116\24\1\1\0\1\117\4\1\1\0\1\120\5\1"+ "\1\0\1\121\4\1\1\0\1\122\2\1\2\0\5\1"+ "\1\0\1\123\5\1\1\0\1\124\2\1\1\0\1\125"+ "\3\1\2\0\1\1\4\0\2\1\1\0\1\126\2\1"+ "\1\0\1\127\1\1\1\0\1\130\1\0\1\131\14\1"+ "\1\0\1\132\1\1\1\0\1\133\2\1\2\0\2\1"+ "\1\134\3\0\1\135\1\0\1\136\2\0\1\137\1\140"; private static int [] zzUnpackAction() { int [] result = new int[653]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } private static int zzUnpackAction(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** * Translates a state to a row index in the transition table */ private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\61\0\142\0\223\0\304\0\304\0\365\0\304"+ "\0\304\0\304\0\304\0\304\0\304\0\304\0\u0126\0\u0157"+ "\0\304\0\u0188\0\304\0\304\0\u01b9\0\u01ea\0\u021b\0\u024c"+ "\0\u027d\0\u02ae\0\u02df\0\u0310\0\304\0\u0341\0\u0372\0\u03a3"+ "\0\u03d4\0\u0405\0\u0436\0\u0467\0\u0498\0\u04c9\0\u04fa\0\u052b"+ "\0\u055c\0\u058d\0\u05be\0\u05ef\0\u0620\0\u0651\0\61\0\304"+ "\0\304\0\304\0\304\0\u0682\0\u06b3\0\u06e4\0\u0715\0\u0746"+ "\0\61\0\u0777\0\u07a8\0\u07d9\0\u080a\0\u083b\0\u086c\0\u089d"+ "\0\u08ce\0\u08ff\0\u0930\0\u0961\0\u0992\0\u09c3\0\u09f4\0\u0a25"+ "\0\u0a56\0\u0a87\0\u0ab8\0\u0ae9\0\u0b1a\0\u0b4b\0\u0b7c\0\u0bad"+ "\0\u0bde\0\u0c0f\0\u0c40\0\u0c71\0\u0ca2\0\u0cd3\0\u0d04\0\u0d35"+ "\0\u0d66\0\u058d\0\304\0\u05be\0\u0d97\0\304\0\61\0\u0dc8"+ "\0\u0df9\0\u0e2a\0\61\0\61\0\u0e5b\0\u0e8c\0\u0ebd\0\u0eee"+ "\0\u0f1f\0\u0f50\0\u0f81\0\u0fb2\0\u0fe3\0\u1014\0\u1045\0\u1076"+ "\0\u10a7\0\u10d8\0\u1109\0\u113a\0\u116b\0\u119c\0\u11cd\0\u11fe"+ "\0\u122f\0\u1260\0\u1291\0\u12c2\0\u12f3\0\u1324\0\u1355\0\u1386"+ "\0\u13b7\0\u13e8\0\u1419\0\u144a\0\u147b\0\u14ac\0\u14dd\0\u150e"+ "\0\u153f\0\u1570\0\u15a1\0\u15d2\0\u1603\0\u1634\0\u1665\0\u1696"+ "\0\u16c7\0\u16f8\0\u1729\0\u175a\0\u178b\0\u17bc\0\304\0\u17ed"+ "\0\u181e\0\u184f\0\304\0\u1880\0\u18b1\0\u18e2\0\u1913\0\u1944"+ "\0\u1975\0\u19a6\0\u19d7\0\u1a08\0\u1a39\0\u1a6a\0\304\0\u1a9b"+ "\0\u1acc\0\u1afd\0\u1b2e\0\u1b5f\0\u1b90\0\u1bc1\0\u1bf2\0\u1c23"+ "\0\u1c54\0\u1c85\0\u1cb6\0\u1ce7\0\u1d18\0\u1d49\0\u1d7a\0\u1dab"+ "\0\u1ddc\0\u1e0d\0\u1e3e\0\u1e6f\0\u1ea0\0\u1ed1\0\u1f02\0\u1f33"+ "\0\u1f64\0\u1f95\0\u1fc6\0\u1ff7\0\304\0\u2028\0\u2059\0\u208a"+ "\0\u20bb\0\u20ec\0\u211d\0\u214e\0\u217f\0\u21b0\0\304\0\u21e1"+ "\0\u2212\0\u2243\0\u2274\0\u22a5\0\u22d6\0\u2307\0\304\0\u2338"+ "\0\304\0\u2369\0\u239a\0\u23cb\0\u23fc\0\u242d\0\u245e\0\u248f"+ "\0\304\0\u24c0\0\u24f1\0\u2522\0\u2553\0\u2584\0\u25b5\0\u25e6"+ "\0\u2617\0\u2648\0\u2679\0\u26aa\0\u26db\0\u270c\0\u273d\0\u276e"+ "\0\u279f\0\u27d0\0\u2801\0\u2832\0\u2863\0\u2894\0\u28c5\0\u28f6"+ "\0\u2927\0\u2958\0\u2989\0\u29ba\0\u29eb\0\u2a1c\0\u2a4d\0\304"+ "\0\u2a7e\0\u2aaf\0\u2ae0\0\u2b11\0\u2b42\0\304\0\u2b73\0\u2ba4"+ "\0\u2bd5\0\u2c06\0\u2c37\0\u2c68\0\u2c99\0\304\0\u2cca\0\304"+ "\0\u2cfb\0\u2d2c\0\u2d5d\0\u2d8e\0\u2dbf\0\u2df0\0\u2e21\0\u2e52"+ "\0\u2e83\0\u2eb4\0\304\0\u2ee5\0\u2f16\0\u2f47\0\u2f78\0\u2fa9"+ "\0\u2fda\0\u300b\0\u303c\0\u306d\0\u309e\0\u30cf\0\u3100\0\304"+ "\0\u3131\0\304\0\u3162\0\304\0\u3193\0\u31c4\0\u31f5\0\u3226"+ "\0\u3257\0\u3288\0\u32b9\0\u32ea\0\304\0\u331b\0\u334c\0\u337d"+ "\0\u33ae\0\u33df\0\u3410\0\u3441\0\304\0\u3472\0\u34a3\0\u34d4"+ "\0\u3505\0\u3536\0\u3567\0\u3598\0\u35c9\0\u35fa\0\u362b\0\u365c"+ "\0\u368d\0\304\0\u36be\0\u36ef\0\u3720\0\304\0\u3751\0\u3782"+ "\0\u37b3\0\u37e4\0\u3815\0\u3846\0\u3877\0\u38a8\0\u38d9\0\u390a"+ "\0\u393b\0\u396c\0\u399d\0\u39ce\0\u39ff\0\u3a30\0\u3a61\0\u3a92"+ "\0\u3ac3\0\u3af4\0\u3b25\0\u3b56\0\u3b87\0\u3bb8\0\304\0\u3be9"+ "\0\u3c1a\0\u3c4b\0\u3c7c\0\u3cad\0\u3cde\0\304\0\u3d0f\0\u3d40"+ "\0\304\0\u3d71\0\304\0\u3da2\0\u3dd3\0\u3e04\0\u3e35\0\u3e66"+ "\0\u3e97\0\304\0\u3ec8\0\u3ef9\0\304\0\u3f2a\0\u3f5b\0\u3f8c"+ "\0\u3fbd\0\u3fee\0\u401f\0\u4050\0\u4081\0\u40b2\0\u40e3\0\u4114"+ "\0\u4145\0\u4176\0\u41a7\0\u41d8\0\u4209\0\u423a\0\304\0\u426b"+ "\0\u429c\0\u42cd\0\304\0\u42fe\0\304\0\u432f\0\u4360\0\u4391"+ "\0\u43c2\0\u43f3\0\u4424\0\u4455\0\u4486\0\u44b7\0\304\0\u44e8"+ "\0\u4519\0\u454a\0\u457b\0\u45ac\0\u45dd\0\u460e\0\u463f\0\u4670"+ "\0\u46a1\0\u46d2\0\u4703\0\u4734\0\u4765\0\u4796\0\304\0\u47c7"+ "\0\304\0\u47f8\0\u4829\0\u485a\0\u488b\0\u48bc\0\u48ed\0\u491e"+ "\0\304\0\u494f\0\u4980\0\u49b1\0\u49e2\0\u4a13\0\u4a44\0\u4a75"+ "\0\u4aa6\0\u4ad7\0\u4b08\0\304\0\u4b39\0\u4b6a\0\304\0\u4b9b"+ "\0\u4bcc\0\304\0\u4bfd\0\u4c2e\0\u4c5f\0\u4c90\0\u4cc1\0\304"+ "\0\u4cf2\0\304\0\u4d23\0\u4d54\0\u4d85\0\u4db6\0\u4de7\0\u4e18"+ "\0\304\0\u4e49\0\u4e7a\0\u4eab\0\304\0\u4edc\0\u4f0d\0\u4f3e"+ "\0\u4f6f\0\304\0\u4fa0\0\u4fd1\0\304\0\u5002\0\u5033\0\u5064"+ "\0\u5095\0\u50c6\0\u50f7\0\u5128\0\u5159\0\304\0\u518a\0\u51bb"+ "\0\u51ec\0\u521d\0\u524e\0\u527f\0\u52b0\0\u52e1\0\u5312\0\304"+ "\0\u5343\0\u5374\0\u53a5\0\u53d6\0\u5407\0\u5438\0\u5469\0\u549a"+ "\0\u54cb\0\u54fc\0\u552d\0\u555e\0\u558f\0\u55c0\0\u55f1\0\u5622"+ "\0\u5653\0\u5684\0\u56b5\0\u56e6\0\u5717\0\u5748\0\304\0\u5779"+ "\0\u57aa\0\304\0\u57db\0\u580c\0\304\0\u583d\0\u586e\0\u589f"+ "\0\u58d0\0\u5901\0\u5932\0\u5963\0\u5994\0\u59c5\0\u59f6\0\u5a27"+ "\0\u5a58\0\u5a89\0\u5aba\0\u5aeb\0\u5b1c\0\u5b4d\0\u5b7e\0\u5baf"+ "\0\u5be0\0\u5c11\0\304\0\u5c42\0\u5c73\0\u5ca4\0\u5cd5\0\u5d06"+ "\0\304\0\u5d37\0\u5d68\0\u5d99\0\u5dca\0\u5dfb\0\u5e2c\0\304"+ "\0\u5e5d\0\u5e8e\0\u5ebf\0\u5ef0\0\u5f21\0\304\0\u5f52\0\u5f83"+ "\0\u5fb4\0\u5fe5\0\u6016\0\u6047\0\u6078\0\u60a9\0\u60da\0\u610b"+ "\0\304\0\u613c\0\u616d\0\u619e\0\u61cf\0\u6200\0\u6231\0\304"+ "\0\u6262\0\u6293\0\u62c4\0\304\0\u62f5\0\u6326\0\u6357\0\u6388"+ "\0\u63b9\0\u63ea\0\u641b\0\u644c\0\u647d\0\u64ae\0\u64df\0\u6510"+ "\0\u6541\0\304\0\u6572\0\u65a3\0\u65d4\0\304\0\u6605\0\u6636"+ "\0\304\0\u6667\0\304\0\u6698\0\u66c9\0\u66fa\0\u672b\0\u675c"+ "\0\u678d\0\u67be\0\u67ef\0\u6820\0\u6851\0\u6882\0\u68b3\0\u68e4"+ "\0\304\0\u6915\0\u6946\0\304\0\u6977\0\u69a8\0\u69d9\0\u6a0a"+ "\0\u6a3b\0\u6a6c\0\304\0\u6a9d\0\u6ace\0\u6aff\0\304\0\u6b30"+ "\0\304\0\u6b61\0\u6b92\0\304\0\304"; private static int [] zzUnpackRowMap() { int [] result = new int[653]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } private static int zzUnpackRowMap(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } /** * The transition table of the DFA */ private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11"+ "\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21"+ "\1\22\1\23\1\24\1\25\1\26\1\27\1\2\1\30"+ "\1\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40"+ "\1\41\1\42\1\43\1\44\1\45\2\2\1\46\1\47"+ "\1\2\1\50\2\2\1\51\1\2\1\52\1\53\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\22\2"+ "\3\0\1\3\61\0\1\4\2\0\1\55\134\0\1\2"+ "\1\0\1\56\1\54\1\2\1\57\16\0\10\2\1\0"+ "\22\2\21\0\1\60\60\0\1\61\60\0\1\62\64\0"+ "\1\63\35\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\64\2\2\1\65\3\2\1\0\6\2\1\66"+ "\13\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\7\2\1\67\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\4\2\1\70\3\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\7\2"+ "\1\71\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\6\2\1\72\1\2\1\0\2\2\1\73"+ "\7\2\1\74\7\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\4\2\1\75\1\76\2\2\1\0\5\2"+ "\1\77\14\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\4\2\1\100\3\2\1\0\6\2\1\101\13\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\4\2"+ "\1\102\1\103\2\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\2\2\1\104"+ "\2\2\1\105\1\106\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\7\2\1\107\1\0\6\2\1\110"+ "\13\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\4\2\1\111\1\112\1\2\1\113\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\4\2\1\114"+ "\3\2\1\0\5\2\1\115\1\116\2\2\1\117\10\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\3\2\1\120\16\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\121\1\2\1\0\1\2"+ "\1\122\20\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\123\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\124\3\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\4\2\1\125\1\126\2\2\1\0\1\127\21\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\16\2\1\130\3\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\131\13\2"+ "\2\0\57\132\1\133\1\132\60\134\1\133\1\135\1\0"+ "\1\135\1\0\2\135\14\0\1\136\1\0\10\135\1\0"+ "\22\135\4\0\1\55\56\0\1\2\1\0\1\56\1\54"+ "\2\2\16\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\2\2\1\137\5\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\4\2\1\140\15\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\2\1\141"+ "\20\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\142\6\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\143\7\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\144"+ "\7\2\1\0\4\2\1\145\15\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\2\2\1\146"+ "\17\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\1\2\1\147\20\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\150\6\2\1\151\1\0"+ "\2\2\1\152\17\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\3\2\1\153\4\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\3\2\1\154"+ "\4\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\5\2\1\155\14\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\2\1\156\20\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\4\2\1\157\3\2\1\160"+ "\11\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\6\2\1\161\1\2\1\0\1\2\1\162\20\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\163"+ "\1\2\1\164\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\3\2\1\165\4\2\1\0\12\2"+ "\1\166\7\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\1\167\21\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\5\2\1\170\2\2\1\0"+ "\5\2\1\171\14\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\17\2\1\172\2\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\2\1\173\20\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\7\2\1\174\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\175\3\2"+ "\1\0\6\2\1\176\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\1\177\2\2\1\200\2\2\1\201"+ "\1\2\1\0\5\2\1\202\14\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\7\2\1\203\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\2"+ "\1\204\6\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\1\2\1\205\6\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\3\2\1\206\16\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\1\207\7\2\1\0\4\2\1\210"+ "\15\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\4\2\1\211\15\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\6\2\1\212\1\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\4\2\1\213\3\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\214\21\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\1\215\21\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\4\2\1\216\3\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\217"+ "\2\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\21\2\1\220\2\0\1\135"+ "\1\0\1\135\1\0\2\135\16\0\10\135\1\0\22\135"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\5\2\1\221\14\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\4\2\1\222\15\2"+ "\2\0\1\2\1\0\1\2\1\54\1\223\1\2\16\0"+ "\10\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\6\2\1\224\13\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\7\2\1\225"+ "\1\0\22\2\2\0\1\2\1\226\1\2\1\54\2\2"+ "\3\0\1\227\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\6\2"+ "\1\230\13\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\3\2\1\231\4\2\1\0\22\2\2\0\1\2"+ "\1\232\1\2\1\54\2\2\3\0\1\233\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\234\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\12\2"+ "\1\235\7\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\6\2\1\236\1\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\237\3\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\5\2\1\240\2\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\6\2"+ "\1\241\13\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\7\2\1\242\12\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\2\2"+ "\1\243\17\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\7\2\1\244\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\2\1\245\6\2\1\0"+ "\22\2\2\0\1\2\1\246\1\2\1\54\2\2\3\0"+ "\1\247\12\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\2\1\250"+ "\20\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\13\2\1\251\6\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\6\2\1\252\1\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\6\2\1\253\13\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\2\2\1\254"+ "\17\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\255\6\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\6\2\1\256"+ "\13\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\4\2\1\257\15\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\4\2\1\260"+ "\15\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\6\2\1\261\13\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\3\2\1\262\4\2\1\0"+ "\3\2\1\263\16\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\2\2\1\264\1\2\1\265"+ "\15\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\6\2\1\266\1\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\7\2\1\267\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\1\270\21\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\1\271\21\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\6\2"+ "\1\272\13\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\1\2\1\273\20\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\274\3\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\5\2\1\275\2\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\6\2"+ "\1\276\13\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\1\277\21\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\300\21\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\1\2\1\301\20\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\4\2\1\302\3\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\3\2"+ "\1\303\4\2\1\0\22\2\2\0\1\2\1\304\1\2"+ "\1\54\2\2\3\0\1\305\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\3\2"+ "\1\306\4\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\307\13\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\2\2\1\310\17\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\1\2\1\311\20\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\2"+ "\1\312\6\2\1\0\22\2\3\0\1\226\7\0\1\227"+ "\47\0\1\2\1\313\1\2\1\54\2\2\3\0\1\314"+ "\12\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\5\2\1\315\2\2\1\0\22\2"+ "\3\0\1\232\7\0\1\233\47\0\1\2\1\316\1\2"+ "\1\54\2\2\3\0\1\317\12\0\10\2\1\0\1\2"+ "\1\320\20\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\321\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\1\322\7\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\1\323\21\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\1\324\21\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\7\2\1\325"+ "\1\0\22\2\2\0\1\2\1\326\1\2\1\54\2\2"+ "\3\0\1\327\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\330\1\2\1\54\2\2\3\0\1\331\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\332\17\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\6\2\1\333\1\2"+ "\1\0\22\2\3\0\1\246\7\0\1\247\47\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\2\2"+ "\1\334\17\2\2\0\1\2\1\335\1\2\1\336\2\2"+ "\16\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\1\2\1\337\20\2"+ "\2\0\1\2\1\340\1\2\1\54\2\2\3\0\1\341"+ "\12\0\10\2\1\0\22\2\2\0\1\2\1\342\1\2"+ "\1\54\2\2\3\0\1\343\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\2\2\1\344\17\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\345\1\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\346\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\347\13\2"+ "\2\0\1\2\1\0\1\2\1\54\1\350\1\2\16\0"+ "\10\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\6\2\1\351\13\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\352"+ "\2\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\5\2\1\353\2\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\354"+ "\2\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\2\2\1\355\17\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\6\2\1\356\13\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\1\2\1\357\6\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\1\360\7\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\7\2\1\361\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\1\362\1\2\16\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\363"+ "\7\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\3\2\1\364\16\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\7\2\1\365"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\366\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\367\3\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\370\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\7\2\1\371\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\6\2\1\372\13\2\3\0\1\304\7\0"+ "\1\305\47\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\6\2\1\373\13\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\6\2\1\374\1\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\4\2\1\375\3\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\2\2\1\376"+ "\17\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\12\2\1\377\7\2\3\0\1\313\7\0"+ "\1\314\50\0\1\314\10\0\1\u0100\46\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\u0101\21\2"+ "\3\0\1\316\7\0\1\317\47\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\3\2\1\u0102\16\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\7\2"+ "\1\u0103\1\0\22\2\2\0\1\2\1\u0104\1\2\1\54"+ "\1\u0105\1\2\3\0\1\u0106\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\2\2"+ "\1\u0107\5\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\1\u0108\1\2\16\0\10\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\1\u0109\1\2\16\0\10\2"+ "\1\0\22\2\3\0\1\326\7\0\1\327\50\0\1\330"+ "\7\0\1\331\47\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\1\2\1\u010a\20\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\7\2"+ "\1\u010b\12\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\7\2\1\u010c\1\0\22\2\3\0\1\335\1\0"+ "\1\u010d\55\0\1\135\1\0\1\135\1\u010e\2\135\14\0"+ "\1\136\1\0\10\135\1\0\22\135\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\u010f\21\2"+ "\3\0\1\340\7\0\1\341\50\0\1\342\7\0\1\343"+ "\50\0\1\343\10\0\1\u0110\46\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\1\2\1\u0111\6\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\2\2\1\u0112\17\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\1\2\1\u0113\20\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\u0114"+ "\7\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\3\2\1\u0115\16\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\6\2\1\u0116"+ "\1\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\7\2\1\u0117\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\1\2\1\u0118\6\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\u0119\17\2\2\0\1\2"+ "\1\u011a\1\2\1\54\2\2\3\0\1\u011b\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\6\2\1\u011c\1\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\6\2\1\u011d\1\2"+ "\1\0\22\2\2\0\1\2\1\u011e\1\2\1\u011f\2\2"+ "\16\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\1\u0120\1\2\16\0\10\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\10\2\1\u0121\11\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\6\2\1\u0122\13\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\6\2\1\u0123\13\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\5\2\1\u0124\2\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\u0125"+ "\2\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\10\2\1\u0126\11\2\2\0"+ "\1\2\1\u0127\1\2\1\54\2\2\3\0\1\u0128\12\0"+ "\10\2\1\0\22\2\2\0\1\2\1\u0129\1\2\1\54"+ "\2\2\3\0\1\u012a\12\0\10\2\1\0\22\2\2\0"+ "\1\2\1\u012b\1\2\1\54\2\2\3\0\1\u012c\12\0"+ "\10\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\6\2\1\u012d\1\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\1\u012e\7\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\1\u012f"+ "\1\2\16\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\4\2\1\u0130\3\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\5\2\1\u0131\14\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\2\1\u0132\6\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\5\2\1\u0133\2\2\1\0\22\2\2\0\1\2\1\u0134"+ "\1\2\1\54\2\2\3\0\1\u0135\12\0\10\2\1\0"+ "\22\2\3\0\1\u0104\7\0\1\u0106\47\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\11\2\1\u0136"+ "\10\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\6\2\1\u0137\13\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\6\2\1\u0138\1\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\4\2\1\u0139\15\2\2\0\1\2\1\0"+ "\1\2\1\54\1\u013a\1\2\16\0\10\2\1\0\22\2"+ "\2\0\1\2\1\u013b\1\2\1\54\1\u013c\1\2\3\0"+ "\1\u013d\12\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\2\1\u013e\6\2\1\0"+ "\22\2\5\0\1\u010e\55\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\5\2\1\u013f\2\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\4\2\1\u0140"+ "\3\2\1\0\22\2\2\0\1\2\1\u0141\1\2\1\u0142"+ "\2\2\16\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\2\1\u0143"+ "\20\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\u0144\6\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\4\2\1\u0145\3\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\2\2\1\u0146\17\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\6\2\1\u0147"+ "\13\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\6\2\1\u0148\1\2\1\0\22\2\2\0\1\2\1\u0149"+ "\1\2\1\54\2\2\3\0\1\u014a\12\0\10\2\1\0"+ "\22\2\3\0\1\u011a\7\0\1\u011b\47\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\2\2\1\u014b"+ "\17\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\7\2\1\u014c\12\2\3\0\1\u011e\1\0"+ "\1\u014d\55\0\1\135\1\0\1\135\1\u014e\2\135\14\0"+ "\1\136\1\0\10\135\1\0\22\135\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\4\2\1\u014f"+ "\15\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\u0150\6\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\1\u0151\1\2\16\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\1\u0152\1\2\16\0"+ "\10\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\2\2\1\u0153\17\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\6\2\1\u0154"+ "\1\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\1\2\1\u0155\6\2\1\0\22\2\3\0"+ "\1\u0127\7\0\1\u0128\50\0\1\u0129\7\0\1\u012a\50\0"+ "\1\u012b\7\0\1\u012c\47\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\2\2\1\u0156\17\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\u0157"+ "\2\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\5\2\1\u0158\14\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\7\2\1\u0159"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\u015a\17\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\14\2"+ "\1\u015b\5\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\4\2\1\u015c\15\2\3\0\1\u0134"+ "\7\0\1\u0135\47\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\5\2\1\u015d\2\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\1\u015e\1\2\16\0\10\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\5\2\1\u015f\2\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\5\2\1\u0160\2\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\10\2\1\u0161\11\2\3\0\1\u013b\7\0"+ "\1\u013d\47\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\1\u0162\21\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\u0163\1\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\2\2\1\u0164\17\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\u0165\1\2\1\0\22\2"+ "\3\0\1\u0141\1\0\1\u0166\55\0\1\135\1\0\1\135"+ "\1\u0167\2\135\14\0\1\136\1\0\10\135\1\0\22\135"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\2"+ "\1\u0168\6\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\u0169\1\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\2"+ "\1\u016a\6\2\1\0\22\2\2\0\1\2\1\u016b\1\2"+ "\1\54\2\2\3\0\1\u016c\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\u016d\1\2\1\54\2\2\3\0\1\u016e"+ "\12\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\1\2\1\u016f\20\2"+ "\3\0\1\u0149\7\0\1\u014a\47\0\1\2\1\u0170\1\2"+ "\1\54\2\2\3\0\1\u0171\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\u0172\1\2\1\54\2\2\3\0\1\u0173"+ "\12\0\10\2\1\0\22\2\5\0\1\u014e\55\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\5\2\1\u0174\2\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\u0175\17\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\13\2"+ "\1\u0176\6\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\11\2\1\u0177\10\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\6\2"+ "\1\u0178\13\2\2\0\1\2\1\u0179\1\2\1\54\2\2"+ "\3\0\1\u017a\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\6\2\1\u017b\1\2"+ "\1\0\22\2\2\0\1\2\1\u017c\1\2\1\54\2\2"+ "\3\0\1\u017d\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\6\2\1\u017e\1\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\7\2\1\u017f\1\0\22\2\2\0\1\2\1\u0180"+ "\1\2\1\u0181\1\u0182\1\2\16\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\u0183\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\u0184\13\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\u0185\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\1\u0186\21\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\15\2\1\u0187\4\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\3\2\1\u0188\4\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\2\1\u0189\20\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\1\2\1\u018a\6\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\6\2\1\u018b\13\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\7\2\1\u018c\12\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\6\2\1\u018d\13\2\2\0\1\2\1\u018e\1\2\1\54"+ "\2\2\3\0\1\u018f\12\0\10\2\1\0\22\2\5\0"+ "\1\u0167\55\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\6\2\1\u0190\1\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\7\2\1\u0191"+ "\12\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\6\2\1\u0192\1\2\1\0\22\2\3\0\1\u016b\7\0"+ "\1\u016c\50\0\1\u016c\10\0\1\u0193\47\0\1\u016d\7\0"+ "\1\u016e\47\0\1\2\1\u0194\1\2\1\54\2\2\3\0"+ "\1\u0195\12\0\10\2\1\0\22\2\3\0\1\u0170\7\0"+ "\1\u0171\50\0\1\u0172\7\0\1\u0173\47\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\2\1\u0196"+ "\20\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\11\2\1\u0197\10\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\4\2\1\u0198\3\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\2\2\1\u0199\17\2\2\0\1\2\1\0"+ "\1\2\1\54\1\u019a\1\2\16\0\10\2\1\0\22\2"+ "\3\0\1\u0179\7\0\1\u017a\47\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\7\2\1\u019b\12\2"+ "\3\0\1\u017c\7\0\1\u017d\47\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\2\2\1\u019c\17\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\2"+ "\1\u019d\6\2\1\0\22\2\3\0\1\u0180\1\0\1\u019e"+ "\55\0\1\135\1\0\1\135\1\u019f\2\135\14\0\1\136"+ "\1\0\10\135\1\0\22\135\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\4\2\1\u01a0\3\2\1\0\22\2"+ "\2\0\1\2\1\u01a1\1\2\1\u01a2\2\2\16\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\1\u01a3"+ "\1\2\16\0\10\2\1\0\22\2\2\0\1\2\1\u01a4"+ "\1\2\1\u01a5\1\u01a6\1\2\16\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\13\2\1\u01a7\6\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\16\2\1\u01a8\3\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\u01a9\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\u01aa\13\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\2\2\1\u01ab\17\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\u01ac\1\2\1\0\22\2"+ "\2\0\1\2\1\u01ad\1\2\1\54\1\u01ae\1\2\3\0"+ "\1\u01af\12\0\10\2\1\0\22\2\2\0\1\2\1\u01b0"+ "\1\2\1\54\2\2\3\0\1\u01b1\12\0\10\2\1\0"+ "\22\2\3\0\1\u018e\7\0\1\u018f\47\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\7\2\1\u01b2"+ "\12\2\2\0\1\2\1\u01b3\1\2\1\u01b4\1\u01b5\1\2"+ "\16\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\2\2\1\u01b6\17\2"+ "\3\0\1\u0194\7\0\1\u0195\47\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\u01b7\13\2"+ "\2\0\1\2\1\u01b8\1\2\1\54\2\2\3\0\1\u01b9"+ "\12\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\7\2\1\u01ba\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\3\2\1\u01bb"+ "\4\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\1\2\1\u01bc\6\2\1\0\22\2\2\0"+ "\1\2\1\u01bd\1\2\1\u01be\1\u01bf\1\2\16\0\10\2"+ "\1\0\22\2\2\0\1\2\1\u01c0\1\2\1\u01c1\1\u01c2"+ "\1\2\16\0\10\2\1\0\22\2\2\0\1\2\1\u01c3"+ "\1\2\1\54\2\2\3\0\1\u01c4\12\0\10\2\1\0"+ "\22\2\5\0\1\u019f\55\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\7\2\1\u01c5\1\0\22\2\3\0\1\u01a1"+ "\1\0\1\u01c6\55\0\1\135\1\0\1\135\1\u01c7\2\135"+ "\14\0\1\136\1\0\10\135\1\0\22\135\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\1\2"+ "\1\u01c8\20\2\3\0\1\u01a4\1\0\1\u01c9\55\0\1\135"+ "\1\0\1\135\1\u01ca\2\135\14\0\1\136\1\0\10\135"+ "\1\0\22\135\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\5\2\1\u01cb\14\2\2\0\1\2"+ "\1\0\1\2\1\54\1\u01cc\1\2\16\0\10\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\5\2\1\u01cd\2\2\1\0\22\2\2\0\1\2\1\u01ce"+ "\1\2\1\54\1\u01cf\1\2\3\0\1\u01d0\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\u01d1\1\2\1\54\2\2"+ "\3\0\1\u01d2\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\11\2"+ "\1\u01d3\10\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\7\2\1\u01d4\12\2\3\0\1\u01ad"+ "\7\0\1\u01af\47\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\5\2\1\u01d5\2\2\1\0\12\2\1\u01d6\7\2"+ "\3\0\1\u01b0\7\0\1\u01b1\47\0\1\2\1\0\1\2"+ "\1\54\1\u01d7\1\2\16\0\10\2\1\0\22\2\3\0"+ "\1\u01b3\1\0\1\u01d8\55\0\1\135\1\0\1\135\1\u01d9"+ "\2\135\14\0\1\136\1\0\10\135\1\0\22\135\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\2\1\u01da\20\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\1\2\1\u01db\20\2\2\0"+ "\1\2\1\u01dc\1\2\1\54\2\2\3\0\1\u01dd\12\0"+ "\10\2\1\0\22\2\3\0\1\u01b8\7\0\1\u01b9\47\0"+ "\1\2\1\0\1\2\1\54\1\u01de\1\2\16\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\1\u01df\21\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\u01e0\7\2\1\0\22\2"+ "\3\0\1\u01bd\1\0\1\u01e1\55\0\1\135\1\0\1\135"+ "\1\u01e2\2\135\14\0\1\136\1\0\10\135\1\0\22\135"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\1\2\1\u01e3\20\2\3\0\1\u01c0\1\0\1\u01e4"+ "\55\0\1\135\1\0\1\135\1\u01e5\2\135\14\0\1\136"+ "\1\0\10\135\1\0\22\135\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\4\2\1\u01e6\3\2\1\0\22\2"+ "\3\0\1\u01c3\7\0\1\u01c4\47\0\1\2\1\0\1\2"+ "\1\54\1\u01e7\1\2\16\0\10\2\1\0\22\2\5\0"+ "\1\u01c7\55\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\3\2\1\u01e8\16\2\5\0\1\u01ca\55\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\7\2\1\u01e9"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\u01ea\17\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\3\2\1\u01eb\4\2"+ "\1\0\22\2\3\0\1\u01ce\7\0\1\u01d0\47\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\13\2"+ "\1\u01ec\6\2\3\0\1\u01d1\7\0\1\u01d2\47\0\1\2"+ "\1\u01ed\1\2\1\54\2\2\3\0\1\u01ee\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\u01ef\17\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\13\2"+ "\1\u01f0\6\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\u01f1\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\1\2\1\u01f2\6\2"+ "\1\0\22\2\5\0\1\u01d9\55\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\1\2\1\u01f3\6\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\1\u01f4\1\2\16\0"+ "\10\2\1\0\22\2\3\0\1\u01dc\7\0\1\u01dd\47\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\5\2\1\u01f5\14\2\2\0\1\2\1\0\1\2\1\54"+ "\1\u01f6\1\2\16\0\10\2\1\0\22\2\2\0\1\2"+ "\1\u01f7\1\2\1\54\2\2\3\0\1\u01f8\12\0\10\2"+ "\1\0\22\2\5\0\1\u01e2\55\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\1\2\1\u01f9\6\2\1\0\22\2"+ "\5\0\1\u01e5\55\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\7\2\1\u01fa\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\1\2\1\u01fb"+ "\20\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\5\2\1\u01fc\2\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\2\1\u01fd\6\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\4\2\1\u01fe\3\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\6\2\1\u01ff"+ "\13\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\7\2\1\u0200\1\0\22\2\3\0\1\u01ed\7\0\1\u01ee"+ "\47\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\11\2\1\u0201\10\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\2\2\1\u0202\17\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\13\2\1\u0203\6\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\6\2\1\u0204\1\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\12\2\1\u0205\7\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\2\2\1\u0206\17\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\7\2"+ "\1\u0207\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\5\2\1\u0208\14\2\3\0"+ "\1\u01f7\7\0\1\u01f8\47\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\12\2\1\u0209\7\2\2\0"+ "\1\2\1\0\1\2\1\54\1\u020a\1\2\16\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\u020b\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\4\2"+ "\1\u020c\15\2\2\0\1\2\1\u020d\1\2\1\54\1\u020e"+ "\1\2\3\0\1\u020f\12\0\10\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\1\u0210\1\2\16\0\10\2"+ "\1\0\22\2\2\0\1\2\1\u0211\1\2\1\54\2\2"+ "\3\0\1\u0212\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\u0213\3\2"+ "\1\0\22\2\2\0\1\2\1\u0214\1\2\1\54\2\2"+ "\3\0\1\u0215\12\0\10\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\6\2"+ "\1\u0216\13\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\4\2\1\u0217\3\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\1\2"+ "\1\u0218\20\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\1\u0219\21\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\4\2\1\u021a\3\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\u021b\6\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\7\2\1\u021c\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\1\u021d\21\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\1\2\1\u021e\20\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\u021f\21\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\u0220\13\2\3\0\1\u020d"+ "\7\0\1\u020f\47\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\13\2\1\u0221\6\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\4\2\1\u0222\3\2"+ "\1\0\6\2\1\u0223\13\2\3\0\1\u0211\7\0\1\u0212"+ "\47\0\1\2\1\0\1\2\1\54\2\2\16\0\3\2"+ "\1\u0224\4\2\1\0\22\2\3\0\1\u0214\7\0\1\u0215"+ "\47\0\1\2\1\0\1\2\1\54\2\2\16\0\7\2"+ "\1\u0225\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\7\2\1\u0226\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\2\2"+ "\1\u0227\17\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\1\2\1\u0228\6\2\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\1\u0229\1\2\16\0\10\2\1\0"+ "\22\2\2\0\1\2\1\u022a\1\2\1\54\2\2\3\0"+ "\1\u022b\12\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\1\2\1\u022c\6\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\1\2\1\u022d\6\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\10\2\1\0\6\2\1\u022e"+ "\13\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\13\2\1\u022f\6\2\2\0\1\2\1\u0230"+ "\1\2\1\54\2\2\3\0\1\u0231\12\0\10\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\4\2\1\u0232\2\2\1\u0233\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\1\u0234\7\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\2\2\1\u0235\5\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\1\u0236\1\2\16\0\10\2\1\0\22\2"+ "\2\0\1\2\1\u0237\1\2\1\54\2\2\3\0\1\u0238"+ "\12\0\10\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\6\2\1\u0239\13\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\7\2"+ "\1\u023a\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\6\2\1\u023b\1\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\2\1\u023c\20\2\3\0\1\u022a\7\0\1\u022b\47\0"+ "\1\2\1\u023d\1\2\1\54\2\2\3\0\1\u023e\12\0"+ "\10\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\6\2\1\u023f\1\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\10\2\1\0"+ "\1\u0240\21\2\2\0\1\2\1\u0241\1\2\1\u0242\2\2"+ "\16\0\10\2\1\0\22\2\3\0\1\u0230\7\0\1\u0231"+ "\47\0\1\2\1\0\1\2\1\54\2\2\16\0\7\2"+ "\1\u0243\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\4\2\1\u0244\3\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\1\u0245\7\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\6\2\1\u0246\13\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\15\2"+ "\1\u0247\4\2\3\0\1\u0237\7\0\1\u0238\47\0\1\2"+ "\1\u0248\1\2\1\54\2\2\3\0\1\u0249\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\5\2\1\u024a\14\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\7\2"+ "\1\u024b\12\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\2\2\1\u024c\17\2\3\0\1\u023d"+ "\7\0\1\u023e\47\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\10\2\1\0\7\2\1\u024d\12\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\13\2"+ "\1\u024e\6\2\3\0\1\u0241\1\0\1\u024f\55\0\1\135"+ "\1\0\1\135\1\u0250\2\135\14\0\1\136\1\0\10\135"+ "\1\0\22\135\2\0\1\2\1\0\1\2\1\54\1\u0251"+ "\1\2\16\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\3\2\1\u0252\4\2\1\0"+ "\22\2\2\0\1\2\1\u0253\1\2\1\54\2\2\3\0"+ "\1\u0254\12\0\10\2\1\0\22\2\2\0\1\2\1\0"+ "\1\2\1\54\2\2\16\0\6\2\1\u0255\1\2\1\0"+ "\22\2\2\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\16\2\1\u0256\3\2\3\0\1\u0248\7\0"+ "\1\u0249\47\0\1\2\1\0\1\2\1\54\2\2\16\0"+ "\10\2\1\0\4\2\1\u0257\15\2\2\0\1\2\1\u0258"+ "\1\2\1\u0259\2\2\16\0\10\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\7\2\1\u025a"+ "\1\0\22\2\2\0\1\2\1\u025b\1\2\1\u025c\2\2"+ "\16\0\10\2\1\0\22\2\2\0\1\2\1\u025d\1\2"+ "\1\u025e\2\2\16\0\10\2\1\0\22\2\5\0\1\u0250"+ "\55\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\3\2\1\u025f\16\2\2\0\1\2\1\0\1\2"+ "\1\54\1\u0260\1\2\16\0\10\2\1\0\22\2\3\0"+ "\1\u0253\7\0\1\u0254\47\0\1\2\1\u0261\1\2\1\54"+ "\2\2\3\0\1\u0262\12\0\10\2\1\0\22\2\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\5\2\1\u0263"+ "\2\2\1\0\22\2\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\10\2\1\0\2\2\1\u0264\17\2\3\0"+ "\1\u0258\1\0\1\u0265\55\0\1\135\1\0\1\135\1\u0266"+ "\2\135\14\0\1\136\1\0\10\135\1\0\22\135\2\0"+ "\1\2\1\0\1\2\1\54\2\2\16\0\1\2\1\u0267"+ "\6\2\1\0\22\2\3\0\1\u025b\1\0\1\u0268\55\0"+ "\1\135\1\0\1\135\1\u0269\2\135\14\0\1\136\1\0"+ "\10\135\1\0\22\135\3\0\1\u025d\1\0\1\u026a\55\0"+ "\1\135\1\0\1\135\1\u026b\2\135\14\0\1\136\1\0"+ "\10\135\1\0\22\135\2\0\1\2\1\0\1\2\1\54"+ "\2\2\16\0\7\2\1\u026c\1\0\22\2\2\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\10\2\1\0\15\2"+ "\1\u026d\4\2\3\0\1\u0261\7\0\1\u0262\47\0\1\2"+ "\1\0\1\2\1\54\2\2\16\0\3\2\1\u026e\4\2"+ "\1\0\22\2\2\0\1\2\1\0\1\2\1\54\2\2"+ "\16\0\1\2\1\u026f\6\2\1\0\22\2\5\0\1\u0266"+ "\55\0\1\2\1\0\1\2\1\54\2\2\16\0\6\2"+ "\1\u0270\1\2\1\0\22\2\5\0\1\u0269\60\0\1\u026b"+ "\55\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\u0271\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\16\2\1\u0272\3\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\u0273\13\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\4\2\1\u0274\3\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\7\2\1\u0275\12\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\13\2\1\u0276\6\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\5\2"+ "\1\u0277\2\2\1\0\22\2\2\0\1\2\1\u0278\1\2"+ "\1\54\2\2\3\0\1\u0279\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\6\2"+ "\1\u027a\1\2\1\0\22\2\2\0\1\2\1\u027b\1\2"+ "\1\54\2\2\3\0\1\u027c\12\0\10\2\1\0\22\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\1\2"+ "\1\u027d\6\2\1\0\22\2\2\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\3\2\1\u027e\4\2\1\0\22\2"+ "\3\0\1\u0278\7\0\1\u0279\47\0\1\2\1\u027f\1\2"+ "\1\54\2\2\3\0\1\u0280\12\0\10\2\1\0\22\2"+ "\3\0\1\u027b\7\0\1\u027c\47\0\1\2\1\0\1\2"+ "\1\54\2\2\16\0\10\2\1\0\17\2\1\u0281\2\2"+ "\2\0\1\2\1\0\1\2\1\54\2\2\16\0\10\2"+ "\1\0\6\2\1\u0282\13\2\3\0\1\u027f\7\0\1\u0280"+ "\50\0\1\u0280\10\0\1\u0283\44\0\1\u0284\1\u0285\1\2"+ "\1\u0286\1\2\1\54\2\2\3\0\1\u0287\12\0\10\2"+ "\1\0\22\2\2\0\1\2\1\u0288\1\2\1\54\2\2"+ "\3\0\1\u0289\12\0\10\2\1\0\22\2\2\0\57\u0284"+ "\1\u028a\1\u0284\60\u0285\1\u028b\1\0\1\u0286\7\0\1\u0287"+ "\50\0\1\u0288\7\0\1\u0289\50\0\1\u028a\10\0\1\u028c"+ "\47\0\1\u028b\10\0\1\u028d\46\0"; private static int [] zzUnpackTrans() { int [] result = new int[27587]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; } private static int zzUnpackTrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; private static final int ZZ_NO_MATCH = 1; private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\1\0\3\1\2\11\1\1\7\11\2\1\1\11\1\1"+ "\2\11\10\1\1\11\16\1\1\0\3\1\4\11\46\1"+ "\1\0\1\11\1\0\1\1\1\11\67\1\1\0\1\11"+ "\2\1\1\0\1\11\12\1\1\0\1\11\34\1\1\0"+ "\1\11\5\1\2\0\1\1\1\0\1\11\6\1\1\0"+ "\1\11\1\0\1\11\3\1\2\0\1\1\1\0\1\11"+ "\2\0\34\1\1\11\3\1\1\0\1\1\1\11\6\1"+ "\1\0\1\11\1\1\1\11\11\1\1\0\1\11\2\1"+ "\2\0\7\1\1\0\1\11\1\0\1\11\1\0\1\11"+ "\7\1\1\0\1\11\5\1\1\0\1\1\1\11\3\1"+ "\2\0\6\1\1\0\1\11\2\1\1\0\1\11\27\1"+ "\1\0\1\11\3\1\3\0\1\11\1\1\1\0\1\11"+ "\1\0\1\11\5\1\1\0\1\11\1\1\1\0\1\11"+ "\2\1\2\0\14\1\1\0\1\11\3\1\1\11\1\0"+ "\1\11\10\1\1\0\1\11\1\1\2\0\1\1\2\0"+ "\7\1\1\0\1\1\1\11\1\0\1\11\1\1\2\0"+ "\3\1\1\0\1\11\3\1\2\0\1\1\2\0\1\1"+ "\1\0\1\11\1\1\1\0\1\11\1\1\1\0\1\11"+ "\3\1\1\0\1\1\1\11\1\0\1\11\5\1\1\0"+ "\1\11\2\1\1\0\1\11\3\1\1\0\1\11\1\1"+ "\1\0\1\11\7\1\1\0\1\11\10\1\1\0\1\11"+ "\24\1\1\0\1\1\1\11\1\1\1\0\1\11\1\1"+ "\1\0\1\11\24\1\1\0\1\11\4\1\1\0\1\11"+ "\5\1\1\0\1\11\4\1\1\0\1\11\2\1\2\0"+ "\5\1\1\0\1\11\5\1\1\0\1\11\2\1\1\0"+ "\1\11\3\1\2\0\1\1\4\0\2\1\1\0\1\11"+ "\2\1\1\0\1\11\1\1\1\0\1\11\1\0\1\11"+ "\14\1\1\0\1\11\1\1\1\0\1\11\2\1\2\0"+ "\2\1\1\11\3\0\1\11\1\0\1\11\2\0\2\11"; private static int [] zzUnpackAttribute() { int [] result = new int[653]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } private static int zzUnpackAttribute(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** the input device */ private java.io.Reader zzReader; /** the current state of the DFA */ private int zzState; /** the current lexical state */ private int zzLexicalState = YYINITIAL; /** this buffer contains the current text to be matched and is the source of the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; /** the textposition at the last accepting state */ private int zzMarkedPos; /** the current text position in the buffer */ private int zzCurrentPos; /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; /** endRead marks the last character in the buffer, that has been read from input */ private int zzEndRead; /** number of newlines encountered up to the start of the matched text */ private int yyline; /** the number of characters up to the start of the matched text */ private int yychar; /** * the number of characters from the last newline up to the start of the * matched text */ private int yycolumn; /** * zzAtBOL == true <=> the scanner is currently at the beginning of a line */ private boolean zzAtBOL = true; /** zzAtEOF == true <=> the scanner is at the EOF */ private boolean zzAtEOF; /** denotes if the user-EOF-code has already been executed */ private boolean zzEOFDone; /* user code: */ private Symbol sym(int sym) { return new Symbol(sym); } private Symbol sym(int sym, Object val) { return new Symbol(sym, val); } boolean strict; //true for template patterns, false otherwise int isName; NameType name; FuncName fname; Ntest ntest; AxisType at; int len; String literal; Double number; int colonPosition; int depth; public boolean isStrict(){ return strict; } public void setStrict(boolean b){ strict = b; } public int getOffset(){ return yychar; } public String getArgument(char c, String input){ int os1=input.indexOf(c), os2=input.lastIndexOf(c); return input.substring(os1+1, os2); } /* public void report_error(String message, Object info) { //throw new XPathParseException("Syntax error during parsing"); } public void report_fatal_error(String message, Object info) throws XPathParseException{ throw new XPathParseException("Syntax error during parsing: "+ message); } public void syntax_error(Symbol cur_token) { } public void unrecovered_syntax_error(Symbol cur_token) throws XPathParseException{ throw new XPathParseException("XPath Syntax error: "+cur_token); }*/ /** * Creates a new scanner * There is also a java.io.InputStream version of this constructor. * * @param in the java.io.Reader to read input from. */ XSLScanner(java.io.Reader in) { isName = 1; colonPosition = -1; depth = 0; // detect the level of [ and ] because strict = false; this.zzReader = in; } /** * Creates a new scanner. * There is also java.io.Reader version of this constructor. * * @param in the java.io.Inputstream to read input from. */ XSLScanner(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 140) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * Refills the input buffer. * * @return <code>false</code>, iff there was new input. * * @exception java.io.IOException if any I/O-Error occurs */ private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead-zzStartRead); /* translate stored positions */ zzEndRead-= zzStartRead; zzCurrentPos-= zzStartRead; zzMarkedPos-= zzStartRead; zzStartRead = 0; } /* is the buffer big enough? */ if (zzCurrentPos >= zzBuffer.length) { /* if not: blow it up */ char newBuffer[] = new char[zzCurrentPos*2]; System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); zzBuffer = newBuffer; } /* finally: fill the buffer with new input */ int numRead = zzReader.read(zzBuffer, zzEndRead, zzBuffer.length-zzEndRead); if (numRead > 0) { zzEndRead+= numRead; return false; } // unlikely but not impossible: read 0 characters, but not at end of stream if (numRead == 0) { int c = zzReader.read(); if (c == -1) { return true; } else { zzBuffer[zzEndRead++] = (char) c; return false; } } // numRead < 0 return true; } /** * Closes the input stream. */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); } /** * Resets the scanner to read from a new input stream. * Does not close the old reader. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>ZZ_INITIAL</tt>. * * @param reader the new input stream */ public final void yyreset(java.io.Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEOFDone = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; } /** * Returns the current lexical state. */ public final int yystate() { return zzLexicalState; } /** * Enters a new lexical state * * @param newState the new lexical state */ public final void yybegin(int newState) { zzLexicalState = newState; } /** * Returns the text matched by the current regular expression. */ public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); } /** * Returns the character at position <tt>pos</tt> from the * matched text. * * It is equivalent to yytext().charAt(pos), but faster * * @param pos the position of the character to fetch. * A value from 0 to yylength()-1. * * @return the character at position pos */ public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; } /** * Returns the length of the matched text region. */ public final int yylength() { return zzMarkedPos-zzStartRead; } /** * Reports an error that occured while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } /** * Contains user EOF-code, which will be executed exactly once, * when the end of file is reached */ private void zzDoEOF() throws java.io.IOException { if (!zzEOFDone) { zzEOFDone = true; yyclose(); } } /** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */ public java_cup.runtime.Symbol next_token() throws java.io.IOException, XPathParseException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; yychar+= zzMarkedPosL-zzStartRead; zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = ZZ_LEXSTATE[zzLexicalState]; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 32: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ABS; fname = new FuncName(); fname.i = FuncName.ABS; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 97: break; case 6: { if (!strict || (strict && (depth >0))){isName = 0 ; /*System.out.println(". returned ");*/ return sym(DOT);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 98: break; case 60: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CONTAINS; fname = new FuncName(); fname.i = FuncName.CONTAINS; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 99: break; case 79: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ENCODE_FOR_URI; fname = new FuncName(); fname.i = FuncName.ENCODE_FOR_URI; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 100: break; case 44: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.COUNT; fname = new FuncName(); fname.i = FuncName.COUNT; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 101: break; case 54: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.CURRENT; return sym(FNAME2,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 102: break; case 81: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING_AFTER; fname = new FuncName(); fname.i = FuncName.SUBSTRING_AFTER; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 103: break; case 75: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.GENERATE_ID; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 104: break; case 46: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.FLOOR; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 105: break; case 87: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.PRECEDING_SIBLING; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 106: break; case 33: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NOT; fname = new FuncName(); fname.i = FuncName.NOT; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 107: break; case 20: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(UNION) ; }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 108: break; case 30: { if (!strict || (strict && (depth >0))){ if (isName == 0) { isName = 1 ; return sym(MOD); } else { isName = 0; name = new NameType(); name.qname = "mod"; //System.out.println("returned a NAME "+yytext()); return sym(NAME,name); }}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 109: break; case 31: { if (!strict || (strict && (depth >0))){ if (isName == 0) { isName = 1 ; return sym(AND); } else { isName = 0; name = new NameType(); name.qname = "add"; return sym(NAME,name); }}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 110: break; case 11: { isName = 0 ; return sym(RP); } case 111: break; case 76: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 112: break; case 15: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(LT); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 113: break; case 78: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STRING_LENGTH; fname = new FuncName(); fname.i = FuncName.STRING_LENGTH; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 114: break; case 18: { if (isName ==0){ isName = 1; //System.out.println("returned a MULT"); return sym(MULT); } else { isName = 0; name = new NameType(); name.qname = "*"; return sym(NAME,name); } } case 115: break; case 9: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(COMMA); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 116: break; case 70: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.PRECEDING; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 117: break; case 62: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING; fname = new FuncName(); fname.i = FuncName.SUBSTRING; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 118: break; case 52: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.PARENT; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 119: break; case 8: { isName = 1 ; return sym(AT); } case 120: break; case 83: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.SUBSTRING_BEFORE; fname = new FuncName(); fname.i = FuncName.SUBSTRING_BEFORE; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 121: break; case 92: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = null; //System.out.println(" !!!!!!!!!!!argument "); return sym(NTEST,ntest); } case 122: break; case 39: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.TRUE; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 123: break; case 28: { isName = 0; len = yytext().length(); name = new NameType(); if (!XMLChar.isNCNameStartChar(yytext().charAt(0))) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position 0"); for(int i=1;i<len-2;i++){ if (!XMLChar.isNCNameChar(yytext().charAt(i))) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position "+i); } name.prefix = yytext().substring(0,len-2); name.localname = "*"; //System.out.println("NAME "+name+ " returned"); return sym(NAME,name); } case 124: break; case 42: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.SELF; //System.out.println("SELF:: returned"); return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 125: break; case 77: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.RESOLVE_QNAME; fname = new FuncName(); fname.i = FuncName.RESOLVE_QNAME; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 126: break; case 48: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.NUMBER; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 127: break; case 36: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAME; fname = new FuncName(); fname.i = FuncName.NAME; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 128: break; case 67: { if (!strict || (strict && (depth >0))){ isName =1; at = new AxisType(); at.i = AxisType.NAMESPACE; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 129: break; case 40: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.NODE; ntest.arg = null; return sym(NTEST,ntest); } case 130: break; case 88: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.FOLLOWING_SIBLING; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 131: break; case 73: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.DESCENDANT; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 132: break; case 47: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.QNAME; fname = new FuncName(); fname.i = FuncName.QNAME; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 133: break; case 23: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(LE);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 134: break; case 59: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.COMMENT; ntest.arg = null; return sym(NTEST,ntest); } case 135: break; case 38: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.LAST; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 136: break; case 41: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.ROUND; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 137: break; case 74: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STARTS_WITH; fname = new FuncName(); fname.i = FuncName.STARTS_WITH; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 138: break; case 1: { isName = 0; name = new NameType(); //name.qname = new String(yytext()); //System.out.println("returned a NAME ==>" + yytext()); //if (yytext().charAt(0) =='-'){ // throw new XPathParseException("Invalid char in name token:"+yytext()); //} name.qname = new String(yytext()); if (!XMLChar.isNCNameStartChar(name.qname.charAt(0))) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position 0"); for(int i=1;i<name.qname.length();i++){ if (!XMLChar.isNCNameChar(name.qname.charAt(i)) && name.qname.charAt(i)!=':' ) throw new XPathParseException("Invalid char in name token: "+yytext()+ "@position "+i); if (name.qname.charAt(i)==':'){ colonPosition = i; } } if (colonPosition != -1){ name.prefix = yytext().substring(0,colonPosition); name.localname = yytext().substring(colonPosition+1); } colonPosition = -1; return sym(NAME,name); } case 139: break; case 64: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ENDS_WITH; fname = new FuncName(); fname.i = FuncName.ENDS_WITH; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 140: break; case 68: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOCAL_NAME; fname = new FuncName(); fname.i = FuncName.LOCAL_NAME; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 141: break; case 86: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_EVEN; fname = new FuncName(); fname.i = FuncName.ROUND_HALF_TO_EVEN; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 142: break; case 4: { throw new XPathParseException("Invalid char in XPath Expression"); } case 143: break; case 84: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.ANCESTOR_OR_SELF; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 144: break; case 27: { isName = 0; len = yytext().length(); literal = yytext().substring(1, len-1); return sym(LITERAL,literal); } case 145: break; case 22: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(GE);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 146: break; case 19: { isName = 1 ; //System.out.println("SLASH returned "); return sym(SLASH); } case 147: break; case 57: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.DOCUMENT; return sym(FNAME2,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 148: break; case 80: { if (!strict || (strict && (depth >0))){ isName =1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NORMALIZE_SPACE; fname = new FuncName(); fname.i = FuncName.NORMALIZE_SPACE; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 149: break; case 25: { isName = 1 ; //System.out.println("DSLASH returned "); return sym(DSLASH); } case 150: break; case 12: { isName = 1 ; /*System.out.println( "[ returned");*/ depth++;return sym(LB); } case 151: break; case 53: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.COMPARE; fname = new FuncName(); fname.i = FuncName.COMPARE; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 152: break; case 21: { if (!strict || (strict && (depth >0))){isName = 0 ; return sym(DDOT);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 153: break; case 17: { if (!strict || (strict && (depth >0))){ isName = 1; return sym(DOLLAR);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 154: break; case 89: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.DESCENDANT_OR_SELF; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 155: break; case 58: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.POSITION; fname = new FuncName(); fname.i = FuncName.POSITION; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 156: break; case 10: { isName = 1 ; return sym(LP); } case 157: break; case 56: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.BOOLEAN; fname = new FuncName(); fname.i = FuncName.BOOLEAN; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 158: break; case 82: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ESCAPE_HTML_URI; fname = new FuncName(); fname.i = FuncName.ESCAPE_HTML_URI; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 159: break; case 29: { if (!strict || (strict && (depth >0))){ if (isName == 0 ) { isName = 1 ; return sym(DIV); } else { isName = 0; name = new NameType(); name.qname = "div"; return sym(NAME,name); }}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 160: break; case 7: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(ADD); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 161: break; case 85: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_ODD; fname = new FuncName(); fname.i = FuncName.ROUND_HALF_TO_ODD; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 162: break; case 37: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.LANG; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 163: break; case 51: { isName = 1; at = new AxisType(); at.i = AxisType.CHILD; return sym(AXISNAME,at); } case 164: break; case 35: { isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.KEY; return sym(FNAME2,fname); } case 165: break; case 90: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOCAL_NAME_FROM_QNAME; fname = new FuncName(); fname.i = FuncName.LOCAL_NAME_FROM_QNAME; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 166: break; case 50: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CONCAT; fname = new FuncName(); fname.i = FuncName.CONCAT; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 167: break; case 72: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.FOLLOWING; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 168: break; case 71: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.UPPER_CASE; fname = new FuncName(); fname.i = FuncName.UPPER_CASE; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 169: break; case 14: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(GT);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 170: break; case 43: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.TEXT; ntest.arg = null; return sym(NTEST,ntest); } case 171: break; case 63: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.TRANSLATE; fname = new FuncName(); fname.i = FuncName.TRANSLATE; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 172: break; case 95: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = getArgument('"',yytext()); //System.out.println(" !!!!!!!!!!!argument ==>" +ntest.arg); return sym(NTEST,ntest); } case 173: break; case 94: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FROM_QNAME; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI_FROM_QNAME; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 174: break; case 45: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.FALSE; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 175: break; case 2: { /* eat white space */ } case 176: break; case 5: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(SUB); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 177: break; case 65: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.IRI_TO_URI; fname = new FuncName(); fname.i = FuncName.IRI_TO_URI; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 178: break; case 24: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(NE);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 179: break; case 16: { if (!strict || (strict && (depth >0))){ isName = 1 ; return sym(EQ);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 180: break; case 34: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.SUM; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 181: break; case 3: { if (!strict || (strict && (depth >0))){ isName = 0; number = new Double(yytext()); //System.out.println("number returned ==> "+ Double.parseDouble(yytext())); return sym(NUMBER,number);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 182: break; case 26: { if (!strict || (strict && (depth >0))){ if (isName == 0) { isName = 1 ; return sym(OR); } else { isName = 0; name = new NameType(); name.qname = "or"; return sym(NAME,name); }}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 183: break; case 96: { isName = 0; ntest = new Ntest(); ntest.i = Ntest.PROCESSING_INSTRUCTION; ntest.arg = getArgument('\'', yytext()); //System.out.println(" !!!!!!!!!!!argument ==>" +ntest.arg); return sym(NTEST,ntest); } case 184: break; case 55: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); fname = new FuncName(); fname.i = FuncName.CEILING; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 185: break; case 13: { isName = 0 ; depth--; return sym(RB); } case 186: break; case 69: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.LOWER_CASE; fname = new FuncName(); fname.i = FuncName.LOWER_CASE; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 187: break; case 93: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX; fname = new FuncName(); fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 188: break; case 61: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.ANCESTOR; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 189: break; case 66: { if (!strict || (strict && (depth >0))){ isName = 1; at = new AxisType(); at.i = AxisType.ATTRIBUTE; return sym(AXISNAME,at);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 190: break; case 91: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.CODE_POINTS_TO_STRING; fname = new FuncName(); fname.i = FuncName.CODE_POINTS_TO_STRING; return sym(FNAME,fname);}else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 191: break; case 49: { if (!strict || (strict && (depth >0))){ isName = 1; yypushback(1); //yyparser.yylval.fname.i = FuncName.STRING; fname = new FuncName(); fname.i = FuncName.STRING; return sym(FNAME,fname); }else throw new XPathParseException(yytext()+" can't appear in a template pattern"); } case 192: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; zzDoEOF(); { return new java_cup.runtime.Symbol(sym.EOF); } } else { zzScanError(ZZ_NO_MATCH); } } } } }
91,666
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
parser.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/parser.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //---------------------------------------------------- // The following code was generated by CUP v0.10k // Wed Jan 04 19:29:51 PST 2012 //---------------------------------------------------- package com.ximpleware.xpath; import java_cup.runtime.*; import com.ximpleware.*; import com.ximpleware.xpath.*; import java.util.*; /** CUP v0.10k generated parser. * @version Wed Jan 04 19:29:51 PST 2012 */ public class parser extends java_cup.runtime.lr_parser { /** Default constructor. */ public parser() {super();} /** Constructor which sets the default scanner. */ public parser(java_cup.runtime.Scanner s) {super(s);} /** Production table. */ protected static final short _production_table[][] = unpackFromStrings(new String[] { "\000\102\000\002\005\003\000\002\002\004\000\002\006" + "\003\000\002\006\005\000\002\010\003\000\002\010\005" + "\000\002\007\003\000\002\007\005\000\002\007\005\000" + "\002\011\003\000\002\011\005\000\002\011\005\000\002" + "\011\005\000\002\011\005\000\002\012\003\000\002\012" + "\005\000\002\012\005\000\002\013\003\000\002\013\005" + "\000\002\013\005\000\002\013\005\000\002\014\003\000" + "\002\014\004\000\002\020\003\000\002\020\005\000\002" + "\015\003\000\002\015\003\000\002\015\005\000\002\015" + "\005\000\002\016\003\000\002\016\004\000\002\022\003" + "\000\002\022\005\000\002\022\003\000\002\022\003\000" + "\002\022\003\000\002\003\006\000\002\021\002\000\002" + "\021\003\000\002\021\005\000\002\023\003\000\002\024" + "\003\000\002\024\003\000\002\033\003\000\002\033\004" + "\000\002\033\003\000\002\032\003\000\002\032\005\000" + "\002\032\003\000\002\030\005\000\002\030\003\000\002" + "\027\003\000\002\027\003\000\002\037\002\000\002\037" + "\004\000\002\025\003\000\002\025\003\000\002\026\002" + "\000\002\026\003\000\002\031\003\000\002\031\003\000" + "\002\034\004\000\002\035\005\000\002\036\005\000\002" + "\017\004\000\002\004\003" }); /** Access to production table. */ public short[][] production_table() {return _production_table;} /** Parse-action table. */ protected static final short[][] _action_table = unpackFromStrings(new String[] { "\000\141\000\036\005\045\006\021\007\017\010\042\012" + "\016\025\004\026\006\035\037\036\032\037\036\040\024" + "\041\uffc8\042\uffc8\043\043\001\002\000\062\002\uffd6\004" + "\uffd6\005\uffd6\006\021\007\017\010\042\011\uffd6\013\uffd6" + "\015\uffd6\016\uffd6\017\uffd6\020\uffd6\021\uffd6\022\uffd6\023" + "\uffd6\024\uffd6\027\uffd6\030\uffd6\031\uffd6\032\uffd6\033\uffd6" + "\041\uffc8\042\uffc8\043\043\001\002\000\032\002\ufffb\011" + "\ufffb\013\ufffb\015\ufffb\016\120\017\117\020\122\021\121" + "\022\ufffb\023\ufffb\031\ufffb\032\ufffb\001\002\000\016\006" + "\021\007\017\010\042\041\uffc8\042\uffc8\043\043\001\002" + "\000\046\002\uffd4\004\uffd4\005\uffd4\011\uffd4\013\uffd4\015" + "\uffd4\016\uffd4\017\uffd4\020\uffd4\021\uffd4\022\uffd4\023\uffd4" + "\024\uffd4\027\uffd4\030\uffd4\031\uffd4\032\uffd4\033\uffd4\001" + "\002\000\054\002\uffde\004\uffde\005\uffde\011\uffde\013\uffde" + "\014\uffde\015\uffde\016\uffde\017\uffde\020\uffde\021\uffde\022" + "\uffde\023\uffde\024\uffde\025\uffde\026\uffde\027\uffde\030\uffde" + "\031\uffde\032\uffde\033\uffde\001\002\000\016\002\uffff\011" + "\uffff\013\uffff\015\uffff\031\132\032\uffff\001\002\000\006" + "\041\136\042\134\001\002\000\006\041\uffc9\042\uffc9\001" + "\002\000\014\002\001\011\001\013\001\015\001\032\130" + "\001\002\000\022\002\ufffd\011\ufffd\013\ufffd\015\ufffd\022" + "\114\023\115\031\ufffd\032\ufffd\001\002\000\036\005\045" + "\006\021\007\017\010\042\012\016\025\004\026\006\035" + "\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043\043" + "\001\002\000\052\002\uffc5\004\uffc5\005\uffc5\011\uffc5\013" + "\uffc5\015\uffc5\016\uffc5\017\uffc5\020\uffc5\021\uffc5\022\uffc5" + "\023\uffc5\024\uffc5\025\uffc5\026\uffc5\027\uffc5\030\uffc5\031" + "\uffc5\032\uffc5\033\uffc5\001\002\000\046\002\uffd7\004\uffd7" + "\005\uffd7\011\uffd7\013\uffd7\015\uffd7\016\uffd7\017\uffd7\020" + "\uffd7\021\uffd7\022\uffd7\023\uffd7\024\uffd7\027\uffd7\030\uffd7" + "\031\uffd7\032\uffd7\033\uffd7\001\002\000\052\002\uffc6\004" + "\uffc6\005\uffc6\011\uffc6\013\uffc6\015\uffc6\016\uffc6\017\uffc6" + "\020\uffc6\021\uffc6\022\uffc6\023\uffc6\024\uffc6\025\uffc6\026" + "\uffc6\027\uffc6\030\uffc6\031\uffc6\032\uffc6\033\uffc6\001\002" + "\000\036\002\ufff8\004\107\005\106\011\ufff8\013\ufff8\015" + "\ufff8\016\ufff8\017\ufff8\020\ufff8\021\ufff8\022\ufff8\023\ufff8" + "\031\ufff8\032\ufff8\001\002\000\044\002\ufff0\004\ufff0\005" + "\ufff0\011\ufff0\013\ufff0\015\ufff0\016\ufff0\017\ufff0\020\ufff0" + "\021\ufff0\022\ufff0\023\ufff0\024\ufff0\027\ufff0\030\ufff0\031" + "\ufff0\032\ufff0\001\002\000\004\012\uffc0\001\002\000\004" + "\012\077\001\002\000\052\002\uffd3\004\uffd3\005\uffd3\011" + "\uffd3\013\uffd3\015\uffd3\016\uffd3\017\uffd3\020\uffd3\021\uffd3" + "\022\uffd3\023\uffd3\024\uffd3\025\074\026\073\027\uffd3\030" + "\uffd3\031\uffd3\032\uffd3\033\uffd3\001\002\000\046\002\uffe8" + "\004\uffe8\005\uffe8\011\uffe8\013\uffe8\015\uffe8\016\uffe8\017" + "\uffe8\020\uffe8\021\uffe8\022\uffe8\023\uffe8\024\uffe8\027\uffe8" + "\030\uffe8\031\uffe8\032\uffe8\033\uffe8\001\002\000\054\002" + "\uffe4\004\uffe4\005\uffe4\011\uffe4\013\uffe4\014\uffe4\015\uffe4" + "\016\uffe4\017\uffe4\020\uffe4\021\uffe4\022\uffe4\023\uffe4\024" + "\uffe4\025\uffe4\026\uffe4\027\uffe4\030\uffe4\031\uffe4\032\uffe4" + "\033\uffe4\001\002\000\046\002\uffea\004\uffea\005\uffea\011" + "\uffea\013\uffea\015\uffea\016\uffea\017\uffea\020\uffea\021\uffea" + "\022\uffea\023\uffea\024\uffea\027\uffea\030\uffea\031\uffea\032" + "\uffea\033\071\001\002\000\054\002\uffdf\004\uffdf\005\uffdf" + "\011\uffdf\013\uffdf\014\uffdf\015\uffdf\016\uffdf\017\uffdf\020" + "\uffdf\021\uffdf\022\uffdf\023\uffdf\024\uffdf\025\uffdf\026\uffdf" + "\027\uffdf\030\uffdf\031\uffdf\032\uffdf\033\uffdf\001\002\000" + "\054\002\uffe2\004\uffe2\005\uffe2\011\uffe2\013\uffe2\014\uffe2" + "\015\uffe2\016\uffe2\017\uffe2\020\uffe2\021\uffe2\022\uffe2\023" + "\uffe2\024\uffe2\025\uffe2\026\uffe2\027\uffe2\030\uffe2\031\uffe2" + "\032\uffe2\033\uffe2\001\002\000\054\002\uffe7\004\uffe7\005" + "\uffe7\011\uffe7\013\uffe7\014\064\015\uffe7\016\uffe7\017\uffe7" + "\020\uffe7\021\uffe7\022\uffe7\023\uffe7\024\uffe7\025\063\026" + "\062\027\uffe7\030\uffe7\031\uffe7\032\uffe7\033\uffe7\001\002" + "\000\004\002\060\001\002\000\054\002\uffe0\004\uffe0\005" + "\uffe0\011\uffe0\013\uffe0\014\uffe0\015\uffe0\016\uffe0\017\uffe0" + "\020\uffe0\021\uffe0\022\uffe0\023\uffe0\024\uffe0\025\uffe0\026" + "\uffe0\027\uffe0\030\uffe0\031\uffe0\032\uffe0\033\uffe0\001\002" + "\000\004\042\057\001\002\000\046\002\uffd1\004\uffd1\005" + "\uffd1\011\uffd1\013\uffd1\015\uffd1\016\uffd1\017\uffd1\020\uffd1" + "\021\uffd1\022\uffd1\023\uffd1\024\uffd1\027\uffd1\030\uffd1\031" + "\uffd1\032\uffd1\033\uffd1\001\002\000\052\002\uffcf\004\uffcf" + "\005\uffcf\011\uffcf\013\uffcf\015\uffcf\016\uffcf\017\uffcf\020" + "\uffcf\021\uffcf\022\uffcf\023\uffcf\024\uffcf\025\uffcf\026\uffcf" + "\027\uffcf\030\uffcf\031\uffcf\032\uffcf\033\uffcf\001\002\000" + "\006\041\uffc7\042\uffc7\001\002\000\006\041\uffca\042\uffca" + "\001\002\000\044\002\uffec\004\uffec\005\uffec\011\uffec\013" + "\uffec\015\uffec\016\uffec\017\uffec\020\uffec\021\uffec\022\uffec" + "\023\uffec\024\uffec\027\uffec\030\uffec\031\uffec\032\uffec\001" + "\002\000\036\005\045\006\021\007\017\010\042\012\016" + "\025\004\026\006\035\037\036\032\037\036\040\024\041" + "\uffc8\042\uffc8\043\043\001\002\000\044\002\ufff3\004\ufff3" + "\005\ufff3\011\ufff3\013\ufff3\015\ufff3\016\ufff3\017\ufff3\020" + "\ufff3\021\ufff3\022\ufff3\023\ufff3\024\051\027\052\030\050" + "\031\ufff3\032\ufff3\001\002\000\046\002\uffd8\004\uffd8\005" + "\uffd8\011\uffd8\013\uffd8\015\uffd8\016\uffd8\017\uffd8\020\uffd8" + "\021\uffd8\022\uffd8\023\uffd8\024\uffd8\027\uffd8\030\uffd8\031" + "\uffd8\032\uffd8\033\uffd8\001\002\000\036\005\045\006\021" + "\007\017\010\042\012\016\025\004\026\006\035\037\036" + "\032\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002" + "\000\036\005\045\006\021\007\017\010\042\012\016\025" + "\004\026\006\035\037\036\032\037\036\040\024\041\uffc8" + "\042\uffc8\043\043\001\002\000\036\005\045\006\021\007" + "\017\010\042\012\016\025\004\026\006\035\037\036\032" + "\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002\000" + "\044\002\uffee\004\uffee\005\uffee\011\uffee\013\uffee\015\uffee" + "\016\uffee\017\uffee\020\uffee\021\uffee\022\uffee\023\uffee\024" + "\uffee\027\uffee\030\uffee\031\uffee\032\uffee\001\002\000\044" + "\002\uffef\004\uffef\005\uffef\011\uffef\013\uffef\015\uffef\016" + "\uffef\017\uffef\020\uffef\021\uffef\022\uffef\023\uffef\024\uffef" + "\027\uffef\030\uffef\031\uffef\032\uffef\001\002\000\044\002" + "\uffed\004\uffed\005\uffed\011\uffed\013\uffed\015\uffed\016\uffed" + "\017\uffed\020\uffed\021\uffed\022\uffed\023\uffed\024\uffed\027" + "\uffed\030\uffed\031\uffed\032\uffed\001\002\000\044\002\uffeb" + "\004\uffeb\005\uffeb\011\uffeb\013\uffeb\015\uffeb\016\uffeb\017" + "\uffeb\020\uffeb\021\uffeb\022\uffeb\023\uffeb\024\uffeb\027\uffeb" + "\030\uffeb\031\uffeb\032\uffeb\001\002\000\054\002\uffc1\004" + "\uffc1\005\uffc1\011\uffc1\013\uffc1\014\uffc1\015\uffc1\016\uffc1" + "\017\uffc1\020\uffc1\021\uffc1\022\uffc1\023\uffc1\024\uffc1\025" + "\uffc1\026\uffc1\027\uffc1\030\uffc1\031\uffc1\032\uffc1\033\uffc1" + "\001\002\000\004\002\000\001\002\000\054\002\uffe3\004" + "\uffe3\005\uffe3\011\uffe3\013\uffe3\014\uffe3\015\uffe3\016\uffe3" + "\017\uffe3\020\uffe3\021\uffe3\022\uffe3\023\uffe3\024\uffe3\025" + "\uffe3\026\uffe3\027\uffe3\030\uffe3\031\uffe3\032\uffe3\033\uffe3" + "\001\002\000\016\006\021\007\017\010\042\041\uffc8\042" + "\uffc8\043\043\001\002\000\016\006\021\007\017\010\042" + "\041\uffc8\042\uffc8\043\043\001\002\000\036\005\045\006" + "\021\007\017\010\042\012\016\025\004\026\006\035\037" + "\036\032\037\036\040\024\041\uffc8\042\uffc8\043\043\001" + "\002\000\004\015\066\001\002\000\054\002\uffc2\004\uffc2" + "\005\uffc2\011\uffc2\013\uffc2\014\uffc2\015\uffc2\016\uffc2\017" + "\uffc2\020\uffc2\021\uffc2\022\uffc2\023\uffc2\024\uffc2\025\uffc2" + "\026\uffc2\027\uffc2\030\uffc2\031\uffc2\032\uffc2\033\uffc2\001" + "\002\000\046\002\uffe6\004\uffe6\005\uffe6\011\uffe6\013\uffe6" + "\015\uffe6\016\uffe6\017\uffe6\020\uffe6\021\uffe6\022\uffe6\023" + "\uffe6\024\uffe6\027\uffe6\030\uffe6\031\uffe6\032\uffe6\033\uffe6" + "\001\002\000\046\002\uffe5\004\uffe5\005\uffe5\011\uffe5\013" + "\uffe5\015\uffe5\016\uffe5\017\uffe5\020\uffe5\021\uffe5\022\uffe5" + "\023\uffe5\024\uffe5\027\uffe5\030\uffe5\031\uffe5\032\uffe5\033" + "\uffe5\001\002\000\034\006\021\007\017\010\042\012\016" + "\025\004\026\006\035\037\036\032\037\036\040\024\041" + "\uffc8\042\uffc8\043\043\001\002\000\044\002\uffe9\004\uffe9" + "\005\uffe9\011\uffe9\013\uffe9\015\uffe9\016\uffe9\017\uffe9\020" + "\uffe9\021\uffe9\022\uffe9\023\uffe9\024\uffe9\027\uffe9\030\uffe9" + "\031\uffe9\032\uffe9\001\002\000\016\006\021\007\017\010" + "\042\041\uffc8\042\uffc8\043\043\001\002\000\016\006\021" + "\007\017\010\042\041\uffc8\042\uffc8\043\043\001\002\000" + "\046\002\uffd2\004\uffd2\005\uffd2\011\uffd2\013\uffd2\015\uffd2" + "\016\uffd2\017\uffd2\020\uffd2\021\uffd2\022\uffd2\023\uffd2\024" + "\uffd2\027\uffd2\030\uffd2\031\uffd2\032\uffd2\033\uffd2\001\002" + "\000\046\002\uffc3\004\uffc3\005\uffc3\011\uffc3\013\uffc3\015" + "\uffc3\016\uffc3\017\uffc3\020\uffc3\021\uffc3\022\uffc3\023\uffc3" + "\024\uffc3\027\uffc3\030\uffc3\031\uffc3\032\uffc3\033\uffc3\001" + "\002\000\040\005\045\006\021\007\017\010\042\012\016" + "\013\uffdc\025\004\026\006\035\037\036\032\037\036\040" + "\024\041\uffc8\042\uffc8\043\043\001\002\000\004\013\105" + "\001\002\000\006\011\103\013\uffdb\001\002\000\006\011" + "\uffd9\013\uffd9\001\002\000\040\005\045\006\021\007\017" + "\010\042\012\016\013\uffdc\025\004\026\006\035\037\036" + "\032\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002" + "\000\004\013\uffda\001\002\000\054\002\uffdd\004\uffdd\005" + "\uffdd\011\uffdd\013\uffdd\014\uffdd\015\uffdd\016\uffdd\017\uffdd" + "\020\uffdd\021\uffdd\022\uffdd\023\uffdd\024\uffdd\025\uffdd\026" + "\uffdd\027\uffdd\030\uffdd\031\uffdd\032\uffdd\033\uffdd\001\002" + "\000\036\005\045\006\021\007\017\010\042\012\016\025" + "\004\026\006\035\037\036\032\037\036\040\024\041\uffc8" + "\042\uffc8\043\043\001\002\000\036\005\045\006\021\007" + "\017\010\042\012\016\025\004\026\006\035\037\036\032" + "\037\036\040\024\041\uffc8\042\uffc8\043\043\001\002\000" + "\044\002\ufff2\004\ufff2\005\ufff2\011\ufff2\013\ufff2\015\ufff2" + "\016\ufff2\017\ufff2\020\ufff2\021\ufff2\022\ufff2\023\ufff2\024" + "\051\027\052\030\050\031\ufff2\032\ufff2\001\002\000\044" + "\002\ufff1\004\ufff1\005\ufff1\011\ufff1\013\ufff1\015\ufff1\016" + "\ufff1\017\ufff1\020\ufff1\021\ufff1\022\ufff1\023\ufff1\024\051" + "\027\052\030\050\031\ufff1\032\ufff1\001\002\000\004\013" + "\113\001\002\000\054\002\uffe1\004\uffe1\005\uffe1\011\uffe1" + "\013\uffe1\014\uffe1\015\uffe1\016\uffe1\017\uffe1\020\uffe1\021" + "\uffe1\022\uffe1\023\uffe1\024\uffe1\025\uffe1\026\uffe1\027\uffe1" + "\030\uffe1\031\uffe1\032\uffe1\033\uffe1\001\002\000\036\005" + "\045\006\021\007\017\010\042\012\016\025\004\026\006" + "\035\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043" + "\043\001\002\000\036\005\045\006\021\007\017\010\042" + "\012\016\025\004\026\006\035\037\036\032\037\036\040" + "\024\041\uffc8\042\uffc8\043\043\001\002\000\032\002\ufff9" + "\011\ufff9\013\ufff9\015\ufff9\016\120\017\117\020\122\021" + "\121\022\ufff9\023\ufff9\031\ufff9\032\ufff9\001\002\000\036" + "\005\045\006\021\007\017\010\042\012\016\025\004\026" + "\006\035\037\036\032\037\036\040\024\041\uffc8\042\uffc8" + "\043\043\001\002\000\036\005\045\006\021\007\017\010" + "\042\012\016\025\004\026\006\035\037\036\032\037\036" + "\040\024\041\uffc8\042\uffc8\043\043\001\002\000\036\005" + "\045\006\021\007\017\010\042\012\016\025\004\026\006" + "\035\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043" + "\043\001\002\000\036\005\045\006\021\007\017\010\042" + "\012\016\025\004\026\006\035\037\036\032\037\036\040" + "\024\041\uffc8\042\uffc8\043\043\001\002\000\036\002\ufff4" + "\004\107\005\106\011\ufff4\013\ufff4\015\ufff4\016\ufff4\017" + "\ufff4\020\ufff4\021\ufff4\022\ufff4\023\ufff4\031\ufff4\032\ufff4" + "\001\002\000\036\002\ufff5\004\107\005\106\011\ufff5\013" + "\ufff5\015\ufff5\016\ufff5\017\ufff5\020\ufff5\021\ufff5\022\ufff5" + "\023\ufff5\031\ufff5\032\ufff5\001\002\000\036\002\ufff6\004" + "\107\005\106\011\ufff6\013\ufff6\015\ufff6\016\ufff6\017\ufff6" + "\020\ufff6\021\ufff6\022\ufff6\023\ufff6\031\ufff6\032\ufff6\001" + "\002\000\036\002\ufff7\004\107\005\106\011\ufff7\013\ufff7" + "\015\ufff7\016\ufff7\017\ufff7\020\ufff7\021\ufff7\022\ufff7\023" + "\ufff7\031\ufff7\032\ufff7\001\002\000\032\002\ufffa\011\ufffa" + "\013\ufffa\015\ufffa\016\120\017\117\020\122\021\121\022" + "\ufffa\023\ufffa\031\ufffa\032\ufffa\001\002\000\036\005\045" + "\006\021\007\017\010\042\012\016\025\004\026\006\035" + "\037\036\032\037\036\040\024\041\uffc8\042\uffc8\043\043" + "\001\002\000\016\002\ufffe\011\ufffe\013\ufffe\015\ufffe\031" + "\132\032\ufffe\001\002\000\036\005\045\006\021\007\017" + "\010\042\012\016\025\004\026\006\035\037\036\032\037" + "\036\040\024\041\uffc8\042\uffc8\043\043\001\002\000\022" + "\002\ufffc\011\ufffc\013\ufffc\015\ufffc\022\114\023\115\031" + "\ufffc\032\ufffc\001\002\000\054\002\uffce\004\uffce\005\uffce" + "\011\uffce\013\uffce\014\uffce\015\uffce\016\uffce\017\uffce\020" + "\uffce\021\uffce\022\uffce\023\uffce\024\uffce\025\uffce\026\uffce" + "\027\uffce\030\uffce\031\uffce\032\uffce\033\uffce\001\002\000" + "\054\002\uffcc\004\uffcc\005\uffcc\011\uffcc\013\uffcc\014\064" + "\015\uffcc\016\uffcc\017\uffcc\020\uffcc\021\uffcc\022\uffcc\023" + "\uffcc\024\uffcc\025\uffcc\026\uffcc\027\uffcc\030\uffcc\031\uffcc" + "\032\uffcc\033\uffcc\001\002\000\054\002\uffcd\004\uffcd\005" + "\uffcd\011\uffcd\013\uffcd\014\uffcd\015\uffcd\016\uffcd\017\uffcd" + "\020\uffcd\021\uffcd\022\uffcd\023\uffcd\024\uffcd\025\uffcd\026" + "\uffcd\027\uffcd\030\uffcd\031\uffcd\032\uffcd\033\uffcd\001\002" + "\000\054\002\uffcc\004\uffcc\005\uffcc\011\uffcc\013\uffcc\014" + "\064\015\uffcc\016\uffcc\017\uffcc\020\uffcc\021\uffcc\022\uffcc" + "\023\uffcc\024\uffcc\025\uffcc\026\uffcc\027\uffcc\030\uffcc\031" + "\uffcc\032\uffcc\033\uffcc\001\002\000\052\002\uffd0\004\uffd0" + "\005\uffd0\011\uffd0\013\uffd0\015\uffd0\016\uffd0\017\uffd0\020" + "\uffd0\021\uffd0\022\uffd0\023\uffd0\024\uffd0\025\uffd0\026\uffd0" + "\027\uffd0\030\uffd0\031\uffd0\032\uffd0\033\uffd0\001\002\000" + "\052\002\uffcb\004\uffcb\005\uffcb\011\uffcb\013\uffcb\015\uffcb" + "\016\uffcb\017\uffcb\020\uffcb\021\uffcb\022\uffcb\023\uffcb\024" + "\uffcb\025\uffcb\026\uffcb\027\uffcb\030\uffcb\031\uffcb\032\uffcb" + "\033\uffcb\001\002\000\046\002\uffc4\004\uffc4\005\uffc4\011" + "\uffc4\013\uffc4\015\uffc4\016\uffc4\017\uffc4\020\uffc4\021\uffc4" + "\022\uffc4\023\uffc4\024\uffc4\027\uffc4\030\uffc4\031\uffc4\032" + "\uffc4\033\uffc4\001\002\000\046\002\uffd5\004\uffd5\005\uffd5" + "\011\uffd5\013\uffd5\015\uffd5\016\uffd5\017\uffd5\020\uffd5\021" + "\uffd5\022\uffd5\023\uffd5\024\uffd5\027\uffd5\030\uffd5\031\uffd5" + "\032\uffd5\033\uffd5\001\002" }); /** Access to parse-action table. */ public short[][] action_table() {return _action_table;} /** <code>reduce_goto</code> table. */ protected static final short[][] _reduce_table = unpackFromStrings(new String[] { "\000\141\000\062\003\007\004\024\005\034\006\013\007" + "\014\010\010\011\004\012\021\013\045\014\022\015\030" + "\016\033\017\032\020\043\022\027\024\026\025\011\026" + "\012\030\025\031\040\032\046\033\017\034\006\035\037" + "\001\001\000\016\025\011\026\012\030\025\031\040\032" + "\142\035\037\001\001\000\002\001\001\000\016\025\011" + "\026\012\030\025\031\040\032\141\035\037\001\001\000" + "\002\001\001\000\002\001\001\000\002\001\001\000\004" + "\027\134\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\062\003\007\004\024\005\111\006\013" + "\007\014\010\010\011\004\012\021\013\045\014\022\015" + "\030\016\033\017\032\020\043\022\027\024\026\025\011" + "\026\012\030\025\031\040\032\046\033\017\034\006\035" + "\037\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\004\036\060\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\044\003\007\004\024\014\055\015\030\016" + "\033\017\032\020\043\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\002\001\001\000\044\003\007" + "\004\024\014\054\015\030\016\033\017\032\020\043\022" + "\027\024\026\025\011\026\012\030\025\031\040\032\046" + "\033\017\034\006\035\037\001\001\000\044\003\007\004" + "\024\014\053\015\030\016\033\017\032\020\043\022\027" + "\024\026\025\011\026\012\030\025\031\040\032\046\033" + "\017\034\006\035\037\001\001\000\044\003\007\004\024" + "\014\052\015\030\016\033\017\032\020\043\022\027\024" + "\026\025\011\026\012\030\025\031\040\032\046\033\017" + "\034\006\035\037\001\001\000\002\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\002\001\001\000\016\025\011\026" + "\012\030\025\031\040\032\067\035\037\001\001\000\016" + "\025\011\026\012\030\025\031\040\032\066\035\037\001" + "\001\000\062\003\007\004\024\005\064\006\013\007\014" + "\010\010\011\004\012\021\013\045\014\022\015\030\016" + "\033\017\032\020\043\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\042\003\007\004\024\015\030\016" + "\033\017\032\020\071\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\016\025\011\026\012\030\025" + "\031\040\032\075\035\037\001\001\000\016\025\011\026" + "\012\030\025\031\040\032\074\035\037\001\001\000\002" + "\001\001\000\002\001\001\000\066\003\007\004\024\005" + "\101\006\013\007\014\010\010\011\004\012\021\013\045" + "\014\022\015\030\016\033\017\032\020\043\021\077\022" + "\027\023\100\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\066\003\007" + "\004\024\005\101\006\013\007\014\010\010\011\004\012" + "\021\013\045\014\022\015\030\016\033\017\032\020\043" + "\021\103\022\027\023\100\024\026\025\011\026\012\030" + "\025\031\040\032\046\033\017\034\006\035\037\001\001" + "\000\002\001\001\000\002\001\001\000\046\003\007\004" + "\024\013\110\014\022\015\030\016\033\017\032\020\043" + "\022\027\024\026\025\011\026\012\030\025\031\040\032" + "\046\033\017\034\006\035\037\001\001\000\046\003\007" + "\004\024\013\107\014\022\015\030\016\033\017\032\020" + "\043\022\027\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\002\001" + "\001\000\002\001\001\000\002\001\001\000\002\001\001" + "\000\052\003\007\004\024\011\126\012\021\013\045\014" + "\022\015\030\016\033\017\032\020\043\022\027\024\026" + "\025\011\026\012\030\025\031\040\032\046\033\017\034" + "\006\035\037\001\001\000\052\003\007\004\024\011\115" + "\012\021\013\045\014\022\015\030\016\033\017\032\020" + "\043\022\027\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\002\001" + "\001\000\050\003\007\004\024\012\125\013\045\014\022" + "\015\030\016\033\017\032\020\043\022\027\024\026\025" + "\011\026\012\030\025\031\040\032\046\033\017\034\006" + "\035\037\001\001\000\050\003\007\004\024\012\124\013" + "\045\014\022\015\030\016\033\017\032\020\043\022\027" + "\024\026\025\011\026\012\030\025\031\040\032\046\033" + "\017\034\006\035\037\001\001\000\050\003\007\004\024" + "\012\123\013\045\014\022\015\030\016\033\017\032\020" + "\043\022\027\024\026\025\011\026\012\030\025\031\040" + "\032\046\033\017\034\006\035\037\001\001\000\050\003" + "\007\004\024\012\122\013\045\014\022\015\030\016\033" + "\017\032\020\043\022\027\024\026\025\011\026\012\030" + "\025\031\040\032\046\033\017\034\006\035\037\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\056\003\007\004\024" + "\007\014\010\130\011\004\012\021\013\045\014\022\015" + "\030\016\033\017\032\020\043\022\027\024\026\025\011" + "\026\012\030\025\031\040\032\046\033\017\034\006\035" + "\037\001\001\000\002\001\001\000\054\003\007\004\024" + "\007\132\011\004\012\021\013\045\014\022\015\030\016" + "\033\017\032\020\043\022\027\024\026\025\011\026\012" + "\030\025\031\040\032\046\033\017\034\006\035\037\001" + "\001\000\002\001\001\000\002\001\001\000\006\036\136" + "\037\137\001\001\000\002\001\001\000\006\036\136\037" + "\140\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001" }); /** Access to <code>reduce_goto</code> table. */ public short[][] reduce_table() {return _reduce_table;} /** Instance of action encapsulation class. */ protected CUP$parser$actions action_obj; /** Action encapsulation object initializer. */ protected void init_actions() { action_obj = new CUP$parser$actions(this); } /** Invoke a user supplied parse action. */ public java_cup.runtime.Symbol do_action( int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top) throws java.lang.Exception { /* call code in generated class */ return action_obj.CUP$parser$do_action(act_num, parser, stack, top); } /** Indicates start state. */ public int start_state() {return 0;} /** Indicates start production. */ public int start_production() {return 1;} /** <code>EOF</code> Symbol index. */ public int EOF_sym() {return 0;} /** <code>error</code> Symbol index. */ public int error_sym() {return 1;} public Hashtable nsHash; public Hashtable symbolHash; Step tempStep; NodeTest tempNt; LocationPathExpr tempLPExpr; //ExprList tmpEL1, tmpEL2; public parser (java.io.Reader input) { super(new Yylex(input)); nsHash = null; } public parser (java.io.InputStream input) { super(new Yylex(input)); } public static void main(String args[]){ try { parser p = new parser(System.in); Object result = p.parse().value; //System.out.println(((Expr)result).evalNumber(null)); //System.out.println(((Expr)result)); } catch (Exception e) { System.out.println("caught: "+e); } } public void report_error(String message, Object info) { //throw new XPathParseException("Syntax error during parsing"); } public void report_fatal_error(String message, Object info) throws XPathParseException{ throw new XPathParseException("Syntax error during parsing: "+ message); } public void syntax_error(Symbol cur_token) { } public void unrecovered_syntax_error(Symbol cur_token) throws XPathParseException{ Yylex scanner = (Yylex)getScanner(); throw new XPathParseException("XPath Syntax error: "+cur_token, scanner.getOffset()); } } /** Cup generated class to encapsulate user supplied action code.*/ class CUP$parser$actions { private final parser parser; /** Constructor */ CUP$parser$actions(parser parser) { this.parser = parser; } /** Method with the actual generated action code. */ public final java_cup.runtime.Symbol CUP$parser$do_action( int CUP$parser$act_num, java_cup.runtime.lr_parser CUP$parser$parser, java.util.Stack CUP$parser$stack, int CUP$parser$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$parser$result; /* select the action based on the action number */ switch (CUP$parser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // FunctionName ::= FNAME { FuncName RESULT = null; int fnleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int fnright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; FuncName fn = (FuncName)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = fn; CUP$parser$result = new java_cup.runtime.Symbol(2/*FunctionName*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // VariableReference ::= DOLLAR NAME { Expr RESULT = null; int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; NameType n = (NameType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; if (parser.symbolHash.get(n.qname)==null) throw new XPathParseException("variableExpression not declared ==> $"+n.qname); RESULT = new VariableExpr(n.qname, (Expr)parser.symbolHash.get(n.qname)); CUP$parser$result = new java_cup.runtime.Symbol(13/*VariableReference*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // Predicate ::= LB Expr RB { Predicate RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Predicate(); if (e.isFinal() && e.isNumerical()){ RESULT.d = e.evalNumber((VTDNav)null); Yylex scanner = (Yylex)parser.getScanner(); if(RESULT.d<1) throw new XPathParseException("invalid index number for predicate", scanner.getOffset()); RESULT.type = Predicate.simple; } RESULT.expr= e; RESULT.requireContext = e.requireContextSize(); //e.markCacheable(); CUP$parser$result = new java_cup.runtime.Symbol(28/*Predicate*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // AbbreviatedRelativeLocationPath ::= Step DSLASH RelativeLocationPath { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setNodeTest(parser.tempNt); s.setNextStep(RESULT); RESULT.setPrevStep(s); RESULT.setNextStep(rlp); rlp.setPrevStep(RESULT); RESULT = s; CUP$parser$result = new java_cup.runtime.Symbol(27/*AbbreviatedRelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath { Step RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setNodeTest(parser.tempNt); RESULT.setNextStep(rlp); rlp.setPrevStep(RESULT); CUP$parser$result = new java_cup.runtime.Symbol(26/*AbbreviatedAbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // AbbreviatedStep ::= DDOT { Step RESULT = null; RESULT = new Step(); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setAxisType(AxisType.PARENT); RESULT.setNodeTest(parser.tempNt); // System.out.println("result " + RESULT.toString()); CUP$parser$result = new java_cup.runtime.Symbol(23/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // AbbreviatedStep ::= DOT { Step RESULT = null; RESULT = new Step(); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); RESULT.setAxisType(AxisType.SELF); RESULT.setNodeTest(parser.tempNt); CUP$parser$result = new java_cup.runtime.Symbol(23/*AbbreviatedStep*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // AbbreviatedAxisSpecifier ::= AT { AxisType RESULT = null; RESULT = new AxisType(); RESULT.i = AxisType.ATTRIBUTE; CUP$parser$result = new java_cup.runtime.Symbol(20/*AbbreviatedAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // AbbreviatedAxisSpecifier ::= { AxisType RESULT = null; RESULT = new AxisType(); RESULT.i = AxisType.CHILD; CUP$parser$result = new java_cup.runtime.Symbol(20/*AbbreviatedAxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // AxisSpecifier ::= AbbreviatedAxisSpecifier { AxisType RESULT = null; int aasleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aasright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; AxisType aas = (AxisType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = aas; CUP$parser$result = new java_cup.runtime.Symbol(19/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // AxisSpecifier ::= AXISNAME { AxisType RESULT = null; int anleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int anright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; AxisType an = (AxisType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = an; CUP$parser$result = new java_cup.runtime.Symbol(19/*AxisSpecifier*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // PredicateList ::= Predicate PredicateList { Predicate RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Predicate p = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int plleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int plright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Predicate pl = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; p.nextP = pl; RESULT = p; CUP$parser$result = new java_cup.runtime.Symbol(29/*PredicateList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // PredicateList ::= { Predicate RESULT = null; RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(29/*PredicateList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // nodetest ::= NTEST { NodeTest RESULT = null; int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Ntest n2 = (Ntest)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new NodeTest(); if (n2.i!=3) RESULT.setTestType(n2.i); else { if (n2.arg ==null) RESULT.setTestType(n2.i); //PI0 else { RESULT.setTestType(4); //PI1 RESULT.setNodeName(n2.arg); } } CUP$parser$result = new java_cup.runtime.Symbol(21/*nodetest*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // nodetest ::= NAME { NodeTest RESULT = null; int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; NameType n = (NameType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new NodeTest(); RESULT.setTestType(NodeTest.NAMETEST); RESULT.setNodeName(n.qname); if (n.localname!=null){ RESULT.setNodeNameNS(n.prefix,n.localname); if (parser.nsHash==null || parser.nsHash.get(n.prefix) ==null) throw new XPathParseException("No URL found for prefix:"+n.prefix); RESULT.URL = (String) parser.nsHash.get(n.prefix); } CUP$parser$result = new java_cup.runtime.Symbol(21/*nodetest*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // Step ::= AbbreviatedStep { Step RESULT = null; int absleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int absright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step abs = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = abs; //System.out.println(" step 4"); CUP$parser$result = new java_cup.runtime.Symbol(22/*Step*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // Step ::= AxisSpecifier nodetest PredicateList { Step RESULT = null; int asleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int asright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; AxisType as = (AxisType)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ntleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int ntright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; NodeTest nt = (NodeTest)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int plleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int plright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Predicate pl = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Step(); RESULT.setAxisType(as.i); if ( (as.i== AxisType.ATTRIBUTE || as.i == AxisType.NAMESPACE) && (nt.testType>1)){ Yylex scanner = (Yylex)parser.getScanner(); throw new XPathParseException(as.getAxisString()+" axis can't operate on"+ " comment(), pi(), or text()", scanner.getOffset()); } RESULT.setNodeTest(nt); RESULT.setPredicate(pl); //System.out.println(" Step 3 "); CUP$parser$result = new java_cup.runtime.Symbol(22/*Step*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // RelativeLocationPath ::= AbbreviatedRelativeLocationPath { Step RESULT = null; int arlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int arlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step arlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = arlp; CUP$parser$result = new java_cup.runtime.Symbol(24/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // RelativeLocationPath ::= Step SLASH RelativeLocationPath { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; //if (s == rlp) throw new XPathParseException("$1 = $3!!!!"); s.setNextStep(rlp); rlp.setPrevStep(s); RESULT= s; CUP$parser$result = new java_cup.runtime.Symbol(24/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // RelativeLocationPath ::= Step { Step RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step s = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = s; CUP$parser$result = new java_cup.runtime.Symbol(24/*RelativeLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // AbsoluteLocationPath ::= AbbreviatedAbsoluteLocationPath { Step RESULT = null; int aalpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aalpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step aalp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = aalp; CUP$parser$result = new java_cup.runtime.Symbol(25/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // AbsoluteLocationPath ::= SLASH RelativeLocationPath { Step RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = rlp; CUP$parser$result = new java_cup.runtime.Symbol(25/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // AbsoluteLocationPath ::= SLASH { Step RESULT = null; RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(25/*AbsoluteLocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // LocationPath ::= AbsoluteLocationPath { LocationPathExpr RESULT = null; int alpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int alpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step alp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new LocationPathExpr(); RESULT.setPathType(LocationPathExpr.ABSOLUTE_PATH); //System.out.println(" absolute "); RESULT.setStep(alp); RESULT.optimize(); //startStep = currentStep=null; CUP$parser$result = new java_cup.runtime.Symbol(18/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // LocationPath ::= RelativeLocationPath { LocationPathExpr RESULT = null; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new LocationPathExpr(); RESULT.setStep(rlp); RESULT.optimize(); CUP$parser$result = new java_cup.runtime.Symbol(18/*LocationPath*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // Argument ::= Expr { Expr RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = e; CUP$parser$result = new java_cup.runtime.Symbol(17/*Argument*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // ArgumentList ::= Argument COMMA ArgumentList { Alist RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int alleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int alright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Alist(); RESULT.e = a; RESULT.next = al; CUP$parser$result = new java_cup.runtime.Symbol(15/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // ArgumentList ::= Argument { Alist RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new Alist(); RESULT.e = a; CUP$parser$result = new java_cup.runtime.Symbol(15/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // ArgumentList ::= { Alist RESULT = null; RESULT = null; CUP$parser$result = new java_cup.runtime.Symbol(15/*ArgumentList*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // FunctionCall ::= FunctionName LP ArgumentList RP { FuncExpr RESULT = null; int fnleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int fnright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; FuncName fn = (FuncName)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int alleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int alright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Alist al = (Alist)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; //RESULT = new FuncExpr(fn.i, al); FuncExpr tfe = new FuncExpr(fn.i, al); if (!tfe.checkArgumentCount()) throw new XPathParseException(" argument input for function "+tfe.fname()+" incorrect"); RESULT = tfe; CUP$parser$result = new java_cup.runtime.Symbol(1/*FunctionCall*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // PrimaryExpr ::= FunctionCall { Expr RESULT = null; int fcleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int fcright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; FuncExpr fc = (FuncExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = fc; CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // PrimaryExpr ::= NUMBER { Expr RESULT = null; int neleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int neright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Double ne = (Double)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new NumExpr(ne.doubleValue()); CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // PrimaryExpr ::= LITERAL { Expr RESULT = null; int leleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int leright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String le = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new LiteralExpr(le); CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // PrimaryExpr ::= LP Expr RP { Expr RESULT = null; int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr e = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = e; CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // PrimaryExpr ::= VariableReference { Expr RESULT = null; int veleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int veright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ve = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ve; CUP$parser$result = new java_cup.runtime.Symbol(16/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // FilterExpr ::= FilterExpr Predicate { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Predicate p = (Predicate)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new FilterExpr(fe, p); CUP$parser$result = new java_cup.runtime.Symbol(12/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // FilterExpr ::= PrimaryExpr { Expr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = pe; CUP$parser$result = new java_cup.runtime.Symbol(12/*FilterExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // PathExpr ::= FilterExpr DSLASH RelativeLocationPath { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; parser.tempStep = new Step(); parser.tempStep.setAxisType(AxisType.DESCENDANT_OR_SELF); parser.tempNt = new NodeTest(); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep.setNodeTest(parser.tempNt); parser.tempStep.setNextStep(rlp); rlp.setPrevStep(parser.tempStep); /*parser.tempStep2 = new Step(); parser.tempNt = new NodeTest(); parser.tempStep2.setAxisType(AxisType.SELF); parser.tempNt.setTestType(NodeTest.NODE); parser.tempStep2.setNodeTest(parser.tempNt); parser.tempStep2.setNextStep(parser.tempStep); parser.tempStep.setPrevStep(parser.tempStep2);*/ parser.tempLPExpr = new LocationPathExpr(); parser.tempLPExpr.setStep(parser.tempStep); RESULT = new PathExpr(fe, parser.tempLPExpr); CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // PathExpr ::= FilterExpr SLASH RelativeLocationPath { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int rlpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int rlpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Step rlp = (Step)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; parser.tempLPExpr = new LocationPathExpr(); parser.tempLPExpr.setStep(rlp); RESULT = new PathExpr(fe, parser.tempLPExpr); CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // PathExpr ::= FilterExpr { Expr RESULT = null; int feleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int feright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr fe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = fe; CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // PathExpr ::= LocationPath { Expr RESULT = null; int lpleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int lpright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; LocationPathExpr lp = (LocationPathExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = lp; CUP$parser$result = new java_cup.runtime.Symbol(11/*PathExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // UnionExpr ::= PathExpr UNION UnionExpr { UnionExpr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int uneleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int uneright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; UnionExpr une = (UnionExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new UnionExpr(pe); RESULT.next = une; CUP$parser$result = new java_cup.runtime.Symbol(14/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // UnionExpr ::= PathExpr { UnionExpr RESULT = null; int peleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int peright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr pe = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new UnionExpr(pe); CUP$parser$result = new java_cup.runtime.Symbol(14/*UnionExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // UnaryExpr ::= SUB UnaryExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new UnaryExpr( BinaryExpr.SUB, ue); CUP$parser$result = new java_cup.runtime.Symbol(10/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // UnaryExpr ::= UnionExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; UnionExpr ue = (UnionExpr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; if (ue.next==null) RESULT = ue.e; else RESULT = ue; CUP$parser$result = new java_cup.runtime.Symbol(10/*UnaryExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // MultiplicativeExpr ::= MultiplicativeExpr MOD UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.MOD, ue); CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // MultiplicativeExpr ::= MultiplicativeExpr DIV UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.DIV, ue); CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // MultiplicativeExpr ::= MultiplicativeExpr MULT UnaryExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(me, BinaryExpr.MULT, ue); CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // MultiplicativeExpr ::= UnaryExpr { Expr RESULT = null; int ueleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int ueright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ue = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ue; CUP$parser$result = new java_cup.runtime.Symbol(9/*MultiplicativeExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // AdditiveExpr ::= AdditiveExpr SUB MultiplicativeExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ae, BinaryExpr.SUB, me); CUP$parser$result = new java_cup.runtime.Symbol(8/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // AdditiveExpr ::= AdditiveExpr ADD MultiplicativeExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ae, BinaryExpr.ADD, me); CUP$parser$result = new java_cup.runtime.Symbol(8/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // AdditiveExpr ::= MultiplicativeExpr { Expr RESULT = null; int meleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int meright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr me = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = me; CUP$parser$result = new java_cup.runtime.Symbol(8/*AdditiveExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // RelationalExpr ::= RelationalExpr GE AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.GE, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // RelationalExpr ::= RelationalExpr LE AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.LE, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // RelationalExpr ::= RelationalExpr GT AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.GT, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // RelationalExpr ::= RelationalExpr LT AdditiveExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(re, BinaryExpr.LT, ae); CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // RelationalExpr ::= AdditiveExpr { Expr RESULT = null; int aeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ae = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ae; CUP$parser$result = new java_cup.runtime.Symbol(7/*RelationalExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // EqualityExpr ::= EqualityExpr NE RelationalExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ee, BinaryExpr.NE, re); CUP$parser$result = new java_cup.runtime.Symbol(5/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // EqualityExpr ::= EqualityExpr EQ RelationalExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(ee, BinaryExpr.EQ, re); CUP$parser$result = new java_cup.runtime.Symbol(5/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // EqualityExpr ::= RelationalExpr { Expr RESULT = null; int releft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int reright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr re = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = re; CUP$parser$result = new java_cup.runtime.Symbol(5/*EqualityExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // AndExpr ::= AndExpr AND EqualityExpr { Expr RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(a, BinaryExpr.AND, ee); CUP$parser$result = new java_cup.runtime.Symbol(6/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // AndExpr ::= EqualityExpr { Expr RESULT = null; int eeleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int eeright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr ee = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = ee; CUP$parser$result = new java_cup.runtime.Symbol(6/*AndExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // OrExpr ::= OrExpr OR AndExpr { Expr RESULT = null; int oleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int oright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Expr o = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new BinaryExpr(o,BinaryExpr.OR,a); CUP$parser$result = new java_cup.runtime.Symbol(4/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // OrExpr ::= AndExpr { Expr RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr a = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = a; CUP$parser$result = new java_cup.runtime.Symbol(4/*OrExpr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // $START ::= Expr EOF { Object RESULT = null; int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Expr start_val = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = start_val; CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } /* ACCEPT */ CUP$parser$parser.done_parsing(); return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // Expr ::= OrExpr { Expr RESULT = null; int oleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int oright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Expr o = (Expr)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = o; CUP$parser$result = new java_cup.runtime.Symbol(3/*Expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } }
90,907
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Ntest.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/Ntest.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; /** * Lexer use this class to represent a type of node test * * */ public class Ntest{ public int i; public String arg; public final static int COMMENT = 5; public final static int TEXT = 2; public final static int PROCESSING_INSTRUCTION = 3; public final static int NODE = 1; // public String getNtestString(){ // switch (i){ // case 1: return "node("; // case 2: return "text("; // case 3: return "processing-instruction("; // case 5: return "comment("; // default: return "invalid node type!!!"; // } //} }
1,381
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
sym2.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/sym2.java
/* * Copyright (C) 2002-2011 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //---------------------------------------------------- // The following code was generated by CUP v0.10k // Fri Feb 11 18:15:11 PST 2011 //---------------------------------------------------- package com.ximpleware.xpath; /** CUP generated class containing symbol constants. */ public class sym2 { /* terminals */ public static final int MOD = 22; public static final int AND = 23; public static final int AXISNAME = 34; public static final int NE = 17; public static final int LT = 13; public static final int OR = 24; public static final int DOLLAR = 27; public static final int LP = 8; public static final int SLASH = 19; public static final int RP = 9; public static final int NTEST = 32; public static final int NAME = 33; public static final int AT = 6; public static final int LITERAL = 29; public static final int GT = 12; public static final int LE = 15; public static final int SUB = 3; public static final int LB = 10; public static final int FNAME = 30; public static final int RB = 11; public static final int COMMA = 7; public static final int NUMBER = 28; public static final int MULT = 18; public static final int EOF = 0; public static final int DIV = 21; public static final int ADD = 2; public static final int UNION = 25; public static final int GE = 14; public static final int error = 1; public static final int DOT = 4; public static final int FNAME2 = 31; public static final int EQ = 16; public static final int DDOT = 5; public static final int DSLASH = 20; public static final int UMINUS = 26; }
2,446
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
UnaryExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/UnaryExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * Parser use this class to represent Unary Expr * */ public class UnaryExpr extends Expr { public int op; public Expr operand; public UnaryExpr (int o, Expr e){ op = o; operand = e; //cacheable =false; } final public String toString(){ return "-"+operand; } final public boolean evalBoolean(VTDNav vn){ return operand.evalBoolean(vn); } final public double evalNumber(VTDNav vn){ return -1*operand.evalNumber(vn);} final public int evalNodeSet(VTDNav vn) throws XPathEvalException{ throw new XPathEvalException("UnaryExpr can't eval to a node set!"); } final public String evalString(VTDNav vn){ double dval = operand.evalNumber(vn); if (dval == (int) dval){ return ""+((int) dval); } return ""+dval; } final public void reset(VTDNav vn){ operand.reset(vn); } final public boolean isNodeSet(){ return false; } final public boolean isNumerical(){ return true; } final public boolean isString(){ return false; } final public boolean isBoolean(){ return false; } // to support computer context size // needs to add final public boolean requireContextSize(){ return operand.requireContextSize(); } final public void setContextSize(int size){ operand.setContextSize(size); } final public void setPosition (int pos){ operand.setPosition(pos); } final public int adjust(int n){ return 0; } final public boolean isFinal(){ return operand.isFinal(); } final public void markCacheable(){ operand.markCacheable(); } final public void markCacheable2(){ operand.markCacheable2(); } final public void clearCache(){ operand.clearCache(); } }
2,636
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
sym.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/sym.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //---------------------------------------------------- // The following code was generated by CUP v0.10k // Wed Jan 04 19:29:51 PST 2012 //---------------------------------------------------- package com.ximpleware.xpath; /** CUP generated class containing symbol constants. */ public class sym { /* terminals */ public static final int MOD = 22; public static final int AND = 23; public static final int AXISNAME = 33; public static final int NE = 17; public static final int LT = 13; public static final int OR = 24; public static final int DOLLAR = 27; public static final int LP = 8; public static final int SLASH = 19; public static final int RP = 9; public static final int NTEST = 31; public static final int NAME = 32; public static final int AT = 6; public static final int LITERAL = 29; public static final int GT = 12; public static final int LE = 15; public static final int SUB = 3; public static final int LB = 10; public static final int FNAME = 30; public static final int RB = 11; public static final int COMMA = 7; public static final int NUMBER = 28; public static final int MULT = 18; public static final int EOF = 0; public static final int DIV = 21; public static final int ADD = 2; public static final int UNION = 25; public static final int GE = 14; public static final int error = 1; public static final int DOT = 4; public static final int EQ = 16; public static final int DDOT = 5; public static final int DSLASH = 20; public static final int UMINUS = 26; }
2,409
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
Step.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/Step.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * A step is a part of location path as defined in * Xpath spec * */ public class Step{ public int axis_type; public NodeTest nt; public Predicate p,pt;// linked list public Step nextS; // points to next step //public int position; // position public Step prevS; // points to the prev step public Object o; //AutoPilot or TextIter goes here public boolean ft; // first time public boolean hasPredicate; public boolean nt_eval; public boolean out_of_range; public Step(){ nextS = prevS = (Step)null; p = pt = null; nt = null; ft = true; hasPredicate =false; nt_eval=false; out_of_range=false; //position = 1; } final public void reset(VTDNav vn){ ft = true; if (hasPredicate) resetP(vn); //out_of_range=false; //position = 1; } final public void resetP(VTDNav vn){ Predicate temp = p; while(temp!=null){ temp.reset(vn); temp = temp.nextP; } } final public void setStep4Predicates(){ Predicate temp = p; while(temp!=null){ temp.s=this; temp = temp.nextP; } } final public void resetP(VTDNav vn, Predicate p1){ Predicate temp = p; while(temp!=p1){ temp.reset(vn); temp = temp.nextP; } } final public void adjust(int n){ Predicate temp = p; while(temp!=null){ temp.adjust(n); temp = temp.nextP; } } final public NodeTest getNodeTest(){ return this.nt; } final public Step getNextStep(){ return nextS; } final public void setNextStep(Step s){ nextS = s; } final public boolean get_ft(){ return ft; } final public void set_ft(boolean b){ ft = b; } final public Step getPrevStep(){ return prevS; } final public void setPrevStep(Step s){ prevS = s; /*if ((this.axis_type==AxisType.CHILD || this.axis_type==AxisType.CHILD0 || this.axis_type==AxisType.ATTRIBUTE) && this.nt.testType==NodeTest.NAMETEST){ }*/ } final public void setNodeTest(NodeTest n){ nt = n; if (axis_type == AxisType.CHILD && n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.CHILD0; }else if (axis_type == AxisType.DESCENDANT && n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.DESCENDANT0; }else if (axis_type == AxisType.DESCENDANT_OR_SELF && n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.DESCENDANT_OR_SELF0; }else if (axis_type == AxisType.FOLLOWING && n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.FOLLOWING0; }else if (axis_type == AxisType.PRECEDING && n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.PRECEDING0; }else if (axis_type == AxisType.FOLLOWING_SIBLING && n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.FOLLOWING_SIBLING0; }else if (axis_type == AxisType.PRECEDING_SIBLING&& n.testType ==NodeTest.NAMETEST ){ axis_type = AxisType.PRECEDING_SIBLING0; } if (n.testType== NodeTest.NODE || (n.testType==NodeTest.NAMETEST && n.nodeName.equals("*"))){ nt_eval= true; } } final public void setPredicate(Predicate p1){ if (p == null){ p = pt = p1; } else { pt.nextP = p1; pt = pt.nextP; } setStep4Predicates(); if (p1!=null) hasPredicate = true; } final public boolean eval(VTDNav vn)throws NavException{ /*boolean result = this.nt.eval(vn); if (result == false) return false; return evalPredicates(vn);*/ return nt.eval(vn) && ((!hasPredicate) || evalPredicates(vn)); } final public boolean eval2(VTDNav vn)throws NavException{ /*boolean result = this.nt.eval(vn); if (result == false) return false; return evalPredicates(vn);*/ //return nt.eval2(vn) && evalPredicates(vn); return nt.eval2(vn) && ((!hasPredicate) || evalPredicates(vn)); } final public boolean eval(VTDNav vn, Predicate p) throws NavException{ return nt.eval(vn) && evalPredicates(vn,p); } final public boolean eval2(VTDNav vn, Predicate p) throws NavException{ return nt.eval2(vn) && evalPredicates(vn,p); } final public boolean evalPredicates(VTDNav vn) throws NavException { Predicate temp = this.p; while(temp!=null) { if (temp.eval(vn)== false) return false; temp = temp.nextP; } return true; } final public boolean evalPredicates(VTDNav vn, Predicate p) throws NavException { Predicate temp = this.p; while(temp!=p) { if (temp.eval(vn)== false) return false; temp = temp.nextP; } return true; } final public void setAxisType(int st){ axis_type = st; } final public String toString(){ String s; if (p == null) s = axisName(axis_type) + nt; else s = axisName(axis_type) + nt + " "+ p ; if (nextS == null) return s; else return s+"/"+nextS.toString(); } final public String axisName(int i){ switch(i){ case AxisType.CHILD0: case AxisType.CHILD: return "child::"; case AxisType.DESCENDANT_OR_SELF0: return "descendant-or-self::"; case AxisType.DESCENDANT0: return "descendant::"; case AxisType.PRECEDING0: return "preceding::"; case AxisType.FOLLOWING0: return "following::"; case AxisType.DESCENDANT_OR_SELF: return "descendant-or-self::"; case AxisType.DESCENDANT: return "descendant::"; case AxisType.PRECEDING: return "preceding::"; case AxisType.FOLLOWING: return "following::"; case AxisType.PARENT: return "parent::"; case AxisType.ANCESTOR: return "ancestor::"; case AxisType.ANCESTOR_OR_SELF: return "ancestor-or-self::"; case AxisType.SELF: return "self::"; case AxisType.FOLLOWING_SIBLING: return "following-sibling::"; case AxisType.FOLLOWING_SIBLING0: return "following-sibling::"; case AxisType.PRECEDING_SIBLING: return "preceding-sibling::"; case AxisType.PRECEDING_SIBLING0: return "preceding-sibling::"; case AxisType.ATTRIBUTE: return "attribute::"; default: return "namespace::"; } } }
6,878
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
UnsupportedException.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/UnsupportedException.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; /** * This exception is thrown when a feature is not supported. * */ public class UnsupportedException extends RuntimeException{ public UnsupportedException(String s){ super(s); } }
1,030
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
LiteralExpr.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/com/ximpleware/xpath/LiteralExpr.java
/* * Copyright (C) 2002-2012 XimpleWare, [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.ximpleware.xpath; import com.ximpleware.*; /** * This class represents a literal string XPath expression * */ public class LiteralExpr extends Expr { public String s; public LiteralExpr (String st){ s = st; //cacheable =false; } final public String toString(){ boolean b = true; for(int i = 0;i<s.length();i++){ if (s.charAt(i) == '\''){ b = false; break; } } if (b == true) return "\""+s+"\""; else return "'" + s + "'"; } final public boolean evalBoolean(VTDNav vn){ return s.length() != 0; } final public double evalNumber(VTDNav vn){ try { double dval = Double.parseDouble(s); return dval; }catch (NumberFormatException e){ return Double.NaN; } } final public int evalNodeSet(VTDNav vn) throws XPathEvalException{ throw new XPathEvalException("LiteralExpr can't eval to a node set!"); } public String evalString(VTDNav vn){ return s; } final public void reset(VTDNav vn){ } final public boolean isNodeSet(){ return false; } final public boolean isNumerical(){ return false; } final public boolean isString(){ return true; } final public boolean isBoolean(){ return false; } // to support computer context size // needs to add final public boolean requireContextSize(){ return false; } final public void setContextSize(int size){ } final public void setPosition(int pos){ } final public int adjust(int n){ return 0; } final public boolean isFinal(){ return true; } /*final public boolean isConstant(){ return true; }*/ /*final public void markCacheable(){ } final public void markCacheable2(){}*/ }
2,583
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
terminal.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/terminal.java
package java_cup; import java_cup.assoc; import java.util.Hashtable; import java.util.Enumeration; /** This class represents a terminal symbol in the grammar. Each terminal * has a textual name, an index, and a string which indicates the type of * object it will be implemented with at runtime (i.e. the class of object * that will be returned by the scanner and pushed on the parse stack to * represent it). * * @version last updated: 7/3/96 * @author Frank Flannery */ public class terminal extends symbol { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Full constructor. * @param nm the name of the terminal. * @param tp the type of the terminal. */ public terminal(String nm, String tp, int precedence_side, int precedence_num) { /* superclass does most of the work */ super(nm, tp); /* add to set of all terminals and check for duplicates */ Object conflict = _all.put(nm,this); if (conflict != null) // can't throw an execption here because this is used in static // initializers, so we do a crash instead // was: // throw new internal_error("Duplicate terminal (" + nm + ") created"); (new internal_error("Duplicate terminal (" + nm + ") created")).crash(); /* assign a unique index */ _index = next_index++; /* set the precedence */ _precedence_num = precedence_num; _precedence_side = precedence_side; /* add to by_index set */ _all_by_index.put(new Integer(_index), this); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Constructor for non-precedented terminal */ public terminal(String nm, String tp) { this(nm, tp, assoc.no_prec, -1); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Constructor with default type. * @param nm the name of the terminal. */ public terminal(String nm) { this(nm, null); } /*-----------------------------------------------------------*/ /*------------------- Class Variables ---------------------*/ /*-----------------------------------------------------------*/ private int _precedence_num; private int _precedence_side; /*-----------------------------------------------------------*/ /*--- (Access to) Static (Class) Variables ------------------*/ /*-----------------------------------------------------------*/ /** Table of all terminals. Elements are stored using name strings as * the key */ protected static Hashtable _all = new Hashtable(); /** Access to all terminals. */ public static Enumeration all() {return _all.elements();} /** Lookup a terminal by name string. */ public static terminal find(String with_name) { if (with_name == null) return null; else return (terminal)_all.get(with_name); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Table of all terminals indexed by their index number. */ protected static Hashtable _all_by_index = new Hashtable(); /** Lookup a terminal by index. */ public static terminal find(int indx) { Integer the_indx = new Integer(indx); return (terminal)_all_by_index.get(the_indx); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Total number of terminals. */ public static int number() {return _all.size();} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Static counter to assign unique index. */ protected static int next_index = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Special terminal for end of input. */ public static final terminal EOF = new terminal("EOF"); /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** special terminal used for error recovery */ public static final terminal error = new terminal("error"); /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Report this symbol as not being a non-terminal. */ public boolean is_non_term() { return false; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Convert to a string. */ public String toString() { return super.toString() + "[" + index() + "]"; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** get the precedence of a terminal */ public int precedence_num() { return _precedence_num; } public int precedence_side() { return _precedence_side; } /** set the precedence of a terminal */ public void set_precedence(int p, int new_prec) { _precedence_side = p; _precedence_num = new_prec; } /*-----------------------------------------------------------*/ }
5,195
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
lalr_item_set.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/lalr_item_set.java
package java_cup; import java.util.Hashtable; import java.util.Enumeration; /** This class represents a set of LALR items. For purposes of building * these sets, items are considered unique only if they have unique cores * (i.e., ignoring differences in their lookahead sets).<p> * * This class provides fairly conventional set oriented operations (union, * sub/super-set tests, etc.), as well as an LALR "closure" operation (see * compute_closure()). * * @see java_cup.lalr_item * @see java_cup.lalr_state * @version last updated: 3/6/96 * @author Scott Hudson */ public class lalr_item_set { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Constructor for an empty set. */ public lalr_item_set() { } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Constructor for cloning from another set. * @param other indicates set we should copy from. */ public lalr_item_set(lalr_item_set other) throws internal_error { not_null(other); _all = (Hashtable)other._all.clone(); } /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** A hash table to implement the set. We store the items using themselves * as keys. */ protected Hashtable _all = new Hashtable(11); /** Access to all elements of the set. */ public Enumeration all() {return _all.elements();} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Cached hashcode for this set. */ protected Integer hashcode_cache = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Size of the set */ public int size() {return _all.size();} /*-----------------------------------------------------------*/ /*--- Set Operation Methods ---------------------------------*/ /*-----------------------------------------------------------*/ /** Does the set contain a particular item? * @param itm the item in question. */ public boolean contains(lalr_item itm) {return _all.containsKey(itm);} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Return the item in the set matching a particular item (or null if not * found) * @param itm the item we are looking for. */ public lalr_item find(lalr_item itm) {return (lalr_item)_all.get(itm);} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Is this set an (improper) subset of another? * @param other the other set in question. */ public boolean is_subset_of(lalr_item_set other) throws internal_error { not_null(other); /* walk down our set and make sure every element is in the other */ for (Enumeration e = all(); e.hasMoreElements(); ) if (!other.contains((lalr_item)e.nextElement())) return false; /* they were all there */ return true; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Is this set an (improper) superset of another? * @param other the other set in question. */ public boolean is_superset_of(lalr_item_set other) throws internal_error { not_null(other); return other.is_subset_of(this); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Add a singleton item, merging lookahead sets if the item is already * part of the set. returns the element of the set that was added or * merged into. * @param itm the item being added. */ public lalr_item add(lalr_item itm) throws internal_error { lalr_item other; not_null(itm); /* see if an item with a matching core is already there */ other = (lalr_item)_all.get(itm); /* if so, merge this lookahead into the original and leave it */ if (other != null) { other.lookahead().add(itm.lookahead()); return other; } /* otherwise we just go in the set */ else { /* invalidate cached hashcode */ hashcode_cache = null; _all.put(itm,itm); return itm; } } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Remove a single item if it is in the set. * @param itm the item to remove. */ public void remove(lalr_item itm) throws internal_error { not_null(itm); /* invalidate cached hashcode */ hashcode_cache = null; /* remove it from hash table implementing set */ _all.remove(itm); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Add a complete set, merging lookaheads where items are already in * the set * @param other the set to be added. */ public void add(lalr_item_set other) throws internal_error { not_null(other); /* walk down the other set and do the adds individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) add((lalr_item)e.nextElement()); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Remove (set subtract) a complete set. * @param other the set to remove. */ public void remove(lalr_item_set other) throws internal_error { not_null(other); /* walk down the other set and do the removes individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) remove((lalr_item)e.nextElement()); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Remove and return one item from the set (done in hash order). */ public lalr_item get_one() throws internal_error { Enumeration the_set; lalr_item result; the_set = all(); if (the_set.hasMoreElements()) { result = (lalr_item)the_set.nextElement(); remove(result); return result; } else return null; } /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Helper function for null test. Throws an interal_error exception if its * parameter is null. * @param obj the object we are testing. */ protected void not_null(Object obj) throws internal_error { if (obj == null) throw new internal_error("Null object used in set operation"); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Compute the closure of the set using the LALR closure rules. Basically * for every item of the form: <pre> * [L ::= a *N alpha, l] * </pre> * (where N is a a non terminal and alpha is a string of symbols) make * sure there are also items of the form: <pre> * [N ::= *beta, first(alpha l)] * </pre> * corresponding to each production of N. Items with identical cores but * differing lookahead sets are merged by creating a new item with the same * core and the union of the lookahead sets (the LA in LALR stands for * "lookahead merged" and this is where the merger is). This routine * assumes that nullability and first sets have been computed for all * productions before it is called. */ public void compute_closure() throws internal_error { lalr_item_set consider; lalr_item itm, new_itm, add_itm; non_terminal nt; terminal_set new_lookaheads; Enumeration p; production prod; boolean need_prop; /* invalidate cached hashcode */ hashcode_cache = null; /* each current element needs to be considered */ consider = new lalr_item_set(this); /* repeat this until there is nothing else to consider */ while (consider.size() > 0) { /* get one item to consider */ itm = consider.get_one(); /* do we have a dot before a non terminal */ nt = itm.dot_before_nt(); if (nt != null) { /* create the lookahead set based on first after dot */ new_lookaheads = itm.calc_lookahead(itm.lookahead()); /* are we going to need to propagate our lookahead to new item */ need_prop = itm.lookahead_visible(); /* create items for each production of that non term */ for (p = nt.productions(); p.hasMoreElements(); ) { prod = (production)p.nextElement(); /* create new item with dot at start and that lookahead */ new_itm = new lalr_item(prod, new terminal_set(new_lookaheads)); /* add/merge item into the set */ add_itm = add(new_itm); /* if propagation is needed link to that item */ if (need_prop) itm.add_propagate(add_itm); /* was this was a new item*/ if (add_itm == new_itm) { /* that may need further closure, consider it also */ consider.add(new_itm); } } } } } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Equality comparison. */ public boolean equals(lalr_item_set other) { if (other == null || other.size() != size()) return false; /* once we know they are the same size, then improper subset does test */ try { return is_subset_of(other); } catch (internal_error e) { /* can't throw error from here (because superclass doesn't) so crash */ e.crash(); return false; } } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Generic equality comparison. */ public boolean equals(Object other) { if (!(other instanceof lalr_item_set)) return false; else return equals((lalr_item_set)other); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Return hash code. */ public int hashCode() { int result = 0; Enumeration e; int cnt; /* only compute a new one if we don't have it cached */ if (hashcode_cache == null) { /* hash together codes from at most first 5 elements */ // CSA fix! we'd *like* to hash just a few elements, but // that means equal sets will have inequal hashcodes, which // we're not allowed (by contract) to do. So hash them all. for (e = all(), cnt=0 ; e.hasMoreElements() /*&& cnt<5*/; cnt++) result ^= ((lalr_item)e.nextElement()).hashCode(); hashcode_cache = new Integer(result); } return hashcode_cache.intValue(); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Convert to string. */ public String toString() { StringBuffer result = new StringBuffer(); result.append("{\n"); for (Enumeration e=all(); e.hasMoreElements(); ) { result.append(" " + (lalr_item)e.nextElement() + "\n"); } result.append("}"); return result.toString(); } /*-----------------------------------------------------------*/ }
11,376
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
parse_action_table.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/parse_action_table.java
package java_cup; import java.util.Enumeration; /** This class represents the complete "action" table of the parser. * It has one row for each state in the parse machine, and a column for * each terminal symbol. Each entry in the table represents a shift, * reduce, or an error. * * @see java_cup.parse_action * @see java_cup.parse_action_row * @version last updated: 11/25/95 * @author Scott Hudson */ public class parse_action_table { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Simple constructor. All terminals, non-terminals, and productions must * already have been entered, and the viable prefix recognizer should * have been constructed before this is called. */ public parse_action_table() { /* determine how many states we are working with */ _num_states = lalr_state.number(); /* allocate the array and fill it in with empty rows */ under_state = new parse_action_row[_num_states]; for (int i=0; i<_num_states; i++) under_state[i] = new parse_action_row(); } /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** How many rows/states are in the machine/table. */ protected int _num_states; /** How many rows/states are in the machine/table. */ public int num_states() {return _num_states;} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Actual array of rows, one per state. */ public parse_action_row[] under_state; /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Check the table to ensure that all productions have been reduced. * Issue a warning message (to System.err) for each production that * is never reduced. */ public void check_reductions() throws internal_error { parse_action act; production prod; /* tabulate reductions -- look at every table entry */ for (int row = 0; row < num_states(); row++) { for (int col = 0; col < under_state[row].size(); col++) { /* look at the action entry to see if its a reduce */ act = under_state[row].under_term[col]; if (act != null && act.kind() == parse_action.REDUCE) { /* tell production that we used it */ ((reduce_action)act).reduce_with().note_reduction_use(); } } } /* now go across every production and make sure we hit it */ for (Enumeration p = production.all(); p.hasMoreElements(); ) { prod = (production)p.nextElement(); /* if we didn't hit it give a warning */ if (prod.num_reductions() == 0) { /* count it * emit.not_reduced++; /* give a warning if they haven't been turned off */ if (!emit.nowarn) { System.err.println("*** Production \"" + prod.to_simple_string() + "\" never reduced"); lexer.warning_count++; } } } } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .* /** Convert to a string. */ public String toString() { String result; int cnt; result = "-------- ACTION_TABLE --------\n"; for (int row = 0; row < num_states(); row++) { result += "From state #" + row + "\n"; cnt = 0; for (int col = 0; col < under_state[row].size(); col++) { /* if the action is not an error print it */ if (under_state[row].under_term[col].kind() != parse_action.ERROR) { result += " [term " + col + ":" + under_state[row].under_term[col] + "]"; /* end the line after the 2nd one */ cnt++; if (cnt == 2) { result += "\n"; cnt = 0; } } } /* finish the line if we haven't just done that */ if (cnt != 0) result += "\n"; } result += "------------------------------"; return result; } /*-----------------------------------------------------------*/ }
4,399
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
shift_action.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/shift_action.java
package java_cup; /** This class represents a shift action within the parse table. * The action simply stores the state that it shifts to and responds * to queries about its type. * * @version last updated: 11/25/95 * @author Scott Hudson */ public class shift_action extends parse_action { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Simple constructor. * @param shft_to the state that this action shifts to. */ public shift_action(lalr_state shft_to) throws internal_error { /* sanity check */ if (shft_to == null) throw new internal_error( "Attempt to create a shift_action to a null state"); _shift_to = shft_to; } /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** The state we shift to. */ protected lalr_state _shift_to; /** The state we shift to. */ public lalr_state shift_to() {return _shift_to;} /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Quick access to type of action. */ public int kind() {return SHIFT;} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Equality test. */ public boolean equals(shift_action other) { return other != null && other.shift_to() == shift_to(); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Generic equality test. */ public boolean equals(Object other) { if (other instanceof shift_action) return equals((shift_action)other); else return false; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Compute a hash code. */ public int hashCode() { /* use the hash code of the state we are shifting to */ return shift_to().hashCode(); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Convert to a string. */ public String toString() {return "SHIFT(to state " + shift_to().index() + ")";} /*-----------------------------------------------------------*/ }
2,495
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
emit.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/emit.java
package java_cup; import java.io.PrintWriter; import java.util.Stack; import java.util.Enumeration; import java.util.Date; /** * This class handles emitting generated code for the resulting parser. * The various parse tables must be constructed, etc. before calling any * routines in this class.<p> * * Three classes are produced by this code: * <dl> * <dt> symbol constant class * <dd> this contains constant declarations for each terminal (and * optionally each non-terminal). * <dt> action class * <dd> this non-public class contains code to invoke all the user actions * that were embedded in the parser specification. * <dt> parser class * <dd> the specialized parser class consisting primarily of some user * supplied general and initialization code, and the parse tables. * </dl><p> * * Three parse tables are created as part of the parser class: * <dl> * <dt> production table * <dd> lists the LHS non terminal number, and the length of the RHS of * each production. * <dt> action table * <dd> for each state of the parse machine, gives the action to be taken * (shift, reduce, or error) under each lookahead symbol.<br> * <dt> reduce-goto table * <dd> when a reduce on a given production is taken, the parse stack is * popped back a number of elements corresponding to the RHS of the * production. This reveals a prior state, which we transition out * of under the LHS non terminal symbol for the production (as if we * had seen the LHS symbol rather than all the symbols matching the * RHS). This table is indexed by non terminal numbers and indicates * how to make these transitions. * </dl><p> * * In addition to the method interface, this class maintains a series of * public global variables and flags indicating how misc. parts of the code * and other output is to be produced, and counting things such as number of * conflicts detected (see the source code and public variables below for * more details).<p> * * This class is "static" (contains only static data and methods).<p> * * @see java_cup.main * @version last update: 11/25/95 * @author Scott Hudson */ /* Major externally callable routines here include: symbols - emit the symbol constant class parser - emit the parser class In addition the following major internal routines are provided: emit_package - emit a package declaration emit_action_code - emit the class containing the user's actions emit_production_table - emit declaration and init for the production table do_action_table - emit declaration and init for the action table do_reduce_table - emit declaration and init for the reduce-goto table Finally, this class uses a number of public instance variables to communicate optional parameters and flags used to control how code is generated, as well as to report counts of various things (such as number of conflicts detected). These include: prefix - a prefix string used to prefix names that would otherwise "pollute" someone else's name space. package_name - name of the package emitted code is placed in (or null for an unnamed package. symbol_const_class_name - name of the class containing symbol constants. parser_class_name - name of the class for the resulting parser. action_code - user supplied declarations and other code to be placed in action class. parser_code - user supplied declarations and other code to be placed in parser class. init_code - user supplied code to be executed as the parser is being initialized. scan_code - user supplied code to get the next Symbol. start_production - the start production for the grammar. import_list - list of imports for use with action class. num_conflicts - number of conflicts detected. nowarn - true if we are not to issue warning messages. not_reduced - count of number of productions that never reduce. unused_term - count of unused terminal symbols. unused_non_term - count of unused non terminal symbols. *_time - a series of symbols indicating how long various sub-parts of code generation took (used to produce optional time reports in main). */ public class emit { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Only constructor is private so no instances can be created. */ private emit() { } /*-----------------------------------------------------------*/ /*--- Static (Class) Variables ------------------------------*/ /*-----------------------------------------------------------*/ /** The prefix placed on names that pollute someone else's name space. */ public static String prefix = "CUP$"; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Package that the resulting code goes into (null is used for unnamed). */ public static String package_name = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Name of the generated class for symbol constants. */ public static String symbol_const_class_name = "sym"; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Name of the generated parser class. */ public static String parser_class_name = "parser"; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** User declarations for direct inclusion in user action class. */ public static String action_code = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** User declarations for direct inclusion in parser class. */ public static String parser_code = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** User code for user_init() which is called during parser initialization. */ public static String init_code = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** User code for scan() which is called to get the next Symbol. */ public static String scan_code = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** The start production of the grammar. */ public static production start_production = null; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** List of imports (Strings containing class names) to go with actions. */ public static Stack import_list = new Stack(); /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Number of conflict found while building tables. */ public static int num_conflicts = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Do we skip warnings? */ public static boolean nowarn = false; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Count of the number on non-reduced productions found. */ public static int not_reduced = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Count of unused terminals. */ public static int unused_term = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Count of unused non terminals. */ public static int unused_non_term = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /* Timing values used to produce timing report in main.*/ /** Time to produce symbol constant class. */ public static long symbols_time = 0; /** Time to produce parser class. */ public static long parser_time = 0; /** Time to produce action code class. */ public static long action_code_time = 0; /** Time to produce the production table. */ public static long production_table_time = 0; /** Time to produce the action table. */ public static long action_table_time = 0; /** Time to produce the reduce-goto table. */ public static long goto_table_time = 0; /* frankf 6/18/96 */ protected static boolean _lr_values; /** whether or not to emit code for left and right values */ public static boolean lr_values() {return _lr_values;} protected static void set_lr_values(boolean b) { _lr_values = b;} /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Build a string with the standard prefix. * @param str string to prefix. */ protected static String pre(String str) { return prefix + parser_class_name + "$" + str; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit a package spec if the user wants one. * @param out stream to produce output on. */ protected static void emit_package(PrintWriter out) { /* generate a package spec if we have a name for one */ if (package_name != null) { out.println("package " + package_name + ";"); out.println(); } } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit code for the symbol constant class, optionally including non terms, * if they have been requested. * @param out stream to produce output on. * @param emit_non_terms do we emit constants for non terminals? * @param sym_interface should we emit an interface, rather than a class? */ public static void symbols(PrintWriter out, boolean emit_non_terms, boolean sym_interface) { terminal term; non_terminal nt; String class_or_interface = (sym_interface)?"interface":"class"; long start_time = System.currentTimeMillis(); /* top of file */ out.println(); out.println("//----------------------------------------------------"); out.println("// The following code was generated by " + version.title_str); out.println("// " + new Date()); out.println("//----------------------------------------------------"); out.println(); emit_package(out); /* class header */ out.println("/** CUP generated " + class_or_interface + " containing symbol constants. */"); out.println("public " + class_or_interface + " " + symbol_const_class_name + " {"); out.println(" /* terminals */"); /* walk over the terminals */ /* later might sort these */ for (Enumeration e = terminal.all(); e.hasMoreElements(); ) { term = (terminal)e.nextElement(); /* output a constant decl for the terminal */ out.println(" public static final int " + term.name() + " = " + term.index() + ";"); } /* do the non terminals if they want them (parser doesn't need them) */ if (emit_non_terms) { out.println(); out.println(" /* non terminals */"); /* walk over the non terminals */ /* later might sort these */ for (Enumeration e = non_terminal.all(); e.hasMoreElements(); ) { nt = (non_terminal)e.nextElement(); /* output a constant decl for the terminal */ out.println(" static final int " + nt.name() + " = " + nt.index() + ";"); } } /* end of class */ out.println("}"); out.println(); symbols_time = System.currentTimeMillis() - start_time; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit code for the non-public class holding the actual action code. * @param out stream to produce output on. * @param start_prod the start production of the grammar. */ protected static void emit_action_code(PrintWriter out, production start_prod) throws internal_error { production prod; long start_time = System.currentTimeMillis(); /* class header */ out.println(); out.println( "/** Cup generated class to encapsulate user supplied action code.*/" ); out.println("class " + pre("actions") + " {"); /* user supplied code */ if (action_code != null) { out.println(); out.println(action_code); } /* field for parser object */ out.println(" private final "+parser_class_name+" parser;"); /* constructor */ out.println(); out.println(" /** Constructor */"); out.println(" " + pre("actions") + "("+parser_class_name+" parser) {"); out.println(" this.parser = parser;"); out.println(" }"); /* action method head */ out.println(); out.println(" /** Method with the actual generated action code. */"); out.println(" public final java_cup.runtime.Symbol " + pre("do_action") + "("); out.println(" int " + pre("act_num,")); out.println(" java_cup.runtime.lr_parser " + pre("parser,")); out.println(" java.util.Stack " + pre("stack,")); out.println(" int " + pre("top)")); out.println(" throws java.lang.Exception"); out.println(" {"); /* declaration of result symbol */ /* New declaration!! now return Symbol 6/13/96 frankf */ out.println(" /* Symbol object for return from actions */"); out.println(" java_cup.runtime.Symbol " + pre("result") + ";"); out.println(); /* switch top */ out.println(" /* select the action based on the action number */"); out.println(" switch (" + pre("act_num") + ")"); out.println(" {"); /* emit action code for each production as a separate case */ for (Enumeration p = production.all(); p.hasMoreElements(); ) { prod = (production)p.nextElement(); /* case label */ out.println(" /*. . . . . . . . . . . . . . . . . . . .*/"); out.println(" case " + prod.index() + ": // " + prod.to_simple_string()); /* give them their own block to work in */ out.println(" {"); /* create the result symbol */ /*make the variable RESULT which will point to the new Symbol (see below) and be changed by action code 6/13/96 frankf */ out.println(" " + prod.lhs().the_symbol().stack_type() + " RESULT = null;"); /* Add code to propagate RESULT assignments that occur in * action code embedded in a production (ie, non-rightmost * action code). 24-Mar-1998 CSA */ for (int i=0; i<prod.rhs_length(); i++) { // only interested in non-terminal symbols. if (!(prod.rhs(i) instanceof symbol_part)) continue; symbol s = ((symbol_part)prod.rhs(i)).the_symbol(); if (!(s instanceof non_terminal)) continue; // skip this non-terminal unless it corresponds to // an embedded action production. if (((non_terminal)s).is_embedded_action == false) continue; // OK, it fits. Make a conditional assignment to RESULT. int index = prod.rhs_length() - i - 1; // last rhs is on top. out.println(" " + "// propagate RESULT from " + s.name()); out.println(" " + "if ( " + "((java_cup.runtime.Symbol) " + emit.pre("stack") + ".elementAt(" + emit.pre("top") + "-" + index + ")).value != null )"); out.println(" " + "RESULT = " + "(" + prod.lhs().the_symbol().stack_type() + ") " + "((java_cup.runtime.Symbol) " + emit.pre("stack") + ".elementAt(" + emit.pre("top") + "-" + index + ")).value;"); } /* if there is an action string, emit it */ if (prod.action() != null && prod.action().code_string() != null && !prod.action().equals("")) out.println(prod.action().code_string()); /* here we have the left and right values being propagated. must make this a command line option. frankf 6/18/96 */ /* Create the code that assigns the left and right values of the new Symbol that the production is reducing to */ if (emit.lr_values()) { int loffset; String leftstring, rightstring; int roffset = 0; rightstring = "((java_cup.runtime.Symbol)" + emit.pre("stack") + ".elementAt(" + emit.pre("top") + "-" + roffset + ")).right"; if (prod.rhs_length() == 0) leftstring = rightstring; else { loffset = prod.rhs_length() - 1; leftstring = "((java_cup.runtime.Symbol)" + emit.pre("stack") + ".elementAt(" + emit.pre("top") + "-" + loffset + ")).left"; } out.println(" " + pre("result") + " = new java_cup.runtime.Symbol(" + prod.lhs().the_symbol().index() + "/*" + prod.lhs().the_symbol().name() + "*/" + ", " + leftstring + ", " + rightstring + ", RESULT);"); } else { out.println(" " + pre("result") + " = new java_cup.runtime.Symbol(" + prod.lhs().the_symbol().index() + "/*" + prod.lhs().the_symbol().name() + "*/" + ", RESULT);"); } /* end of their block */ out.println(" }"); /* if this was the start production, do action for accept */ if (prod == start_prod) { out.println(" /* ACCEPT */"); out.println(" " + pre("parser") + ".done_parsing();"); } /* code to return lhs symbol */ out.println(" return " + pre("result") + ";"); out.println(); } /* end of switch */ out.println(" /* . . . . . .*/"); out.println(" default:"); out.println(" throw new Exception("); out.println(" \"Invalid action number found in " + "internal parse table\");"); out.println(); out.println(" }"); /* end of method */ out.println(" }"); /* end of class */ out.println("}"); out.println(); action_code_time = System.currentTimeMillis() - start_time; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit the production table. * @param out stream to produce output on. */ protected static void emit_production_table(PrintWriter out) { production all_prods[]; production prod; long start_time = System.currentTimeMillis(); /* collect up the productions in order */ all_prods = new production[production.number()]; for (Enumeration p = production.all(); p.hasMoreElements(); ) { prod = (production)p.nextElement(); all_prods[prod.index()] = prod; } // make short[][] short[][] prod_table = new short[production.number()][2]; for (int i = 0; i<production.number(); i++) { prod = all_prods[i]; // { lhs symbol , rhs size } prod_table[i][0] = (short) prod.lhs().the_symbol().index(); prod_table[i][1] = (short) prod.rhs_length(); } /* do the top of the table */ out.println(); out.println(" /** Production table. */"); out.println(" protected static final short _production_table[][] = "); out.print (" unpackFromStrings("); do_table_as_string(out, prod_table); out.println(");"); /* do the public accessor method */ out.println(); out.println(" /** Access to production table. */"); out.println(" public short[][] production_table() " + "{return _production_table;}"); production_table_time = System.currentTimeMillis() - start_time; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit the action table. * @param out stream to produce output on. * @param act_tab the internal representation of the action table. * @param compact_reduces do we use the most frequent reduce as default? */ protected static void do_action_table( PrintWriter out, parse_action_table act_tab, boolean compact_reduces) throws internal_error { parse_action_row row; parse_action act; int red; long start_time = System.currentTimeMillis(); /* collect values for the action table */ short[][] action_table = new short[act_tab.num_states()][]; /* do each state (row) of the action table */ for (int i = 0; i < act_tab.num_states(); i++) { /* get the row */ row = act_tab.under_state[i]; /* determine the default for the row */ if (compact_reduces) row.compute_default(); else row.default_reduce = -1; /* make temporary table for the row. */ short[] temp_table = new short[2*row.size()]; int nentries = 0; /* do each column */ for (int j = 0; j < row.size(); j++) { /* extract the action from the table */ act = row.under_term[j]; /* skip error entries these are all defaulted out */ if (act.kind() != parse_action.ERROR) { /* first put in the symbol index, then the actual entry */ /* shifts get positive entries of state number + 1 */ if (act.kind() == parse_action.SHIFT) { /* make entry */ temp_table[nentries++] = (short) j; temp_table[nentries++] = (short) (((shift_action)act).shift_to().index() + 1); } /* reduce actions get negated entries of production# + 1 */ else if (act.kind() == parse_action.REDUCE) { /* if its the default entry let it get defaulted out */ red = ((reduce_action)act).reduce_with().index(); if (red != row.default_reduce) { /* make entry */ temp_table[nentries++] = (short) j; temp_table[nentries++] = (short) (-(red+1)); } } else if (act.kind() == parse_action.NONASSOC) { /* do nothing, since we just want a syntax error */ } /* shouldn't be anything else */ else throw new internal_error("Unrecognized action code " + act.kind() + " found in parse table"); } } /* now we know how big to make the row */ action_table[i] = new short[nentries + 2]; System.arraycopy(temp_table, 0, action_table[i], 0, nentries); /* finish off the row with a default entry */ action_table[i][nentries++] = -1; if (row.default_reduce != -1) action_table[i][nentries++] = (short) (-(row.default_reduce+1)); else action_table[i][nentries++] = 0; } /* finish off the init of the table */ out.println(); out.println(" /** Parse-action table. */"); out.println(" protected static final short[][] _action_table = "); out.print (" unpackFromStrings("); do_table_as_string(out, action_table); out.println(");"); /* do the public accessor method */ out.println(); out.println(" /** Access to parse-action table. */"); out.println(" public short[][] action_table() {return _action_table;}"); action_table_time = System.currentTimeMillis() - start_time; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit the reduce-goto table. * @param out stream to produce output on. * @param red_tab the internal representation of the reduce-goto table. */ protected static void do_reduce_table( PrintWriter out, parse_reduce_table red_tab) { lalr_state goto_st; parse_action act; long start_time = System.currentTimeMillis(); /* collect values for reduce-goto table */ short[][] reduce_goto_table = new short[red_tab.num_states()][]; /* do each row of the reduce-goto table */ for (int i=0; i<red_tab.num_states(); i++) { /* make temporary table for the row. */ short[] temp_table = new short[2*red_tab.under_state[i].size()]; int nentries = 0; /* do each entry in the row */ for (int j=0; j<red_tab.under_state[i].size(); j++) { /* get the entry */ goto_st = red_tab.under_state[i].under_non_term[j]; /* if we have none, skip it */ if (goto_st != null) { /* make entries for the index and the value */ temp_table[nentries++] = (short) j; temp_table[nentries++] = (short) goto_st.index(); } } /* now we know how big to make the row. */ reduce_goto_table[i] = new short[nentries+2]; System.arraycopy(temp_table, 0, reduce_goto_table[i], 0, nentries); /* end row with default value */ reduce_goto_table[i][nentries++] = -1; reduce_goto_table[i][nentries++] = -1; } /* emit the table. */ out.println(); out.println(" /** <code>reduce_goto</code> table. */"); out.println(" protected static final short[][] _reduce_table = "); out.print (" unpackFromStrings("); do_table_as_string(out, reduce_goto_table); out.println(");"); /* do the public accessor method */ out.println(); out.println(" /** Access to <code>reduce_goto</code> table. */"); out.println(" public short[][] reduce_table() {return _reduce_table;}"); out.println(); goto_table_time = System.currentTimeMillis() - start_time; } // print a string array encoding the given short[][] array. protected static void do_table_as_string(PrintWriter out, short[][] sa) { out.println("new String[] {"); out.print(" \""); int nchar=0, nbytes=0; nbytes+=do_escaped(out, (char)(sa.length>>16)); nchar =do_newline(out, nchar, nbytes); nbytes+=do_escaped(out, (char)(sa.length&0xFFFF)); nchar =do_newline(out, nchar, nbytes); for (int i=0; i<sa.length; i++) { nbytes+=do_escaped(out, (char)(sa[i].length>>16)); nchar =do_newline(out, nchar, nbytes); nbytes+=do_escaped(out, (char)(sa[i].length&0xFFFF)); nchar =do_newline(out, nchar, nbytes); for (int j=0; j<sa[i].length; j++) { // contents of string are (value+2) to allow for common -1, 0 cases // (UTF-8 encoding is most efficient for 0<c<0x80) nbytes+=do_escaped(out, (char)(2+sa[i][j])); nchar =do_newline(out, nchar, nbytes); } } out.print("\" }"); } // split string if it is very long; start new line occasionally for neatness protected static int do_newline(PrintWriter out, int nchar, int nbytes) { if (nbytes > 65500) { out.println("\", "); out.print(" \""); } else if (nchar > 11) { out.println("\" +"); out.print(" \""); } else return nchar+1; return 0; } // output an escape sequence for the given character code. protected static int do_escaped(PrintWriter out, char c) { StringBuffer escape = new StringBuffer(); if (c <= 0xFF) { escape.append(Integer.toOctalString(c)); while(escape.length() < 3) escape.insert(0, '0'); } else { escape.append(Integer.toHexString(c)); while(escape.length() < 4) escape.insert(0, '0'); escape.insert(0, 'u'); } escape.insert(0, '\\'); out.print(escape.toString()); // return number of bytes this takes up in UTF-8 encoding. if (c == 0) return 2; if (c >= 0x01 && c <= 0x7F) return 1; if (c >= 0x80 && c <= 0x7FF) return 2; return 3; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Emit the parser subclass with embedded tables. * @param out stream to produce output on. * @param action_table internal representation of the action table. * @param reduce_table internal representation of the reduce-goto table. * @param start_st start state of the parse machine. * @param start_prod start production of the grammar. * @param compact_reduces do we use most frequent reduce as default? * @param suppress_scanner should scanner be suppressed for compatibility? */ public static void parser( PrintWriter out, parse_action_table action_table, parse_reduce_table reduce_table, int start_st, production start_prod, boolean compact_reduces, boolean suppress_scanner) throws internal_error { long start_time = System.currentTimeMillis(); /* top of file */ out.println(); out.println("//----------------------------------------------------"); out.println("// The following code was generated by " + version.title_str); out.println("// " + new Date()); out.println("//----------------------------------------------------"); out.println(); emit_package(out); /* user supplied imports */ for (int i = 0; i < import_list.size(); i++) out.println("import " + import_list.elementAt(i) + ";"); /* class header */ out.println(); out.println("/** "+version.title_str+" generated parser."); out.println(" * @version " + new Date()); out.println(" */"); out.println("public class " + parser_class_name + " extends java_cup.runtime.lr_parser {"); /* constructors [CSA/davidm, 24-jul-99] */ out.println(); out.println(" /** Default constructor. */"); out.println(" public " + parser_class_name + "() {super();}"); if (!suppress_scanner) { out.println(); out.println(" /** Constructor which sets the default scanner. */"); out.println(" public " + parser_class_name + "(java_cup.runtime.Scanner s) {super(s);}"); } /* emit the various tables */ emit_production_table(out); do_action_table(out, action_table, compact_reduces); do_reduce_table(out, reduce_table); /* instance of the action encapsulation class */ out.println(" /** Instance of action encapsulation class. */"); out.println(" protected " + pre("actions") + " action_obj;"); out.println(); /* action object initializer */ out.println(" /** Action encapsulation object initializer. */"); out.println(" protected void init_actions()"); out.println(" {"); out.println(" action_obj = new " + pre("actions") + "(this);"); out.println(" }"); out.println(); /* access to action code */ out.println(" /** Invoke a user supplied parse action. */"); out.println(" public java_cup.runtime.Symbol do_action("); out.println(" int act_num,"); out.println(" java_cup.runtime.lr_parser parser,"); out.println(" java.util.Stack stack,"); out.println(" int top)"); out.println(" throws java.lang.Exception"); out.println(" {"); out.println(" /* call code in generated class */"); out.println(" return action_obj." + pre("do_action(") + "act_num, parser, stack, top);"); out.println(" }"); out.println(""); /* method to tell the parser about the start state */ out.println(" /** Indicates start state. */"); out.println(" public int start_state() {return " + start_st + ";}"); /* method to indicate start production */ out.println(" /** Indicates start production. */"); out.println(" public int start_production() {return " + start_production.index() + ";}"); out.println(); /* methods to indicate EOF and error symbol indexes */ out.println(" /** <code>EOF</code> Symbol index. */"); out.println(" public int EOF_sym() {return " + terminal.EOF.index() + ";}"); out.println(); out.println(" /** <code>error</code> Symbol index. */"); out.println(" public int error_sym() {return " + terminal.error.index() + ";}"); out.println(); /* user supplied code for user_init() */ if (init_code != null) { out.println(); out.println(" /** User initialization code. */"); out.println(" public void user_init() throws java.lang.Exception"); out.println(" {"); out.println(init_code); out.println(" }"); } /* user supplied code for scan */ if (scan_code != null) { out.println(); out.println(" /** Scan to get the next Symbol. */"); out.println(" public java_cup.runtime.Symbol scan()"); out.println(" throws java.lang.Exception"); out.println(" {"); out.println(scan_code); out.println(" }"); } /* user supplied code */ if (parser_code != null) { out.println(); out.println(parser_code); } /* end of class */ out.println("}"); /* put out the action code class */ emit_action_code(out, start_prod); parser_time = System.currentTimeMillis() - start_time; } /*-----------------------------------------------------------*/ }
33,695
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
action_production.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/action_production.java
package java_cup; /** A specialized version of a production used when we split an existing * production in order to remove an embedded action. Here we keep a bit * of extra bookkeeping so that we know where we came from. * @version last updated: 11/25/95 * @author Scott Hudson */ public class action_production extends production { /** Constructor. * @param base the production we are being factored out of. * @param lhs_sym the LHS symbol for this production. * @param rhs_parts array of production parts for the RHS. * @param rhs_len how much of the rhs_parts array is valid. * @param action_str the trailing reduce action for this production. */ public action_production( production base, non_terminal lhs_sym, production_part rhs_parts[], int rhs_len, String action_str) throws internal_error { super(lhs_sym, rhs_parts, rhs_len, action_str); _base_production = base; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** The production we were taken out of. */ protected production _base_production; /** The production we were taken out of. */ public production base_production() {return _base_production;} }
1,307
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
parse_reduce_row.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/parse_reduce_row.java
package java_cup; /** This class represents one row (corresponding to one machine state) of the * reduce-goto parse table. */ public class parse_reduce_row { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Simple constructor. Note: this should not be used until the number * of terminals in the grammar has been established. */ public parse_reduce_row() { /* make sure the size is set */ if (_size <= 0 ) _size = non_terminal.number(); /* allocate the array */ under_non_term = new lalr_state[size()]; } /*-----------------------------------------------------------*/ /*--- (Access to) Static (Class) Variables ------------------*/ /*-----------------------------------------------------------*/ /** Number of columns (non terminals) in every row. */ protected static int _size = 0; /** Number of columns (non terminals) in every row. */ public static int size() {return _size;} /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** Actual entries for the row. */ public lalr_state under_non_term[]; }
1,425
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
assoc.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/assoc.java
package java_cup; /* Defines integers that represent the associativity of terminals * @version last updated: 7/3/96 * @author Frank Flannery */ public class assoc { /* various associativities, no_prec being the default value */ public final static int left = 0; public final static int right = 1; public final static int nonassoc = 2; public final static int no_prec = -1; }
407
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
symbol_part.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/symbol_part.java
package java_cup; /** This class represents a part of a production which is a symbol (terminal * or non terminal). This simply maintains a reference to the symbol in * question. * * @see java_cup.production * @version last updated: 11/25/95 * @author Scott Hudson */ public class symbol_part extends production_part { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Full constructor. * @param sym the symbol that this part is made up of. * @param lab an optional label string for the part. */ public symbol_part(symbol sym, String lab) throws internal_error { super(lab); if (sym == null) throw new internal_error( "Attempt to construct a symbol_part with a null symbol"); _the_symbol = sym; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Constructor with no label. * @param sym the symbol that this part is made up of. */ public symbol_part(symbol sym) throws internal_error { this(sym,null); } /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** The symbol that this part is made up of. */ protected symbol _the_symbol; /** The symbol that this part is made up of. */ public symbol the_symbol() {return _the_symbol;} /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Respond that we are not an action part. */ public boolean is_action() { return false; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Equality comparison. */ public boolean equals(symbol_part other) { return other != null && super.equals(other) && the_symbol().equals(other.the_symbol()); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Generic equality comparison. */ public boolean equals(Object other) { if (!(other instanceof symbol_part)) return false; else return equals((symbol_part)other); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Produce a hash code. */ public int hashCode() { return super.hashCode() ^ (the_symbol()==null ? 0 : the_symbol().hashCode()); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Convert to a string. */ public String toString() { if (the_symbol() != null) return super.toString() + the_symbol(); else return super.toString() + "$$MISSING-SYMBOL$$"; } /*-----------------------------------------------------------*/ }
3,026
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
nonassoc_action.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/nonassoc_action.java
package java_cup; /** This class represents a shift/reduce nonassociative error within the * parse table. If action_table element is assign to type * nonassoc_action, it cannot be changed, and signifies that there * is a conflict between shifting and reducing a production and a * terminal that shouldn't be next to each other. * * @version last updated: 7/2/96 * @author Frank Flannery */ public class nonassoc_action extends parse_action { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Simple constructor. */ public nonassoc_action() throws internal_error { /* don't need to set anything, since it signifies error */ } /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Quick access to type of action. */ public int kind() {return NONASSOC;} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Equality test. */ public boolean equals(parse_action other) { return other != null && other.kind() == NONASSOC; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Generic equality test. */ public boolean equals(Object other) { if (other instanceof parse_action) return equals((parse_action)other); else return false; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Compute a hash code. */ public int hashCode() { /* all objects of this class hash together */ return 0xCafe321; } /** Convert to string. */ public String toString() { return "NONASSOC"; } /*-----------------------------------------------------------*/ }
2,008
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
parse_action_row.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/parse_action_row.java
package java_cup; /** This class represents one row (corresponding to one machine state) of the * parse action table. */ public class parse_action_row { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Simple constructor. Note: this should not be used until the number of * terminals in the grammar has been established. */ public parse_action_row() { /* make sure the size is set */ if (_size <= 0 ) _size = terminal.number(); /* allocate the array */ under_term = new parse_action[size()]; /* set each element to an error action */ for (int i=0; i<_size; i++) under_term[i] = new parse_action(); } /*-----------------------------------------------------------*/ /*--- (Access to) Static (Class) Variables ------------------*/ /*-----------------------------------------------------------*/ /** Number of columns (terminals) in every row. */ protected static int _size = 0; /** Number of columns (terminals) in every row. */ public static int size() {return _size;} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Table of reduction counts (reused by compute_default()). */ protected static int reduction_count[] = null; /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** Actual action entries for the row. */ public parse_action under_term[]; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Default (reduce) action for this row. -1 will represent default * of error. */ public int default_reduce; /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Compute the default (reduce) action for this row and store it in * default_reduce. In the case of non-zero default we will have the * effect of replacing all errors by that reduction. This may cause * us to do erroneous reduces, but will never cause us to shift past * the point of the error and never cause an incorrect parse. -1 will * be used to encode the fact that no reduction can be used as a * default (in which case error will be used). */ public void compute_default() { int i, prod, max_prod, max_red; /* if we haven't allocated the count table, do so now */ if (reduction_count == null) reduction_count = new int[production.number()]; /* clear the reduction count table and maximums */ for (i = 0; i < production.number(); i++) reduction_count[i] = 0; max_prod = -1; max_red = 0; /* walk down the row and look at the reduces */ for (i = 0; i < size(); i++) if (under_term[i].kind() == parse_action.REDUCE) { /* count the reduce in the proper production slot and keep the max up to date */ prod = ((reduce_action)under_term[i]).reduce_with().index(); reduction_count[prod]++; if (reduction_count[prod] > max_red) { max_red = reduction_count[prod]; max_prod = prod; } } /* record the max as the default (or -1 for not found) */ default_reduce = max_prod; } /*-----------------------------------------------------------*/ }
3,699
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z
non_terminal.java
/FileExtraction/Java_unseen/heartsome_translationstudio8/base_plugins/net.heartsome.xml/src/java_cup/non_terminal.java
package java_cup; import java.util.Hashtable; import java.util.Enumeration; /** This class represents a non-terminal symbol in the grammar. Each * non terminal has a textual name, an index, and a string which indicates * the type of object it will be implemented with at runtime (i.e. the class * of object that will be pushed on the parse stack to represent it). * * @version last updated: 11/25/95 * @author Scott Hudson */ public class non_terminal extends symbol { /*-----------------------------------------------------------*/ /*--- Constructor(s) ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Full constructor. * @param nm the name of the non terminal. * @param tp the type string for the non terminal. */ public non_terminal(String nm, String tp) { /* super class does most of the work */ super(nm, tp); /* add to set of all non terminals and check for duplicates */ Object conflict = _all.put(nm,this); if (conflict != null) // can't throw an exception here because these are used in static // initializers, so we crash instead // was: // throw new internal_error("Duplicate non-terminal ("+nm+") created"); (new internal_error("Duplicate non-terminal ("+nm+") created")).crash(); /* assign a unique index */ _index = next_index++; /* add to by_index set */ _all_by_index.put(new Integer(_index), this); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Constructor with default type. * @param nm the name of the non terminal. */ public non_terminal(String nm) { this(nm, null); } /*-----------------------------------------------------------*/ /*--- (Access to) Static (Class) Variables ------------------*/ /*-----------------------------------------------------------*/ /** Table of all non-terminals -- elements are stored using name strings * as the key */ protected static Hashtable _all = new Hashtable(); /** Access to all non-terminals. */ public static Enumeration all() {return _all.elements();} /** lookup a non terminal by name string */ public static non_terminal find(String with_name) { if (with_name == null) return null; else return (non_terminal)_all.get(with_name); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Table of all non terminals indexed by their index number. */ protected static Hashtable _all_by_index = new Hashtable(); /** Lookup a non terminal by index. */ public static non_terminal find(int indx) { Integer the_indx = new Integer(indx); return (non_terminal)_all_by_index.get(the_indx); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Total number of non-terminals. */ public static int number() {return _all.size();} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Static counter to assign unique indexes. */ protected static int next_index = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Static counter for creating unique non-terminal names */ static protected int next_nt = 0; /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** special non-terminal for start symbol */ public static final non_terminal START_nt = new non_terminal("$START"); /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** flag non-terminals created to embed action productions */ public boolean is_embedded_action = false; /* added 24-Mar-1998, CSA */ /*-----------------------------------------------------------*/ /*--- Static Methods ----------------------------------------*/ /*-----------------------------------------------------------*/ /** Method for creating a new uniquely named hidden non-terminal using * the given string as a base for the name (or "NT$" if null is passed). * @param prefix base name to construct unique name from. */ static non_terminal create_new(String prefix) throws internal_error { if (prefix == null) prefix = "NT$"; return new non_terminal(prefix + next_nt++); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** static routine for creating a new uniquely named hidden non-terminal */ static non_terminal create_new() throws internal_error { return create_new(null); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Compute nullability of all non-terminals. */ public static void compute_nullability() throws internal_error { boolean change = true; non_terminal nt; Enumeration e; production prod; /* repeat this process until there is no change */ while (change) { /* look for a new change */ change = false; /* consider each non-terminal */ for (e=all(); e.hasMoreElements(); ) { nt = (non_terminal)e.nextElement(); /* only look at things that aren't already marked nullable */ if (!nt.nullable()) { if (nt.looks_nullable()) { nt._nullable = true; change = true; } } } } /* do one last pass over the productions to finalize all of them */ for (e=production.all(); e.hasMoreElements(); ) { prod = (production)e.nextElement(); prod.set_nullable(prod.check_nullable()); } } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Compute first sets for all non-terminals. This assumes nullability has * already computed. */ public static void compute_first_sets() throws internal_error { boolean change = true; Enumeration n; Enumeration p; non_terminal nt; production prod; terminal_set prod_first; /* repeat this process until we have no change */ while (change) { /* look for a new change */ change = false; /* consider each non-terminal */ for (n = all(); n.hasMoreElements(); ) { nt = (non_terminal)n.nextElement(); /* consider every production of that non terminal */ for (p = nt.productions(); p.hasMoreElements(); ) { prod = (production)p.nextElement(); /* get the updated first of that production */ prod_first = prod.check_first_set(); /* if this going to add anything, add it */ if (!prod_first.is_subset_of(nt._first_set)) { change = true; nt._first_set.add(prod_first); } } } } } /*-----------------------------------------------------------*/ /*--- (Access to) Instance Variables ------------------------*/ /*-----------------------------------------------------------*/ /** Table of all productions with this non terminal on the LHS. */ protected Hashtable _productions = new Hashtable(11); /** Access to productions with this non terminal on the LHS. */ public Enumeration productions() {return _productions.elements();} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Total number of productions with this non terminal on the LHS. */ public int num_productions() {return _productions.size();} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Add a production to our set of productions. */ public void add_production(production prod) throws internal_error { /* catch improper productions */ if (prod == null || prod.lhs() == null || prod.lhs().the_symbol() != this) throw new internal_error( "Attempt to add invalid production to non terminal production table"); /* add it to the table, keyed with itself */ _productions.put(prod,prod); } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Nullability of this non terminal. */ protected boolean _nullable; /** Nullability of this non terminal. */ public boolean nullable() {return _nullable;} /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** First set for this non-terminal. */ protected terminal_set _first_set = new terminal_set(); /** First set for this non-terminal. */ public terminal_set first_set() {return _first_set;} /*-----------------------------------------------------------*/ /*--- General Methods ---------------------------------------*/ /*-----------------------------------------------------------*/ /** Indicate that this symbol is a non-terminal. */ public boolean is_non_term() { return true; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** Test to see if this non terminal currently looks nullable. */ protected boolean looks_nullable() throws internal_error { /* look and see if any of the productions now look nullable */ for (Enumeration e = productions(); e.hasMoreElements(); ) /* if the production can go to empty, we are nullable */ if (((production)e.nextElement()).check_nullable()) return true; /* none of the productions can go to empty, so we are not nullable */ return false; } /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /** convert to string */ public String toString() { return super.toString() + "[" + index() + "]" + (nullable() ? "*" : ""); } /*-----------------------------------------------------------*/ }
9,755
Java
.java
heartsome/translationstudio8
83
45
18
2014-06-03T17:56:15Z
2020-10-13T06:46:15Z