aboutsummaryrefslogblamecommitdiffstats
path: root/src/nodejs/alternative/xapi-peg-grammar.peg
blob: d9f554710581d8258db23c26a28d46638ca876b6 (plain) (tree)















































                                                                                                                                                
Expr   Path Type XPath?
Path   "/"
Type   WildCard / "node" / "way" / "relation"
XPath  Bbox (Tag Child?)? / Bbox Child Tag? / Tag (Bbox Child?)? / Tag Child Bbox? / Child (Tag Bbox?)? / Child Bbox Tag?
Bbox   LeftBracket BboxPredicate  RightBracket
Tag    LeftBracket TagPredicate   RightBracket
Child  LeftBracket ChildPredicate RightBracket

BboxPredicate  [bB] [bB] [oO] [xX] Equals Left Komma Bottom Komma Right Komma Top
Left          Coordinate
Bottom        Coordinate
Right         Coordinate
Top           Coordinate
Coordinate    Sign? Double / Sign? Integer

TagPredicate  Keys Equals Vals

Keys  Key (Pipe Key)*
Key   Chars
Vals  WildCard / Val
Val   Chars Pipe Keys / Chars

Chars         Char (Char)*
SpecialChar   Escape Special
Special       Equals / LeftBracket / RightBracket / LeftParent / RightParent / Pipe / Backslash
Space         [ U+0020 ]
Equals        [ U+003D ]
Escape        [ U+005C ]
LeftBracket   [ U+005B ]
RightBracket  [ U+005D ]
LeftParent    [ U+0028 ]
RightParent   [ U+0029 ]
Backslash     [ U+005C ]
Pipe          [ U+007C ]
Char          SpecialChar / [U+0021-U+0027] / [U+002B-U+003C] / [U+003E-U+005A] / [U+005C] / [U+005E-U+007B] / [U+007D-U+FFFF]

ChildPredicate  "nd" / "not(nd)" / "tag" / "not(tag)" / "not(tag)" / "way" / "not(way)" / "node" / "not(node)" / "relation" / "not(relation)"

Integer   "0" / Sign? [1-9] [0-9]*
Double    Integer "." [0-9]*
Sign      "+" / "-"
Empty     ""

Dot       "."
Komma     ","
WildCard  "*"
CR  [U+0013]
LF  [U+000A]