void end() throws SAXException { if (childPatterns == null) { error("missing_children"); endChild(schemaBuilder.makeErrorPattern()); } if (comments != null) { int idx = childPatterns.size()-1; childPatterns.set(idx,schemaBuilder.commentAfter(childPatterns.get(idx), comments)); comments = null; } sendPatternToParent(buildPattern(childPatterns, startLocation, annotations)); }
State createChildState(String localName) throws SAXException { if (grammar == null) return super.createChildState(localName); if (localName.equals("grammar")) return new MergeGrammarState(grammar); error("expected_grammar", localName); return null; }
@Override void setOtherAttribute(String name, String value) throws SAXException { if (name.equals("combine")) { value = value.trim(); if (value.equals("choice")) { combine = GrammarSection.COMBINE_CHOICE; } else if (value.equals("interleave")) { combine = GrammarSection.COMBINE_INTERLEAVE; } else { error("combine_attribute_bad_value", value); } } else { super.setOtherAttribute(name, value); } }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno); }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno); }
@Override ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno); }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeList(super.buildPattern(patterns, loc, null), loc, anno); } }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeOptional(super.buildPattern(patterns, loc, null), loc, anno); } }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return super.buildPattern(patterns, loc, null); } }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno); } }
State createChildState(String localName) throws SAXException { if (childPatterns==null) return super.createChildState(localName); error("too_many_children"); return null; } }
State createChildState(String localName) throws SAXException { State tem = super.createChildState(localName); if (tem != null && childPatterns!=null) error("attribute_multi_pattern"); return tem; }
void setOtherAttribute(String name, String value) throws SAXException { if (name.equals("combine")) { value = value.trim(); if (value.equals("choice")) combine = GrammarSection.COMBINE_CHOICE; else if (value.equals("interleave")) combine = GrammarSection.COMBINE_INTERLEAVE; else error("combine_attribute_bad_value", value); } else super.setOtherAttribute(name, value); }
void end() throws SAXException { if (childPatterns == null) endChild(schemaBuilder.makeText(startLocation, null)); super.end(); }
@Override State createChildState(String localName) throws SAXException { if (childPatterns == null) { return super.createChildState(localName); } error("too_many_children"); return null; } }
@Override ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno); } }
@Override void end() throws SAXException { if (childPatterns == null) { endChild(schemaBuilder.makeText(startLocation, null)); } super.end(); }
ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeOneOrMore(super.buildPattern(patterns, loc, null), loc, anno); } }
@Override ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno); }
@Override ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { return super.buildPattern(patterns, loc, null); } }