MCPcopy Create free account
hub / github.com/BaseXdb/basex / init

Method init

basex-core/src/main/java/org/basex/query/QueryParser.java:233–246  ·  view source on GitHub ↗

Initializes the parsing process. @throws QueryException query exception

()

Source from the content-addressed store, hash-verified

231 * @throws QueryException query exception
232 */
233 private void init() throws QueryException {
234 final IO baseIO = sc.baseIO();
235 path = baseIO == null ? null : baseIO.path();
236 if(!more()) throw error(QUERYEMPTY);
237
238 // checks if the query string contains invalid characters
239 for(int i = 0; i < length; i++) {
240 final int cp = input[i];
241 if(!XMLToken.valid(cp)) {
242 pos = i;
243 throw error(MODLEINV_X, currentAsString());
244 }
245 }
246 }
247
248 /**
249 * Finishes the parsing step.

Callers 2

parseMainMethod · 0.95
parseLibraryMethod · 0.95

Calls 6

pathMethod · 0.95
errorMethod · 0.95
validMethod · 0.95
baseIOMethod · 0.80
moreMethod · 0.65
currentAsStringMethod · 0.45

Tested by

no test coverage detected