2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.xpath.impl;
10 import org.kohsuke.MetaInfServices;
11 import org.opendaylight.yangtools.yang.common.QNameModule;
12 import org.opendaylight.yangtools.yang.common.YangNamespaceContext;
13 import org.opendaylight.yangtools.yang.xpath.api.YangXPathMathMode;
14 import org.opendaylight.yangtools.yang.xpath.api.YangXPathParser;
15 import org.opendaylight.yangtools.yang.xpath.api.YangXPathParser.QualifiedBound;
16 import org.opendaylight.yangtools.yang.xpath.api.YangXPathParser.UnqualifiedBound;
17 import org.opendaylight.yangtools.yang.xpath.api.YangXPathParserFactory;
20 public final class AntlrXPathParserFactory implements YangXPathParserFactory {
22 public YangXPathParser newParser(final YangXPathMathMode mathMode) {
23 return new AntlrXPathParser.Base(mathMode);
27 public QualifiedBound newParser(final YangXPathMathMode mathMode, final YangNamespaceContext namespaceContext) {
28 return new AntlrXPathParser.Qualified(mathMode, namespaceContext);
32 public UnqualifiedBound newParser(final YangXPathMathMode mathMode, final YangNamespaceContext namespaceContext,
33 final QNameModule defaultNamespace) {
34 return new AntlrXPathParser.Unqualified(mathMode, namespaceContext, defaultNamespace);