1 #ifndef XPATHPARSER_HPP
2 #define XPATHPARSER_HPP
3 #include <sngxml/xpath/XPathExpr.hpp>
4 #include <soulng/lexer/Token.hpp>
5 #include <soulng/parser/Match.hpp>
6 #include <soulng/parser/Value.hpp>
7
8
9
10 class XPathLexer;
11
12 struct XPathParser
13 {
14 static std::unique_ptr<sngxml::xpath::XPathExpr> Parse(XPathLexer& lexer);
15 static soulng::parser::Match Expr(XPathLexer& lexer);
16 static soulng::parser::Match OrExpr(XPathLexer& lexer);
17 static soulng::parser::Match AndExpr(XPathLexer& lexer);
18 static soulng::parser::Match EqualityExpr(XPathLexer& lexer);
19 static soulng::parser::Match RelationalExpr(XPathLexer& lexer);
20 static soulng::parser::Match AdditiveExpr(XPathLexer& lexer);
21 static soulng::parser::Match MultiplicativeExpr(XPathLexer& lexer);
22 static soulng::parser::Match UnaryExpr(XPathLexer& lexer);
23 static soulng::parser::Match UnionExpr(XPathLexer& lexer);
24 static soulng::parser::Match PathExpr(XPathLexer& lexer);
25 static soulng::parser::Match FilterExpr(XPathLexer& lexer);
26 static soulng::parser::Match LocationPath(XPathLexer& lexer);
27 static soulng::parser::Match AbsoluteLocationPath(XPathLexer& lexer);
28 static soulng::parser::Match AbbreviatedAbsoluteLocationPath(XPathLexer& lexer);
29 static soulng::parser::Match RelativeLocationPath(XPathLexer& lexer);
30 static soulng::parser::Match Step(XPathLexer& lexer);
31 static soulng::parser::Match AxisSpecifier(XPathLexer& lexer);
32 static soulng::parser::Match AxisName(XPathLexer& lexer);
33 static soulng::parser::Match AbbreviatedAxisSpecifier(XPathLexer& lexer);
34 static soulng::parser::Match NodeTest(XPathLexer& lexer);
35 static soulng::parser::Match NodeType(XPathLexer& lexer);
36 static soulng::parser::Match NameTest(XPathLexer& lexer);
37 static soulng::parser::Match AbbreviatedStep(XPathLexer& lexer);
38 static soulng::parser::Match Literal(XPathLexer& lexer);
39 static soulng::parser::Match Number(XPathLexer& lexer);
40 static soulng::parser::Match Predicate(XPathLexer& lexer);
41 static soulng::parser::Match PredicateExpr(XPathLexer& lexer);
42 static soulng::parser::Match PrimaryExpr(XPathLexer& lexer);
43 static soulng::parser::Match VariableReference(XPathLexer& lexer);
44 static soulng::parser::Match FunctionCall(XPathLexer& lexer);
45 static soulng::parser::Match FunctionName(XPathLexer& lexer);
46 static soulng::parser::Match Argument(XPathLexer& lexer);
47 static soulng::parser::Match QName(XPathLexer& lexer);
48 static soulng::parser::Match PrefixedName(XPathLexer& lexer);
49 static soulng::parser::Match Prefix(XPathLexer& lexer);
50 static soulng::parser::Match UnprefixedName(XPathLexer& lexer);
51 static soulng::parser::Match LocalPart(XPathLexer& lexer);
52 static soulng::parser::Match NCName(XPathLexer& lexer);
53 };
54
55 #endif // XPATHPARSER_HPP