diff --git a/query/docs/SPEC.md b/query/docs/SPEC.md index b51ba6bacd..4640f2ebfa 100644 --- a/query/docs/SPEC.md +++ b/query/docs/SPEC.md @@ -163,22 +163,23 @@ Examples: A duration literal is a representation of a length of time. It has an integer part and a duration unit part. Multiple durations may be specified together and the resulting duration is the sum of each smaller part. +When several durations are specified together, larger units must appear before smaller ones, and there can be no repeated units. duration_lit = { int_lit duration_unit } . - duration_unit = "ns" | "us" | "µs" | "ms" | "s" | "m" | "h" | "d" | "w" | "mo" | "y" . + duration_unit = "y" | "mo" | "w" | "d" | "h" | "m" | "s" | "ms" | "us" | "µs" | "ns" . | Units | Meaning | | ----- | ------- | -| ns | nanoseconds (1 billionth of a second) | -| us or µs | microseconds (1 millionth of a second) | -| ms | milliseconds (1 thousandth of a second) | -| s | second | -| m | minute (60 seconds) | -| h | hour (60 minutes) | -| d | day | -| w | week (7 days) | -| mo | month | | y | year (12 months) | +| mo | month | +| w | week (7 days) | +| d | day | +| h | hour (60 minutes) | +| m | minute (60 seconds) | +| s | second | +| ms | milliseconds (1 thousandth of a second) | +| us or µs | microseconds (1 millionth of a second) | +| ns | nanoseconds (1 billionth of a second) | Durations represent a length of time. Lengths of time are dependent on specific instants in time they occur and as such, durations do not represent a fixed amount of time. diff --git a/query/parser/flux.go b/query/parser/flux.go index 560799531d..e67057e1d3 100644 --- a/query/parser/flux.go +++ b/query/parser/flux.go @@ -27,45 +27,9 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 9, col: 5, offset: 112}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 9, col: 5, offset: 112}, + name: "__", }, &labeledExpr{ pos: position{line: 9, col: 8, offset: 115}, @@ -75,51 +39,13 @@ var g = &grammar{ name: "Program", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 9, col: 24, offset: 131}, + name: "__", }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, + &ruleRefExpr{ + pos: position{line: 9, col: 27, offset: 134}, + name: "EOF", }, }, }, @@ -166,89 +92,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 19, col: 30, offset: 300}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 19, col: 30, offset: 300}, + name: "__", }, &ruleRefExpr{ pos: position{line: 19, col: 33, offset: 303}, name: "SourceElement", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 19, col: 47, offset: 317}, + name: "__", }, }, }, @@ -309,163 +163,30 @@ var g = &grammar{ val: "option", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 35, col: 14, offset: 540}, + name: "__", }, &labeledExpr{ pos: position{line: 35, col: 17, offset: 543}, label: "id", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonOptionStatement13, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 35, col: 20, offset: 546}, + name: "Identifier", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 35, col: 31, offset: 557}, + name: "__", }, &litMatcher{ pos: position{line: 35, col: 34, offset: 560}, val: "=", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 35, col: 38, offset: 564}, + name: "__", }, &labeledExpr{ pos: position{line: 35, col: 41, offset: 567}, @@ -509,45 +230,9 @@ var g = &grammar{ val: "return", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 45, col: 14, offset: 773}, + name: "__", }, &labeledExpr{ pos: position{line: 45, col: 17, offset: 776}, @@ -591,45 +276,9 @@ var g = &grammar{ val: "{", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 55, col: 9, offset: 959}, + name: "__", }, &labeledExpr{ pos: position{line: 55, col: 12, offset: 962}, @@ -639,133 +288,25 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 55, col: 19, offset: 969}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 55, col: 19, offset: 969}, + name: "__", }, &ruleRefExpr{ pos: position{line: 55, col: 22, offset: 972}, name: "Statement", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 55, col: 32, offset: 982}, + name: "__", }, }, }, }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 55, col: 38, offset: 988}, + name: "__", }, &litMatcher{ pos: position{line: 55, col: 41, offset: 991}, @@ -788,120 +329,23 @@ var g = &grammar{ &labeledExpr{ pos: position{line: 60, col: 5, offset: 1072}, label: "id", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonVariableDeclaration4, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 60, col: 8, offset: 1075}, + name: "Identifier", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 60, col: 19, offset: 1086}, + name: "__", }, &litMatcher{ pos: position{line: 60, col: 22, offset: 1089}, val: "=", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 60, col: 26, offset: 1093}, + name: "__", }, &labeledExpr{ pos: position{line: 60, col: 29, offset: 1096}, @@ -927,34 +371,9 @@ var g = &grammar{ &labeledExpr{ pos: position{line: 66, col: 5, offset: 1184}, label: "head", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonMemberExpressions4, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 66, col: 10, offset: 1189}, + name: "Identifier", }, }, &labeledExpr{ @@ -964,49 +383,13 @@ var g = &grammar{ pos: position{line: 67, col: 10, offset: 1236}, expr: &actionExpr{ pos: position{line: 68, col: 10, offset: 1247}, - run: (*parser).callonMemberExpressions11, + run: (*parser).callonMemberExpressions7, expr: &seqExpr{ pos: position{line: 68, col: 10, offset: 1247}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 68, col: 10, offset: 1247}, + name: "__", }, &labeledExpr{ pos: position{line: 68, col: 13, offset: 1250}, @@ -1042,77 +425,16 @@ var g = &grammar{ val: ".", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 77, col: 9, offset: 1432}, + name: "__", }, &labeledExpr{ pos: position{line: 77, col: 12, offset: 1435}, label: "property", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonMemberExpressionProperty14, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 77, col: 21, offset: 1444}, + name: "Identifier", }, }, }, @@ -1120,7 +442,7 @@ var g = &grammar{ }, &actionExpr{ pos: position{line: 80, col: 7, offset: 1496}, - run: (*parser).callonMemberExpressionProperty19, + run: (*parser).callonMemberExpressionProperty8, expr: &seqExpr{ pos: position{line: 80, col: 7, offset: 1496}, exprs: []interface{}{ @@ -1129,45 +451,9 @@ var g = &grammar{ val: "[", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 80, col: 11, offset: 1500}, + name: "__", }, &labeledExpr{ pos: position{line: 80, col: 14, offset: 1503}, @@ -1177,90 +463,18 @@ var g = &grammar{ name: "Primary", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 80, col: 31, offset: 1520}, + name: "__", }, &litMatcher{ pos: position{line: 80, col: 34, offset: 1523}, val: "]", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 80, col: 38, offset: 1527}, + name: "__", }, }, }, @@ -1294,45 +508,9 @@ var g = &grammar{ name: "MemberExpressions", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 86, col: 32, offset: 1623}, + name: "__", }, &labeledExpr{ pos: position{line: 86, col: 35, offset: 1626}, @@ -1356,49 +534,13 @@ var g = &grammar{ alternatives: []interface{}{ &actionExpr{ pos: position{line: 91, col: 9, offset: 1729}, - run: (*parser).callonCallExpression21, + run: (*parser).callonCallExpression14, expr: &seqExpr{ pos: position{line: 91, col: 9, offset: 1729}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 91, col: 9, offset: 1729}, + name: "__", }, &labeledExpr{ pos: position{line: 91, col: 12, offset: 1732}, @@ -1413,49 +555,13 @@ var g = &grammar{ }, &actionExpr{ pos: position{line: 94, col: 10, offset: 1820}, - run: (*parser).callonCallExpression33, + run: (*parser).callonCallExpression19, expr: &seqExpr{ pos: position{line: 94, col: 10, offset: 1820}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 94, col: 10, offset: 1820}, + name: "__", }, &labeledExpr{ pos: position{line: 94, col: 13, offset: 1823}, @@ -1493,45 +599,9 @@ var g = &grammar{ name: "PipeExpressionHead", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 103, col: 29, offset: 2040}, + name: "__", }, &labeledExpr{ pos: position{line: 103, col: 32, offset: 2043}, @@ -1541,89 +611,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 103, col: 38, offset: 2049}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 103, col: 38, offset: 2049}, + name: "__", }, &ruleRefExpr{ pos: position{line: 103, col: 41, offset: 2052}, name: "PipeExpressionPipe", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 103, col: 60, offset: 2071}, + name: "__", }, }, }, @@ -1643,921 +641,9 @@ var g = &grammar{ pos: position{line: 108, col: 5, offset: 2158}, name: "CallExpression", }, - &actionExpr{ - pos: position{line: 394, col: 5, offset: 7430}, - run: (*parser).callonPipeExpressionHead3, - expr: &seqExpr{ - pos: position{line: 394, col: 7, offset: 7432}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 394, col: 7, offset: 7432}, - val: "\"", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 394, col: 11, offset: 7436}, - expr: &choiceExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - alternatives: []interface{}{ - &seqExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 402, col: 5, offset: 7645}, - expr: &charClassMatcher{ - pos: position{line: 402, col: 8, offset: 7648}, - val: "[\"\\\\\\n]", - chars: []rune{'"', '\\', '\n'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - &seqExpr{ - pos: position{line: 403, col: 5, offset: 7682}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 403, col: 5, offset: 7682}, - val: "\\", - ignoreCase: false, - }, - &choiceExpr{ - pos: position{line: 406, col: 5, offset: 7730}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 406, col: 5, offset: 7730}, - val: "\"", - ignoreCase: false, - }, - &actionExpr{ - pos: position{line: 407, col: 5, offset: 7738}, - run: (*parser).callonPipeExpressionHead16, - expr: &choiceExpr{ - pos: position{line: 407, col: 7, offset: 7740}, - alternatives: []interface{}{ - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 394, col: 29, offset: 7454}, - val: "\"", - ignoreCase: false, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 397, col: 5, offset: 7514}, - run: (*parser).callonPipeExpressionHead23, - expr: &seqExpr{ - pos: position{line: 397, col: 7, offset: 7516}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 397, col: 7, offset: 7516}, - val: "\"", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 397, col: 11, offset: 7520}, - expr: &choiceExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - alternatives: []interface{}{ - &seqExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 402, col: 5, offset: 7645}, - expr: &charClassMatcher{ - pos: position{line: 402, col: 8, offset: 7648}, - val: "[\"\\\\\\n]", - chars: []rune{'"', '\\', '\n'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - &seqExpr{ - pos: position{line: 403, col: 5, offset: 7682}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 403, col: 5, offset: 7682}, - val: "\\", - ignoreCase: false, - }, - &choiceExpr{ - pos: position{line: 406, col: 5, offset: 7730}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 406, col: 5, offset: 7730}, - val: "\"", - ignoreCase: false, - }, - &actionExpr{ - pos: position{line: 407, col: 5, offset: 7738}, - run: (*parser).callonPipeExpressionHead36, - expr: &choiceExpr{ - pos: position{line: 407, col: 7, offset: 7740}, - alternatives: []interface{}{ - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &choiceExpr{ - pos: position{line: 397, col: 31, offset: 7540}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 442, col: 5, offset: 8348}, - run: (*parser).callonPipeExpressionHead46, - expr: &seqExpr{ - pos: position{line: 442, col: 5, offset: 8348}, - exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 442, col: 8, offset: 8351}, - val: "true", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 445, col: 5, offset: 8422}, - run: (*parser).callonPipeExpressionHead65, - expr: &seqExpr{ - pos: position{line: 445, col: 5, offset: 8422}, - exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 445, col: 8, offset: 8425}, - val: "false", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 413, col: 5, offset: 7850}, - run: (*parser).callonPipeExpressionHead84, - expr: &seqExpr{ - pos: position{line: 413, col: 5, offset: 7850}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 413, col: 5, offset: 7850}, - val: "/", - ignoreCase: false, - }, - &labeledExpr{ - pos: position{line: 413, col: 9, offset: 7854}, - label: "pattern", - expr: &actionExpr{ - pos: position{line: 418, col: 5, offset: 7931}, - run: (*parser).callonPipeExpressionHead88, - expr: &labeledExpr{ - pos: position{line: 418, col: 5, offset: 7931}, - label: "chars", - expr: &oneOrMoreExpr{ - pos: position{line: 418, col: 11, offset: 7937}, - expr: &choiceExpr{ - pos: position{line: 423, col: 5, offset: 8021}, - alternatives: []interface{}{ - &actionExpr{ - pos: position{line: 423, col: 5, offset: 8021}, - run: (*parser).callonPipeExpressionHead92, - expr: &seqExpr{ - pos: position{line: 423, col: 5, offset: 8021}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 423, col: 5, offset: 8021}, - expr: &charClassMatcher{ - pos: position{line: 423, col: 6, offset: 8022}, - val: "[\\\\/]", - chars: []rune{'\\', '/'}, - ignoreCase: false, - inverted: false, - }, - }, - &labeledExpr{ - pos: position{line: 423, col: 12, offset: 8028}, - label: "re", - expr: &actionExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - run: (*parser).callonPipeExpressionHead97, - expr: &seqExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 437, col: 5, offset: 8268}, - expr: &charClassMatcher{ - pos: position{line: 493, col: 5, offset: 9128}, - val: "[\\n\\r]", - chars: []rune{'\n', '\r'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 429, col: 5, offset: 8137}, - run: (*parser).callonPipeExpressionHead102, - expr: &litMatcher{ - pos: position{line: 429, col: 5, offset: 8137}, - val: "\\/", - ignoreCase: false, - }, - }, - &actionExpr{ - pos: position{line: 432, col: 5, offset: 8185}, - run: (*parser).callonPipeExpressionHead104, - expr: &seqExpr{ - pos: position{line: 432, col: 5, offset: 8185}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 432, col: 5, offset: 8185}, - val: "\\", - ignoreCase: false, - }, - &actionExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - run: (*parser).callonPipeExpressionHead107, - expr: &seqExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 437, col: 5, offset: 8268}, - expr: &charClassMatcher{ - pos: position{line: 493, col: 5, offset: 9128}, - val: "[\\n\\r]", - chars: []rune{'\n', '\r'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 413, col: 28, offset: 7873}, - val: "/", - ignoreCase: false, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 469, col: 5, offset: 8759}, - run: (*parser).callonPipeExpressionHead113, - expr: &litMatcher{ - pos: position{line: 469, col: 5, offset: 8759}, - val: "<-", - ignoreCase: false, - }, - }, - &actionExpr{ - pos: position{line: 389, col: 5, offset: 7322}, - run: (*parser).callonPipeExpressionHead115, - expr: &labeledExpr{ - pos: position{line: 389, col: 5, offset: 7322}, - label: "durations", - expr: &oneOrMoreExpr{ - pos: position{line: 389, col: 15, offset: 7332}, - expr: &actionExpr{ - pos: position{line: 384, col: 5, offset: 7205}, - run: (*parser).callonPipeExpressionHead118, - expr: &seqExpr{ - pos: position{line: 384, col: 5, offset: 7205}, - exprs: []interface{}{ - &labeledExpr{ - pos: position{line: 384, col: 5, offset: 7205}, - label: "mag", - expr: &actionExpr{ - pos: position{line: 458, col: 5, offset: 8642}, - run: (*parser).callonPipeExpressionHead121, - expr: &choiceExpr{ - pos: position{line: 455, col: 6, offset: 8595}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 455, col: 6, offset: 8595}, - val: "0", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 455, col: 12, offset: 8601}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 463, col: 5, offset: 8719}, - val: "[1-9]", - ranges: []rune{'1', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 455, col: 25, offset: 8614}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - }, - }, - &labeledExpr{ - pos: position{line: 384, col: 24, offset: 7224}, - label: "unit", - expr: &choiceExpr{ - pos: position{line: 373, col: 9, offset: 7020}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 348, col: 5, offset: 6816}, - val: "ns", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 351, col: 6, offset: 6844}, - val: "us", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 351, col: 13, offset: 6851}, - val: "µs", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 351, col: 20, offset: 6859}, - val: "μs", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 354, col: 5, offset: 6888}, - val: "ms", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 357, col: 5, offset: 6910}, - val: "[smhdw]", - chars: []rune{'s', 'm', 'h', 'd', 'w'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 343, col: 5, offset: 6728}, - run: (*parser).callonPipeExpressionHead136, - expr: &seqExpr{ - pos: position{line: 343, col: 5, offset: 6728}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 337, col: 18, offset: 6643}, - val: "-", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 337, col: 32, offset: 6657}, - val: "-", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 343, col: 14, offset: 6737}, - val: "T", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 334, col: 14, offset: 6573}, - val: ":", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 334, col: 29, offset: 6588}, - val: ":", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrOneExpr{ - pos: position{line: 334, col: 44, offset: 6603}, - expr: &seqExpr{ - pos: position{line: 325, col: 5, offset: 6443}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 325, col: 5, offset: 6443}, - val: ".", - ignoreCase: false, - }, - &oneOrMoreExpr{ - pos: position{line: 325, col: 9, offset: 6447}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - &choiceExpr{ - pos: position{line: 331, col: 6, offset: 6526}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 331, col: 6, offset: 6526}, - val: "Z", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 328, col: 5, offset: 6473}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 328, col: 6, offset: 6474}, - val: "[+-]", - chars: []rune{'+', '-'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 328, col: 26, offset: 6494}, - val: ":", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 450, col: 5, offset: 8513}, - run: (*parser).callonPipeExpressionHead171, - expr: &seqExpr{ - pos: position{line: 450, col: 5, offset: 8513}, - exprs: []interface{}{ - &choiceExpr{ - pos: position{line: 455, col: 6, offset: 8595}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 455, col: 6, offset: 8595}, - val: "0", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 455, col: 12, offset: 8601}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 463, col: 5, offset: 8719}, - val: "[1-9]", - ranges: []rune{'1', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 455, col: 25, offset: 8614}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 450, col: 13, offset: 8521}, - val: ".", - ignoreCase: false, - }, - &oneOrMoreExpr{ - pos: position{line: 450, col: 17, offset: 8525}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 458, col: 5, offset: 8642}, - run: (*parser).callonPipeExpressionHead182, - expr: &choiceExpr{ - pos: position{line: 455, col: 6, offset: 8595}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 455, col: 6, offset: 8595}, - val: "0", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 455, col: 12, offset: 8601}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 463, col: 5, offset: 8719}, - val: "[1-9]", - ranges: []rune{'1', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 455, col: 25, offset: 8614}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 109, col: 5, offset: 2299}, + name: "Literal", }, &ruleRefExpr{ pos: position{line: 110, col: 5, offset: 2311}, @@ -2567,34 +653,9 @@ var g = &grammar{ pos: position{line: 111, col: 5, offset: 2321}, name: "MemberExpressions", }, - &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonPipeExpressionHead191, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 112, col: 5, offset: 2343}, + name: "Identifier", }, &ruleRefExpr{ pos: position{line: 113, col: 5, offset: 2358}, @@ -2625,45 +686,9 @@ var g = &grammar{ val: "|>", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 118, col: 10, offset: 2443}, + name: "__", }, &labeledExpr{ pos: position{line: 118, col: 13, offset: 2446}, @@ -2691,45 +716,9 @@ var g = &grammar{ val: "(", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 123, col: 9, offset: 2546}, + name: "__", }, &labeledExpr{ pos: position{line: 123, col: 12, offset: 2549}, @@ -2742,45 +731,9 @@ var g = &grammar{ }, }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 123, col: 37, offset: 2574}, + name: "__", }, &litMatcher{ pos: position{line: 123, col: 40, offset: 2577}, @@ -2805,45 +758,9 @@ var g = &grammar{ val: "(", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 128, col: 9, offset: 2645}, + name: "__", }, &labeledExpr{ pos: position{line: 128, col: 12, offset: 2648}, @@ -2856,135 +773,27 @@ var g = &grammar{ }, }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 128, col: 40, offset: 2676}, + name: "__", }, &litMatcher{ pos: position{line: 128, col: 43, offset: 2679}, val: ")", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 128, col: 47, offset: 2683}, + name: "__", }, &litMatcher{ pos: position{line: 128, col: 50, offset: 2686}, val: "=>", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 128, col: 55, offset: 2691}, + name: "__", }, &labeledExpr{ pos: position{line: 128, col: 58, offset: 2694}, @@ -2994,45 +803,9 @@ var g = &grammar{ name: "ArrowFunctionBody", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 128, col: 81, offset: 2717}, + name: "__", }, }, }, @@ -3055,45 +828,9 @@ var g = &grammar{ name: "ArrowFunctionParam", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 133, col: 30, offset: 2835}, + name: "__", }, &labeledExpr{ pos: position{line: 133, col: 33, offset: 2838}, @@ -3132,45 +869,9 @@ var g = &grammar{ val: ",", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 138, col: 9, offset: 2985}, + name: "__", }, &labeledExpr{ pos: position{line: 138, col: 13, offset: 2989}, @@ -3180,45 +881,9 @@ var g = &grammar{ name: "ArrowFunctionParam", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 138, col: 36, offset: 3012}, + name: "__", }, }, }, @@ -3239,120 +904,23 @@ var g = &grammar{ &labeledExpr{ pos: position{line: 143, col: 5, offset: 3069}, label: "key", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonArrowFunctionParam5, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 143, col: 9, offset: 3073}, + name: "Identifier", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 143, col: 20, offset: 3084}, + name: "__", }, &litMatcher{ pos: position{line: 143, col: 23, offset: 3087}, val: "=", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 143, col: 27, offset: 3091}, + name: "__", }, &labeledExpr{ pos: position{line: 143, col: 30, offset: 3094}, @@ -3362,127 +930,30 @@ var g = &grammar{ name: "Primary", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 143, col: 45, offset: 3109}, + name: "__", }, }, }, }, &actionExpr{ pos: position{line: 146, col: 5, offset: 3173}, - run: (*parser).callonArrowFunctionParam37, + run: (*parser).callonArrowFunctionParam12, expr: &seqExpr{ pos: position{line: 146, col: 5, offset: 3173}, exprs: []interface{}{ &labeledExpr{ pos: position{line: 146, col: 5, offset: 3173}, label: "key", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonArrowFunctionParam40, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 146, col: 9, offset: 3177}, + name: "Identifier", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 146, col: 20, offset: 3188}, + name: "__", }, }, }, @@ -3537,45 +1008,9 @@ var g = &grammar{ val: "{", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 160, col: 9, offset: 3389}, + name: "__", }, &labeledExpr{ pos: position{line: 160, col: 12, offset: 3392}, @@ -3588,45 +1023,9 @@ var g = &grammar{ }, }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 160, col: 39, offset: 3419}, + name: "__", }, &litMatcher{ pos: position{line: 160, col: 42, offset: 3422}, @@ -3654,45 +1053,9 @@ var g = &grammar{ name: "Property", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 165, col: 20, offset: 3492}, + name: "__", }, &labeledExpr{ pos: position{line: 165, col: 23, offset: 3495}, @@ -3705,45 +1068,9 @@ var g = &grammar{ }, }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 165, col: 44, offset: 3516}, + name: "__", }, &zeroOrOneExpr{ pos: position{line: 165, col: 47, offset: 3519}, @@ -3771,45 +1098,9 @@ var g = &grammar{ val: ",", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 170, col: 9, offset: 3608}, + name: "__", }, &labeledExpr{ pos: position{line: 170, col: 13, offset: 3612}, @@ -3835,120 +1126,23 @@ var g = &grammar{ &labeledExpr{ pos: position{line: 175, col: 5, offset: 3669}, label: "key", - expr: &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonProperty4, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 175, col: 9, offset: 3673}, + name: "Identifier", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 175, col: 20, offset: 3684}, + name: "__", }, &litMatcher{ pos: position{line: 175, col: 24, offset: 3688}, val: ":", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 175, col: 28, offset: 3692}, + name: "__", }, &labeledExpr{ pos: position{line: 175, col: 31, offset: 3695}, @@ -3970,6 +1164,29 @@ var g = &grammar{ name: "LogicalExpression", }, }, + { + name: "LogicalOperators", + pos: position{line: 189, col: 1, offset: 3979}, + expr: &actionExpr{ + pos: position{line: 190, col: 5, offset: 4000}, + run: (*parser).callonLogicalOperators1, + expr: &choiceExpr{ + pos: position{line: 190, col: 6, offset: 4001}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 190, col: 6, offset: 4001}, + val: "or", + ignoreCase: true, + }, + &litMatcher{ + pos: position{line: 190, col: 14, offset: 4009}, + val: "and", + ignoreCase: true, + }, + }, + }, + }, + }, { name: "LogicalExpression", pos: position{line: 194, col: 1, offset: 4061}, @@ -3995,104 +1212,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 195, col: 26, offset: 4104}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 195, col: 26, offset: 4104}, + name: "__", }, - &actionExpr{ - pos: position{line: 190, col: 5, offset: 4000}, - run: (*parser).callonLogicalExpression16, - expr: &choiceExpr{ - pos: position{line: 190, col: 6, offset: 4001}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 190, col: 6, offset: 4001}, - val: "or", - ignoreCase: true, - }, - &litMatcher{ - pos: position{line: 190, col: 14, offset: 4009}, - val: "and", - ignoreCase: true, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 195, col: 30, offset: 4108}, + name: "LogicalOperators", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 195, col: 47, offset: 4125}, + name: "__", }, &ruleRefExpr{ pos: position{line: 195, col: 51, offset: 4129}, @@ -4106,6 +1236,39 @@ var g = &grammar{ }, }, }, + { + name: "EqualityOperators", + pos: position{line: 199, col: 1, offset: 4208}, + expr: &actionExpr{ + pos: position{line: 200, col: 5, offset: 4230}, + run: (*parser).callonEqualityOperators1, + expr: &choiceExpr{ + pos: position{line: 200, col: 6, offset: 4231}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 200, col: 6, offset: 4231}, + val: "==", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 200, col: 13, offset: 4238}, + val: "!=", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 200, col: 20, offset: 4245}, + val: "=~", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 200, col: 27, offset: 4252}, + val: "!~", + ignoreCase: false, + }, + }, + }, + }, + }, { name: "Equality", pos: position{line: 204, col: 1, offset: 4297}, @@ -4131,114 +1294,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 205, col: 28, offset: 4333}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 205, col: 28, offset: 4333}, + name: "__", }, - &actionExpr{ - pos: position{line: 200, col: 5, offset: 4230}, - run: (*parser).callonEquality16, - expr: &choiceExpr{ - pos: position{line: 200, col: 6, offset: 4231}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 200, col: 6, offset: 4231}, - val: "==", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 200, col: 13, offset: 4238}, - val: "!=", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 200, col: 20, offset: 4245}, - val: "=~", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 200, col: 27, offset: 4252}, - val: "!~", - ignoreCase: false, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 205, col: 31, offset: 4336}, + name: "EqualityOperators", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 205, col: 49, offset: 4354}, + name: "__", }, &ruleRefExpr{ pos: position{line: 205, col: 52, offset: 4357}, @@ -4252,6 +1318,59 @@ var g = &grammar{ }, }, }, + { + name: "RelationalOperators", + pos: position{line: 209, col: 1, offset: 4437}, + expr: &actionExpr{ + pos: position{line: 210, col: 5, offset: 4461}, + run: (*parser).callonRelationalOperators1, + expr: &choiceExpr{ + pos: position{line: 210, col: 9, offset: 4465}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 210, col: 9, offset: 4465}, + val: "<=", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 211, col: 9, offset: 4478}, + val: "<", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 212, col: 9, offset: 4490}, + val: ">=", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 213, col: 9, offset: 4503}, + val: ">", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 214, col: 9, offset: 4515}, + val: "startswith", + ignoreCase: true, + }, + &litMatcher{ + pos: position{line: 215, col: 9, offset: 4537}, + val: "in", + ignoreCase: true, + }, + &litMatcher{ + pos: position{line: 216, col: 9, offset: 4551}, + val: "not empty", + ignoreCase: true, + }, + &litMatcher{ + pos: position{line: 217, col: 9, offset: 4572}, + val: "empty", + ignoreCase: true, + }, + }, + }, + }, + }, { name: "Relational", pos: position{line: 222, col: 1, offset: 4630}, @@ -4277,134 +1396,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 223, col: 26, offset: 4666}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 223, col: 26, offset: 4666}, + name: "__", }, - &actionExpr{ - pos: position{line: 210, col: 5, offset: 4461}, - run: (*parser).callonRelational16, - expr: &choiceExpr{ - pos: position{line: 210, col: 9, offset: 4465}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 210, col: 9, offset: 4465}, - val: "<=", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 211, col: 9, offset: 4478}, - val: "<", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 212, col: 9, offset: 4490}, - val: ">=", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 213, col: 9, offset: 4503}, - val: ">", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 214, col: 9, offset: 4515}, - val: "startswith", - ignoreCase: true, - }, - &litMatcher{ - pos: position{line: 215, col: 9, offset: 4537}, - val: "in", - ignoreCase: true, - }, - &litMatcher{ - pos: position{line: 216, col: 9, offset: 4551}, - val: "not empty", - ignoreCase: true, - }, - &litMatcher{ - pos: position{line: 217, col: 9, offset: 4572}, - val: "empty", - ignoreCase: true, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 223, col: 29, offset: 4669}, + name: "RelationalOperators", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 223, col: 49, offset: 4689}, + name: "__", }, &ruleRefExpr{ pos: position{line: 223, col: 52, offset: 4692}, @@ -4418,6 +1420,29 @@ var g = &grammar{ }, }, }, + { + name: "AdditiveOperator", + pos: position{line: 227, col: 1, offset: 4770}, + expr: &actionExpr{ + pos: position{line: 228, col: 5, offset: 4791}, + run: (*parser).callonAdditiveOperator1, + expr: &choiceExpr{ + pos: position{line: 228, col: 6, offset: 4792}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 228, col: 6, offset: 4792}, + val: "+", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 228, col: 12, offset: 4798}, + val: "-", + ignoreCase: false, + }, + }, + }, + }, + }, { name: "Additive", pos: position{line: 232, col: 1, offset: 4846}, @@ -4443,96 +1468,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 233, col: 32, offset: 4886}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 233, col: 32, offset: 4886}, + name: "__", }, - &actionExpr{ - pos: position{line: 228, col: 5, offset: 4791}, - run: (*parser).callonAdditive16, - expr: &charClassMatcher{ - pos: position{line: 228, col: 6, offset: 4792}, - val: "[+-]", - chars: []rune{'+', '-'}, - ignoreCase: false, - inverted: false, - }, + &ruleRefExpr{ + pos: position{line: 233, col: 35, offset: 4889}, + name: "AdditiveOperator", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 233, col: 52, offset: 4906}, + name: "__", }, &ruleRefExpr{ pos: position{line: 233, col: 55, offset: 4909}, @@ -4546,6 +1492,29 @@ var g = &grammar{ }, }, }, + { + name: "MultiplicativeOperator", + pos: position{line: 237, col: 1, offset: 4993}, + expr: &actionExpr{ + pos: position{line: 238, col: 5, offset: 5020}, + run: (*parser).callonMultiplicativeOperator1, + expr: &choiceExpr{ + pos: position{line: 238, col: 6, offset: 5021}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 238, col: 6, offset: 5021}, + val: "*", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 238, col: 12, offset: 5027}, + val: "/", + ignoreCase: false, + }, + }, + }, + }, + }, { name: "Multiplicative", pos: position{line: 242, col: 1, offset: 5071}, @@ -4571,96 +1540,17 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 243, col: 33, offset: 5118}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 243, col: 33, offset: 5118}, + name: "__", }, - &actionExpr{ - pos: position{line: 238, col: 5, offset: 5020}, - run: (*parser).callonMultiplicative16, - expr: &charClassMatcher{ - pos: position{line: 238, col: 6, offset: 5021}, - val: "[*/]", - chars: []rune{'*', '/'}, - ignoreCase: false, - inverted: false, - }, + &ruleRefExpr{ + pos: position{line: 243, col: 36, offset: 5121}, + name: "MultiplicativeOperator", }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 243, col: 59, offset: 5144}, + name: "__", }, &ruleRefExpr{ pos: position{line: 243, col: 62, offset: 5147}, @@ -4674,6 +1564,29 @@ var g = &grammar{ }, }, }, + { + name: "UnaryOperator", + pos: position{line: 247, col: 1, offset: 5232}, + expr: &actionExpr{ + pos: position{line: 248, col: 5, offset: 5250}, + run: (*parser).callonUnaryOperator1, + expr: &choiceExpr{ + pos: position{line: 248, col: 6, offset: 5251}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 248, col: 6, offset: 5251}, + val: "-", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 248, col: 12, offset: 5257}, + val: "not", + ignoreCase: false, + }, + }, + }, + }, + }, { name: "UnaryExpression", pos: position{line: 252, col: 1, offset: 5303}, @@ -4686,108 +1599,21 @@ var g = &grammar{ expr: &seqExpr{ pos: position{line: 253, col: 5, offset: 5323}, exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 253, col: 5, offset: 5323}, + name: "__", }, &labeledExpr{ pos: position{line: 253, col: 8, offset: 5326}, label: "op", - expr: &actionExpr{ - pos: position{line: 248, col: 5, offset: 5250}, - run: (*parser).callonUnaryExpression13, - expr: &choiceExpr{ - pos: position{line: 248, col: 6, offset: 5251}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 248, col: 6, offset: 5251}, - val: "-", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 248, col: 12, offset: 5257}, - val: "not", - ignoreCase: false, - }, - }, - }, + expr: &ruleRefExpr{ + pos: position{line: 253, col: 11, offset: 5329}, + name: "UnaryOperator", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 253, col: 25, offset: 5343}, + name: "__", }, &labeledExpr{ pos: position{line: 253, col: 28, offset: 5346}, @@ -4797,45 +1623,9 @@ var g = &grammar{ name: "Primary", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 253, col: 45, offset: 5363}, + name: "__", }, }, }, @@ -4861,921 +1651,9 @@ var g = &grammar{ pos: position{line: 260, col: 5, offset: 5476}, name: "Array", }, - &actionExpr{ - pos: position{line: 394, col: 5, offset: 7430}, - run: (*parser).callonPrimary4, - expr: &seqExpr{ - pos: position{line: 394, col: 7, offset: 7432}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 394, col: 7, offset: 7432}, - val: "\"", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 394, col: 11, offset: 7436}, - expr: &choiceExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - alternatives: []interface{}{ - &seqExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 402, col: 5, offset: 7645}, - expr: &charClassMatcher{ - pos: position{line: 402, col: 8, offset: 7648}, - val: "[\"\\\\\\n]", - chars: []rune{'"', '\\', '\n'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - &seqExpr{ - pos: position{line: 403, col: 5, offset: 7682}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 403, col: 5, offset: 7682}, - val: "\\", - ignoreCase: false, - }, - &choiceExpr{ - pos: position{line: 406, col: 5, offset: 7730}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 406, col: 5, offset: 7730}, - val: "\"", - ignoreCase: false, - }, - &actionExpr{ - pos: position{line: 407, col: 5, offset: 7738}, - run: (*parser).callonPrimary17, - expr: &choiceExpr{ - pos: position{line: 407, col: 7, offset: 7740}, - alternatives: []interface{}{ - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 394, col: 29, offset: 7454}, - val: "\"", - ignoreCase: false, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 397, col: 5, offset: 7514}, - run: (*parser).callonPrimary24, - expr: &seqExpr{ - pos: position{line: 397, col: 7, offset: 7516}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 397, col: 7, offset: 7516}, - val: "\"", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 397, col: 11, offset: 7520}, - expr: &choiceExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - alternatives: []interface{}{ - &seqExpr{ - pos: position{line: 402, col: 5, offset: 7645}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 402, col: 5, offset: 7645}, - expr: &charClassMatcher{ - pos: position{line: 402, col: 8, offset: 7648}, - val: "[\"\\\\\\n]", - chars: []rune{'"', '\\', '\n'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - &seqExpr{ - pos: position{line: 403, col: 5, offset: 7682}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 403, col: 5, offset: 7682}, - val: "\\", - ignoreCase: false, - }, - &choiceExpr{ - pos: position{line: 406, col: 5, offset: 7730}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 406, col: 5, offset: 7730}, - val: "\"", - ignoreCase: false, - }, - &actionExpr{ - pos: position{line: 407, col: 5, offset: 7738}, - run: (*parser).callonPrimary37, - expr: &choiceExpr{ - pos: position{line: 407, col: 7, offset: 7740}, - alternatives: []interface{}{ - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &choiceExpr{ - pos: position{line: 397, col: 31, offset: 7540}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - ¬Expr{ - pos: position{line: 499, col: 5, offset: 9158}, - expr: &anyMatcher{ - line: 499, col: 6, offset: 9159, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 442, col: 5, offset: 8348}, - run: (*parser).callonPrimary47, - expr: &seqExpr{ - pos: position{line: 442, col: 5, offset: 8348}, - exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 442, col: 8, offset: 8351}, - val: "true", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 445, col: 5, offset: 8422}, - run: (*parser).callonPrimary66, - expr: &seqExpr{ - pos: position{line: 445, col: 5, offset: 8422}, - exprs: []interface{}{ - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 445, col: 8, offset: 8425}, - val: "false", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 413, col: 5, offset: 7850}, - run: (*parser).callonPrimary85, - expr: &seqExpr{ - pos: position{line: 413, col: 5, offset: 7850}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 413, col: 5, offset: 7850}, - val: "/", - ignoreCase: false, - }, - &labeledExpr{ - pos: position{line: 413, col: 9, offset: 7854}, - label: "pattern", - expr: &actionExpr{ - pos: position{line: 418, col: 5, offset: 7931}, - run: (*parser).callonPrimary89, - expr: &labeledExpr{ - pos: position{line: 418, col: 5, offset: 7931}, - label: "chars", - expr: &oneOrMoreExpr{ - pos: position{line: 418, col: 11, offset: 7937}, - expr: &choiceExpr{ - pos: position{line: 423, col: 5, offset: 8021}, - alternatives: []interface{}{ - &actionExpr{ - pos: position{line: 423, col: 5, offset: 8021}, - run: (*parser).callonPrimary93, - expr: &seqExpr{ - pos: position{line: 423, col: 5, offset: 8021}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 423, col: 5, offset: 8021}, - expr: &charClassMatcher{ - pos: position{line: 423, col: 6, offset: 8022}, - val: "[\\\\/]", - chars: []rune{'\\', '/'}, - ignoreCase: false, - inverted: false, - }, - }, - &labeledExpr{ - pos: position{line: 423, col: 12, offset: 8028}, - label: "re", - expr: &actionExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - run: (*parser).callonPrimary98, - expr: &seqExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 437, col: 5, offset: 8268}, - expr: &charClassMatcher{ - pos: position{line: 493, col: 5, offset: 9128}, - val: "[\\n\\r]", - chars: []rune{'\n', '\r'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 429, col: 5, offset: 8137}, - run: (*parser).callonPrimary103, - expr: &litMatcher{ - pos: position{line: 429, col: 5, offset: 8137}, - val: "\\/", - ignoreCase: false, - }, - }, - &actionExpr{ - pos: position{line: 432, col: 5, offset: 8185}, - run: (*parser).callonPrimary105, - expr: &seqExpr{ - pos: position{line: 432, col: 5, offset: 8185}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 432, col: 5, offset: 8185}, - val: "\\", - ignoreCase: false, - }, - &actionExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - run: (*parser).callonPrimary108, - expr: &seqExpr{ - pos: position{line: 437, col: 5, offset: 8268}, - exprs: []interface{}{ - ¬Expr{ - pos: position{line: 437, col: 5, offset: 8268}, - expr: &charClassMatcher{ - pos: position{line: 493, col: 5, offset: 9128}, - val: "[\\n\\r]", - chars: []rune{'\n', '\r'}, - ignoreCase: false, - inverted: false, - }, - }, - &anyMatcher{ - line: 482, col: 5, offset: 9026, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 413, col: 28, offset: 7873}, - val: "/", - ignoreCase: false, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 469, col: 5, offset: 8759}, - run: (*parser).callonPrimary114, - expr: &litMatcher{ - pos: position{line: 469, col: 5, offset: 8759}, - val: "<-", - ignoreCase: false, - }, - }, - &actionExpr{ - pos: position{line: 389, col: 5, offset: 7322}, - run: (*parser).callonPrimary116, - expr: &labeledExpr{ - pos: position{line: 389, col: 5, offset: 7322}, - label: "durations", - expr: &oneOrMoreExpr{ - pos: position{line: 389, col: 15, offset: 7332}, - expr: &actionExpr{ - pos: position{line: 384, col: 5, offset: 7205}, - run: (*parser).callonPrimary119, - expr: &seqExpr{ - pos: position{line: 384, col: 5, offset: 7205}, - exprs: []interface{}{ - &labeledExpr{ - pos: position{line: 384, col: 5, offset: 7205}, - label: "mag", - expr: &actionExpr{ - pos: position{line: 458, col: 5, offset: 8642}, - run: (*parser).callonPrimary122, - expr: &choiceExpr{ - pos: position{line: 455, col: 6, offset: 8595}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 455, col: 6, offset: 8595}, - val: "0", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 455, col: 12, offset: 8601}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 463, col: 5, offset: 8719}, - val: "[1-9]", - ranges: []rune{'1', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 455, col: 25, offset: 8614}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - }, - }, - &labeledExpr{ - pos: position{line: 384, col: 24, offset: 7224}, - label: "unit", - expr: &choiceExpr{ - pos: position{line: 373, col: 9, offset: 7020}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 348, col: 5, offset: 6816}, - val: "ns", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 351, col: 6, offset: 6844}, - val: "us", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 351, col: 13, offset: 6851}, - val: "µs", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 351, col: 20, offset: 6859}, - val: "μs", - ignoreCase: false, - }, - &litMatcher{ - pos: position{line: 354, col: 5, offset: 6888}, - val: "ms", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 357, col: 5, offset: 6910}, - val: "[smhdw]", - chars: []rune{'s', 'm', 'h', 'd', 'w'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 343, col: 5, offset: 6728}, - run: (*parser).callonPrimary137, - expr: &seqExpr{ - pos: position{line: 343, col: 5, offset: 6728}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 337, col: 18, offset: 6643}, - val: "-", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 337, col: 32, offset: 6657}, - val: "-", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 343, col: 14, offset: 6737}, - val: "T", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 334, col: 14, offset: 6573}, - val: ":", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 334, col: 29, offset: 6588}, - val: ":", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrOneExpr{ - pos: position{line: 334, col: 44, offset: 6603}, - expr: &seqExpr{ - pos: position{line: 325, col: 5, offset: 6443}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 325, col: 5, offset: 6443}, - val: ".", - ignoreCase: false, - }, - &oneOrMoreExpr{ - pos: position{line: 325, col: 9, offset: 6447}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - &choiceExpr{ - pos: position{line: 331, col: 6, offset: 6526}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 331, col: 6, offset: 6526}, - val: "Z", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 328, col: 5, offset: 6473}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 328, col: 6, offset: 6474}, - val: "[+-]", - chars: []rune{'+', '-'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &litMatcher{ - pos: position{line: 328, col: 26, offset: 6494}, - val: ":", - ignoreCase: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 450, col: 5, offset: 8513}, - run: (*parser).callonPrimary172, - expr: &seqExpr{ - pos: position{line: 450, col: 5, offset: 8513}, - exprs: []interface{}{ - &choiceExpr{ - pos: position{line: 455, col: 6, offset: 8595}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 455, col: 6, offset: 8595}, - val: "0", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 455, col: 12, offset: 8601}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 463, col: 5, offset: 8719}, - val: "[1-9]", - ranges: []rune{'1', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 455, col: 25, offset: 8614}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, - &litMatcher{ - pos: position{line: 450, col: 13, offset: 8521}, - val: ".", - ignoreCase: false, - }, - &oneOrMoreExpr{ - pos: position{line: 450, col: 17, offset: 8525}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - &actionExpr{ - pos: position{line: 458, col: 5, offset: 8642}, - run: (*parser).callonPrimary183, - expr: &choiceExpr{ - pos: position{line: 455, col: 6, offset: 8595}, - alternatives: []interface{}{ - &litMatcher{ - pos: position{line: 455, col: 6, offset: 8595}, - val: "0", - ignoreCase: false, - }, - &seqExpr{ - pos: position{line: 455, col: 12, offset: 8601}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 463, col: 5, offset: 8719}, - val: "[1-9]", - ranges: []rune{'1', '9'}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 455, col: 25, offset: 8614}, - expr: &charClassMatcher{ - pos: position{line: 466, col: 5, offset: 8736}, - val: "[0-9]", - ranges: []rune{'0', '9'}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 261, col: 5, offset: 5486}, + name: "Literal", }, &ruleRefExpr{ pos: position{line: 262, col: 5, offset: 5498}, @@ -5785,34 +1663,9 @@ var g = &grammar{ pos: position{line: 263, col: 5, offset: 5517}, name: "MemberExpressions", }, - &actionExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - run: (*parser).callonPrimary192, - expr: &seqExpr{ - pos: position{line: 476, col: 5, offset: 8945}, - exprs: []interface{}{ - &charClassMatcher{ - pos: position{line: 476, col: 5, offset: 8945}, - val: "[_\\pL]", - chars: []rune{'_'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 476, col: 11, offset: 8951}, - expr: &charClassMatcher{ - pos: position{line: 476, col: 11, offset: 8951}, - val: "[_0-9\\pL]", - chars: []rune{'_'}, - ranges: []rune{'0', '9'}, - classes: []*unicode.RangeTable{rangeTable("L")}, - ignoreCase: false, - inverted: false, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 264, col: 5, offset: 5539}, + name: "Identifier", }, &ruleRefExpr{ pos: position{line: 265, col: 5, offset: 5554}, @@ -5829,6 +1682,47 @@ var g = &grammar{ }, }, }, + { + name: "Literal", + pos: position{line: 269, col: 1, offset: 5611}, + expr: &choiceExpr{ + pos: position{line: 270, col: 5, offset: 5623}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 270, col: 5, offset: 5623}, + name: "StringLiteral", + }, + &ruleRefExpr{ + pos: position{line: 271, col: 5, offset: 5641}, + name: "BooleanLiteral", + }, + &ruleRefExpr{ + pos: position{line: 272, col: 5, offset: 5660}, + name: "RegexpLiteral", + }, + &ruleRefExpr{ + pos: position{line: 273, col: 5, offset: 5678}, + name: "PipeLiteral", + }, + &ruleRefExpr{ + pos: position{line: 274, col: 5, offset: 5694}, + name: "DurationLiteral", + }, + &ruleRefExpr{ + pos: position{line: 275, col: 5, offset: 5714}, + name: "DateTimeLiteral", + }, + &ruleRefExpr{ + pos: position{line: 276, col: 5, offset: 5734}, + name: "NumberLiteral", + }, + &ruleRefExpr{ + pos: position{line: 277, col: 5, offset: 5752}, + name: "IntegerLiteral", + }, + }, + }, + }, { name: "Parens", pos: position{line: 279, col: 1, offset: 5768}, @@ -5843,45 +1737,9 @@ var g = &grammar{ val: "(", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 280, col: 9, offset: 5783}, + name: "__", }, &labeledExpr{ pos: position{line: 280, col: 12, offset: 5786}, @@ -5891,45 +1749,9 @@ var g = &grammar{ name: "Expr", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 280, col: 22, offset: 5796}, + name: "__", }, &litMatcher{ pos: position{line: 280, col: 25, offset: 5799}, @@ -5954,45 +1776,9 @@ var g = &grammar{ val: "[", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 285, col: 9, offset: 5849}, + name: "__", }, &labeledExpr{ pos: position{line: 285, col: 12, offset: 5852}, @@ -6005,45 +1791,9 @@ var g = &grammar{ }, }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 285, col: 36, offset: 5876}, + name: "__", }, &litMatcher{ pos: position{line: 285, col: 39, offset: 5879}, @@ -6071,45 +1821,9 @@ var g = &grammar{ name: "Primary", }, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 290, col: 19, offset: 5951}, + name: "__", }, &labeledExpr{ pos: position{line: 290, col: 22, offset: 5954}, @@ -6140,45 +1854,9 @@ var g = &grammar{ val: ",", ignoreCase: false, }, - &zeroOrMoreExpr{ - pos: position{line: 484, col: 5, offset: 9035}, - expr: &choiceExpr{ - pos: position{line: 484, col: 7, offset: 9037}, - alternatives: []interface{}{ - &charClassMatcher{ - pos: position{line: 490, col: 5, offset: 9098}, - val: "[ \\t\\r\\n]", - chars: []rune{' ', '\t', '\r', '\n'}, - ignoreCase: false, - inverted: false, - }, - &seqExpr{ - pos: position{line: 487, col: 5, offset: 9072}, - exprs: []interface{}{ - &litMatcher{ - pos: position{line: 487, col: 5, offset: 9072}, - val: "//", - ignoreCase: false, - }, - &zeroOrMoreExpr{ - pos: position{line: 487, col: 10, offset: 9077}, - expr: &charClassMatcher{ - pos: position{line: 487, col: 10, offset: 9077}, - val: "[^\\r\\n]", - chars: []rune{'\r', '\n'}, - ignoreCase: false, - inverted: true, - }, - }, - &litMatcher{ - pos: position{line: 496, col: 5, offset: 9144}, - val: "\n", - ignoreCase: false, - }, - }, - }, - }, - }, + &ruleRefExpr{ + pos: position{line: 295, col: 9, offset: 6049}, + name: "__", }, &labeledExpr{ pos: position{line: 295, col: 12, offset: 6052}, @@ -6192,6 +1870,1643 @@ var g = &grammar{ }, }, }, + { + name: "DateFullYear", + pos: position{line: 299, col: 1, offset: 6103}, + expr: &seqExpr{ + pos: position{line: 300, col: 5, offset: 6120}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 300, col: 5, offset: 6120}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 300, col: 11, offset: 6126}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 300, col: 17, offset: 6132}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 300, col: 23, offset: 6138}, + name: "Digit", + }, + }, + }, + }, + { + name: "DateMonth", + pos: position{line: 302, col: 1, offset: 6145}, + expr: &seqExpr{ + pos: position{line: 304, col: 5, offset: 6170}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 304, col: 5, offset: 6170}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 304, col: 11, offset: 6176}, + name: "Digit", + }, + }, + }, + }, + { + name: "DateMDay", + pos: position{line: 306, col: 1, offset: 6183}, + expr: &seqExpr{ + pos: position{line: 309, col: 5, offset: 6253}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 309, col: 5, offset: 6253}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 309, col: 11, offset: 6259}, + name: "Digit", + }, + }, + }, + }, + { + name: "TimeHour", + pos: position{line: 311, col: 1, offset: 6266}, + expr: &seqExpr{ + pos: position{line: 313, col: 5, offset: 6290}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 313, col: 5, offset: 6290}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 313, col: 11, offset: 6296}, + name: "Digit", + }, + }, + }, + }, + { + name: "TimeMinute", + pos: position{line: 315, col: 1, offset: 6303}, + expr: &seqExpr{ + pos: position{line: 317, col: 5, offset: 6329}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 317, col: 5, offset: 6329}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 317, col: 11, offset: 6335}, + name: "Digit", + }, + }, + }, + }, + { + name: "TimeSecond", + pos: position{line: 319, col: 1, offset: 6342}, + expr: &seqExpr{ + pos: position{line: 322, col: 5, offset: 6414}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 322, col: 5, offset: 6414}, + name: "Digit", + }, + &ruleRefExpr{ + pos: position{line: 322, col: 11, offset: 6420}, + name: "Digit", + }, + }, + }, + }, + { + name: "TimeSecFrac", + pos: position{line: 324, col: 1, offset: 6427}, + expr: &seqExpr{ + pos: position{line: 325, col: 5, offset: 6443}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 325, col: 5, offset: 6443}, + val: ".", + ignoreCase: false, + }, + &oneOrMoreExpr{ + pos: position{line: 325, col: 9, offset: 6447}, + expr: &ruleRefExpr{ + pos: position{line: 325, col: 9, offset: 6447}, + name: "Digit", + }, + }, + }, + }, + }, + { + name: "TimeNumOffset", + pos: position{line: 327, col: 1, offset: 6455}, + expr: &seqExpr{ + pos: position{line: 328, col: 5, offset: 6473}, + exprs: []interface{}{ + &choiceExpr{ + pos: position{line: 328, col: 6, offset: 6474}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 328, col: 6, offset: 6474}, + val: "+", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 328, col: 12, offset: 6480}, + val: "-", + ignoreCase: false, + }, + }, + }, + &ruleRefExpr{ + pos: position{line: 328, col: 17, offset: 6485}, + name: "TimeHour", + }, + &litMatcher{ + pos: position{line: 328, col: 26, offset: 6494}, + val: ":", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 328, col: 30, offset: 6498}, + name: "TimeMinute", + }, + }, + }, + }, + { + name: "TimeOffset", + pos: position{line: 330, col: 1, offset: 6510}, + expr: &choiceExpr{ + pos: position{line: 331, col: 6, offset: 6526}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 331, col: 6, offset: 6526}, + val: "Z", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 331, col: 12, offset: 6532}, + name: "TimeNumOffset", + }, + }, + }, + }, + { + name: "PartialTime", + pos: position{line: 333, col: 1, offset: 6548}, + expr: &seqExpr{ + pos: position{line: 334, col: 5, offset: 6564}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 334, col: 5, offset: 6564}, + name: "TimeHour", + }, + &litMatcher{ + pos: position{line: 334, col: 14, offset: 6573}, + val: ":", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 334, col: 18, offset: 6577}, + name: "TimeMinute", + }, + &litMatcher{ + pos: position{line: 334, col: 29, offset: 6588}, + val: ":", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 334, col: 33, offset: 6592}, + name: "TimeSecond", + }, + &zeroOrOneExpr{ + pos: position{line: 334, col: 44, offset: 6603}, + expr: &ruleRefExpr{ + pos: position{line: 334, col: 44, offset: 6603}, + name: "TimeSecFrac", + }, + }, + }, + }, + }, + { + name: "FullDate", + pos: position{line: 336, col: 1, offset: 6617}, + expr: &seqExpr{ + pos: position{line: 337, col: 5, offset: 6630}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 337, col: 5, offset: 6630}, + name: "DateFullYear", + }, + &litMatcher{ + pos: position{line: 337, col: 18, offset: 6643}, + val: "-", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 337, col: 22, offset: 6647}, + name: "DateMonth", + }, + &litMatcher{ + pos: position{line: 337, col: 32, offset: 6657}, + val: "-", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 337, col: 36, offset: 6661}, + name: "DateMDay", + }, + }, + }, + }, + { + name: "FullTime", + pos: position{line: 339, col: 1, offset: 6671}, + expr: &seqExpr{ + pos: position{line: 340, col: 5, offset: 6684}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 340, col: 5, offset: 6684}, + name: "PartialTime", + }, + &ruleRefExpr{ + pos: position{line: 340, col: 17, offset: 6696}, + name: "TimeOffset", + }, + }, + }, + }, + { + name: "DateTimeLiteral", + pos: position{line: 342, col: 1, offset: 6708}, + expr: &actionExpr{ + pos: position{line: 343, col: 5, offset: 6728}, + run: (*parser).callonDateTimeLiteral1, + expr: &seqExpr{ + pos: position{line: 343, col: 5, offset: 6728}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 343, col: 5, offset: 6728}, + name: "FullDate", + }, + &litMatcher{ + pos: position{line: 343, col: 14, offset: 6737}, + val: "T", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 343, col: 18, offset: 6741}, + name: "FullTime", + }, + }, + }, + }, + }, + { + name: "DurationLiteral", + pos: position{line: 350, col: 1, offset: 7003}, + expr: &actionExpr{ + pos: position{line: 351, col: 5, offset: 7023}, + run: (*parser).callonDurationLiteral1, + expr: &labeledExpr{ + pos: position{line: 351, col: 5, offset: 7023}, + label: "durations", + expr: &choiceExpr{ + pos: position{line: 352, col: 9, offset: 7043}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 352, col: 9, offset: 7043}, + name: "DayDuration", + }, + &ruleRefExpr{ + pos: position{line: 353, col: 9, offset: 7063}, + name: "HourDuration", + }, + &ruleRefExpr{ + pos: position{line: 354, col: 9, offset: 7084}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 355, col: 9, offset: 7112}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 356, col: 9, offset: 7140}, + name: "MonthDuration", + }, + &ruleRefExpr{ + pos: position{line: 357, col: 9, offset: 7162}, + name: "MinuteDuration", + }, + &ruleRefExpr{ + pos: position{line: 358, col: 9, offset: 7185}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 359, col: 9, offset: 7212}, + name: "SecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 360, col: 9, offset: 7235}, + name: "WeekDuration", + }, + &ruleRefExpr{ + pos: position{line: 361, col: 9, offset: 7256}, + name: "YearDuration", + }, + }, + }, + }, + }, + }, + { + name: "YearDuration", + pos: position{line: 366, col: 1, offset: 7339}, + expr: &actionExpr{ + pos: position{line: 367, col: 5, offset: 7356}, + run: (*parser).callonYearDuration1, + expr: &seqExpr{ + pos: position{line: 367, col: 5, offset: 7356}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 367, col: 5, offset: 7356}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 367, col: 9, offset: 7360}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 367, col: 24, offset: 7375}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 367, col: 29, offset: 7380}, + name: "YearUnits", + }, + }, + &labeledExpr{ + pos: position{line: 367, col: 39, offset: 7390}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 367, col: 50, offset: 7401}, + expr: &choiceExpr{ + pos: position{line: 368, col: 9, offset: 7411}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 368, col: 9, offset: 7411}, + name: "DayDuration", + }, + &ruleRefExpr{ + pos: position{line: 369, col: 9, offset: 7431}, + name: "HourDuration", + }, + &ruleRefExpr{ + pos: position{line: 370, col: 9, offset: 7452}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 371, col: 9, offset: 7480}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 372, col: 9, offset: 7508}, + name: "MonthDuration", + }, + &ruleRefExpr{ + pos: position{line: 373, col: 9, offset: 7530}, + name: "MinuteDuration", + }, + &ruleRefExpr{ + pos: position{line: 374, col: 9, offset: 7553}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 375, col: 9, offset: 7580}, + name: "SecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 376, col: 9, offset: 7603}, + name: "WeekDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "MonthDuration", + pos: position{line: 381, col: 1, offset: 7705}, + expr: &actionExpr{ + pos: position{line: 382, col: 5, offset: 7723}, + run: (*parser).callonMonthDuration1, + expr: &seqExpr{ + pos: position{line: 382, col: 5, offset: 7723}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 382, col: 5, offset: 7723}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 382, col: 9, offset: 7727}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 382, col: 24, offset: 7742}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 382, col: 29, offset: 7747}, + name: "MonthUnits", + }, + }, + &labeledExpr{ + pos: position{line: 382, col: 40, offset: 7758}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 382, col: 51, offset: 7769}, + expr: &choiceExpr{ + pos: position{line: 383, col: 9, offset: 7779}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 383, col: 9, offset: 7779}, + name: "DayDuration", + }, + &ruleRefExpr{ + pos: position{line: 384, col: 9, offset: 7799}, + name: "HourDuration", + }, + &ruleRefExpr{ + pos: position{line: 385, col: 9, offset: 7820}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 386, col: 9, offset: 7848}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 387, col: 9, offset: 7876}, + name: "MinuteDuration", + }, + &ruleRefExpr{ + pos: position{line: 388, col: 9, offset: 7899}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 389, col: 9, offset: 7926}, + name: "SecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 390, col: 9, offset: 7949}, + name: "WeekDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "WeekDuration", + pos: position{line: 395, col: 1, offset: 8052}, + expr: &actionExpr{ + pos: position{line: 396, col: 5, offset: 8069}, + run: (*parser).callonWeekDuration1, + expr: &seqExpr{ + pos: position{line: 396, col: 5, offset: 8069}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 396, col: 5, offset: 8069}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 396, col: 9, offset: 8073}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 396, col: 24, offset: 8088}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 396, col: 29, offset: 8093}, + name: "WeekUnits", + }, + }, + &labeledExpr{ + pos: position{line: 396, col: 39, offset: 8103}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 396, col: 50, offset: 8114}, + expr: &choiceExpr{ + pos: position{line: 397, col: 9, offset: 8124}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 397, col: 9, offset: 8124}, + name: "DayDuration", + }, + &ruleRefExpr{ + pos: position{line: 398, col: 9, offset: 8144}, + name: "HourDuration", + }, + &ruleRefExpr{ + pos: position{line: 399, col: 9, offset: 8165}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 400, col: 9, offset: 8193}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 401, col: 9, offset: 8221}, + name: "MinuteDuration", + }, + &ruleRefExpr{ + pos: position{line: 402, col: 9, offset: 8244}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 403, col: 9, offset: 8271}, + name: "SecondDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "DayDuration", + pos: position{line: 408, col: 1, offset: 8375}, + expr: &actionExpr{ + pos: position{line: 409, col: 5, offset: 8391}, + run: (*parser).callonDayDuration1, + expr: &seqExpr{ + pos: position{line: 409, col: 5, offset: 8391}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 409, col: 5, offset: 8391}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 409, col: 9, offset: 8395}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 409, col: 24, offset: 8410}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 409, col: 29, offset: 8415}, + name: "DayUnits", + }, + }, + &labeledExpr{ + pos: position{line: 409, col: 38, offset: 8424}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 409, col: 49, offset: 8435}, + expr: &choiceExpr{ + pos: position{line: 410, col: 9, offset: 8445}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 410, col: 9, offset: 8445}, + name: "HourDuration", + }, + &ruleRefExpr{ + pos: position{line: 411, col: 9, offset: 8466}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 412, col: 9, offset: 8494}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 413, col: 9, offset: 8522}, + name: "MinuteDuration", + }, + &ruleRefExpr{ + pos: position{line: 414, col: 9, offset: 8545}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 415, col: 9, offset: 8572}, + name: "SecondDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "HourDuration", + pos: position{line: 420, col: 1, offset: 8676}, + expr: &actionExpr{ + pos: position{line: 421, col: 5, offset: 8693}, + run: (*parser).callonHourDuration1, + expr: &seqExpr{ + pos: position{line: 421, col: 5, offset: 8693}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 421, col: 5, offset: 8693}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 421, col: 9, offset: 8697}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 421, col: 24, offset: 8712}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 421, col: 29, offset: 8717}, + name: "HourUnits", + }, + }, + &labeledExpr{ + pos: position{line: 421, col: 39, offset: 8727}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 421, col: 50, offset: 8738}, + expr: &choiceExpr{ + pos: position{line: 422, col: 9, offset: 8748}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 422, col: 9, offset: 8748}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 423, col: 9, offset: 8776}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 424, col: 9, offset: 8804}, + name: "MinuteDuration", + }, + &ruleRefExpr{ + pos: position{line: 425, col: 9, offset: 8827}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 426, col: 9, offset: 8854}, + name: "SecondDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "MinuteDuration", + pos: position{line: 431, col: 1, offset: 8958}, + expr: &actionExpr{ + pos: position{line: 432, col: 5, offset: 8977}, + run: (*parser).callonMinuteDuration1, + expr: &seqExpr{ + pos: position{line: 432, col: 5, offset: 8977}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 432, col: 5, offset: 8977}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 432, col: 9, offset: 8981}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 432, col: 24, offset: 8996}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 432, col: 29, offset: 9001}, + name: "MinuteUnits", + }, + }, + &labeledExpr{ + pos: position{line: 432, col: 41, offset: 9013}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 432, col: 52, offset: 9024}, + expr: &choiceExpr{ + pos: position{line: 433, col: 9, offset: 9034}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 433, col: 9, offset: 9034}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 434, col: 9, offset: 9062}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 435, col: 9, offset: 9090}, + name: "NanoSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 436, col: 9, offset: 9117}, + name: "SecondDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "SecondDuration", + pos: position{line: 441, col: 1, offset: 9221}, + expr: &actionExpr{ + pos: position{line: 442, col: 5, offset: 9240}, + run: (*parser).callonSecondDuration1, + expr: &seqExpr{ + pos: position{line: 442, col: 5, offset: 9240}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 442, col: 5, offset: 9240}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 442, col: 9, offset: 9244}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 442, col: 24, offset: 9259}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 442, col: 29, offset: 9264}, + name: "SecondUnits", + }, + }, + &labeledExpr{ + pos: position{line: 442, col: 41, offset: 9276}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 442, col: 52, offset: 9287}, + expr: &choiceExpr{ + pos: position{line: 443, col: 9, offset: 9297}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 443, col: 9, offset: 9297}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 444, col: 9, offset: 9325}, + name: "MilliSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 445, col: 9, offset: 9353}, + name: "NanoSecondDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "MilliSecondDuration", + pos: position{line: 450, col: 1, offset: 9461}, + expr: &actionExpr{ + pos: position{line: 451, col: 5, offset: 9485}, + run: (*parser).callonMilliSecondDuration1, + expr: &seqExpr{ + pos: position{line: 451, col: 5, offset: 9485}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 451, col: 5, offset: 9485}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 451, col: 9, offset: 9489}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 451, col: 24, offset: 9504}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 451, col: 29, offset: 9509}, + name: "MilliSecondUnits", + }, + }, + &labeledExpr{ + pos: position{line: 451, col: 46, offset: 9526}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 451, col: 57, offset: 9537}, + expr: &choiceExpr{ + pos: position{line: 452, col: 9, offset: 9547}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 452, col: 9, offset: 9547}, + name: "MicroSecondDuration", + }, + &ruleRefExpr{ + pos: position{line: 453, col: 9, offset: 9575}, + name: "NanoSecondDuration", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "MicroSecondDuration", + pos: position{line: 458, col: 1, offset: 9683}, + expr: &actionExpr{ + pos: position{line: 459, col: 5, offset: 9707}, + run: (*parser).callonMicroSecondDuration1, + expr: &seqExpr{ + pos: position{line: 459, col: 5, offset: 9707}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 459, col: 5, offset: 9707}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 459, col: 9, offset: 9711}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 459, col: 24, offset: 9726}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 459, col: 29, offset: 9731}, + name: "MicroSecondUnits", + }, + }, + &labeledExpr{ + pos: position{line: 459, col: 46, offset: 9748}, + label: "otherParts", + expr: &zeroOrOneExpr{ + pos: position{line: 459, col: 57, offset: 9759}, + expr: &ruleRefExpr{ + pos: position{line: 460, col: 7, offset: 9767}, + name: "NanoSecondDuration", + }, + }, + }, + }, + }, + }, + }, + { + name: "NanoSecondDuration", + pos: position{line: 465, col: 1, offset: 9875}, + expr: &actionExpr{ + pos: position{line: 466, col: 5, offset: 9898}, + run: (*parser).callonNanoSecondDuration1, + expr: &seqExpr{ + pos: position{line: 466, col: 5, offset: 9898}, + exprs: []interface{}{ + &labeledExpr{ + pos: position{line: 466, col: 5, offset: 9898}, + label: "mag", + expr: &ruleRefExpr{ + pos: position{line: 466, col: 9, offset: 9902}, + name: "IntegerLiteral", + }, + }, + &labeledExpr{ + pos: position{line: 466, col: 24, offset: 9917}, + label: "unit", + expr: &ruleRefExpr{ + pos: position{line: 466, col: 29, offset: 9922}, + name: "NanoSecondUnits", + }, + }, + }, + }, + }, + }, + { + name: "NanoSecondUnits", + pos: position{line: 470, col: 1, offset: 10013}, + expr: &litMatcher{ + pos: position{line: 471, col: 5, offset: 10033}, + val: "ns", + ignoreCase: false, + }, + }, + { + name: "MicroSecondUnits", + pos: position{line: 473, col: 1, offset: 10039}, + expr: &actionExpr{ + pos: position{line: 474, col: 5, offset: 10060}, + run: (*parser).callonMicroSecondUnits1, + expr: &choiceExpr{ + pos: position{line: 474, col: 6, offset: 10061}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 474, col: 6, offset: 10061}, + val: "us", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 474, col: 13, offset: 10068}, + val: "µs", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 474, col: 20, offset: 10076}, + val: "μs", + ignoreCase: false, + }, + }, + }, + }, + }, + { + name: "MilliSecondUnits", + pos: position{line: 478, col: 1, offset: 10123}, + expr: &litMatcher{ + pos: position{line: 479, col: 5, offset: 10144}, + val: "ms", + ignoreCase: false, + }, + }, + { + name: "SecondUnits", + pos: position{line: 481, col: 1, offset: 10150}, + expr: &litMatcher{ + pos: position{line: 482, col: 5, offset: 10166}, + val: "s", + ignoreCase: false, + }, + }, + { + name: "MinuteUnits", + pos: position{line: 484, col: 1, offset: 10171}, + expr: &litMatcher{ + pos: position{line: 485, col: 5, offset: 10187}, + val: "m", + ignoreCase: false, + }, + }, + { + name: "HourUnits", + pos: position{line: 487, col: 1, offset: 10192}, + expr: &litMatcher{ + pos: position{line: 488, col: 5, offset: 10206}, + val: "h", + ignoreCase: false, + }, + }, + { + name: "DayUnits", + pos: position{line: 490, col: 1, offset: 10211}, + expr: &litMatcher{ + pos: position{line: 491, col: 5, offset: 10224}, + val: "d", + ignoreCase: false, + }, + }, + { + name: "WeekUnits", + pos: position{line: 493, col: 1, offset: 10229}, + expr: &litMatcher{ + pos: position{line: 494, col: 5, offset: 10243}, + val: "w", + ignoreCase: false, + }, + }, + { + name: "MonthUnits", + pos: position{line: 496, col: 1, offset: 10248}, + expr: &litMatcher{ + pos: position{line: 497, col: 5, offset: 10263}, + val: "mo", + ignoreCase: false, + }, + }, + { + name: "YearUnits", + pos: position{line: 499, col: 1, offset: 10269}, + expr: &litMatcher{ + pos: position{line: 500, col: 5, offset: 10283}, + val: "y", + ignoreCase: false, + }, + }, + { + name: "StringLiteral", + pos: position{line: 502, col: 1, offset: 10288}, + expr: &choiceExpr{ + pos: position{line: 503, col: 5, offset: 10306}, + alternatives: []interface{}{ + &actionExpr{ + pos: position{line: 503, col: 5, offset: 10306}, + run: (*parser).callonStringLiteral2, + expr: &seqExpr{ + pos: position{line: 503, col: 7, offset: 10308}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 503, col: 7, offset: 10308}, + val: "\"", + ignoreCase: false, + }, + &zeroOrMoreExpr{ + pos: position{line: 503, col: 11, offset: 10312}, + expr: &ruleRefExpr{ + pos: position{line: 503, col: 11, offset: 10312}, + name: "DoubleStringChar", + }, + }, + &litMatcher{ + pos: position{line: 503, col: 29, offset: 10330}, + val: "\"", + ignoreCase: false, + }, + }, + }, + }, + &actionExpr{ + pos: position{line: 506, col: 5, offset: 10390}, + run: (*parser).callonStringLiteral8, + expr: &seqExpr{ + pos: position{line: 506, col: 7, offset: 10392}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 506, col: 7, offset: 10392}, + val: "\"", + ignoreCase: false, + }, + &zeroOrMoreExpr{ + pos: position{line: 506, col: 11, offset: 10396}, + expr: &ruleRefExpr{ + pos: position{line: 506, col: 11, offset: 10396}, + name: "DoubleStringChar", + }, + }, + &choiceExpr{ + pos: position{line: 506, col: 31, offset: 10416}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 506, col: 31, offset: 10416}, + name: "EOL", + }, + &ruleRefExpr{ + pos: position{line: 506, col: 37, offset: 10422}, + name: "EOF", + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + name: "DoubleStringChar", + pos: position{line: 510, col: 1, offset: 10500}, + expr: &choiceExpr{ + pos: position{line: 511, col: 5, offset: 10521}, + alternatives: []interface{}{ + &seqExpr{ + pos: position{line: 511, col: 5, offset: 10521}, + exprs: []interface{}{ + ¬Expr{ + pos: position{line: 511, col: 5, offset: 10521}, + expr: &choiceExpr{ + pos: position{line: 511, col: 8, offset: 10524}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 511, col: 8, offset: 10524}, + val: "\"", + ignoreCase: false, + }, + &litMatcher{ + pos: position{line: 511, col: 14, offset: 10530}, + val: "\\", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 511, col: 21, offset: 10537}, + name: "EOL", + }, + }, + }, + }, + &ruleRefExpr{ + pos: position{line: 511, col: 27, offset: 10543}, + name: "SourceChar", + }, + }, + }, + &seqExpr{ + pos: position{line: 512, col: 5, offset: 10558}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 512, col: 5, offset: 10558}, + val: "\\", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 512, col: 10, offset: 10563}, + name: "DoubleStringEscape", + }, + }, + }, + }, + }, + }, + { + name: "DoubleStringEscape", + pos: position{line: 514, col: 1, offset: 10583}, + expr: &choiceExpr{ + pos: position{line: 515, col: 5, offset: 10606}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 515, col: 5, offset: 10606}, + val: "\"", + ignoreCase: false, + }, + &actionExpr{ + pos: position{line: 516, col: 5, offset: 10614}, + run: (*parser).callonDoubleStringEscape3, + expr: &choiceExpr{ + pos: position{line: 516, col: 7, offset: 10616}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 516, col: 7, offset: 10616}, + name: "SourceChar", + }, + &ruleRefExpr{ + pos: position{line: 516, col: 20, offset: 10629}, + name: "EOL", + }, + &ruleRefExpr{ + pos: position{line: 516, col: 26, offset: 10635}, + name: "EOF", + }, + }, + }, + }, + }, + }, + }, + { + name: "RegexpLiteral", + pos: position{line: 521, col: 1, offset: 10708}, + expr: &actionExpr{ + pos: position{line: 522, col: 5, offset: 10726}, + run: (*parser).callonRegexpLiteral1, + expr: &seqExpr{ + pos: position{line: 522, col: 5, offset: 10726}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 522, col: 5, offset: 10726}, + val: "/", + ignoreCase: false, + }, + &labeledExpr{ + pos: position{line: 522, col: 9, offset: 10730}, + label: "pattern", + expr: &ruleRefExpr{ + pos: position{line: 522, col: 17, offset: 10738}, + name: "RegexpBody", + }, + }, + &litMatcher{ + pos: position{line: 522, col: 28, offset: 10749}, + val: "/", + ignoreCase: false, + }, + }, + }, + }, + }, + { + name: "RegexpBody", + pos: position{line: 526, col: 1, offset: 10792}, + expr: &actionExpr{ + pos: position{line: 527, col: 5, offset: 10807}, + run: (*parser).callonRegexpBody1, + expr: &labeledExpr{ + pos: position{line: 527, col: 5, offset: 10807}, + label: "chars", + expr: &oneOrMoreExpr{ + pos: position{line: 527, col: 11, offset: 10813}, + expr: &ruleRefExpr{ + pos: position{line: 527, col: 11, offset: 10813}, + name: "RegexpChar", + }, + }, + }, + }, + }, + { + name: "RegexpChar", + pos: position{line: 531, col: 1, offset: 10882}, + expr: &choiceExpr{ + pos: position{line: 532, col: 5, offset: 10897}, + alternatives: []interface{}{ + &actionExpr{ + pos: position{line: 532, col: 5, offset: 10897}, + run: (*parser).callonRegexpChar2, + expr: &seqExpr{ + pos: position{line: 532, col: 5, offset: 10897}, + exprs: []interface{}{ + ¬Expr{ + pos: position{line: 532, col: 5, offset: 10897}, + expr: &charClassMatcher{ + pos: position{line: 532, col: 6, offset: 10898}, + val: "[\\\\/]", + chars: []rune{'\\', '/'}, + ignoreCase: false, + inverted: false, + }, + }, + &labeledExpr{ + pos: position{line: 532, col: 12, offset: 10904}, + label: "re", + expr: &ruleRefExpr{ + pos: position{line: 532, col: 15, offset: 10907}, + name: "RegexpNonTerminator", + }, + }, + }, + }, + }, + &ruleRefExpr{ + pos: position{line: 535, col: 5, offset: 10960}, + name: "RegexpBackslashSequence", + }, + }, + }, + }, + { + name: "RegexpBackslashSequence", + pos: position{line: 537, col: 1, offset: 10985}, + expr: &choiceExpr{ + pos: position{line: 538, col: 5, offset: 11013}, + alternatives: []interface{}{ + &actionExpr{ + pos: position{line: 538, col: 5, offset: 11013}, + run: (*parser).callonRegexpBackslashSequence2, + expr: &litMatcher{ + pos: position{line: 538, col: 5, offset: 11013}, + val: "\\/", + ignoreCase: false, + }, + }, + &actionExpr{ + pos: position{line: 541, col: 5, offset: 11061}, + run: (*parser).callonRegexpBackslashSequence4, + expr: &seqExpr{ + pos: position{line: 541, col: 5, offset: 11061}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 541, col: 5, offset: 11061}, + val: "\\", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 541, col: 10, offset: 11066}, + name: "RegexpNonTerminator", + }, + }, + }, + }, + }, + }, + }, + { + name: "RegexpNonTerminator", + pos: position{line: 545, col: 1, offset: 11120}, + expr: &actionExpr{ + pos: position{line: 546, col: 5, offset: 11144}, + run: (*parser).callonRegexpNonTerminator1, + expr: &seqExpr{ + pos: position{line: 546, col: 5, offset: 11144}, + exprs: []interface{}{ + ¬Expr{ + pos: position{line: 546, col: 5, offset: 11144}, + expr: &ruleRefExpr{ + pos: position{line: 546, col: 6, offset: 11145}, + name: "LineTerminator", + }, + }, + &ruleRefExpr{ + pos: position{line: 546, col: 21, offset: 11160}, + name: "SourceChar", + }, + }, + }, + }, + }, + { + name: "BooleanLiteral", + pos: position{line: 550, col: 1, offset: 11205}, + expr: &choiceExpr{ + pos: position{line: 551, col: 5, offset: 11224}, + alternatives: []interface{}{ + &actionExpr{ + pos: position{line: 551, col: 5, offset: 11224}, + run: (*parser).callonBooleanLiteral2, + expr: &seqExpr{ + pos: position{line: 551, col: 5, offset: 11224}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 551, col: 5, offset: 11224}, + name: "__", + }, + &litMatcher{ + pos: position{line: 551, col: 8, offset: 11227}, + val: "true", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 551, col: 15, offset: 11234}, + name: "__", + }, + }, + }, + }, + &actionExpr{ + pos: position{line: 554, col: 5, offset: 11298}, + run: (*parser).callonBooleanLiteral7, + expr: &seqExpr{ + pos: position{line: 554, col: 5, offset: 11298}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 554, col: 5, offset: 11298}, + name: "__", + }, + &litMatcher{ + pos: position{line: 554, col: 8, offset: 11301}, + val: "false", + ignoreCase: false, + }, + &ruleRefExpr{ + pos: position{line: 554, col: 16, offset: 11309}, + name: "__", + }, + }, + }, + }, + }, + }, + }, + { + name: "NumberLiteral", + pos: position{line: 558, col: 1, offset: 11371}, + expr: &actionExpr{ + pos: position{line: 559, col: 5, offset: 11389}, + run: (*parser).callonNumberLiteral1, + expr: &seqExpr{ + pos: position{line: 559, col: 5, offset: 11389}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 559, col: 5, offset: 11389}, + name: "Integer", + }, + &litMatcher{ + pos: position{line: 559, col: 13, offset: 11397}, + val: ".", + ignoreCase: false, + }, + &oneOrMoreExpr{ + pos: position{line: 559, col: 17, offset: 11401}, + expr: &ruleRefExpr{ + pos: position{line: 559, col: 17, offset: 11401}, + name: "Digit", + }, + }, + }, + }, + }, + }, + { + name: "Integer", + pos: position{line: 563, col: 1, offset: 11458}, + expr: &choiceExpr{ + pos: position{line: 564, col: 6, offset: 11471}, + alternatives: []interface{}{ + &litMatcher{ + pos: position{line: 564, col: 6, offset: 11471}, + val: "0", + ignoreCase: false, + }, + &seqExpr{ + pos: position{line: 564, col: 12, offset: 11477}, + exprs: []interface{}{ + &ruleRefExpr{ + pos: position{line: 564, col: 12, offset: 11477}, + name: "NonZeroDigit", + }, + &zeroOrMoreExpr{ + pos: position{line: 564, col: 25, offset: 11490}, + expr: &ruleRefExpr{ + pos: position{line: 564, col: 25, offset: 11490}, + name: "Digit", + }, + }, + }, + }, + }, + }, + }, + { + name: "IntegerLiteral", + pos: position{line: 566, col: 1, offset: 11499}, + expr: &actionExpr{ + pos: position{line: 567, col: 5, offset: 11518}, + run: (*parser).callonIntegerLiteral1, + expr: &ruleRefExpr{ + pos: position{line: 567, col: 5, offset: 11518}, + name: "Integer", + }, + }, + }, + { + name: "NonZeroDigit", + pos: position{line: 571, col: 1, offset: 11578}, + expr: &charClassMatcher{ + pos: position{line: 572, col: 5, offset: 11595}, + val: "[1-9]", + ranges: []rune{'1', '9'}, + ignoreCase: false, + inverted: false, + }, + }, + { + name: "Digit", + pos: position{line: 574, col: 1, offset: 11602}, + expr: &charClassMatcher{ + pos: position{line: 575, col: 5, offset: 11612}, + val: "[0-9]", + ranges: []rune{'0', '9'}, + ignoreCase: false, + inverted: false, + }, + }, + { + name: "PipeLiteral", + pos: position{line: 577, col: 1, offset: 11619}, + expr: &actionExpr{ + pos: position{line: 578, col: 5, offset: 11635}, + run: (*parser).callonPipeLiteral1, + expr: &litMatcher{ + pos: position{line: 578, col: 5, offset: 11635}, + val: "<-", + ignoreCase: false, + }, + }, + }, + { + name: "Identifier", + pos: position{line: 583, col: 1, offset: 11699}, + expr: &actionExpr{ + pos: position{line: 585, col: 5, offset: 11821}, + run: (*parser).callonIdentifier1, + expr: &seqExpr{ + pos: position{line: 585, col: 5, offset: 11821}, + exprs: []interface{}{ + &charClassMatcher{ + pos: position{line: 585, col: 5, offset: 11821}, + val: "[_\\pL]", + chars: []rune{'_'}, + classes: []*unicode.RangeTable{rangeTable("L")}, + ignoreCase: false, + inverted: false, + }, + &zeroOrMoreExpr{ + pos: position{line: 585, col: 11, offset: 11827}, + expr: &charClassMatcher{ + pos: position{line: 585, col: 11, offset: 11827}, + val: "[_0-9\\pL]", + chars: []rune{'_'}, + ranges: []rune{'0', '9'}, + classes: []*unicode.RangeTable{rangeTable("L")}, + ignoreCase: false, + inverted: false, + }, + }, + }, + }, + }, + }, + { + name: "SourceChar", + pos: position{line: 590, col: 1, offset: 11887}, + expr: &anyMatcher{ + line: 591, col: 5, offset: 11902, + }, + }, + { + name: "__", + pos: position{line: 592, col: 1, offset: 11904}, + expr: &zeroOrMoreExpr{ + pos: position{line: 593, col: 5, offset: 11911}, + expr: &choiceExpr{ + pos: position{line: 593, col: 7, offset: 11913}, + alternatives: []interface{}{ + &ruleRefExpr{ + pos: position{line: 593, col: 7, offset: 11913}, + name: "ws", + }, + &ruleRefExpr{ + pos: position{line: 593, col: 12, offset: 11918}, + name: "EOL", + }, + &ruleRefExpr{ + pos: position{line: 593, col: 18, offset: 11924}, + name: "Comment", + }, + }, + }, + }, + }, + { + name: "Comment", + pos: position{line: 595, col: 1, offset: 11936}, + expr: &seqExpr{ + pos: position{line: 596, col: 5, offset: 11948}, + exprs: []interface{}{ + &litMatcher{ + pos: position{line: 596, col: 5, offset: 11948}, + val: "//", + ignoreCase: false, + }, + &zeroOrMoreExpr{ + pos: position{line: 596, col: 10, offset: 11953}, + expr: &charClassMatcher{ + pos: position{line: 596, col: 10, offset: 11953}, + val: "[^\\r\\n]", + chars: []rune{'\r', '\n'}, + ignoreCase: false, + inverted: true, + }, + }, + &ruleRefExpr{ + pos: position{line: 596, col: 19, offset: 11962}, + name: "EOL", + }, + }, + }, + }, + { + name: "ws", + pos: position{line: 598, col: 1, offset: 11967}, + expr: &charClassMatcher{ + pos: position{line: 599, col: 5, offset: 11974}, + val: "[ \\t\\r\\n]", + chars: []rune{' ', '\t', '\r', '\n'}, + ignoreCase: false, + inverted: false, + }, + }, + { + name: "LineTerminator", + pos: position{line: 601, col: 1, offset: 11985}, + expr: &charClassMatcher{ + pos: position{line: 602, col: 5, offset: 12004}, + val: "[\\n\\r]", + chars: []rune{'\n', '\r'}, + ignoreCase: false, + inverted: false, + }, + }, + { + name: "EOL", + pos: position{line: 604, col: 1, offset: 12012}, + expr: &litMatcher{ + pos: position{line: 605, col: 5, offset: 12020}, + val: "\n", + ignoreCase: false, + }, + }, + { + name: "EOF", + pos: position{line: 607, col: 1, offset: 12026}, + expr: ¬Expr{ + pos: position{line: 608, col: 5, offset: 12034}, + expr: &anyMatcher{ + line: 608, col: 6, offset: 12035, + }, + }, + }, }, } @@ -6228,17 +3543,6 @@ func (p *parser) callonSourceElements1() (interface{}, error) { return p.cur.onSourceElements1(stack["head"], stack["tail"]) } -func (c *current) onOptionStatement13() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonOptionStatement13() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onOptionStatement13() -} - func (c *current) onOptionStatement1(id, expr interface{}) (interface{}, error) { return optionstmt(id, expr, c.text, c.pos) @@ -6294,17 +3598,6 @@ func (p *parser) callonBlockStatement1() (interface{}, error) { return p.cur.onBlockStatement1(stack["body"]) } -func (c *current) onVariableDeclaration4() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonVariableDeclaration4() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onVariableDeclaration4() -} - func (c *current) onVariableDeclaration1(id, init interface{}) (interface{}, error) { return vardecl(id, init, c.text, c.pos) @@ -6316,26 +3609,15 @@ func (p *parser) callonVariableDeclaration1() (interface{}, error) { return p.cur.onVariableDeclaration1(stack["id"], stack["init"]) } -func (c *current) onMemberExpressions4() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonMemberExpressions4() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onMemberExpressions4() -} - -func (c *current) onMemberExpressions11(property interface{}) (interface{}, error) { +func (c *current) onMemberExpressions7(property interface{}) (interface{}, error) { return property, nil } -func (p *parser) callonMemberExpressions11() (interface{}, error) { +func (p *parser) callonMemberExpressions7() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onMemberExpressions11(stack["property"]) + return p.cur.onMemberExpressions7(stack["property"]) } func (c *current) onMemberExpressions1(head, tail interface{}) (interface{}, error) { @@ -6349,17 +3631,6 @@ func (p *parser) callonMemberExpressions1() (interface{}, error) { return p.cur.onMemberExpressions1(stack["head"], stack["tail"]) } -func (c *current) onMemberExpressionProperty14() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonMemberExpressionProperty14() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onMemberExpressionProperty14() -} - func (c *current) onMemberExpressionProperty2(property interface{}) (interface{}, error) { return property, nil @@ -6371,15 +3642,15 @@ func (p *parser) callonMemberExpressionProperty2() (interface{}, error) { return p.cur.onMemberExpressionProperty2(stack["property"]) } -func (c *current) onMemberExpressionProperty19(property interface{}) (interface{}, error) { +func (c *current) onMemberExpressionProperty8(property interface{}) (interface{}, error) { return property, nil } -func (p *parser) callonMemberExpressionProperty19() (interface{}, error) { +func (p *parser) callonMemberExpressionProperty8() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onMemberExpressionProperty19(stack["property"]) + return p.cur.onMemberExpressionProperty8(stack["property"]) } func (c *current) onCallExpression4(callee, args interface{}) (interface{}, error) { @@ -6393,26 +3664,26 @@ func (p *parser) callonCallExpression4() (interface{}, error) { return p.cur.onCallExpression4(stack["callee"], stack["args"]) } -func (c *current) onCallExpression21(args interface{}) (interface{}, error) { +func (c *current) onCallExpression14(args interface{}) (interface{}, error) { return callexpr(nil, args, c.text, c.pos) } -func (p *parser) callonCallExpression21() (interface{}, error) { +func (p *parser) callonCallExpression14() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onCallExpression21(stack["args"]) + return p.cur.onCallExpression14(stack["args"]) } -func (c *current) onCallExpression33(property interface{}) (interface{}, error) { +func (c *current) onCallExpression19(property interface{}) (interface{}, error) { return memberexpr(nil, property, c.text, c.pos) } -func (p *parser) callonCallExpression33() (interface{}, error) { +func (p *parser) callonCallExpression19() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onCallExpression33(stack["property"]) + return p.cur.onCallExpression19(stack["property"]) } func (c *current) onCallExpression1(head, tail interface{}) (interface{}, error) { @@ -6437,237 +3708,6 @@ func (p *parser) callonPipeExpression1() (interface{}, error) { return p.cur.onPipeExpression1(stack["head"], stack["tail"]) } -func (c *current) onPipeExpressionHead16() (interface{}, error) { - return nil, errors.New("invalid escape character") - -} - -func (p *parser) callonPipeExpressionHead16() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead16() -} - -func (c *current) onPipeExpressionHead3() (interface{}, error) { - return stringLiteral(c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead3() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead3() -} - -func (c *current) onPipeExpressionHead36() (interface{}, error) { - return nil, errors.New("invalid escape character") - -} - -func (p *parser) callonPipeExpressionHead36() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead36() -} - -func (c *current) onPipeExpressionHead23() (interface{}, error) { - return "", errors.New("string literal not terminated") - -} - -func (p *parser) callonPipeExpressionHead23() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead23() -} - -func (c *current) onPipeExpressionHead46() (interface{}, error) { - return booleanLiteral(true, c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead46() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead46() -} - -func (c *current) onPipeExpressionHead65() (interface{}, error) { - return booleanLiteral(false, c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead65() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead65() -} - -func (c *current) onPipeExpressionHead97() (interface{}, error) { - return c.text, nil - -} - -func (p *parser) callonPipeExpressionHead97() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead97() -} - -func (c *current) onPipeExpressionHead92(re interface{}) (interface{}, error) { - return re, nil - -} - -func (p *parser) callonPipeExpressionHead92() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead92(stack["re"]) -} - -func (c *current) onPipeExpressionHead102() (interface{}, error) { - return []byte{'/'}, nil - -} - -func (p *parser) callonPipeExpressionHead102() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead102() -} - -func (c *current) onPipeExpressionHead107() (interface{}, error) { - return c.text, nil - -} - -func (p *parser) callonPipeExpressionHead107() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead107() -} - -func (c *current) onPipeExpressionHead104() (interface{}, error) { - return c.text, nil - -} - -func (p *parser) callonPipeExpressionHead104() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead104() -} - -func (c *current) onPipeExpressionHead88(chars interface{}) (interface{}, error) { - return regexLiteral(chars, c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead88() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead88(stack["chars"]) -} - -func (c *current) onPipeExpressionHead84(pattern interface{}) (interface{}, error) { - return pattern, nil - -} - -func (p *parser) callonPipeExpressionHead84() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead84(stack["pattern"]) -} - -func (c *current) onPipeExpressionHead113() (interface{}, error) { - return pipeLiteral(c.text, c.pos), nil - -} - -func (p *parser) callonPipeExpressionHead113() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead113() -} - -func (c *current) onPipeExpressionHead121() (interface{}, error) { - return integerLiteral(c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead121() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead121() -} - -func (c *current) onPipeExpressionHead118(mag, unit interface{}) (interface{}, error) { - return singleDuration(mag, unit, c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead118() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead118(stack["mag"], stack["unit"]) -} - -func (c *current) onPipeExpressionHead115(durations interface{}) (interface{}, error) { - return durationLiteral(durations, c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead115() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead115(stack["durations"]) -} - -func (c *current) onPipeExpressionHead136() (interface{}, error) { - return datetime(c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead136() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead136() -} - -func (c *current) onPipeExpressionHead171() (interface{}, error) { - return numberLiteral(c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead171() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead171() -} - -func (c *current) onPipeExpressionHead182() (interface{}, error) { - return integerLiteral(c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead182() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead182() -} - -func (c *current) onPipeExpressionHead191() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonPipeExpressionHead191() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPipeExpressionHead191() -} - func (c *current) onPipeExpressionPipe1(call interface{}) (interface{}, error) { return incompletePipeExpr(call, c.text, c.pos) @@ -6723,17 +3763,6 @@ func (p *parser) callonArrowFunctionParamsRest1() (interface{}, error) { return p.cur.onArrowFunctionParamsRest1(stack["arg"]) } -func (c *current) onArrowFunctionParam5() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonArrowFunctionParam5() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onArrowFunctionParam5() -} - func (c *current) onArrowFunctionParam2(key, value interface{}) (interface{}, error) { return property(key, value, c.text, c.pos) @@ -6745,26 +3774,15 @@ func (p *parser) callonArrowFunctionParam2() (interface{}, error) { return p.cur.onArrowFunctionParam2(stack["key"], stack["value"]) } -func (c *current) onArrowFunctionParam40() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonArrowFunctionParam40() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onArrowFunctionParam40() -} - -func (c *current) onArrowFunctionParam37(key interface{}) (interface{}, error) { +func (c *current) onArrowFunctionParam12(key interface{}) (interface{}, error) { return property(key, nil, c.text, c.pos) } -func (p *parser) callonArrowFunctionParam37() (interface{}, error) { +func (p *parser) callonArrowFunctionParam12() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onArrowFunctionParam37(stack["key"]) + return p.cur.onArrowFunctionParam12(stack["key"]) } func (c *current) onArrowFunctionBody2(body interface{}) (interface{}, error) { @@ -6822,17 +3840,6 @@ func (p *parser) callonPropertiesRest1() (interface{}, error) { return p.cur.onPropertiesRest1(stack["arg"]) } -func (c *current) onProperty4() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonProperty4() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onProperty4() -} - func (c *current) onProperty1(key, value interface{}) (interface{}, error) { return property(key, value, c.text, c.pos) @@ -6844,15 +3851,15 @@ func (p *parser) callonProperty1() (interface{}, error) { return p.cur.onProperty1(stack["key"], stack["value"]) } -func (c *current) onLogicalExpression16() (interface{}, error) { +func (c *current) onLogicalOperators1() (interface{}, error) { return logicalOp(c.text) } -func (p *parser) callonLogicalExpression16() (interface{}, error) { +func (p *parser) callonLogicalOperators1() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onLogicalExpression16() + return p.cur.onLogicalOperators1() } func (c *current) onLogicalExpression1(head, tail interface{}) (interface{}, error) { @@ -6866,15 +3873,15 @@ func (p *parser) callonLogicalExpression1() (interface{}, error) { return p.cur.onLogicalExpression1(stack["head"], stack["tail"]) } -func (c *current) onEquality16() (interface{}, error) { +func (c *current) onEqualityOperators1() (interface{}, error) { return operator(c.text) } -func (p *parser) callonEquality16() (interface{}, error) { +func (p *parser) callonEqualityOperators1() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onEquality16() + return p.cur.onEqualityOperators1() } func (c *current) onEquality1(head, tail interface{}) (interface{}, error) { @@ -6888,15 +3895,15 @@ func (p *parser) callonEquality1() (interface{}, error) { return p.cur.onEquality1(stack["head"], stack["tail"]) } -func (c *current) onRelational16() (interface{}, error) { +func (c *current) onRelationalOperators1() (interface{}, error) { return operator(c.text) } -func (p *parser) callonRelational16() (interface{}, error) { +func (p *parser) callonRelationalOperators1() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onRelational16() + return p.cur.onRelationalOperators1() } func (c *current) onRelational1(head, tail interface{}) (interface{}, error) { @@ -6910,15 +3917,15 @@ func (p *parser) callonRelational1() (interface{}, error) { return p.cur.onRelational1(stack["head"], stack["tail"]) } -func (c *current) onAdditive16() (interface{}, error) { +func (c *current) onAdditiveOperator1() (interface{}, error) { return operator(c.text) } -func (p *parser) callonAdditive16() (interface{}, error) { +func (p *parser) callonAdditiveOperator1() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onAdditive16() + return p.cur.onAdditiveOperator1() } func (c *current) onAdditive1(head, tail interface{}) (interface{}, error) { @@ -6932,15 +3939,15 @@ func (p *parser) callonAdditive1() (interface{}, error) { return p.cur.onAdditive1(stack["head"], stack["tail"]) } -func (c *current) onMultiplicative16() (interface{}, error) { +func (c *current) onMultiplicativeOperator1() (interface{}, error) { return operator(c.text) } -func (p *parser) callonMultiplicative16() (interface{}, error) { +func (p *parser) callonMultiplicativeOperator1() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onMultiplicative16() + return p.cur.onMultiplicativeOperator1() } func (c *current) onMultiplicative1(head, tail interface{}) (interface{}, error) { @@ -6954,15 +3961,15 @@ func (p *parser) callonMultiplicative1() (interface{}, error) { return p.cur.onMultiplicative1(stack["head"], stack["tail"]) } -func (c *current) onUnaryExpression13() (interface{}, error) { +func (c *current) onUnaryOperator1() (interface{}, error) { return operator(c.text) } -func (p *parser) callonUnaryExpression13() (interface{}, error) { +func (p *parser) callonUnaryOperator1() (interface{}, error) { stack := p.vstack[len(p.vstack)-1] _ = stack - return p.cur.onUnaryExpression13() + return p.cur.onUnaryOperator1() } func (c *current) onUnaryExpression2(op, argument interface{}) (interface{}, error) { @@ -6976,237 +3983,6 @@ func (p *parser) callonUnaryExpression2() (interface{}, error) { return p.cur.onUnaryExpression2(stack["op"], stack["argument"]) } -func (c *current) onPrimary17() (interface{}, error) { - return nil, errors.New("invalid escape character") - -} - -func (p *parser) callonPrimary17() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary17() -} - -func (c *current) onPrimary4() (interface{}, error) { - return stringLiteral(c.text, c.pos) - -} - -func (p *parser) callonPrimary4() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary4() -} - -func (c *current) onPrimary37() (interface{}, error) { - return nil, errors.New("invalid escape character") - -} - -func (p *parser) callonPrimary37() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary37() -} - -func (c *current) onPrimary24() (interface{}, error) { - return "", errors.New("string literal not terminated") - -} - -func (p *parser) callonPrimary24() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary24() -} - -func (c *current) onPrimary47() (interface{}, error) { - return booleanLiteral(true, c.text, c.pos) - -} - -func (p *parser) callonPrimary47() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary47() -} - -func (c *current) onPrimary66() (interface{}, error) { - return booleanLiteral(false, c.text, c.pos) - -} - -func (p *parser) callonPrimary66() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary66() -} - -func (c *current) onPrimary98() (interface{}, error) { - return c.text, nil - -} - -func (p *parser) callonPrimary98() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary98() -} - -func (c *current) onPrimary93(re interface{}) (interface{}, error) { - return re, nil - -} - -func (p *parser) callonPrimary93() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary93(stack["re"]) -} - -func (c *current) onPrimary103() (interface{}, error) { - return []byte{'/'}, nil - -} - -func (p *parser) callonPrimary103() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary103() -} - -func (c *current) onPrimary108() (interface{}, error) { - return c.text, nil - -} - -func (p *parser) callonPrimary108() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary108() -} - -func (c *current) onPrimary105() (interface{}, error) { - return c.text, nil - -} - -func (p *parser) callonPrimary105() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary105() -} - -func (c *current) onPrimary89(chars interface{}) (interface{}, error) { - return regexLiteral(chars, c.text, c.pos) - -} - -func (p *parser) callonPrimary89() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary89(stack["chars"]) -} - -func (c *current) onPrimary85(pattern interface{}) (interface{}, error) { - return pattern, nil - -} - -func (p *parser) callonPrimary85() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary85(stack["pattern"]) -} - -func (c *current) onPrimary114() (interface{}, error) { - return pipeLiteral(c.text, c.pos), nil - -} - -func (p *parser) callonPrimary114() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary114() -} - -func (c *current) onPrimary122() (interface{}, error) { - return integerLiteral(c.text, c.pos) - -} - -func (p *parser) callonPrimary122() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary122() -} - -func (c *current) onPrimary119(mag, unit interface{}) (interface{}, error) { - return singleDuration(mag, unit, c.text, c.pos) - -} - -func (p *parser) callonPrimary119() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary119(stack["mag"], stack["unit"]) -} - -func (c *current) onPrimary116(durations interface{}) (interface{}, error) { - return durationLiteral(durations, c.text, c.pos) - -} - -func (p *parser) callonPrimary116() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary116(stack["durations"]) -} - -func (c *current) onPrimary137() (interface{}, error) { - return datetime(c.text, c.pos) - -} - -func (p *parser) callonPrimary137() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary137() -} - -func (c *current) onPrimary172() (interface{}, error) { - return numberLiteral(c.text, c.pos) - -} - -func (p *parser) callonPrimary172() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary172() -} - -func (c *current) onPrimary183() (interface{}, error) { - return integerLiteral(c.text, c.pos) - -} - -func (p *parser) callonPrimary183() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary183() -} - -func (c *current) onPrimary192() (interface{}, error) { - return identifier(c.text, c.pos) - -} - -func (p *parser) callonPrimary192() (interface{}, error) { - stack := p.vstack[len(p.vstack)-1] - _ = stack - return p.cur.onPrimary192() -} - func (c *current) onParens1(expr interface{}) (interface{}, error) { return expr, nil @@ -7251,6 +4027,314 @@ func (p *parser) callonArrayRest1() (interface{}, error) { return p.cur.onArrayRest1(stack["element"]) } +func (c *current) onDateTimeLiteral1() (interface{}, error) { + return datetime(c.text, c.pos) + +} + +func (p *parser) callonDateTimeLiteral1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onDateTimeLiteral1() +} + +func (c *current) onDurationLiteral1(durations interface{}) (interface{}, error) { + return durationLiteral(durations, c.text, c.pos) + +} + +func (p *parser) callonDurationLiteral1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onDurationLiteral1(stack["durations"]) +} + +func (c *current) onYearDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonYearDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onYearDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onMonthDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonMonthDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onMonthDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onWeekDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonWeekDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onWeekDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onDayDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonDayDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onDayDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onHourDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonHourDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onHourDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onMinuteDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonMinuteDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onMinuteDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onSecondDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonSecondDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onSecondDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onMilliSecondDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonMilliSecondDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onMilliSecondDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onMicroSecondDuration1(mag, unit, otherParts interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + +} + +func (p *parser) callonMicroSecondDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onMicroSecondDuration1(stack["mag"], stack["unit"], stack["otherParts"]) +} + +func (c *current) onNanoSecondDuration1(mag, unit interface{}) (interface{}, error) { + return appendSingleDurations(mag, unit, nil, c.text, c.pos) + +} + +func (p *parser) callonNanoSecondDuration1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onNanoSecondDuration1(stack["mag"], stack["unit"]) +} + +func (c *current) onMicroSecondUnits1() (interface{}, error) { + return []byte("us"), nil + +} + +func (p *parser) callonMicroSecondUnits1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onMicroSecondUnits1() +} + +func (c *current) onStringLiteral2() (interface{}, error) { + return stringLiteral(c.text, c.pos) + +} + +func (p *parser) callonStringLiteral2() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onStringLiteral2() +} + +func (c *current) onStringLiteral8() (interface{}, error) { + return "", errors.New("string literal not terminated") + +} + +func (p *parser) callonStringLiteral8() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onStringLiteral8() +} + +func (c *current) onDoubleStringEscape3() (interface{}, error) { + return nil, errors.New("invalid escape character") + +} + +func (p *parser) callonDoubleStringEscape3() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onDoubleStringEscape3() +} + +func (c *current) onRegexpLiteral1(pattern interface{}) (interface{}, error) { + return pattern, nil + +} + +func (p *parser) callonRegexpLiteral1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onRegexpLiteral1(stack["pattern"]) +} + +func (c *current) onRegexpBody1(chars interface{}) (interface{}, error) { + return regexLiteral(chars, c.text, c.pos) + +} + +func (p *parser) callonRegexpBody1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onRegexpBody1(stack["chars"]) +} + +func (c *current) onRegexpChar2(re interface{}) (interface{}, error) { + return re, nil + +} + +func (p *parser) callonRegexpChar2() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onRegexpChar2(stack["re"]) +} + +func (c *current) onRegexpBackslashSequence2() (interface{}, error) { + return []byte{'/'}, nil + +} + +func (p *parser) callonRegexpBackslashSequence2() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onRegexpBackslashSequence2() +} + +func (c *current) onRegexpBackslashSequence4() (interface{}, error) { + return c.text, nil + +} + +func (p *parser) callonRegexpBackslashSequence4() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onRegexpBackslashSequence4() +} + +func (c *current) onRegexpNonTerminator1() (interface{}, error) { + return c.text, nil + +} + +func (p *parser) callonRegexpNonTerminator1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onRegexpNonTerminator1() +} + +func (c *current) onBooleanLiteral2() (interface{}, error) { + return booleanLiteral(true, c.text, c.pos) + +} + +func (p *parser) callonBooleanLiteral2() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onBooleanLiteral2() +} + +func (c *current) onBooleanLiteral7() (interface{}, error) { + return booleanLiteral(false, c.text, c.pos) + +} + +func (p *parser) callonBooleanLiteral7() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onBooleanLiteral7() +} + +func (c *current) onNumberLiteral1() (interface{}, error) { + return numberLiteral(c.text, c.pos) + +} + +func (p *parser) callonNumberLiteral1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onNumberLiteral1() +} + +func (c *current) onIntegerLiteral1() (interface{}, error) { + return integerLiteral(c.text, c.pos) + +} + +func (p *parser) callonIntegerLiteral1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onIntegerLiteral1() +} + +func (c *current) onPipeLiteral1() (interface{}, error) { + return pipeLiteral(c.text, c.pos), nil + +} + +func (p *parser) callonPipeLiteral1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onPipeLiteral1() +} + +func (c *current) onIdentifier1() (interface{}, error) { + return identifier(c.text, c.pos) + +} + +func (p *parser) callonIdentifier1() (interface{}, error) { + stack := p.vstack[len(p.vstack)-1] + _ = stack + return p.cur.onIdentifier1() +} + var ( // errNoRule is returned when the grammar to parse has no rule. errNoRule = errors.New("grammar has no rule") diff --git a/query/parser/flux.peg b/query/parser/flux.peg index ca2db14dcb..1512331733 100644 --- a/query/parser/flux.peg +++ b/query/parser/flux.peg @@ -344,11 +344,136 @@ DateTimeLiteral return datetime(c.text, c.pos) } +// The order of the choices in this rule and those below matters. +// Minutes (m) must appear before milliseconds (ms) and months (mo), +// otherwise "10ms" will be parsed as 10 minutes and an extraneous "s". +DurationLiteral + = durations:( + DayDuration + / HourDuration + / MicroSecondDuration + / MilliSecondDuration + / MonthDuration + / MinuteDuration + / NanoSecondDuration + / SecondDuration + / WeekDuration + / YearDuration + ) { + return durationLiteral(durations, c.text, c.pos) + } + +YearDuration + = mag:IntegerLiteral unit:YearUnits otherParts:( + DayDuration + / HourDuration + / MicroSecondDuration + / MilliSecondDuration + / MonthDuration + / MinuteDuration + / NanoSecondDuration + / SecondDuration + / WeekDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +MonthDuration + = mag:IntegerLiteral unit:MonthUnits otherParts:( + DayDuration + / HourDuration + / MicroSecondDuration + / MilliSecondDuration + / MinuteDuration + / NanoSecondDuration + / SecondDuration + / WeekDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +WeekDuration + = mag:IntegerLiteral unit:WeekUnits otherParts:( + DayDuration + / HourDuration + / MicroSecondDuration + / MilliSecondDuration + / MinuteDuration + / NanoSecondDuration + / SecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +DayDuration + = mag:IntegerLiteral unit:DayUnits otherParts:( + HourDuration + / MicroSecondDuration + / MilliSecondDuration + / MinuteDuration + / NanoSecondDuration + / SecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +HourDuration + = mag:IntegerLiteral unit:HourUnits otherParts:( + MicroSecondDuration + / MilliSecondDuration + / MinuteDuration + / NanoSecondDuration + / SecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +MinuteDuration + = mag:IntegerLiteral unit:MinuteUnits otherParts:( + MicroSecondDuration + / MilliSecondDuration + / NanoSecondDuration + / SecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +SecondDuration + = mag:IntegerLiteral unit:SecondUnits otherParts:( + MicroSecondDuration + / MilliSecondDuration + / NanoSecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +MilliSecondDuration + = mag:IntegerLiteral unit:MilliSecondUnits otherParts:( + MicroSecondDuration + / NanoSecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +MicroSecondDuration + = mag:IntegerLiteral unit:MicroSecondUnits otherParts:( + NanoSecondDuration + )? { + return appendSingleDurations(mag, unit, otherParts, c.text, c.pos) + } + +NanoSecondDuration + = mag:IntegerLiteral unit:NanoSecondUnits { + return appendSingleDurations(mag, unit, nil, c.text, c.pos) + } + NanoSecondUnits = "ns" MicroSecondUnits - = ("us" / "µs" / "μs") + = ("us" / "µs" / "μs") { + return []byte("us"), nil + } MilliSecondUnits = "ms" @@ -368,27 +493,11 @@ DayUnits WeekUnits = "w" -DurationUnits - = ( - NanoSecondUnits - / MicroSecondUnits - / MilliSecondUnits - / SecondUnits - / MinuteUnits - / HourUnits - / DayUnits - / WeekUnits - ) +MonthUnits + = "mo" -SingleDuration - = mag:IntegerLiteral unit:DurationUnits { - return singleDuration(mag, unit, c.text, c.pos) - } - -DurationLiteral - = durations:SingleDuration+ { - return durationLiteral(durations, c.text, c.pos) - } +YearUnits + = "y" StringLiteral = ( '"' DoubleStringChar* '"' ) { diff --git a/query/parser/parser.go b/query/parser/parser.go index 5e6012f82f..55f2b3bf50 100644 --- a/query/parser/parser.go +++ b/query/parser/parser.go @@ -2,7 +2,7 @@ package parser -//go:generate pigeon -optimize-parser -optimize-grammar -o flux.go flux.peg +//go:generate pigeon -optimize-parser -o flux.go flux.peg import ( "github.com/influxdata/platform/query/ast" diff --git a/query/parser/parser_test.go b/query/parser/parser_test.go index a0f4eff977..a735640147 100644 --- a/query/parser/parser_test.go +++ b/query/parser/parser_test.go @@ -1718,6 +1718,81 @@ join(tables:[a,b], on:["t1"], fn: (a,b) => (a["_field"] - b["_field"]) / b["_fie }, }, }, + { + name: "duration literal, all units", + raw: `dur = 1y3mo2w1d4h1m30s1ms2µs70ns`, + want: &ast.Program{ + Body: []ast.Statement{&ast.VariableDeclaration{ + Declarations: []*ast.VariableDeclarator{{ + ID: &ast.Identifier{Name: "dur"}, + Init: &ast.DurationLiteral{ + Values: []ast.Duration{ + {Magnitude: 1, Unit: "y"}, + {Magnitude: 3, Unit: "mo"}, + {Magnitude: 2, Unit: "w"}, + {Magnitude: 1, Unit: "d"}, + {Magnitude: 4, Unit: "h"}, + {Magnitude: 1, Unit: "m"}, + {Magnitude: 30, Unit: "s"}, + {Magnitude: 1, Unit: "ms"}, + {Magnitude: 2, Unit: "us"}, + {Magnitude: 70, Unit: "ns"}, + }, + }, + }}, + }}, + }, + }, + { + name: "duration literal, months", + raw: `dur = 6mo`, + want: &ast.Program{ + Body: []ast.Statement{&ast.VariableDeclaration{ + Declarations: []*ast.VariableDeclarator{{ + ID: &ast.Identifier{Name: "dur"}, + Init: &ast.DurationLiteral{ + Values: []ast.Duration{ + {Magnitude: 6, Unit: "mo"}, + }, + }, + }}, + }}, + }, + }, + { + name: "duration literal, milliseconds", + raw: `dur = 500ms`, + want: &ast.Program{ + Body: []ast.Statement{&ast.VariableDeclaration{ + Declarations: []*ast.VariableDeclarator{{ + ID: &ast.Identifier{Name: "dur"}, + Init: &ast.DurationLiteral{ + Values: []ast.Duration{ + {Magnitude: 500, Unit: "ms"}, + }, + }, + }}, + }}, + }, + }, + { + name: "duration literal, months, minutes, milliseconds", + raw: `dur = 6mo30m500ms`, + want: &ast.Program{ + Body: []ast.Statement{&ast.VariableDeclaration{ + Declarations: []*ast.VariableDeclarator{{ + ID: &ast.Identifier{Name: "dur"}, + Init: &ast.DurationLiteral{ + Values: []ast.Duration{ + {Magnitude: 6, Unit: "mo"}, + {Magnitude: 30, Unit: "m"}, + {Magnitude: 500, Unit: "ms"}, + }, + }, + }}, + }}, + }, + }, { name: "parse error extra gibberish", raw: `from(bucket:"Flux/autogen") &^*&H#IUJBN`, @@ -1728,6 +1803,21 @@ join(tables:[a,b], on:["t1"], fn: (a,b) => (a["_field"] - b["_field"]) / b["_fie raw: `from(bucket:"Flux/autogen") &^*&H#IUJBN from(bucket:"other/autogen")`, wantErr: true, }, + { + name: "parse error from duration literal with repeated units", + raw: `from(bucket:"my_bucket") |> range(start: -1d3h2h1m)`, + wantErr: true, + }, + { + name: "parser error from duration literal with smaller unit before larger one", + raw: `from(bucket:"my_bucket") |> range(start: -1s5m)`, + wantErr: true, + }, + { + name: "parser error from duration literal with invalid unit", + raw: `from(bucket:"my_bucket") |> range(start: -1s5v)`, + wantErr: true, + }, } for _, tt := range tests { tt := tt diff --git a/query/parser/types.go b/query/parser/types.go index 6e93ffa442..468606686c 100644 --- a/query/parser/types.go +++ b/query/parser/types.go @@ -341,30 +341,41 @@ func regexLiteral(chars interface{}, text []byte, pos position) (*ast.RegexpLite } func durationLiteral(durations interface{}, text []byte, pos position) (*ast.DurationLiteral, error) { - durs := toIfaceSlice(durations) - literals := make([]*singleDurationLiteral, len(durs)) - for i, d := range durs { - literals[i] = d.(*singleDurationLiteral) + literals := durations.([]*singleDurationLiteral) + // The slice built by the parser goes from smallest units to largest (opposite of syntax), + // reverse it for the AST produced. + for i := 0; i < len(literals) / 2; i++ { + j := len(literals) - i - 1 + literals[i], literals[j] = literals[j], literals[i] } + return &ast.DurationLiteral{ BaseNode: base(text, pos), Values: toDurationSlice(literals), }, nil } -func singleDuration(mag, unit interface{}, text []byte, pos position) (*singleDurationLiteral, error) { - return &singleDurationLiteral{ - // Not an AST node - magnitude: mag.(*ast.IntegerLiteral), - unit: string(unit.([]byte)), - }, nil -} - type singleDurationLiteral struct { magnitude *ast.IntegerLiteral unit string } +func appendSingleDurations(mag, unit, otherParts interface{}, text []byte, pos position) ([]*singleDurationLiteral, error) { + sdl := &singleDurationLiteral{ + magnitude: mag.(*ast.IntegerLiteral), + unit: string(unit.([]byte)), + } + + if otherParts == nil { + slice := make([]*singleDurationLiteral, 1, 10) + slice[0] = sdl + return slice, nil + } + + others := otherParts.([]*singleDurationLiteral) + return append(others, sdl), nil +} + func datetime(text []byte, pos position) (*ast.DateTimeLiteral, error) { t, err := time.Parse(time.RFC3339Nano, string(text)) if err != nil { diff --git a/query/promql/promql.go b/query/promql/promql.go index f775e173fb..007f772aba 100644 --- a/query/promql/promql.go +++ b/query/promql/promql.go @@ -16,42 +16,44 @@ import ( "unicode/utf8" ) +// DO NOT EDIT: This file is auto generated by the pigeon PEG parser generator. + var reservedWords = map[string]bool{} var g = &grammar{ rules: []*rule{ { name: "Grammar", - pos: position{line: 8, col: 1, offset: 60}, + pos: position{line: 11, col: 1, offset: 234}, expr: &actionExpr{ - pos: position{line: 8, col: 12, offset: 71}, + pos: position{line: 11, col: 12, offset: 245}, run: (*parser).callonGrammar1, expr: &seqExpr{ - pos: position{line: 8, col: 12, offset: 71}, + pos: position{line: 11, col: 12, offset: 245}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 8, col: 12, offset: 71}, + pos: position{line: 11, col: 12, offset: 245}, label: "grammar", expr: &choiceExpr{ - pos: position{line: 8, col: 22, offset: 81}, + pos: position{line: 11, col: 22, offset: 255}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 8, col: 22, offset: 81}, + pos: position{line: 11, col: 22, offset: 255}, name: "Comment", }, &ruleRefExpr{ - pos: position{line: 8, col: 32, offset: 91}, + pos: position{line: 11, col: 32, offset: 265}, name: "AggregateExpression", }, &ruleRefExpr{ - pos: position{line: 8, col: 54, offset: 113}, + pos: position{line: 11, col: 54, offset: 287}, name: "VectorSelector", }, }, }, }, &ruleRefExpr{ - pos: position{line: 8, col: 71, offset: 130}, + pos: position{line: 11, col: 71, offset: 304}, name: "EOF", }, }, @@ -60,39 +62,39 @@ var g = &grammar{ }, { name: "SourceChar", - pos: position{line: 12, col: 1, offset: 163}, + pos: position{line: 15, col: 1, offset: 337}, expr: &anyMatcher{ - line: 12, col: 14, offset: 176, + line: 15, col: 14, offset: 350, }, }, { name: "Comment", - pos: position{line: 14, col: 1, offset: 179}, + pos: position{line: 17, col: 1, offset: 353}, expr: &actionExpr{ - pos: position{line: 14, col: 11, offset: 189}, + pos: position{line: 17, col: 11, offset: 363}, run: (*parser).callonComment1, expr: &seqExpr{ - pos: position{line: 14, col: 11, offset: 189}, + pos: position{line: 17, col: 11, offset: 363}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 14, col: 11, offset: 189}, + pos: position{line: 17, col: 11, offset: 363}, val: "#", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 14, col: 15, offset: 193}, + pos: position{line: 17, col: 15, offset: 367}, expr: &seqExpr{ - pos: position{line: 14, col: 17, offset: 195}, + pos: position{line: 17, col: 17, offset: 369}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 14, col: 17, offset: 195}, + pos: position{line: 17, col: 17, offset: 369}, expr: &ruleRefExpr{ - pos: position{line: 14, col: 18, offset: 196}, + pos: position{line: 17, col: 18, offset: 370}, name: "EOL", }, }, &ruleRefExpr{ - pos: position{line: 14, col: 22, offset: 200}, + pos: position{line: 17, col: 22, offset: 374}, name: "SourceChar", }, }, @@ -104,15 +106,15 @@ var g = &grammar{ }, { name: "Identifier", - pos: position{line: 18, col: 1, offset: 260}, + pos: position{line: 21, col: 1, offset: 434}, expr: &actionExpr{ - pos: position{line: 18, col: 14, offset: 273}, + pos: position{line: 21, col: 14, offset: 447}, run: (*parser).callonIdentifier1, expr: &labeledExpr{ - pos: position{line: 18, col: 14, offset: 273}, + pos: position{line: 21, col: 14, offset: 447}, label: "ident", expr: &ruleRefExpr{ - pos: position{line: 18, col: 20, offset: 279}, + pos: position{line: 21, col: 20, offset: 453}, name: "IdentifierName", }, }, @@ -120,21 +122,21 @@ var g = &grammar{ }, { name: "IdentifierName", - pos: position{line: 26, col: 1, offset: 463}, + pos: position{line: 29, col: 1, offset: 637}, expr: &actionExpr{ - pos: position{line: 26, col: 18, offset: 480}, + pos: position{line: 29, col: 18, offset: 654}, run: (*parser).callonIdentifierName1, expr: &seqExpr{ - pos: position{line: 26, col: 18, offset: 480}, + pos: position{line: 29, col: 18, offset: 654}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 26, col: 18, offset: 480}, + pos: position{line: 29, col: 18, offset: 654}, name: "IdentifierStart", }, &zeroOrMoreExpr{ - pos: position{line: 26, col: 34, offset: 496}, + pos: position{line: 29, col: 34, offset: 670}, expr: &ruleRefExpr{ - pos: position{line: 26, col: 34, offset: 496}, + pos: position{line: 29, col: 34, offset: 670}, name: "IdentifierPart", }, }, @@ -144,9 +146,9 @@ var g = &grammar{ }, { name: "IdentifierStart", - pos: position{line: 29, col: 1, offset: 547}, + pos: position{line: 32, col: 1, offset: 721}, expr: &charClassMatcher{ - pos: position{line: 29, col: 19, offset: 565}, + pos: position{line: 32, col: 19, offset: 739}, val: "[\\pL_]", chars: []rune{'_'}, classes: []*unicode.RangeTable{rangeTable("L")}, @@ -156,16 +158,16 @@ var g = &grammar{ }, { name: "IdentifierPart", - pos: position{line: 30, col: 1, offset: 572}, + pos: position{line: 33, col: 1, offset: 746}, expr: &choiceExpr{ - pos: position{line: 30, col: 18, offset: 589}, + pos: position{line: 33, col: 18, offset: 763}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 30, col: 18, offset: 589}, + pos: position{line: 33, col: 18, offset: 763}, name: "IdentifierStart", }, &charClassMatcher{ - pos: position{line: 30, col: 36, offset: 607}, + pos: position{line: 33, col: 36, offset: 781}, val: "[\\p{Nd}]", classes: []*unicode.RangeTable{rangeTable("Nd")}, ignoreCase: false, @@ -176,74 +178,74 @@ var g = &grammar{ }, { name: "StringLiteral", - pos: position{line: 32, col: 1, offset: 617}, + pos: position{line: 35, col: 1, offset: 791}, expr: &choiceExpr{ - pos: position{line: 32, col: 17, offset: 633}, + pos: position{line: 35, col: 17, offset: 807}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 32, col: 17, offset: 633}, + pos: position{line: 35, col: 17, offset: 807}, run: (*parser).callonStringLiteral2, expr: &choiceExpr{ - pos: position{line: 32, col: 19, offset: 635}, + pos: position{line: 35, col: 19, offset: 809}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 32, col: 19, offset: 635}, + pos: position{line: 35, col: 19, offset: 809}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 32, col: 19, offset: 635}, + pos: position{line: 35, col: 19, offset: 809}, val: "\"", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 32, col: 23, offset: 639}, + pos: position{line: 35, col: 23, offset: 813}, expr: &ruleRefExpr{ - pos: position{line: 32, col: 23, offset: 639}, + pos: position{line: 35, col: 23, offset: 813}, name: "DoubleStringChar", }, }, &litMatcher{ - pos: position{line: 32, col: 41, offset: 657}, + pos: position{line: 35, col: 41, offset: 831}, val: "\"", ignoreCase: false, }, }, }, &seqExpr{ - pos: position{line: 32, col: 47, offset: 663}, + pos: position{line: 35, col: 47, offset: 837}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 32, col: 47, offset: 663}, + pos: position{line: 35, col: 47, offset: 837}, val: "'", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 32, col: 51, offset: 667}, + pos: position{line: 35, col: 51, offset: 841}, name: "SingleStringChar", }, &litMatcher{ - pos: position{line: 32, col: 68, offset: 684}, + pos: position{line: 35, col: 68, offset: 858}, val: "'", ignoreCase: false, }, }, }, &seqExpr{ - pos: position{line: 32, col: 74, offset: 690}, + pos: position{line: 35, col: 74, offset: 864}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 32, col: 74, offset: 690}, + pos: position{line: 35, col: 74, offset: 864}, val: "`", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 32, col: 78, offset: 694}, + pos: position{line: 35, col: 78, offset: 868}, expr: &ruleRefExpr{ - pos: position{line: 32, col: 78, offset: 694}, + pos: position{line: 35, col: 78, offset: 868}, name: "RawStringChar", }, }, &litMatcher{ - pos: position{line: 32, col: 93, offset: 709}, + pos: position{line: 35, col: 93, offset: 883}, val: "`", ignoreCase: false, }, @@ -253,35 +255,35 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 38, col: 5, offset: 855}, + pos: position{line: 41, col: 5, offset: 1029}, run: (*parser).callonStringLiteral18, expr: &choiceExpr{ - pos: position{line: 38, col: 7, offset: 857}, + pos: position{line: 41, col: 7, offset: 1031}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 38, col: 9, offset: 859}, + pos: position{line: 41, col: 9, offset: 1033}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 38, col: 9, offset: 859}, + pos: position{line: 41, col: 9, offset: 1033}, val: "\"", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 38, col: 13, offset: 863}, + pos: position{line: 41, col: 13, offset: 1037}, expr: &ruleRefExpr{ - pos: position{line: 38, col: 13, offset: 863}, + pos: position{line: 41, col: 13, offset: 1037}, name: "DoubleStringChar", }, }, &choiceExpr{ - pos: position{line: 38, col: 33, offset: 883}, + pos: position{line: 41, col: 33, offset: 1057}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 38, col: 33, offset: 883}, + pos: position{line: 41, col: 33, offset: 1057}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 38, col: 39, offset: 889}, + pos: position{line: 41, col: 39, offset: 1063}, name: "EOF", }, }, @@ -289,29 +291,29 @@ var g = &grammar{ }, }, &seqExpr{ - pos: position{line: 38, col: 51, offset: 901}, + pos: position{line: 41, col: 51, offset: 1075}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 38, col: 51, offset: 901}, + pos: position{line: 41, col: 51, offset: 1075}, val: "'", ignoreCase: false, }, &zeroOrOneExpr{ - pos: position{line: 38, col: 55, offset: 905}, + pos: position{line: 41, col: 55, offset: 1079}, expr: &ruleRefExpr{ - pos: position{line: 38, col: 55, offset: 905}, + pos: position{line: 41, col: 55, offset: 1079}, name: "SingleStringChar", }, }, &choiceExpr{ - pos: position{line: 38, col: 75, offset: 925}, + pos: position{line: 41, col: 75, offset: 1099}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 38, col: 75, offset: 925}, + pos: position{line: 41, col: 75, offset: 1099}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 38, col: 81, offset: 931}, + pos: position{line: 41, col: 81, offset: 1105}, name: "EOF", }, }, @@ -319,22 +321,22 @@ var g = &grammar{ }, }, &seqExpr{ - pos: position{line: 38, col: 91, offset: 941}, + pos: position{line: 41, col: 91, offset: 1115}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 38, col: 91, offset: 941}, + pos: position{line: 41, col: 91, offset: 1115}, val: "`", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 38, col: 95, offset: 945}, + pos: position{line: 41, col: 95, offset: 1119}, expr: &ruleRefExpr{ - pos: position{line: 38, col: 95, offset: 945}, + pos: position{line: 41, col: 95, offset: 1119}, name: "RawStringChar", }, }, &ruleRefExpr{ - pos: position{line: 38, col: 110, offset: 960}, + pos: position{line: 41, col: 110, offset: 1134}, name: "EOF", }, }, @@ -347,51 +349,51 @@ var g = &grammar{ }, { name: "DoubleStringChar", - pos: position{line: 42, col: 1, offset: 1031}, + pos: position{line: 45, col: 1, offset: 1205}, expr: &choiceExpr{ - pos: position{line: 42, col: 20, offset: 1050}, + pos: position{line: 45, col: 20, offset: 1224}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 42, col: 20, offset: 1050}, + pos: position{line: 45, col: 20, offset: 1224}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 42, col: 20, offset: 1050}, + pos: position{line: 45, col: 20, offset: 1224}, expr: &choiceExpr{ - pos: position{line: 42, col: 23, offset: 1053}, + pos: position{line: 45, col: 23, offset: 1227}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 42, col: 23, offset: 1053}, + pos: position{line: 45, col: 23, offset: 1227}, val: "\"", ignoreCase: false, }, &litMatcher{ - pos: position{line: 42, col: 29, offset: 1059}, + pos: position{line: 45, col: 29, offset: 1233}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 42, col: 36, offset: 1066}, + pos: position{line: 45, col: 36, offset: 1240}, name: "EOL", }, }, }, }, &ruleRefExpr{ - pos: position{line: 42, col: 42, offset: 1072}, + pos: position{line: 45, col: 42, offset: 1246}, name: "SourceChar", }, }, }, &seqExpr{ - pos: position{line: 42, col: 55, offset: 1085}, + pos: position{line: 45, col: 55, offset: 1259}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 42, col: 55, offset: 1085}, + pos: position{line: 45, col: 55, offset: 1259}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 42, col: 60, offset: 1090}, + pos: position{line: 45, col: 60, offset: 1264}, name: "DoubleStringEscape", }, }, @@ -401,51 +403,51 @@ var g = &grammar{ }, { name: "SingleStringChar", - pos: position{line: 43, col: 1, offset: 1109}, + pos: position{line: 46, col: 1, offset: 1283}, expr: &choiceExpr{ - pos: position{line: 43, col: 20, offset: 1128}, + pos: position{line: 46, col: 20, offset: 1302}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 43, col: 20, offset: 1128}, + pos: position{line: 46, col: 20, offset: 1302}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 43, col: 20, offset: 1128}, + pos: position{line: 46, col: 20, offset: 1302}, expr: &choiceExpr{ - pos: position{line: 43, col: 23, offset: 1131}, + pos: position{line: 46, col: 23, offset: 1305}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 43, col: 23, offset: 1131}, + pos: position{line: 46, col: 23, offset: 1305}, val: "'", ignoreCase: false, }, &litMatcher{ - pos: position{line: 43, col: 29, offset: 1137}, + pos: position{line: 46, col: 29, offset: 1311}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 43, col: 36, offset: 1144}, + pos: position{line: 46, col: 36, offset: 1318}, name: "EOL", }, }, }, }, &ruleRefExpr{ - pos: position{line: 43, col: 42, offset: 1150}, + pos: position{line: 46, col: 42, offset: 1324}, name: "SourceChar", }, }, }, &seqExpr{ - pos: position{line: 43, col: 55, offset: 1163}, + pos: position{line: 46, col: 55, offset: 1337}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 43, col: 55, offset: 1163}, + pos: position{line: 46, col: 55, offset: 1337}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 43, col: 60, offset: 1168}, + pos: position{line: 46, col: 60, offset: 1342}, name: "SingleStringEscape", }, }, @@ -455,20 +457,20 @@ var g = &grammar{ }, { name: "RawStringChar", - pos: position{line: 44, col: 1, offset: 1187}, + pos: position{line: 47, col: 1, offset: 1361}, expr: &seqExpr{ - pos: position{line: 44, col: 17, offset: 1203}, + pos: position{line: 47, col: 17, offset: 1377}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 44, col: 17, offset: 1203}, + pos: position{line: 47, col: 17, offset: 1377}, expr: &litMatcher{ - pos: position{line: 44, col: 18, offset: 1204}, + pos: position{line: 47, col: 18, offset: 1378}, val: "`", ignoreCase: false, }, }, &ruleRefExpr{ - pos: position{line: 44, col: 22, offset: 1208}, + pos: position{line: 47, col: 22, offset: 1382}, name: "SourceChar", }, }, @@ -476,40 +478,40 @@ var g = &grammar{ }, { name: "DoubleStringEscape", - pos: position{line: 46, col: 1, offset: 1220}, + pos: position{line: 49, col: 1, offset: 1394}, expr: &choiceExpr{ - pos: position{line: 46, col: 22, offset: 1241}, + pos: position{line: 49, col: 22, offset: 1415}, alternatives: []interface{}{ &choiceExpr{ - pos: position{line: 46, col: 24, offset: 1243}, + pos: position{line: 49, col: 24, offset: 1417}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 46, col: 24, offset: 1243}, + pos: position{line: 49, col: 24, offset: 1417}, val: "\"", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 46, col: 30, offset: 1249}, + pos: position{line: 49, col: 30, offset: 1423}, name: "CommonEscapeSequence", }, }, }, &actionExpr{ - pos: position{line: 47, col: 7, offset: 1278}, + pos: position{line: 50, col: 7, offset: 1452}, run: (*parser).callonDoubleStringEscape5, expr: &choiceExpr{ - pos: position{line: 47, col: 9, offset: 1280}, + pos: position{line: 50, col: 9, offset: 1454}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 47, col: 9, offset: 1280}, + pos: position{line: 50, col: 9, offset: 1454}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 47, col: 22, offset: 1293}, + pos: position{line: 50, col: 22, offset: 1467}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 47, col: 28, offset: 1299}, + pos: position{line: 50, col: 28, offset: 1473}, name: "EOF", }, }, @@ -520,40 +522,40 @@ var g = &grammar{ }, { name: "SingleStringEscape", - pos: position{line: 50, col: 1, offset: 1364}, + pos: position{line: 53, col: 1, offset: 1538}, expr: &choiceExpr{ - pos: position{line: 50, col: 22, offset: 1385}, + pos: position{line: 53, col: 22, offset: 1559}, alternatives: []interface{}{ &choiceExpr{ - pos: position{line: 50, col: 24, offset: 1387}, + pos: position{line: 53, col: 24, offset: 1561}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 50, col: 24, offset: 1387}, + pos: position{line: 53, col: 24, offset: 1561}, val: "'", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 50, col: 30, offset: 1393}, + pos: position{line: 53, col: 30, offset: 1567}, name: "CommonEscapeSequence", }, }, }, &actionExpr{ - pos: position{line: 51, col: 7, offset: 1422}, + pos: position{line: 54, col: 7, offset: 1596}, run: (*parser).callonSingleStringEscape5, expr: &choiceExpr{ - pos: position{line: 51, col: 9, offset: 1424}, + pos: position{line: 54, col: 9, offset: 1598}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 51, col: 9, offset: 1424}, + pos: position{line: 54, col: 9, offset: 1598}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 51, col: 22, offset: 1437}, + pos: position{line: 54, col: 22, offset: 1611}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 51, col: 28, offset: 1443}, + pos: position{line: 54, col: 28, offset: 1617}, name: "EOF", }, }, @@ -564,28 +566,28 @@ var g = &grammar{ }, { name: "CommonEscapeSequence", - pos: position{line: 55, col: 1, offset: 1509}, + pos: position{line: 58, col: 1, offset: 1683}, expr: &choiceExpr{ - pos: position{line: 55, col: 24, offset: 1532}, + pos: position{line: 58, col: 24, offset: 1706}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 55, col: 24, offset: 1532}, + pos: position{line: 58, col: 24, offset: 1706}, name: "SingleCharEscape", }, &ruleRefExpr{ - pos: position{line: 55, col: 43, offset: 1551}, + pos: position{line: 58, col: 43, offset: 1725}, name: "OctalEscape", }, &ruleRefExpr{ - pos: position{line: 55, col: 57, offset: 1565}, + pos: position{line: 58, col: 57, offset: 1739}, name: "HexEscape", }, &ruleRefExpr{ - pos: position{line: 55, col: 69, offset: 1577}, + pos: position{line: 58, col: 69, offset: 1751}, name: "LongUnicodeEscape", }, &ruleRefExpr{ - pos: position{line: 55, col: 89, offset: 1597}, + pos: position{line: 58, col: 89, offset: 1771}, name: "ShortUnicodeEscape", }, }, @@ -593,47 +595,47 @@ var g = &grammar{ }, { name: "SingleCharEscape", - pos: position{line: 56, col: 1, offset: 1616}, + pos: position{line: 59, col: 1, offset: 1790}, expr: &choiceExpr{ - pos: position{line: 56, col: 20, offset: 1635}, + pos: position{line: 59, col: 20, offset: 1809}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 56, col: 20, offset: 1635}, + pos: position{line: 59, col: 20, offset: 1809}, val: "a", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 26, offset: 1641}, + pos: position{line: 59, col: 26, offset: 1815}, val: "b", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 32, offset: 1647}, + pos: position{line: 59, col: 32, offset: 1821}, val: "n", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 38, offset: 1653}, + pos: position{line: 59, col: 38, offset: 1827}, val: "f", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 44, offset: 1659}, + pos: position{line: 59, col: 44, offset: 1833}, val: "r", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 50, offset: 1665}, + pos: position{line: 59, col: 50, offset: 1839}, val: "t", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 56, offset: 1671}, + pos: position{line: 59, col: 56, offset: 1845}, val: "v", ignoreCase: false, }, &litMatcher{ - pos: position{line: 56, col: 62, offset: 1677}, + pos: position{line: 59, col: 62, offset: 1851}, val: "\\", ignoreCase: false, }, @@ -642,50 +644,50 @@ var g = &grammar{ }, { name: "OctalEscape", - pos: position{line: 57, col: 1, offset: 1682}, + pos: position{line: 60, col: 1, offset: 1856}, expr: &choiceExpr{ - pos: position{line: 57, col: 15, offset: 1696}, + pos: position{line: 60, col: 15, offset: 1870}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 57, col: 15, offset: 1696}, + pos: position{line: 60, col: 15, offset: 1870}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 57, col: 15, offset: 1696}, + pos: position{line: 60, col: 15, offset: 1870}, name: "OctalDigit", }, &ruleRefExpr{ - pos: position{line: 57, col: 26, offset: 1707}, + pos: position{line: 60, col: 26, offset: 1881}, name: "OctalDigit", }, &ruleRefExpr{ - pos: position{line: 57, col: 37, offset: 1718}, + pos: position{line: 60, col: 37, offset: 1892}, name: "OctalDigit", }, }, }, &actionExpr{ - pos: position{line: 58, col: 7, offset: 1735}, + pos: position{line: 61, col: 7, offset: 1909}, run: (*parser).callonOctalEscape6, expr: &seqExpr{ - pos: position{line: 58, col: 7, offset: 1735}, + pos: position{line: 61, col: 7, offset: 1909}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 58, col: 7, offset: 1735}, + pos: position{line: 61, col: 7, offset: 1909}, name: "OctalDigit", }, &choiceExpr{ - pos: position{line: 58, col: 20, offset: 1748}, + pos: position{line: 61, col: 20, offset: 1922}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 58, col: 20, offset: 1748}, + pos: position{line: 61, col: 20, offset: 1922}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 58, col: 33, offset: 1761}, + pos: position{line: 61, col: 33, offset: 1935}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 58, col: 39, offset: 1767}, + pos: position{line: 61, col: 39, offset: 1941}, name: "EOF", }, }, @@ -698,52 +700,52 @@ var g = &grammar{ }, { name: "HexEscape", - pos: position{line: 61, col: 1, offset: 1828}, + pos: position{line: 64, col: 1, offset: 2002}, expr: &choiceExpr{ - pos: position{line: 61, col: 13, offset: 1840}, + pos: position{line: 64, col: 13, offset: 2014}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 61, col: 13, offset: 1840}, + pos: position{line: 64, col: 13, offset: 2014}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 61, col: 13, offset: 1840}, + pos: position{line: 64, col: 13, offset: 2014}, val: "x", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 61, col: 17, offset: 1844}, + pos: position{line: 64, col: 17, offset: 2018}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 61, col: 26, offset: 1853}, + pos: position{line: 64, col: 26, offset: 2027}, name: "HexDigit", }, }, }, &actionExpr{ - pos: position{line: 62, col: 7, offset: 1868}, + pos: position{line: 65, col: 7, offset: 2042}, run: (*parser).callonHexEscape6, expr: &seqExpr{ - pos: position{line: 62, col: 7, offset: 1868}, + pos: position{line: 65, col: 7, offset: 2042}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 62, col: 7, offset: 1868}, + pos: position{line: 65, col: 7, offset: 2042}, val: "x", ignoreCase: false, }, &choiceExpr{ - pos: position{line: 62, col: 13, offset: 1874}, + pos: position{line: 65, col: 13, offset: 2048}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 62, col: 13, offset: 1874}, + pos: position{line: 65, col: 13, offset: 2048}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 62, col: 26, offset: 1887}, + pos: position{line: 65, col: 26, offset: 2061}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 62, col: 32, offset: 1893}, + pos: position{line: 65, col: 32, offset: 2067}, name: "EOF", }, }, @@ -756,80 +758,80 @@ var g = &grammar{ }, { name: "LongUnicodeEscape", - pos: position{line: 65, col: 1, offset: 1960}, + pos: position{line: 68, col: 1, offset: 2134}, expr: &choiceExpr{ - pos: position{line: 66, col: 5, offset: 1985}, + pos: position{line: 69, col: 5, offset: 2159}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 66, col: 5, offset: 1985}, + pos: position{line: 69, col: 5, offset: 2159}, run: (*parser).callonLongUnicodeEscape2, expr: &seqExpr{ - pos: position{line: 66, col: 5, offset: 1985}, + pos: position{line: 69, col: 5, offset: 2159}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 66, col: 5, offset: 1985}, + pos: position{line: 69, col: 5, offset: 2159}, val: "U", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 66, col: 9, offset: 1989}, + pos: position{line: 69, col: 9, offset: 2163}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 18, offset: 1998}, + pos: position{line: 69, col: 18, offset: 2172}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 27, offset: 2007}, + pos: position{line: 69, col: 27, offset: 2181}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 36, offset: 2016}, + pos: position{line: 69, col: 36, offset: 2190}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 45, offset: 2025}, + pos: position{line: 69, col: 45, offset: 2199}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 54, offset: 2034}, + pos: position{line: 69, col: 54, offset: 2208}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 63, offset: 2043}, + pos: position{line: 69, col: 63, offset: 2217}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 66, col: 72, offset: 2052}, + pos: position{line: 69, col: 72, offset: 2226}, name: "HexDigit", }, }, }, }, &actionExpr{ - pos: position{line: 69, col: 7, offset: 2154}, + pos: position{line: 72, col: 7, offset: 2328}, run: (*parser).callonLongUnicodeEscape13, expr: &seqExpr{ - pos: position{line: 69, col: 7, offset: 2154}, + pos: position{line: 72, col: 7, offset: 2328}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 69, col: 7, offset: 2154}, + pos: position{line: 72, col: 7, offset: 2328}, val: "U", ignoreCase: false, }, &choiceExpr{ - pos: position{line: 69, col: 13, offset: 2160}, + pos: position{line: 72, col: 13, offset: 2334}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 69, col: 13, offset: 2160}, + pos: position{line: 72, col: 13, offset: 2334}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 69, col: 26, offset: 2173}, + pos: position{line: 72, col: 26, offset: 2347}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 69, col: 32, offset: 2179}, + pos: position{line: 72, col: 32, offset: 2353}, name: "EOF", }, }, @@ -842,64 +844,64 @@ var g = &grammar{ }, { name: "ShortUnicodeEscape", - pos: position{line: 72, col: 1, offset: 2242}, + pos: position{line: 75, col: 1, offset: 2416}, expr: &choiceExpr{ - pos: position{line: 73, col: 5, offset: 2268}, + pos: position{line: 76, col: 5, offset: 2442}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 73, col: 5, offset: 2268}, + pos: position{line: 76, col: 5, offset: 2442}, run: (*parser).callonShortUnicodeEscape2, expr: &seqExpr{ - pos: position{line: 73, col: 5, offset: 2268}, + pos: position{line: 76, col: 5, offset: 2442}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 73, col: 5, offset: 2268}, + pos: position{line: 76, col: 5, offset: 2442}, val: "u", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 73, col: 9, offset: 2272}, + pos: position{line: 76, col: 9, offset: 2446}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 73, col: 18, offset: 2281}, + pos: position{line: 76, col: 18, offset: 2455}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 73, col: 27, offset: 2290}, + pos: position{line: 76, col: 27, offset: 2464}, name: "HexDigit", }, &ruleRefExpr{ - pos: position{line: 73, col: 36, offset: 2299}, + pos: position{line: 76, col: 36, offset: 2473}, name: "HexDigit", }, }, }, }, &actionExpr{ - pos: position{line: 76, col: 7, offset: 2401}, + pos: position{line: 79, col: 7, offset: 2575}, run: (*parser).callonShortUnicodeEscape9, expr: &seqExpr{ - pos: position{line: 76, col: 7, offset: 2401}, + pos: position{line: 79, col: 7, offset: 2575}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 76, col: 7, offset: 2401}, + pos: position{line: 79, col: 7, offset: 2575}, val: "u", ignoreCase: false, }, &choiceExpr{ - pos: position{line: 76, col: 13, offset: 2407}, + pos: position{line: 79, col: 13, offset: 2581}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 76, col: 13, offset: 2407}, + pos: position{line: 79, col: 13, offset: 2581}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 76, col: 26, offset: 2420}, + pos: position{line: 79, col: 26, offset: 2594}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 76, col: 32, offset: 2426}, + pos: position{line: 79, col: 32, offset: 2600}, name: "EOF", }, }, @@ -912,9 +914,9 @@ var g = &grammar{ }, { name: "OctalDigit", - pos: position{line: 80, col: 1, offset: 2490}, + pos: position{line: 83, col: 1, offset: 2664}, expr: &charClassMatcher{ - pos: position{line: 80, col: 14, offset: 2503}, + pos: position{line: 83, col: 14, offset: 2677}, val: "[0-7]", ranges: []rune{'0', '7'}, ignoreCase: false, @@ -923,9 +925,9 @@ var g = &grammar{ }, { name: "DecimalDigit", - pos: position{line: 81, col: 1, offset: 2509}, + pos: position{line: 84, col: 1, offset: 2683}, expr: &charClassMatcher{ - pos: position{line: 81, col: 16, offset: 2524}, + pos: position{line: 84, col: 16, offset: 2698}, val: "[0-9]", ranges: []rune{'0', '9'}, ignoreCase: false, @@ -934,9 +936,9 @@ var g = &grammar{ }, { name: "HexDigit", - pos: position{line: 82, col: 1, offset: 2530}, + pos: position{line: 85, col: 1, offset: 2704}, expr: &charClassMatcher{ - pos: position{line: 82, col: 12, offset: 2541}, + pos: position{line: 85, col: 12, offset: 2715}, val: "[0-9a-f]i", ranges: []rune{'0', '9', 'a', 'f'}, ignoreCase: true, @@ -945,44 +947,44 @@ var g = &grammar{ }, { name: "CharClassMatcher", - pos: position{line: 84, col: 1, offset: 2552}, + pos: position{line: 87, col: 1, offset: 2726}, expr: &choiceExpr{ - pos: position{line: 84, col: 20, offset: 2571}, + pos: position{line: 87, col: 20, offset: 2745}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 84, col: 20, offset: 2571}, + pos: position{line: 87, col: 20, offset: 2745}, run: (*parser).callonCharClassMatcher2, expr: &seqExpr{ - pos: position{line: 84, col: 20, offset: 2571}, + pos: position{line: 87, col: 20, offset: 2745}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 84, col: 20, offset: 2571}, + pos: position{line: 87, col: 20, offset: 2745}, val: "[", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 84, col: 24, offset: 2575}, + pos: position{line: 87, col: 24, offset: 2749}, expr: &choiceExpr{ - pos: position{line: 84, col: 26, offset: 2577}, + pos: position{line: 87, col: 26, offset: 2751}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 84, col: 26, offset: 2577}, + pos: position{line: 87, col: 26, offset: 2751}, name: "ClassCharRange", }, &ruleRefExpr{ - pos: position{line: 84, col: 43, offset: 2594}, + pos: position{line: 87, col: 43, offset: 2768}, name: "ClassChar", }, &seqExpr{ - pos: position{line: 84, col: 55, offset: 2606}, + pos: position{line: 87, col: 55, offset: 2780}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 84, col: 55, offset: 2606}, + pos: position{line: 87, col: 55, offset: 2780}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 84, col: 60, offset: 2611}, + pos: position{line: 87, col: 60, offset: 2785}, name: "UnicodeClassEscape", }, }, @@ -991,14 +993,14 @@ var g = &grammar{ }, }, &litMatcher{ - pos: position{line: 84, col: 82, offset: 2633}, + pos: position{line: 87, col: 82, offset: 2807}, val: "]", ignoreCase: false, }, &zeroOrOneExpr{ - pos: position{line: 84, col: 86, offset: 2637}, + pos: position{line: 87, col: 86, offset: 2811}, expr: &litMatcher{ - pos: position{line: 84, col: 86, offset: 2637}, + pos: position{line: 87, col: 86, offset: 2811}, val: "i", ignoreCase: false, }, @@ -1007,44 +1009,44 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 86, col: 5, offset: 2679}, + pos: position{line: 89, col: 5, offset: 2853}, run: (*parser).callonCharClassMatcher15, expr: &seqExpr{ - pos: position{line: 86, col: 5, offset: 2679}, + pos: position{line: 89, col: 5, offset: 2853}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 86, col: 5, offset: 2679}, + pos: position{line: 89, col: 5, offset: 2853}, val: "[", ignoreCase: false, }, &zeroOrMoreExpr{ - pos: position{line: 86, col: 9, offset: 2683}, + pos: position{line: 89, col: 9, offset: 2857}, expr: &seqExpr{ - pos: position{line: 86, col: 11, offset: 2685}, + pos: position{line: 89, col: 11, offset: 2859}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 86, col: 11, offset: 2685}, + pos: position{line: 89, col: 11, offset: 2859}, expr: &ruleRefExpr{ - pos: position{line: 86, col: 14, offset: 2688}, + pos: position{line: 89, col: 14, offset: 2862}, name: "EOL", }, }, &ruleRefExpr{ - pos: position{line: 86, col: 20, offset: 2694}, + pos: position{line: 89, col: 20, offset: 2868}, name: "SourceChar", }, }, }, }, &choiceExpr{ - pos: position{line: 86, col: 36, offset: 2710}, + pos: position{line: 89, col: 36, offset: 2884}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 86, col: 36, offset: 2710}, + pos: position{line: 89, col: 36, offset: 2884}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 86, col: 42, offset: 2716}, + pos: position{line: 89, col: 42, offset: 2890}, name: "EOF", }, }, @@ -1057,21 +1059,21 @@ var g = &grammar{ }, { name: "ClassCharRange", - pos: position{line: 90, col: 1, offset: 2788}, + pos: position{line: 93, col: 1, offset: 2962}, expr: &seqExpr{ - pos: position{line: 90, col: 18, offset: 2805}, + pos: position{line: 93, col: 18, offset: 2979}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 90, col: 18, offset: 2805}, + pos: position{line: 93, col: 18, offset: 2979}, name: "ClassChar", }, &litMatcher{ - pos: position{line: 90, col: 28, offset: 2815}, + pos: position{line: 93, col: 28, offset: 2989}, val: "-", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 90, col: 32, offset: 2819}, + pos: position{line: 93, col: 32, offset: 2993}, name: "ClassChar", }, }, @@ -1079,51 +1081,51 @@ var g = &grammar{ }, { name: "ClassChar", - pos: position{line: 91, col: 1, offset: 2829}, + pos: position{line: 94, col: 1, offset: 3003}, expr: &choiceExpr{ - pos: position{line: 91, col: 13, offset: 2841}, + pos: position{line: 94, col: 13, offset: 3015}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 91, col: 13, offset: 2841}, + pos: position{line: 94, col: 13, offset: 3015}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 91, col: 13, offset: 2841}, + pos: position{line: 94, col: 13, offset: 3015}, expr: &choiceExpr{ - pos: position{line: 91, col: 16, offset: 2844}, + pos: position{line: 94, col: 16, offset: 3018}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 91, col: 16, offset: 2844}, + pos: position{line: 94, col: 16, offset: 3018}, val: "]", ignoreCase: false, }, &litMatcher{ - pos: position{line: 91, col: 22, offset: 2850}, + pos: position{line: 94, col: 22, offset: 3024}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 91, col: 29, offset: 2857}, + pos: position{line: 94, col: 29, offset: 3031}, name: "EOL", }, }, }, }, &ruleRefExpr{ - pos: position{line: 91, col: 35, offset: 2863}, + pos: position{line: 94, col: 35, offset: 3037}, name: "SourceChar", }, }, }, &seqExpr{ - pos: position{line: 91, col: 48, offset: 2876}, + pos: position{line: 94, col: 48, offset: 3050}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 91, col: 48, offset: 2876}, + pos: position{line: 94, col: 48, offset: 3050}, val: "\\", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 91, col: 53, offset: 2881}, + pos: position{line: 94, col: 53, offset: 3055}, name: "CharClassEscape", }, }, @@ -1133,51 +1135,51 @@ var g = &grammar{ }, { name: "CharClassEscape", - pos: position{line: 92, col: 1, offset: 2897}, + pos: position{line: 95, col: 1, offset: 3071}, expr: &choiceExpr{ - pos: position{line: 92, col: 19, offset: 2915}, + pos: position{line: 95, col: 19, offset: 3089}, alternatives: []interface{}{ &choiceExpr{ - pos: position{line: 92, col: 21, offset: 2917}, + pos: position{line: 95, col: 21, offset: 3091}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 92, col: 21, offset: 2917}, + pos: position{line: 95, col: 21, offset: 3091}, val: "]", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 92, col: 27, offset: 2923}, + pos: position{line: 95, col: 27, offset: 3097}, name: "CommonEscapeSequence", }, }, }, &actionExpr{ - pos: position{line: 93, col: 7, offset: 2952}, + pos: position{line: 96, col: 7, offset: 3126}, run: (*parser).callonCharClassEscape5, expr: &seqExpr{ - pos: position{line: 93, col: 7, offset: 2952}, + pos: position{line: 96, col: 7, offset: 3126}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 93, col: 7, offset: 2952}, + pos: position{line: 96, col: 7, offset: 3126}, expr: &litMatcher{ - pos: position{line: 93, col: 8, offset: 2953}, + pos: position{line: 96, col: 8, offset: 3127}, val: "p", ignoreCase: false, }, }, &choiceExpr{ - pos: position{line: 93, col: 14, offset: 2959}, + pos: position{line: 96, col: 14, offset: 3133}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 93, col: 14, offset: 2959}, + pos: position{line: 96, col: 14, offset: 3133}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 93, col: 27, offset: 2972}, + pos: position{line: 96, col: 27, offset: 3146}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 93, col: 33, offset: 2978}, + pos: position{line: 96, col: 33, offset: 3152}, name: "EOF", }, }, @@ -1190,49 +1192,49 @@ var g = &grammar{ }, { name: "UnicodeClassEscape", - pos: position{line: 97, col: 1, offset: 3044}, + pos: position{line: 100, col: 1, offset: 3218}, expr: &seqExpr{ - pos: position{line: 97, col: 22, offset: 3065}, + pos: position{line: 100, col: 22, offset: 3239}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 97, col: 22, offset: 3065}, + pos: position{line: 100, col: 22, offset: 3239}, val: "p", ignoreCase: false, }, &choiceExpr{ - pos: position{line: 98, col: 7, offset: 3078}, + pos: position{line: 101, col: 7, offset: 3252}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 98, col: 7, offset: 3078}, + pos: position{line: 101, col: 7, offset: 3252}, name: "SingleCharUnicodeClass", }, &actionExpr{ - pos: position{line: 99, col: 7, offset: 3107}, + pos: position{line: 102, col: 7, offset: 3281}, run: (*parser).callonUnicodeClassEscape5, expr: &seqExpr{ - pos: position{line: 99, col: 7, offset: 3107}, + pos: position{line: 102, col: 7, offset: 3281}, exprs: []interface{}{ ¬Expr{ - pos: position{line: 99, col: 7, offset: 3107}, + pos: position{line: 102, col: 7, offset: 3281}, expr: &litMatcher{ - pos: position{line: 99, col: 8, offset: 3108}, + pos: position{line: 102, col: 8, offset: 3282}, val: "{", ignoreCase: false, }, }, &choiceExpr{ - pos: position{line: 99, col: 14, offset: 3114}, + pos: position{line: 102, col: 14, offset: 3288}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 99, col: 14, offset: 3114}, + pos: position{line: 102, col: 14, offset: 3288}, name: "SourceChar", }, &ruleRefExpr{ - pos: position{line: 99, col: 27, offset: 3127}, + pos: position{line: 102, col: 27, offset: 3301}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 99, col: 33, offset: 3133}, + pos: position{line: 102, col: 33, offset: 3307}, name: "EOF", }, }, @@ -1241,26 +1243,26 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 100, col: 7, offset: 3204}, + pos: position{line: 103, col: 7, offset: 3378}, run: (*parser).callonUnicodeClassEscape13, expr: &seqExpr{ - pos: position{line: 100, col: 7, offset: 3204}, + pos: position{line: 103, col: 7, offset: 3378}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 100, col: 7, offset: 3204}, + pos: position{line: 103, col: 7, offset: 3378}, val: "{", ignoreCase: false, }, &labeledExpr{ - pos: position{line: 100, col: 11, offset: 3208}, + pos: position{line: 103, col: 11, offset: 3382}, label: "ident", expr: &ruleRefExpr{ - pos: position{line: 100, col: 17, offset: 3214}, + pos: position{line: 103, col: 17, offset: 3388}, name: "IdentifierName", }, }, &litMatcher{ - pos: position{line: 100, col: 32, offset: 3229}, + pos: position{line: 103, col: 32, offset: 3403}, val: "}", ignoreCase: false, }, @@ -1268,34 +1270,34 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 106, col: 7, offset: 3393}, + pos: position{line: 109, col: 7, offset: 3567}, run: (*parser).callonUnicodeClassEscape19, expr: &seqExpr{ - pos: position{line: 106, col: 7, offset: 3393}, + pos: position{line: 109, col: 7, offset: 3567}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 106, col: 7, offset: 3393}, + pos: position{line: 109, col: 7, offset: 3567}, val: "{", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 106, col: 11, offset: 3397}, + pos: position{line: 109, col: 11, offset: 3571}, name: "IdentifierName", }, &choiceExpr{ - pos: position{line: 106, col: 28, offset: 3414}, + pos: position{line: 109, col: 28, offset: 3588}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 106, col: 28, offset: 3414}, + pos: position{line: 109, col: 28, offset: 3588}, val: "]", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 106, col: 34, offset: 3420}, + pos: position{line: 109, col: 34, offset: 3594}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 106, col: 40, offset: 3426}, + pos: position{line: 109, col: 40, offset: 3600}, name: "EOF", }, }, @@ -1310,9 +1312,9 @@ var g = &grammar{ }, { name: "SingleCharUnicodeClass", - pos: position{line: 111, col: 1, offset: 3506}, + pos: position{line: 114, col: 1, offset: 3680}, expr: &charClassMatcher{ - pos: position{line: 111, col: 26, offset: 3531}, + pos: position{line: 114, col: 26, offset: 3705}, val: "[LMNCPZS]", chars: []rune{'L', 'M', 'N', 'C', 'P', 'Z', 'S'}, ignoreCase: false, @@ -1321,39 +1323,39 @@ var g = &grammar{ }, { name: "Number", - pos: position{line: 114, col: 1, offset: 3543}, + pos: position{line: 117, col: 1, offset: 3717}, expr: &actionExpr{ - pos: position{line: 114, col: 10, offset: 3552}, + pos: position{line: 117, col: 10, offset: 3726}, run: (*parser).callonNumber1, expr: &seqExpr{ - pos: position{line: 114, col: 10, offset: 3552}, + pos: position{line: 117, col: 10, offset: 3726}, exprs: []interface{}{ &zeroOrOneExpr{ - pos: position{line: 114, col: 10, offset: 3552}, + pos: position{line: 117, col: 10, offset: 3726}, expr: &litMatcher{ - pos: position{line: 114, col: 10, offset: 3552}, + pos: position{line: 117, col: 10, offset: 3726}, val: "-", ignoreCase: false, }, }, &ruleRefExpr{ - pos: position{line: 114, col: 15, offset: 3557}, + pos: position{line: 117, col: 15, offset: 3731}, name: "Integer", }, &zeroOrOneExpr{ - pos: position{line: 114, col: 23, offset: 3565}, + pos: position{line: 117, col: 23, offset: 3739}, expr: &seqExpr{ - pos: position{line: 114, col: 25, offset: 3567}, + pos: position{line: 117, col: 25, offset: 3741}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 114, col: 25, offset: 3567}, + pos: position{line: 117, col: 25, offset: 3741}, val: ".", ignoreCase: false, }, &oneOrMoreExpr{ - pos: position{line: 114, col: 29, offset: 3571}, + pos: position{line: 117, col: 29, offset: 3745}, expr: &ruleRefExpr{ - pos: position{line: 114, col: 29, offset: 3571}, + pos: position{line: 117, col: 29, offset: 3745}, name: "Digit", }, }, @@ -1366,29 +1368,29 @@ var g = &grammar{ }, { name: "Integer", - pos: position{line: 118, col: 1, offset: 3623}, + pos: position{line: 121, col: 1, offset: 3797}, expr: &choiceExpr{ - pos: position{line: 118, col: 11, offset: 3633}, + pos: position{line: 121, col: 11, offset: 3807}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 118, col: 11, offset: 3633}, + pos: position{line: 121, col: 11, offset: 3807}, val: "0", ignoreCase: false, }, &actionExpr{ - pos: position{line: 118, col: 17, offset: 3639}, + pos: position{line: 121, col: 17, offset: 3813}, run: (*parser).callonInteger3, expr: &seqExpr{ - pos: position{line: 118, col: 17, offset: 3639}, + pos: position{line: 121, col: 17, offset: 3813}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 118, col: 17, offset: 3639}, + pos: position{line: 121, col: 17, offset: 3813}, name: "NonZeroDigit", }, &zeroOrMoreExpr{ - pos: position{line: 118, col: 30, offset: 3652}, + pos: position{line: 121, col: 30, offset: 3826}, expr: &ruleRefExpr{ - pos: position{line: 118, col: 30, offset: 3652}, + pos: position{line: 121, col: 30, offset: 3826}, name: "Digit", }, }, @@ -1400,9 +1402,9 @@ var g = &grammar{ }, { name: "NonZeroDigit", - pos: position{line: 122, col: 1, offset: 3716}, + pos: position{line: 125, col: 1, offset: 3890}, expr: &charClassMatcher{ - pos: position{line: 122, col: 16, offset: 3731}, + pos: position{line: 125, col: 16, offset: 3905}, val: "[1-9]", ranges: []rune{'1', '9'}, ignoreCase: false, @@ -1411,9 +1413,9 @@ var g = &grammar{ }, { name: "Digit", - pos: position{line: 123, col: 1, offset: 3737}, + pos: position{line: 126, col: 1, offset: 3911}, expr: &charClassMatcher{ - pos: position{line: 123, col: 9, offset: 3745}, + pos: position{line: 126, col: 9, offset: 3919}, val: "[0-9]", ranges: []rune{'0', '9'}, ignoreCase: false, @@ -1422,31 +1424,31 @@ var g = &grammar{ }, { name: "LabelBlock", - pos: position{line: 125, col: 1, offset: 3752}, + pos: position{line: 128, col: 1, offset: 3926}, expr: &choiceExpr{ - pos: position{line: 125, col: 14, offset: 3765}, + pos: position{line: 128, col: 14, offset: 3939}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 125, col: 14, offset: 3765}, + pos: position{line: 128, col: 14, offset: 3939}, run: (*parser).callonLabelBlock2, expr: &seqExpr{ - pos: position{line: 125, col: 14, offset: 3765}, + pos: position{line: 128, col: 14, offset: 3939}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 125, col: 14, offset: 3765}, + pos: position{line: 128, col: 14, offset: 3939}, val: "{", ignoreCase: false, }, &labeledExpr{ - pos: position{line: 125, col: 18, offset: 3769}, + pos: position{line: 128, col: 18, offset: 3943}, label: "block", expr: &ruleRefExpr{ - pos: position{line: 125, col: 24, offset: 3775}, + pos: position{line: 128, col: 24, offset: 3949}, name: "LabelMatches", }, }, &litMatcher{ - pos: position{line: 125, col: 37, offset: 3788}, + pos: position{line: 128, col: 37, offset: 3962}, val: "}", ignoreCase: false, }, @@ -1454,22 +1456,22 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 127, col: 5, offset: 3820}, + pos: position{line: 130, col: 5, offset: 3994}, run: (*parser).callonLabelBlock8, expr: &seqExpr{ - pos: position{line: 127, col: 5, offset: 3820}, + pos: position{line: 130, col: 5, offset: 3994}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 127, col: 5, offset: 3820}, + pos: position{line: 130, col: 5, offset: 3994}, val: "{", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 127, col: 9, offset: 3824}, + pos: position{line: 130, col: 9, offset: 3998}, name: "LabelMatches", }, &ruleRefExpr{ - pos: position{line: 127, col: 22, offset: 3837}, + pos: position{line: 130, col: 22, offset: 4011}, name: "EOF", }, }, @@ -1480,12 +1482,12 @@ var g = &grammar{ }, { name: "NanoSecondUnits", - pos: position{line: 131, col: 1, offset: 3902}, + pos: position{line: 134, col: 1, offset: 4076}, expr: &actionExpr{ - pos: position{line: 131, col: 19, offset: 3920}, + pos: position{line: 134, col: 19, offset: 4094}, run: (*parser).callonNanoSecondUnits1, expr: &litMatcher{ - pos: position{line: 131, col: 19, offset: 3920}, + pos: position{line: 134, col: 19, offset: 4094}, val: "ns", ignoreCase: false, }, @@ -1493,25 +1495,25 @@ var g = &grammar{ }, { name: "MicroSecondUnits", - pos: position{line: 136, col: 1, offset: 4025}, + pos: position{line: 139, col: 1, offset: 4199}, expr: &actionExpr{ - pos: position{line: 136, col: 20, offset: 4044}, + pos: position{line: 139, col: 20, offset: 4218}, run: (*parser).callonMicroSecondUnits1, expr: &choiceExpr{ - pos: position{line: 136, col: 21, offset: 4045}, + pos: position{line: 139, col: 21, offset: 4219}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 136, col: 21, offset: 4045}, + pos: position{line: 139, col: 21, offset: 4219}, val: "us", ignoreCase: false, }, &litMatcher{ - pos: position{line: 136, col: 28, offset: 4052}, + pos: position{line: 139, col: 28, offset: 4226}, val: "µs", ignoreCase: false, }, &litMatcher{ - pos: position{line: 136, col: 35, offset: 4060}, + pos: position{line: 139, col: 35, offset: 4234}, val: "μs", ignoreCase: false, }, @@ -1521,12 +1523,12 @@ var g = &grammar{ }, { name: "MilliSecondUnits", - pos: position{line: 141, col: 1, offset: 4169}, + pos: position{line: 144, col: 1, offset: 4343}, expr: &actionExpr{ - pos: position{line: 141, col: 20, offset: 4188}, + pos: position{line: 144, col: 20, offset: 4362}, run: (*parser).callonMilliSecondUnits1, expr: &litMatcher{ - pos: position{line: 141, col: 20, offset: 4188}, + pos: position{line: 144, col: 20, offset: 4362}, val: "ms", ignoreCase: false, }, @@ -1534,12 +1536,12 @@ var g = &grammar{ }, { name: "SecondUnits", - pos: position{line: 146, col: 1, offset: 4295}, + pos: position{line: 149, col: 1, offset: 4469}, expr: &actionExpr{ - pos: position{line: 146, col: 15, offset: 4309}, + pos: position{line: 149, col: 15, offset: 4483}, run: (*parser).callonSecondUnits1, expr: &litMatcher{ - pos: position{line: 146, col: 15, offset: 4309}, + pos: position{line: 149, col: 15, offset: 4483}, val: "s", ignoreCase: false, }, @@ -1547,12 +1549,12 @@ var g = &grammar{ }, { name: "MinuteUnits", - pos: position{line: 150, col: 1, offset: 4346}, + pos: position{line: 153, col: 1, offset: 4520}, expr: &actionExpr{ - pos: position{line: 150, col: 15, offset: 4360}, + pos: position{line: 153, col: 15, offset: 4534}, run: (*parser).callonMinuteUnits1, expr: &litMatcher{ - pos: position{line: 150, col: 15, offset: 4360}, + pos: position{line: 153, col: 15, offset: 4534}, val: "m", ignoreCase: false, }, @@ -1560,12 +1562,12 @@ var g = &grammar{ }, { name: "HourUnits", - pos: position{line: 154, col: 1, offset: 4397}, + pos: position{line: 157, col: 1, offset: 4571}, expr: &actionExpr{ - pos: position{line: 154, col: 13, offset: 4409}, + pos: position{line: 157, col: 13, offset: 4583}, run: (*parser).callonHourUnits1, expr: &litMatcher{ - pos: position{line: 154, col: 13, offset: 4409}, + pos: position{line: 157, col: 13, offset: 4583}, val: "h", ignoreCase: false, }, @@ -1573,12 +1575,12 @@ var g = &grammar{ }, { name: "DayUnits", - pos: position{line: 158, col: 1, offset: 4444}, + pos: position{line: 161, col: 1, offset: 4618}, expr: &actionExpr{ - pos: position{line: 158, col: 12, offset: 4455}, + pos: position{line: 161, col: 12, offset: 4629}, run: (*parser).callonDayUnits1, expr: &litMatcher{ - pos: position{line: 158, col: 12, offset: 4455}, + pos: position{line: 161, col: 12, offset: 4629}, val: "d", ignoreCase: false, }, @@ -1586,12 +1588,12 @@ var g = &grammar{ }, { name: "WeekUnits", - pos: position{line: 164, col: 1, offset: 4663}, + pos: position{line: 167, col: 1, offset: 4837}, expr: &actionExpr{ - pos: position{line: 164, col: 13, offset: 4675}, + pos: position{line: 167, col: 13, offset: 4849}, run: (*parser).callonWeekUnits1, expr: &litMatcher{ - pos: position{line: 164, col: 13, offset: 4675}, + pos: position{line: 167, col: 13, offset: 4849}, val: "w", ignoreCase: false, }, @@ -1599,12 +1601,12 @@ var g = &grammar{ }, { name: "YearUnits", - pos: position{line: 170, col: 1, offset: 4886}, + pos: position{line: 173, col: 1, offset: 5060}, expr: &actionExpr{ - pos: position{line: 170, col: 13, offset: 4898}, + pos: position{line: 173, col: 13, offset: 5072}, run: (*parser).callonYearUnits1, expr: &litMatcher{ - pos: position{line: 170, col: 13, offset: 4898}, + pos: position{line: 173, col: 13, offset: 5072}, val: "y", ignoreCase: false, }, @@ -1612,44 +1614,44 @@ var g = &grammar{ }, { name: "DurationUnits", - pos: position{line: 176, col: 1, offset: 5095}, + pos: position{line: 179, col: 1, offset: 5269}, expr: &choiceExpr{ - pos: position{line: 176, col: 18, offset: 5112}, + pos: position{line: 179, col: 18, offset: 5286}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 176, col: 18, offset: 5112}, + pos: position{line: 179, col: 18, offset: 5286}, name: "NanoSecondUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 36, offset: 5130}, + pos: position{line: 179, col: 36, offset: 5304}, name: "MicroSecondUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 55, offset: 5149}, + pos: position{line: 179, col: 55, offset: 5323}, name: "MilliSecondUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 74, offset: 5168}, + pos: position{line: 179, col: 74, offset: 5342}, name: "SecondUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 88, offset: 5182}, + pos: position{line: 179, col: 88, offset: 5356}, name: "MinuteUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 102, offset: 5196}, + pos: position{line: 179, col: 102, offset: 5370}, name: "HourUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 114, offset: 5208}, + pos: position{line: 179, col: 114, offset: 5382}, name: "DayUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 125, offset: 5219}, + pos: position{line: 179, col: 125, offset: 5393}, name: "WeekUnits", }, &ruleRefExpr{ - pos: position{line: 176, col: 137, offset: 5231}, + pos: position{line: 179, col: 137, offset: 5405}, name: "YearUnits", }, }, @@ -1657,26 +1659,26 @@ var g = &grammar{ }, { name: "Duration", - pos: position{line: 178, col: 1, offset: 5243}, + pos: position{line: 181, col: 1, offset: 5417}, expr: &actionExpr{ - pos: position{line: 178, col: 12, offset: 5254}, + pos: position{line: 181, col: 12, offset: 5428}, run: (*parser).callonDuration1, expr: &seqExpr{ - pos: position{line: 178, col: 12, offset: 5254}, + pos: position{line: 181, col: 12, offset: 5428}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 178, col: 12, offset: 5254}, + pos: position{line: 181, col: 12, offset: 5428}, label: "dur", expr: &ruleRefExpr{ - pos: position{line: 178, col: 16, offset: 5258}, + pos: position{line: 181, col: 16, offset: 5432}, name: "Integer", }, }, &labeledExpr{ - pos: position{line: 178, col: 24, offset: 5266}, + pos: position{line: 181, col: 24, offset: 5440}, label: "units", expr: &ruleRefExpr{ - pos: position{line: 178, col: 30, offset: 5272}, + pos: position{line: 181, col: 30, offset: 5446}, name: "DurationUnits", }, }, @@ -1686,82 +1688,82 @@ var g = &grammar{ }, { name: "Operators", - pos: position{line: 184, col: 1, offset: 5421}, + pos: position{line: 187, col: 1, offset: 5595}, expr: &choiceExpr{ - pos: position{line: 184, col: 13, offset: 5433}, + pos: position{line: 187, col: 13, offset: 5607}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 184, col: 13, offset: 5433}, + pos: position{line: 187, col: 13, offset: 5607}, val: "-", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 19, offset: 5439}, + pos: position{line: 187, col: 19, offset: 5613}, val: "+", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 25, offset: 5445}, + pos: position{line: 187, col: 25, offset: 5619}, val: "*", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 31, offset: 5451}, + pos: position{line: 187, col: 31, offset: 5625}, val: "%", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 37, offset: 5457}, + pos: position{line: 187, col: 37, offset: 5631}, val: "/", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 43, offset: 5463}, + pos: position{line: 187, col: 43, offset: 5637}, val: "==", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 50, offset: 5470}, + pos: position{line: 187, col: 50, offset: 5644}, val: "!=", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 57, offset: 5477}, + pos: position{line: 187, col: 57, offset: 5651}, val: "<=", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 64, offset: 5484}, + pos: position{line: 187, col: 64, offset: 5658}, val: "<", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 70, offset: 5490}, + pos: position{line: 187, col: 70, offset: 5664}, val: ">=", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 77, offset: 5497}, + pos: position{line: 187, col: 77, offset: 5671}, val: ">", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 83, offset: 5503}, + pos: position{line: 187, col: 83, offset: 5677}, val: "=~", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 90, offset: 5510}, + pos: position{line: 187, col: 90, offset: 5684}, val: "!~", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 97, offset: 5517}, + pos: position{line: 187, col: 97, offset: 5691}, val: "^", ignoreCase: false, }, &litMatcher{ - pos: position{line: 184, col: 103, offset: 5523}, + pos: position{line: 187, col: 103, offset: 5697}, val: "=", ignoreCase: false, }, @@ -1770,42 +1772,42 @@ var g = &grammar{ }, { name: "LabelOperators", - pos: position{line: 186, col: 1, offset: 5528}, + pos: position{line: 189, col: 1, offset: 5702}, expr: &choiceExpr{ - pos: position{line: 186, col: 19, offset: 5546}, + pos: position{line: 189, col: 19, offset: 5720}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 186, col: 19, offset: 5546}, + pos: position{line: 189, col: 19, offset: 5720}, run: (*parser).callonLabelOperators2, expr: &litMatcher{ - pos: position{line: 186, col: 19, offset: 5546}, + pos: position{line: 189, col: 19, offset: 5720}, val: "!=", ignoreCase: false, }, }, &actionExpr{ - pos: position{line: 188, col: 5, offset: 5582}, + pos: position{line: 191, col: 5, offset: 5756}, run: (*parser).callonLabelOperators4, expr: &litMatcher{ - pos: position{line: 188, col: 5, offset: 5582}, + pos: position{line: 191, col: 5, offset: 5756}, val: "=~", ignoreCase: false, }, }, &actionExpr{ - pos: position{line: 190, col: 5, offset: 5620}, + pos: position{line: 193, col: 5, offset: 5794}, run: (*parser).callonLabelOperators6, expr: &litMatcher{ - pos: position{line: 190, col: 5, offset: 5620}, + pos: position{line: 193, col: 5, offset: 5794}, val: "!~", ignoreCase: false, }, }, &actionExpr{ - pos: position{line: 192, col: 5, offset: 5660}, + pos: position{line: 195, col: 5, offset: 5834}, run: (*parser).callonLabelOperators8, expr: &litMatcher{ - pos: position{line: 192, col: 5, offset: 5660}, + pos: position{line: 195, col: 5, offset: 5834}, val: "=", ignoreCase: false, }, @@ -1815,57 +1817,57 @@ var g = &grammar{ }, { name: "Label", - pos: position{line: 196, col: 1, offset: 5691}, + pos: position{line: 199, col: 1, offset: 5865}, expr: &ruleRefExpr{ - pos: position{line: 196, col: 9, offset: 5699}, + pos: position{line: 199, col: 9, offset: 5873}, name: "Identifier", }, }, { name: "LabelMatch", - pos: position{line: 197, col: 1, offset: 5710}, + pos: position{line: 200, col: 1, offset: 5884}, expr: &actionExpr{ - pos: position{line: 197, col: 14, offset: 5723}, + pos: position{line: 200, col: 14, offset: 5897}, run: (*parser).callonLabelMatch1, expr: &seqExpr{ - pos: position{line: 197, col: 14, offset: 5723}, + pos: position{line: 200, col: 14, offset: 5897}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 197, col: 14, offset: 5723}, + pos: position{line: 200, col: 14, offset: 5897}, label: "label", expr: &ruleRefExpr{ - pos: position{line: 197, col: 20, offset: 5729}, + pos: position{line: 200, col: 20, offset: 5903}, name: "Label", }, }, &ruleRefExpr{ - pos: position{line: 197, col: 26, offset: 5735}, + pos: position{line: 200, col: 26, offset: 5909}, name: "__", }, &labeledExpr{ - pos: position{line: 197, col: 29, offset: 5738}, + pos: position{line: 200, col: 29, offset: 5912}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 197, col: 32, offset: 5741}, + pos: position{line: 200, col: 32, offset: 5915}, name: "LabelOperators", }, }, &ruleRefExpr{ - pos: position{line: 197, col: 47, offset: 5756}, + pos: position{line: 200, col: 47, offset: 5930}, name: "__", }, &labeledExpr{ - pos: position{line: 197, col: 50, offset: 5759}, + pos: position{line: 200, col: 50, offset: 5933}, label: "match", expr: &choiceExpr{ - pos: position{line: 197, col: 58, offset: 5767}, + pos: position{line: 200, col: 58, offset: 5941}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 197, col: 58, offset: 5767}, + pos: position{line: 200, col: 58, offset: 5941}, name: "StringLiteral", }, &ruleRefExpr{ - pos: position{line: 197, col: 74, offset: 5783}, + pos: position{line: 200, col: 74, offset: 5957}, name: "Number", }, }, @@ -1877,32 +1879,32 @@ var g = &grammar{ }, { name: "LabelMatches", - pos: position{line: 200, col: 1, offset: 5873}, + pos: position{line: 203, col: 1, offset: 6047}, expr: &actionExpr{ - pos: position{line: 200, col: 16, offset: 5888}, + pos: position{line: 203, col: 16, offset: 6062}, run: (*parser).callonLabelMatches1, expr: &seqExpr{ - pos: position{line: 200, col: 16, offset: 5888}, + pos: position{line: 203, col: 16, offset: 6062}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 200, col: 16, offset: 5888}, + pos: position{line: 203, col: 16, offset: 6062}, label: "first", expr: &ruleRefExpr{ - pos: position{line: 200, col: 22, offset: 5894}, + pos: position{line: 203, col: 22, offset: 6068}, name: "LabelMatch", }, }, &ruleRefExpr{ - pos: position{line: 200, col: 33, offset: 5905}, + pos: position{line: 203, col: 33, offset: 6079}, name: "__", }, &labeledExpr{ - pos: position{line: 200, col: 36, offset: 5908}, + pos: position{line: 203, col: 36, offset: 6082}, label: "rest", expr: &zeroOrMoreExpr{ - pos: position{line: 200, col: 41, offset: 5913}, + pos: position{line: 203, col: 41, offset: 6087}, expr: &ruleRefExpr{ - pos: position{line: 200, col: 41, offset: 5913}, + pos: position{line: 203, col: 41, offset: 6087}, name: "LabelMatchesRest", }, }, @@ -1913,27 +1915,27 @@ var g = &grammar{ }, { name: "LabelMatchesRest", - pos: position{line: 204, col: 1, offset: 5992}, + pos: position{line: 207, col: 1, offset: 6166}, expr: &actionExpr{ - pos: position{line: 204, col: 21, offset: 6012}, + pos: position{line: 207, col: 21, offset: 6186}, run: (*parser).callonLabelMatchesRest1, expr: &seqExpr{ - pos: position{line: 204, col: 21, offset: 6012}, + pos: position{line: 207, col: 21, offset: 6186}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 204, col: 21, offset: 6012}, + pos: position{line: 207, col: 21, offset: 6186}, val: ",", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 204, col: 25, offset: 6016}, + pos: position{line: 207, col: 25, offset: 6190}, name: "__", }, &labeledExpr{ - pos: position{line: 204, col: 28, offset: 6019}, + pos: position{line: 207, col: 28, offset: 6193}, label: "match", expr: &ruleRefExpr{ - pos: position{line: 204, col: 34, offset: 6025}, + pos: position{line: 207, col: 34, offset: 6199}, name: "LabelMatch", }, }, @@ -1943,27 +1945,27 @@ var g = &grammar{ }, { name: "LabelList", - pos: position{line: 208, col: 1, offset: 6063}, + pos: position{line: 211, col: 1, offset: 6237}, expr: &choiceExpr{ - pos: position{line: 208, col: 13, offset: 6075}, + pos: position{line: 211, col: 13, offset: 6249}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 208, col: 13, offset: 6075}, + pos: position{line: 211, col: 13, offset: 6249}, run: (*parser).callonLabelList2, expr: &seqExpr{ - pos: position{line: 208, col: 14, offset: 6076}, + pos: position{line: 211, col: 14, offset: 6250}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 208, col: 14, offset: 6076}, + pos: position{line: 211, col: 14, offset: 6250}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 208, col: 18, offset: 6080}, + pos: position{line: 211, col: 18, offset: 6254}, name: "__", }, &litMatcher{ - pos: position{line: 208, col: 21, offset: 6083}, + pos: position{line: 211, col: 21, offset: 6257}, val: ")", ignoreCase: false, }, @@ -1971,49 +1973,49 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 210, col: 6, offset: 6115}, + pos: position{line: 213, col: 6, offset: 6289}, run: (*parser).callonLabelList7, expr: &seqExpr{ - pos: position{line: 210, col: 6, offset: 6115}, + pos: position{line: 213, col: 6, offset: 6289}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 210, col: 6, offset: 6115}, + pos: position{line: 213, col: 6, offset: 6289}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 210, col: 10, offset: 6119}, + pos: position{line: 213, col: 10, offset: 6293}, name: "__", }, &labeledExpr{ - pos: position{line: 210, col: 13, offset: 6122}, + pos: position{line: 213, col: 13, offset: 6296}, label: "label", expr: &ruleRefExpr{ - pos: position{line: 210, col: 19, offset: 6128}, + pos: position{line: 213, col: 19, offset: 6302}, name: "Label", }, }, &ruleRefExpr{ - pos: position{line: 210, col: 25, offset: 6134}, + pos: position{line: 213, col: 25, offset: 6308}, name: "__", }, &labeledExpr{ - pos: position{line: 210, col: 28, offset: 6137}, + pos: position{line: 213, col: 28, offset: 6311}, label: "rest", expr: &zeroOrMoreExpr{ - pos: position{line: 210, col: 33, offset: 6142}, + pos: position{line: 213, col: 33, offset: 6316}, expr: &ruleRefExpr{ - pos: position{line: 210, col: 33, offset: 6142}, + pos: position{line: 213, col: 33, offset: 6316}, name: "LabelListRest", }, }, }, &ruleRefExpr{ - pos: position{line: 210, col: 48, offset: 6157}, + pos: position{line: 213, col: 48, offset: 6331}, name: "__", }, &litMatcher{ - pos: position{line: 210, col: 51, offset: 6160}, + pos: position{line: 213, col: 51, offset: 6334}, val: ")", ignoreCase: false, }, @@ -2025,27 +2027,27 @@ var g = &grammar{ }, { name: "LabelListRest", - pos: position{line: 214, col: 1, offset: 6226}, + pos: position{line: 217, col: 1, offset: 6400}, expr: &actionExpr{ - pos: position{line: 214, col: 18, offset: 6243}, + pos: position{line: 217, col: 18, offset: 6417}, run: (*parser).callonLabelListRest1, expr: &seqExpr{ - pos: position{line: 214, col: 18, offset: 6243}, + pos: position{line: 217, col: 18, offset: 6417}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 214, col: 18, offset: 6243}, + pos: position{line: 217, col: 18, offset: 6417}, val: ",", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 214, col: 22, offset: 6247}, + pos: position{line: 217, col: 22, offset: 6421}, name: "__", }, &labeledExpr{ - pos: position{line: 214, col: 25, offset: 6250}, + pos: position{line: 217, col: 25, offset: 6424}, label: "label", expr: &ruleRefExpr{ - pos: position{line: 214, col: 31, offset: 6256}, + pos: position{line: 217, col: 31, offset: 6430}, name: "Label", }, }, @@ -2055,62 +2057,62 @@ var g = &grammar{ }, { name: "VectorSelector", - pos: position{line: 218, col: 1, offset: 6289}, + pos: position{line: 221, col: 1, offset: 6463}, expr: &actionExpr{ - pos: position{line: 218, col: 18, offset: 6306}, + pos: position{line: 221, col: 18, offset: 6480}, run: (*parser).callonVectorSelector1, expr: &seqExpr{ - pos: position{line: 218, col: 18, offset: 6306}, + pos: position{line: 221, col: 18, offset: 6480}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 218, col: 18, offset: 6306}, + pos: position{line: 221, col: 18, offset: 6480}, label: "metric", expr: &ruleRefExpr{ - pos: position{line: 218, col: 25, offset: 6313}, + pos: position{line: 221, col: 25, offset: 6487}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 218, col: 36, offset: 6324}, + pos: position{line: 221, col: 36, offset: 6498}, name: "__", }, &labeledExpr{ - pos: position{line: 218, col: 40, offset: 6328}, + pos: position{line: 221, col: 40, offset: 6502}, label: "block", expr: &zeroOrOneExpr{ - pos: position{line: 218, col: 46, offset: 6334}, + pos: position{line: 221, col: 46, offset: 6508}, expr: &ruleRefExpr{ - pos: position{line: 218, col: 46, offset: 6334}, + pos: position{line: 221, col: 46, offset: 6508}, name: "LabelBlock", }, }, }, &ruleRefExpr{ - pos: position{line: 218, col: 58, offset: 6346}, + pos: position{line: 221, col: 58, offset: 6520}, name: "__", }, &labeledExpr{ - pos: position{line: 218, col: 61, offset: 6349}, + pos: position{line: 221, col: 61, offset: 6523}, label: "rng", expr: &zeroOrOneExpr{ - pos: position{line: 218, col: 65, offset: 6353}, + pos: position{line: 221, col: 65, offset: 6527}, expr: &ruleRefExpr{ - pos: position{line: 218, col: 65, offset: 6353}, + pos: position{line: 221, col: 65, offset: 6527}, name: "Range", }, }, }, &ruleRefExpr{ - pos: position{line: 218, col: 72, offset: 6360}, + pos: position{line: 221, col: 72, offset: 6534}, name: "__", }, &labeledExpr{ - pos: position{line: 218, col: 75, offset: 6363}, + pos: position{line: 221, col: 75, offset: 6537}, label: "offset", expr: &zeroOrOneExpr{ - pos: position{line: 218, col: 82, offset: 6370}, + pos: position{line: 221, col: 82, offset: 6544}, expr: &ruleRefExpr{ - pos: position{line: 218, col: 82, offset: 6370}, + pos: position{line: 221, col: 82, offset: 6544}, name: "Offset", }, }, @@ -2121,36 +2123,36 @@ var g = &grammar{ }, { name: "Range", - pos: position{line: 222, col: 1, offset: 6448}, + pos: position{line: 225, col: 1, offset: 6622}, expr: &actionExpr{ - pos: position{line: 222, col: 9, offset: 6456}, + pos: position{line: 225, col: 9, offset: 6630}, run: (*parser).callonRange1, expr: &seqExpr{ - pos: position{line: 222, col: 9, offset: 6456}, + pos: position{line: 225, col: 9, offset: 6630}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 222, col: 9, offset: 6456}, + pos: position{line: 225, col: 9, offset: 6630}, val: "[", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 222, col: 13, offset: 6460}, + pos: position{line: 225, col: 13, offset: 6634}, name: "__", }, &labeledExpr{ - pos: position{line: 222, col: 16, offset: 6463}, + pos: position{line: 225, col: 16, offset: 6637}, label: "dur", expr: &ruleRefExpr{ - pos: position{line: 222, col: 20, offset: 6467}, + pos: position{line: 225, col: 20, offset: 6641}, name: "Duration", }, }, &ruleRefExpr{ - pos: position{line: 222, col: 29, offset: 6476}, + pos: position{line: 225, col: 29, offset: 6650}, name: "__", }, &litMatcher{ - pos: position{line: 222, col: 32, offset: 6479}, + pos: position{line: 225, col: 32, offset: 6653}, val: "]", ignoreCase: false, }, @@ -2160,27 +2162,27 @@ var g = &grammar{ }, { name: "Offset", - pos: position{line: 226, col: 1, offset: 6508}, + pos: position{line: 229, col: 1, offset: 6682}, expr: &actionExpr{ - pos: position{line: 226, col: 10, offset: 6517}, + pos: position{line: 229, col: 10, offset: 6691}, run: (*parser).callonOffset1, expr: &seqExpr{ - pos: position{line: 226, col: 10, offset: 6517}, + pos: position{line: 229, col: 10, offset: 6691}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 226, col: 10, offset: 6517}, + pos: position{line: 229, col: 10, offset: 6691}, val: "offset", ignoreCase: true, }, &ruleRefExpr{ - pos: position{line: 226, col: 20, offset: 6527}, + pos: position{line: 229, col: 20, offset: 6701}, name: "__", }, &labeledExpr{ - pos: position{line: 226, col: 23, offset: 6530}, + pos: position{line: 229, col: 23, offset: 6704}, label: "dur", expr: &ruleRefExpr{ - pos: position{line: 226, col: 27, offset: 6534}, + pos: position{line: 229, col: 27, offset: 6708}, name: "Duration", }, }, @@ -2190,12 +2192,12 @@ var g = &grammar{ }, { name: "CountValueOperator", - pos: position{line: 230, col: 1, offset: 6568}, + pos: position{line: 233, col: 1, offset: 6742}, expr: &actionExpr{ - pos: position{line: 230, col: 22, offset: 6589}, + pos: position{line: 233, col: 22, offset: 6763}, run: (*parser).callonCountValueOperator1, expr: &litMatcher{ - pos: position{line: 230, col: 22, offset: 6589}, + pos: position{line: 233, col: 22, offset: 6763}, val: "count_values", ignoreCase: true, }, @@ -2203,28 +2205,28 @@ var g = &grammar{ }, { name: "BinaryAggregateOperators", - pos: position{line: 236, col: 1, offset: 6674}, + pos: position{line: 239, col: 1, offset: 6848}, expr: &actionExpr{ - pos: position{line: 236, col: 29, offset: 6702}, + pos: position{line: 239, col: 29, offset: 6876}, run: (*parser).callonBinaryAggregateOperators1, expr: &labeledExpr{ - pos: position{line: 236, col: 29, offset: 6702}, + pos: position{line: 239, col: 29, offset: 6876}, label: "op", expr: &choiceExpr{ - pos: position{line: 236, col: 33, offset: 6706}, + pos: position{line: 239, col: 33, offset: 6880}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 236, col: 33, offset: 6706}, + pos: position{line: 239, col: 33, offset: 6880}, val: "topk", ignoreCase: true, }, &litMatcher{ - pos: position{line: 236, col: 43, offset: 6716}, + pos: position{line: 239, col: 43, offset: 6890}, val: "bottomk", ignoreCase: true, }, &litMatcher{ - pos: position{line: 236, col: 56, offset: 6729}, + pos: position{line: 239, col: 56, offset: 6903}, val: "quantile", ignoreCase: true, }, @@ -2235,48 +2237,48 @@ var g = &grammar{ }, { name: "UnaryAggregateOperators", - pos: position{line: 242, col: 1, offset: 6831}, + pos: position{line: 245, col: 1, offset: 7005}, expr: &actionExpr{ - pos: position{line: 242, col: 27, offset: 6857}, + pos: position{line: 245, col: 27, offset: 7031}, run: (*parser).callonUnaryAggregateOperators1, expr: &labeledExpr{ - pos: position{line: 242, col: 27, offset: 6857}, + pos: position{line: 245, col: 27, offset: 7031}, label: "op", expr: &choiceExpr{ - pos: position{line: 242, col: 31, offset: 6861}, + pos: position{line: 245, col: 31, offset: 7035}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 242, col: 31, offset: 6861}, + pos: position{line: 245, col: 31, offset: 7035}, val: "sum", ignoreCase: true, }, &litMatcher{ - pos: position{line: 242, col: 40, offset: 6870}, + pos: position{line: 245, col: 40, offset: 7044}, val: "min", ignoreCase: true, }, &litMatcher{ - pos: position{line: 242, col: 49, offset: 6879}, + pos: position{line: 245, col: 49, offset: 7053}, val: "max", ignoreCase: true, }, &litMatcher{ - pos: position{line: 242, col: 58, offset: 6888}, + pos: position{line: 245, col: 58, offset: 7062}, val: "avg", ignoreCase: true, }, &litMatcher{ - pos: position{line: 242, col: 67, offset: 6897}, + pos: position{line: 245, col: 67, offset: 7071}, val: "stddev", ignoreCase: true, }, &litMatcher{ - pos: position{line: 242, col: 79, offset: 6909}, + pos: position{line: 245, col: 79, offset: 7083}, val: "stdvar", ignoreCase: true, }, &litMatcher{ - pos: position{line: 242, col: 91, offset: 6921}, + pos: position{line: 245, col: 91, offset: 7095}, val: "count", ignoreCase: true, }, @@ -2287,20 +2289,20 @@ var g = &grammar{ }, { name: "AggregateOperators", - pos: position{line: 248, col: 1, offset: 7020}, + pos: position{line: 251, col: 1, offset: 7194}, expr: &choiceExpr{ - pos: position{line: 248, col: 22, offset: 7041}, + pos: position{line: 251, col: 22, offset: 7215}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 248, col: 22, offset: 7041}, + pos: position{line: 251, col: 22, offset: 7215}, name: "CountValueOperator", }, &ruleRefExpr{ - pos: position{line: 248, col: 43, offset: 7062}, + pos: position{line: 251, col: 43, offset: 7236}, name: "BinaryAggregateOperators", }, &ruleRefExpr{ - pos: position{line: 248, col: 70, offset: 7089}, + pos: position{line: 251, col: 70, offset: 7263}, name: "UnaryAggregateOperators", }, }, @@ -2308,41 +2310,41 @@ var g = &grammar{ }, { name: "AggregateBy", - pos: position{line: 250, col: 1, offset: 7114}, + pos: position{line: 253, col: 1, offset: 7288}, expr: &actionExpr{ - pos: position{line: 250, col: 15, offset: 7128}, + pos: position{line: 253, col: 15, offset: 7302}, run: (*parser).callonAggregateBy1, expr: &seqExpr{ - pos: position{line: 250, col: 15, offset: 7128}, + pos: position{line: 253, col: 15, offset: 7302}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 250, col: 15, offset: 7128}, + pos: position{line: 253, col: 15, offset: 7302}, val: "by", ignoreCase: true, }, &ruleRefExpr{ - pos: position{line: 250, col: 21, offset: 7134}, + pos: position{line: 253, col: 21, offset: 7308}, name: "__", }, &labeledExpr{ - pos: position{line: 250, col: 24, offset: 7137}, + pos: position{line: 253, col: 24, offset: 7311}, label: "labels", expr: &ruleRefExpr{ - pos: position{line: 250, col: 31, offset: 7144}, + pos: position{line: 253, col: 31, offset: 7318}, name: "LabelList", }, }, &ruleRefExpr{ - pos: position{line: 250, col: 41, offset: 7154}, + pos: position{line: 253, col: 41, offset: 7328}, name: "__", }, &labeledExpr{ - pos: position{line: 250, col: 44, offset: 7157}, + pos: position{line: 253, col: 44, offset: 7331}, label: "keep", expr: &zeroOrOneExpr{ - pos: position{line: 250, col: 49, offset: 7162}, + pos: position{line: 253, col: 49, offset: 7336}, expr: &litMatcher{ - pos: position{line: 250, col: 49, offset: 7162}, + pos: position{line: 253, col: 49, offset: 7336}, val: "keep_common", ignoreCase: true, }, @@ -2354,27 +2356,27 @@ var g = &grammar{ }, { name: "AggregateWithout", - pos: position{line: 257, col: 1, offset: 7275}, + pos: position{line: 260, col: 1, offset: 7449}, expr: &actionExpr{ - pos: position{line: 257, col: 20, offset: 7294}, + pos: position{line: 260, col: 20, offset: 7468}, run: (*parser).callonAggregateWithout1, expr: &seqExpr{ - pos: position{line: 257, col: 20, offset: 7294}, + pos: position{line: 260, col: 20, offset: 7468}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 257, col: 20, offset: 7294}, + pos: position{line: 260, col: 20, offset: 7468}, val: "without", ignoreCase: true, }, &ruleRefExpr{ - pos: position{line: 257, col: 31, offset: 7305}, + pos: position{line: 260, col: 31, offset: 7479}, name: "__", }, &labeledExpr{ - pos: position{line: 257, col: 34, offset: 7308}, + pos: position{line: 260, col: 34, offset: 7482}, label: "labels", expr: &ruleRefExpr{ - pos: position{line: 257, col: 41, offset: 7315}, + pos: position{line: 260, col: 41, offset: 7489}, name: "LabelList", }, }, @@ -2384,16 +2386,16 @@ var g = &grammar{ }, { name: "AggregateGroup", - pos: position{line: 264, col: 1, offset: 7427}, + pos: position{line: 267, col: 1, offset: 7601}, expr: &choiceExpr{ - pos: position{line: 264, col: 18, offset: 7444}, + pos: position{line: 267, col: 18, offset: 7618}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 264, col: 18, offset: 7444}, + pos: position{line: 267, col: 18, offset: 7618}, name: "AggregateBy", }, &ruleRefExpr{ - pos: position{line: 264, col: 32, offset: 7458}, + pos: position{line: 267, col: 32, offset: 7632}, name: "AggregateWithout", }, }, @@ -2401,86 +2403,86 @@ var g = &grammar{ }, { name: "AggregateExpression", - pos: position{line: 266, col: 1, offset: 7476}, + pos: position{line: 269, col: 1, offset: 7650}, expr: &choiceExpr{ - pos: position{line: 267, col: 1, offset: 7498}, + pos: position{line: 270, col: 1, offset: 7672}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 267, col: 1, offset: 7498}, + pos: position{line: 270, col: 1, offset: 7672}, run: (*parser).callonAggregateExpression2, expr: &seqExpr{ - pos: position{line: 267, col: 1, offset: 7498}, + pos: position{line: 270, col: 1, offset: 7672}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 267, col: 1, offset: 7498}, + pos: position{line: 270, col: 1, offset: 7672}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 267, col: 4, offset: 7501}, + pos: position{line: 270, col: 4, offset: 7675}, name: "CountValueOperator", }, }, &ruleRefExpr{ - pos: position{line: 267, col: 24, offset: 7521}, + pos: position{line: 270, col: 24, offset: 7695}, name: "__", }, &litMatcher{ - pos: position{line: 267, col: 27, offset: 7524}, + pos: position{line: 270, col: 27, offset: 7698}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 267, col: 31, offset: 7528}, + pos: position{line: 270, col: 31, offset: 7702}, name: "__", }, &labeledExpr{ - pos: position{line: 267, col: 34, offset: 7531}, + pos: position{line: 270, col: 34, offset: 7705}, label: "param", expr: &ruleRefExpr{ - pos: position{line: 267, col: 40, offset: 7537}, + pos: position{line: 270, col: 40, offset: 7711}, name: "StringLiteral", }, }, &ruleRefExpr{ - pos: position{line: 267, col: 54, offset: 7551}, + pos: position{line: 270, col: 54, offset: 7725}, name: "__", }, &litMatcher{ - pos: position{line: 267, col: 57, offset: 7554}, + pos: position{line: 270, col: 57, offset: 7728}, val: ",", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 267, col: 61, offset: 7558}, + pos: position{line: 270, col: 61, offset: 7732}, name: "__", }, &labeledExpr{ - pos: position{line: 267, col: 64, offset: 7561}, + pos: position{line: 270, col: 64, offset: 7735}, label: "vector", expr: &ruleRefExpr{ - pos: position{line: 267, col: 71, offset: 7568}, + pos: position{line: 270, col: 71, offset: 7742}, name: "VectorSelector", }, }, &ruleRefExpr{ - pos: position{line: 267, col: 86, offset: 7583}, + pos: position{line: 270, col: 86, offset: 7757}, name: "__", }, &litMatcher{ - pos: position{line: 267, col: 89, offset: 7586}, + pos: position{line: 270, col: 89, offset: 7760}, val: ")", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 267, col: 93, offset: 7590}, + pos: position{line: 270, col: 93, offset: 7764}, name: "__", }, &labeledExpr{ - pos: position{line: 267, col: 96, offset: 7593}, + pos: position{line: 270, col: 96, offset: 7767}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 267, col: 102, offset: 7599}, + pos: position{line: 270, col: 102, offset: 7773}, expr: &ruleRefExpr{ - pos: position{line: 267, col: 102, offset: 7599}, + pos: position{line: 270, col: 102, offset: 7773}, name: "AggregateGroup", }, }, @@ -2489,82 +2491,82 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 273, col: 1, offset: 7747}, + pos: position{line: 276, col: 1, offset: 7921}, run: (*parser).callonAggregateExpression22, expr: &seqExpr{ - pos: position{line: 273, col: 1, offset: 7747}, + pos: position{line: 276, col: 1, offset: 7921}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 273, col: 1, offset: 7747}, + pos: position{line: 276, col: 1, offset: 7921}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 273, col: 4, offset: 7750}, + pos: position{line: 276, col: 4, offset: 7924}, name: "CountValueOperator", }, }, &ruleRefExpr{ - pos: position{line: 273, col: 24, offset: 7770}, + pos: position{line: 276, col: 24, offset: 7944}, name: "__", }, &labeledExpr{ - pos: position{line: 273, col: 27, offset: 7773}, + pos: position{line: 276, col: 27, offset: 7947}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 273, col: 33, offset: 7779}, + pos: position{line: 276, col: 33, offset: 7953}, expr: &ruleRefExpr{ - pos: position{line: 273, col: 33, offset: 7779}, + pos: position{line: 276, col: 33, offset: 7953}, name: "AggregateGroup", }, }, }, &ruleRefExpr{ - pos: position{line: 273, col: 49, offset: 7795}, + pos: position{line: 276, col: 49, offset: 7969}, name: "__", }, &litMatcher{ - pos: position{line: 273, col: 52, offset: 7798}, + pos: position{line: 276, col: 52, offset: 7972}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 273, col: 56, offset: 7802}, + pos: position{line: 276, col: 56, offset: 7976}, name: "__", }, &labeledExpr{ - pos: position{line: 273, col: 59, offset: 7805}, + pos: position{line: 276, col: 59, offset: 7979}, label: "param", expr: &ruleRefExpr{ - pos: position{line: 273, col: 65, offset: 7811}, + pos: position{line: 276, col: 65, offset: 7985}, name: "StringLiteral", }, }, &ruleRefExpr{ - pos: position{line: 273, col: 79, offset: 7825}, + pos: position{line: 276, col: 79, offset: 7999}, name: "__", }, &litMatcher{ - pos: position{line: 273, col: 82, offset: 7828}, + pos: position{line: 276, col: 82, offset: 8002}, val: ",", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 273, col: 86, offset: 7832}, + pos: position{line: 276, col: 86, offset: 8006}, name: "__", }, &labeledExpr{ - pos: position{line: 273, col: 89, offset: 7835}, + pos: position{line: 276, col: 89, offset: 8009}, label: "vector", expr: &ruleRefExpr{ - pos: position{line: 273, col: 96, offset: 7842}, + pos: position{line: 276, col: 96, offset: 8016}, name: "VectorSelector", }, }, &ruleRefExpr{ - pos: position{line: 273, col: 111, offset: 7857}, + pos: position{line: 276, col: 111, offset: 8031}, name: "__", }, &litMatcher{ - pos: position{line: 273, col: 114, offset: 7860}, + pos: position{line: 276, col: 114, offset: 8034}, val: ")", ignoreCase: false, }, @@ -2572,81 +2574,81 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 279, col: 1, offset: 7996}, + pos: position{line: 282, col: 1, offset: 8170}, run: (*parser).callonAggregateExpression42, expr: &seqExpr{ - pos: position{line: 279, col: 1, offset: 7996}, + pos: position{line: 282, col: 1, offset: 8170}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 279, col: 1, offset: 7996}, + pos: position{line: 282, col: 1, offset: 8170}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 279, col: 4, offset: 7999}, + pos: position{line: 282, col: 4, offset: 8173}, name: "BinaryAggregateOperators", }, }, &ruleRefExpr{ - pos: position{line: 279, col: 30, offset: 8025}, + pos: position{line: 282, col: 30, offset: 8199}, name: "__", }, &litMatcher{ - pos: position{line: 279, col: 33, offset: 8028}, + pos: position{line: 282, col: 33, offset: 8202}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 279, col: 37, offset: 8032}, + pos: position{line: 282, col: 37, offset: 8206}, name: "__", }, &labeledExpr{ - pos: position{line: 279, col: 41, offset: 8036}, + pos: position{line: 282, col: 41, offset: 8210}, label: "param", expr: &ruleRefExpr{ - pos: position{line: 279, col: 47, offset: 8042}, + pos: position{line: 282, col: 47, offset: 8216}, name: "Number", }, }, &ruleRefExpr{ - pos: position{line: 279, col: 54, offset: 8049}, + pos: position{line: 282, col: 54, offset: 8223}, name: "__", }, &litMatcher{ - pos: position{line: 279, col: 57, offset: 8052}, + pos: position{line: 282, col: 57, offset: 8226}, val: ",", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 279, col: 61, offset: 8056}, + pos: position{line: 282, col: 61, offset: 8230}, name: "__", }, &labeledExpr{ - pos: position{line: 279, col: 64, offset: 8059}, + pos: position{line: 282, col: 64, offset: 8233}, label: "vector", expr: &ruleRefExpr{ - pos: position{line: 279, col: 71, offset: 8066}, + pos: position{line: 282, col: 71, offset: 8240}, name: "VectorSelector", }, }, &ruleRefExpr{ - pos: position{line: 279, col: 86, offset: 8081}, + pos: position{line: 282, col: 86, offset: 8255}, name: "__", }, &litMatcher{ - pos: position{line: 279, col: 89, offset: 8084}, + pos: position{line: 282, col: 89, offset: 8258}, val: ")", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 279, col: 93, offset: 8088}, + pos: position{line: 282, col: 93, offset: 8262}, name: "__", }, &labeledExpr{ - pos: position{line: 279, col: 96, offset: 8091}, + pos: position{line: 282, col: 96, offset: 8265}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 279, col: 102, offset: 8097}, + pos: position{line: 282, col: 102, offset: 8271}, expr: &ruleRefExpr{ - pos: position{line: 279, col: 102, offset: 8097}, + pos: position{line: 282, col: 102, offset: 8271}, name: "AggregateGroup", }, }, @@ -2655,82 +2657,82 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 285, col: 1, offset: 8238}, + pos: position{line: 288, col: 1, offset: 8412}, run: (*parser).callonAggregateExpression62, expr: &seqExpr{ - pos: position{line: 285, col: 1, offset: 8238}, + pos: position{line: 288, col: 1, offset: 8412}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 285, col: 1, offset: 8238}, + pos: position{line: 288, col: 1, offset: 8412}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 285, col: 4, offset: 8241}, + pos: position{line: 288, col: 4, offset: 8415}, name: "BinaryAggregateOperators", }, }, &ruleRefExpr{ - pos: position{line: 285, col: 30, offset: 8267}, + pos: position{line: 288, col: 30, offset: 8441}, name: "__", }, &labeledExpr{ - pos: position{line: 285, col: 33, offset: 8270}, + pos: position{line: 288, col: 33, offset: 8444}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 285, col: 39, offset: 8276}, + pos: position{line: 288, col: 39, offset: 8450}, expr: &ruleRefExpr{ - pos: position{line: 285, col: 39, offset: 8276}, + pos: position{line: 288, col: 39, offset: 8450}, name: "AggregateGroup", }, }, }, &ruleRefExpr{ - pos: position{line: 285, col: 55, offset: 8292}, + pos: position{line: 288, col: 55, offset: 8466}, name: "__", }, &litMatcher{ - pos: position{line: 285, col: 58, offset: 8295}, + pos: position{line: 288, col: 58, offset: 8469}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 285, col: 62, offset: 8299}, + pos: position{line: 288, col: 62, offset: 8473}, name: "__", }, &labeledExpr{ - pos: position{line: 285, col: 66, offset: 8303}, + pos: position{line: 288, col: 66, offset: 8477}, label: "param", expr: &ruleRefExpr{ - pos: position{line: 285, col: 72, offset: 8309}, + pos: position{line: 288, col: 72, offset: 8483}, name: "Number", }, }, &ruleRefExpr{ - pos: position{line: 285, col: 79, offset: 8316}, + pos: position{line: 288, col: 79, offset: 8490}, name: "__", }, &litMatcher{ - pos: position{line: 285, col: 82, offset: 8319}, + pos: position{line: 288, col: 82, offset: 8493}, val: ",", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 285, col: 86, offset: 8323}, + pos: position{line: 288, col: 86, offset: 8497}, name: "__", }, &labeledExpr{ - pos: position{line: 285, col: 89, offset: 8326}, + pos: position{line: 288, col: 89, offset: 8500}, label: "vector", expr: &ruleRefExpr{ - pos: position{line: 285, col: 96, offset: 8333}, + pos: position{line: 288, col: 96, offset: 8507}, name: "VectorSelector", }, }, &ruleRefExpr{ - pos: position{line: 285, col: 111, offset: 8348}, + pos: position{line: 288, col: 111, offset: 8522}, name: "__", }, &litMatcher{ - pos: position{line: 285, col: 114, offset: 8351}, + pos: position{line: 288, col: 114, offset: 8525}, val: ")", ignoreCase: false, }, @@ -2738,60 +2740,60 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 291, col: 1, offset: 8480}, + pos: position{line: 294, col: 1, offset: 8654}, run: (*parser).callonAggregateExpression82, expr: &seqExpr{ - pos: position{line: 291, col: 1, offset: 8480}, + pos: position{line: 294, col: 1, offset: 8654}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 291, col: 1, offset: 8480}, + pos: position{line: 294, col: 1, offset: 8654}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 291, col: 4, offset: 8483}, + pos: position{line: 294, col: 4, offset: 8657}, name: "UnaryAggregateOperators", }, }, &ruleRefExpr{ - pos: position{line: 291, col: 29, offset: 8508}, + pos: position{line: 294, col: 29, offset: 8682}, name: "__", }, &litMatcher{ - pos: position{line: 291, col: 32, offset: 8511}, + pos: position{line: 294, col: 32, offset: 8685}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 291, col: 36, offset: 8515}, + pos: position{line: 294, col: 36, offset: 8689}, name: "__", }, &labeledExpr{ - pos: position{line: 291, col: 39, offset: 8518}, + pos: position{line: 294, col: 39, offset: 8692}, label: "vector", expr: &ruleRefExpr{ - pos: position{line: 291, col: 46, offset: 8525}, + pos: position{line: 294, col: 46, offset: 8699}, name: "VectorSelector", }, }, &ruleRefExpr{ - pos: position{line: 291, col: 61, offset: 8540}, + pos: position{line: 294, col: 61, offset: 8714}, name: "__", }, &litMatcher{ - pos: position{line: 291, col: 64, offset: 8543}, + pos: position{line: 294, col: 64, offset: 8717}, val: ")", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 291, col: 68, offset: 8547}, + pos: position{line: 294, col: 68, offset: 8721}, name: "__", }, &labeledExpr{ - pos: position{line: 291, col: 71, offset: 8550}, + pos: position{line: 294, col: 71, offset: 8724}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 291, col: 77, offset: 8556}, + pos: position{line: 294, col: 77, offset: 8730}, expr: &ruleRefExpr{ - pos: position{line: 291, col: 77, offset: 8556}, + pos: position{line: 294, col: 77, offset: 8730}, name: "AggregateGroup", }, }, @@ -2800,61 +2802,61 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 295, col: 1, offset: 8649}, + pos: position{line: 298, col: 1, offset: 8823}, run: (*parser).callonAggregateExpression97, expr: &seqExpr{ - pos: position{line: 295, col: 1, offset: 8649}, + pos: position{line: 298, col: 1, offset: 8823}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 295, col: 1, offset: 8649}, + pos: position{line: 298, col: 1, offset: 8823}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 295, col: 4, offset: 8652}, + pos: position{line: 298, col: 4, offset: 8826}, name: "UnaryAggregateOperators", }, }, &ruleRefExpr{ - pos: position{line: 295, col: 29, offset: 8677}, + pos: position{line: 298, col: 29, offset: 8851}, name: "__", }, &labeledExpr{ - pos: position{line: 295, col: 32, offset: 8680}, + pos: position{line: 298, col: 32, offset: 8854}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 295, col: 38, offset: 8686}, + pos: position{line: 298, col: 38, offset: 8860}, expr: &ruleRefExpr{ - pos: position{line: 295, col: 38, offset: 8686}, + pos: position{line: 298, col: 38, offset: 8860}, name: "AggregateGroup", }, }, }, &ruleRefExpr{ - pos: position{line: 295, col: 54, offset: 8702}, + pos: position{line: 298, col: 54, offset: 8876}, name: "__", }, &litMatcher{ - pos: position{line: 295, col: 57, offset: 8705}, + pos: position{line: 298, col: 57, offset: 8879}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 295, col: 61, offset: 8709}, + pos: position{line: 298, col: 61, offset: 8883}, name: "__", }, &labeledExpr{ - pos: position{line: 295, col: 64, offset: 8712}, + pos: position{line: 298, col: 64, offset: 8886}, label: "vector", expr: &ruleRefExpr{ - pos: position{line: 295, col: 71, offset: 8719}, + pos: position{line: 298, col: 71, offset: 8893}, name: "VectorSelector", }, }, &ruleRefExpr{ - pos: position{line: 295, col: 86, offset: 8734}, + pos: position{line: 298, col: 86, offset: 8908}, name: "__", }, &litMatcher{ - pos: position{line: 295, col: 89, offset: 8737}, + pos: position{line: 298, col: 89, offset: 8911}, val: ")", ignoreCase: false, }, @@ -2866,22 +2868,22 @@ var g = &grammar{ }, { name: "__", - pos: position{line: 299, col: 1, offset: 8817}, + pos: position{line: 302, col: 1, offset: 8991}, expr: &zeroOrMoreExpr{ - pos: position{line: 299, col: 6, offset: 8822}, + pos: position{line: 302, col: 6, offset: 8996}, expr: &choiceExpr{ - pos: position{line: 299, col: 8, offset: 8824}, + pos: position{line: 302, col: 8, offset: 8998}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 299, col: 8, offset: 8824}, + pos: position{line: 302, col: 8, offset: 8998}, name: "Whitespace", }, &ruleRefExpr{ - pos: position{line: 299, col: 21, offset: 8837}, + pos: position{line: 302, col: 21, offset: 9011}, name: "EOL", }, &ruleRefExpr{ - pos: position{line: 299, col: 27, offset: 8843}, + pos: position{line: 302, col: 27, offset: 9017}, name: "Comment", }, }, @@ -2890,20 +2892,20 @@ var g = &grammar{ }, { name: "_", - pos: position{line: 300, col: 1, offset: 8854}, + pos: position{line: 303, col: 1, offset: 9028}, expr: &zeroOrMoreExpr{ - pos: position{line: 300, col: 5, offset: 8858}, + pos: position{line: 303, col: 5, offset: 9032}, expr: &ruleRefExpr{ - pos: position{line: 300, col: 5, offset: 8858}, + pos: position{line: 303, col: 5, offset: 9032}, name: "Whitespace", }, }, }, { name: "Whitespace", - pos: position{line: 302, col: 1, offset: 8871}, + pos: position{line: 305, col: 1, offset: 9045}, expr: &charClassMatcher{ - pos: position{line: 302, col: 14, offset: 8884}, + pos: position{line: 305, col: 14, offset: 9058}, val: "[ \\t\\r]", chars: []rune{' ', '\t', '\r'}, ignoreCase: false, @@ -2912,62 +2914,62 @@ var g = &grammar{ }, { name: "EOL", - pos: position{line: 303, col: 1, offset: 8892}, + pos: position{line: 306, col: 1, offset: 9066}, expr: &litMatcher{ - pos: position{line: 303, col: 7, offset: 8898}, + pos: position{line: 306, col: 7, offset: 9072}, val: "\n", ignoreCase: false, }, }, { name: "EOS", - pos: position{line: 304, col: 1, offset: 8903}, + pos: position{line: 307, col: 1, offset: 9077}, expr: &choiceExpr{ - pos: position{line: 304, col: 7, offset: 8909}, + pos: position{line: 307, col: 7, offset: 9083}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 304, col: 7, offset: 8909}, + pos: position{line: 307, col: 7, offset: 9083}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 304, col: 7, offset: 8909}, + pos: position{line: 307, col: 7, offset: 9083}, name: "__", }, &litMatcher{ - pos: position{line: 304, col: 10, offset: 8912}, + pos: position{line: 307, col: 10, offset: 9086}, val: ";", ignoreCase: false, }, }, }, &seqExpr{ - pos: position{line: 304, col: 16, offset: 8918}, + pos: position{line: 307, col: 16, offset: 9092}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 304, col: 16, offset: 8918}, + pos: position{line: 307, col: 16, offset: 9092}, name: "_", }, &zeroOrOneExpr{ - pos: position{line: 304, col: 18, offset: 8920}, + pos: position{line: 307, col: 18, offset: 9094}, expr: &ruleRefExpr{ - pos: position{line: 304, col: 18, offset: 8920}, + pos: position{line: 307, col: 18, offset: 9094}, name: "SingleLineComment", }, }, &ruleRefExpr{ - pos: position{line: 304, col: 37, offset: 8939}, + pos: position{line: 307, col: 37, offset: 9113}, name: "EOL", }, }, }, &seqExpr{ - pos: position{line: 304, col: 43, offset: 8945}, + pos: position{line: 307, col: 43, offset: 9119}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 304, col: 43, offset: 8945}, + pos: position{line: 307, col: 43, offset: 9119}, name: "__", }, &ruleRefExpr{ - pos: position{line: 304, col: 46, offset: 8948}, + pos: position{line: 307, col: 46, offset: 9122}, name: "EOF", }, }, @@ -2977,11 +2979,11 @@ var g = &grammar{ }, { name: "EOF", - pos: position{line: 306, col: 1, offset: 8953}, + pos: position{line: 309, col: 1, offset: 9127}, expr: ¬Expr{ - pos: position{line: 306, col: 7, offset: 8959}, + pos: position{line: 309, col: 7, offset: 9133}, expr: &anyMatcher{ - line: 306, col: 8, offset: 8960, + line: 309, col: 8, offset: 9134, }, }, }, diff --git a/query/promql/promql.peg b/query/promql/promql.peg index 77ffe0ec1f..02f30eef01 100644 --- a/query/promql/promql.peg +++ b/query/promql/promql.peg @@ -1,6 +1,9 @@ { +// Package promql implements a promql parser to build flux query specifications from promql. package promql +// DO NOT EDIT: This file is auto generated by the pigeon PEG parser generator. + var reservedWords = map[string]bool{} } diff --git a/query/semantic/graph.go b/query/semantic/graph.go index 466de2205a..64d57cf509 100644 --- a/query/semantic/graph.go +++ b/query/semantic/graph.go @@ -1367,11 +1367,22 @@ func analyzeRegexpLiteral(lit *ast.RegexpLiteral, declarations DeclarationScope) }, nil } func toDuration(lit ast.Duration) (time.Duration, error) { + // TODO: This is temporary code until we have proper duration type that takes different months, DST, etc into account var dur time.Duration var err error mag := lit.Magnitude unit := lit.Unit + switch unit { + case "y": + mag *= 12 + unit = "mo" + fallthrough + case "mo": + const weeksPerMonth = 365.25 / 12 / 7 + mag = int64(float64(mag) * weeksPerMonth) + unit = "w" + fallthrough case "w": mag *= 7 unit = "d" @@ -1381,6 +1392,7 @@ func toDuration(lit ast.Duration) (time.Duration, error) { unit = "h" fallthrough default: + // ParseDuration will handle h, m, s, ms, us, ns. dur, err = time.ParseDuration(strconv.FormatInt(mag, 10) + unit) } return dur, err