94 P makeEmpty(L loc, A anno); 95 96 P makeNotAllowed(L loc, A anno); 97 98 P makeText(L loc, A anno); 99 100 P makeAttribute(N nc, P p, L loc, A anno) throws BuildException; 101 102 P makeElement(N nc, P p, L loc, A anno) throws BuildException; 103 104 DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, L loc) throws BuildException; 105 106 P makeValue(String datatypeLibrary, String type, String value, 107 Context c, String ns, L loc, A anno) throws BuildException; 108 109 /** 110 * 111 * @param parent 112 * The parent scope. null if there's no parent scope. 113 * For example, if the complete document looks like the following: 114 * <pre><xmp> 115 * <grammar> 116 * <start><element name="root"><empty/></element></start> 117 * </grammar> 118 * </xmp></pre> 119 * Then when the outer-most {@link Grammar} is created, it will 120 * receive the <tt>null</tt> parent. 121 */ 122 Grammar<P,E,L,A,CL> makeGrammar(Scope<P,E,L,A,CL> parent); 123 124 /** 125 * Called when annotation is found right inside a pattern 126 * 127 * such as, 128 * 129 * <pre><xmp> 130 * <element name="foo"> <!-- this becomes 'P' --> 131 * <foreign:annotation /> <!-- this becomes 'A' --> 132 * ... 133 * </element> 134 * </xmp></pre> 135 */ 136 P annotate(P p, A anno) throws BuildException; 137 138 /** 139 * Called when element annotation is found after a pattern. 140 * 141 * such as, 142 * 143 * <pre><xmp> 144 * <element name="foo"> 145 * <empty /> <!-- this becomes 'P' --> 146 * <foreign:annotation /> <!-- this becomes 'E' --> 147 * </element> 148 * </xmp></pre> 149 */ 150 P annotateAfter(P p, E e) throws BuildException; 151 152 P commentAfter(P p, CL comments) throws BuildException; 153 154 /** 155 * 156 * @param current 157 * Current grammar that we are parsing. This is what contains 158 * externalRef. 159 * @param scope 160 * The parent scope. null if there's no parent scope. 161 * See {@link #makeGrammar(Scope)} for more details about 162 * when this parameter can be null. 163 */ 164 P makeExternalRef(Parseable current, String uri, String ns, Scope<P,E,L,A,CL> scope, 165 L loc, A anno) throws BuildException, IllegalSchemaException; 166 167 L makeLocation(String systemId, int lineNumber, int columnNumber); 168 | 94 P makeEmpty(L loc, A anno); 95 96 P makeNotAllowed(L loc, A anno); 97 98 P makeText(L loc, A anno); 99 100 P makeAttribute(N nc, P p, L loc, A anno) throws BuildException; 101 102 P makeElement(N nc, P p, L loc, A anno) throws BuildException; 103 104 DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, L loc) throws BuildException; 105 106 P makeValue(String datatypeLibrary, String type, String value, 107 Context c, String ns, L loc, A anno) throws BuildException; 108 109 /** 110 * 111 * @param parent 112 * The parent scope. null if there's no parent scope. 113 * For example, if the complete document looks like the following: 114 * <pre>{@code 115 * <grammar> 116 * <start><element name="root"><empty/></element></start> 117 * </grammar> 118 * }</pre> 119 * Then when the outer-most {@link Grammar} is created, it will 120 * receive the {@code null} parent. 121 */ 122 Grammar<P,E,L,A,CL> makeGrammar(Scope<P,E,L,A,CL> parent); 123 124 /** 125 * Called when annotation is found right inside a pattern 126 * 127 * such as, 128 * 129 * <pre>{@code 130 * <element name="foo"> <!-- this becomes 'P' --> 131 * <foreign:annotation /> <!-- this becomes 'A' --> 132 * ... 133 * </element> 134 * }</pre> 135 */ 136 P annotate(P p, A anno) throws BuildException; 137 138 /** 139 * Called when element annotation is found after a pattern. 140 * 141 * such as, 142 * 143 * <pre>{@code 144 * <element name="foo"> 145 * <empty /> <!-- this becomes 'P' --> 146 * <foreign:annotation /> <!-- this becomes 'E' --> 147 * </element> 148 * }</pre> 149 */ 150 P annotateAfter(P p, E e) throws BuildException; 151 152 P commentAfter(P p, CL comments) throws BuildException; 153 154 /** 155 * 156 * @param current 157 * Current grammar that we are parsing. This is what contains 158 * externalRef. 159 * @param scope 160 * The parent scope. null if there's no parent scope. 161 * See {@link #makeGrammar(Scope)} for more details about 162 * when this parameter can be null. 163 */ 164 P makeExternalRef(Parseable current, String uri, String ns, Scope<P,E,L,A,CL> scope, 165 L loc, A anno) throws BuildException, IllegalSchemaException; 166 167 L makeLocation(String systemId, int lineNumber, int columnNumber); 168 |