public static void dump(XMLStreamWriter writer, XMLElement elem, String ... blacklist) throws XMLStreamException { dump(null,writer,elem,blacklist); } public static void dump(ScannerBuffer buffer, XMLStreamWriter writer, XMLElement elem, String ... blacklist) throws XMLStreamException {
public Location left() { for (XMLElement e : list){ Location loc = e.left(); if (loc!=null) return loc; } return null; } public Location right() {
@Override public List<XMLElement> selectById(String s) { LinkedList<XMLElement> response= new LinkedList<XMLElement>(); if (tagname.equals(s)) response.add(this); for (XMLElement e : list){ List<XMLElement> selection =e.selectById(s); response.addAll(selection); } return response; } private int variant;
@Override public List<XMLElement> selectById(String s) { LinkedList<XMLElement> response= new LinkedList<XMLElement>(); if (tagname.equals(s)) response.add(this); for (XMLElement e : list){ List<XMLElement> selection =e.selectById(s); response.addAll(selection); } return response; } private int variant;
public static void dump(XMLStreamWriter writer, XMLElement elem, String ... blacklist) throws XMLStreamException { dump(null,writer,elem,blacklist); } public static void dump(ScannerBuffer buffer, XMLStreamWriter writer, XMLElement elem, String ... blacklist) throws XMLStreamException {
public Location left() { for (XMLElement e : list){ Location loc = e.left(); if (loc!=null) return loc; } return null; } public Location right() {
@Override public List<XMLElement> selectById(String s) { LinkedList<XMLElement> response= new LinkedList<XMLElement>(); if (tagname.equals(s)) response.add(this); for (XMLElement e : list){ List<XMLElement> selection =e.selectById(s); response.addAll(selection); } return response; } private int variant;
public static void dump(XMLStreamWriter writer, XMLElement elem, String ... blacklist) throws XMLStreamException { dump(null,writer,elem,blacklist); } public static void dump(ScannerBuffer buffer, XMLStreamWriter writer, XMLElement elem, String ... blacklist) throws XMLStreamException {
public Location left() { for (XMLElement e : list){ Location loc = e.left(); if (loc!=null) return loc; } return null; } public Location right() {
@Override protected void dump(XMLStreamWriter writer) throws XMLStreamException { writer.writeStartElement("nonterminal"); writer.writeAttribute("id", tagname); writer.writeAttribute("variant", variant+""); // if (!list.isEmpty()){ Location loc = left(); if (loc!=null) loc.toXML(writer, "left"); // } for (XMLElement e:list) e.dump(writer); loc = right(); if (loc!=null) loc.toXML(writer, "right"); writer.writeEndElement(); } }
public Location right() { for (Iterator<XMLElement> it = list.descendingIterator();it.hasNext();){ Location loc = it.next().left(); if (loc!=null) return loc; } return null; }
@Override protected void dump(XMLStreamWriter writer) throws XMLStreamException { writer.writeStartElement("nonterminal"); writer.writeAttribute("id", tagname); writer.writeAttribute("variant", variant+""); // if (!list.isEmpty()){ Location loc = left(); if (loc!=null) loc.toXML(writer, "left"); // } for (XMLElement e:list) e.dump(writer); loc = right(); if (loc!=null) loc.toXML(writer, "right"); writer.writeEndElement(); } }
public Location right() { for (Iterator<XMLElement> it = list.descendingIterator();it.hasNext();){ Location loc = it.next().left(); if (loc!=null) return loc; } return null; }
@Override protected void dump(XMLStreamWriter writer) throws XMLStreamException { writer.writeStartElement("nonterminal"); writer.writeAttribute("id", tagname); writer.writeAttribute("variant", variant+""); // if (!list.isEmpty()){ Location loc = left(); if (loc!=null) loc.toXML(writer, "left"); // } for (XMLElement e:list) e.dump(writer); loc = right(); if (loc!=null) loc.toXML(writer, "right"); writer.writeEndElement(); } }
public Location right() { for (Iterator<XMLElement> it = list.descendingIterator();it.hasNext();){ Location loc = it.next().left(); if (loc!=null) return loc; } return null; }
elem.dump(writer); writer.writeEndElement();
elem.dump(writer); writer.writeEndElement();
elem.dump(writer); writer.writeEndElement();