prometheus/promql
Tobias Guggenmos c229ed17e2 promql: Implement yyLexer interface (#6370)
This is the first step towards a generated lexer as described in #6256.

It adds methods to the parser struct, that make it implement the yyLexer interface required by a yacc generated parser, as described here: https://godoc.org/golang.org/x/tools/cmd/goyacc .

The yyLexer interface is implemented by the parser struct instead of the lexer struct for the following reasons:

* Both parsers have a lookahead that the lexer does not know about. This solution makes it possible to synchronize these lookaheads when switching parsers.
* The routines to handle parser errors are not accessible to the lexer.

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2019-11-26 13:28:36 +00:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
testdata Fix scalar-vector comparisons (#5454) 2019-04-11 10:42:16 +01:00
ast.go PromQL: Reduce Code duplication in AST traversion (#6362) 2019-11-25 11:41:59 +00:00
bench_test.go Refactor testutil.NewStorage into a new package 2019-08-08 19:43:04 -06:00
engine.go fix word 'substracting' to 'subtracting' (#5822) 2019-08-01 15:44:38 +01:00
engine_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
functions.go refine error handling in prometheus (#5388) 2019-03-26 00:01:12 +01:00
functions_test.go Refactor testutil.NewStorage into a new package 2019-08-08 19:43:04 -06:00
fuzz.go fix fuzz targets (#5851) 2019-08-12 20:47:57 +02:00
lex.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
lex_test.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
parse.go promql: Implement yyLexer interface (#6370) 2019-11-26 13:28:36 +00:00
parse_test.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
printer.go fix subquery with offset conversion to string (#6373) 2019-11-26 06:45:51 +00:00
printer_test.go fix subquery with offset conversion to string (#6373) 2019-11-26 06:45:51 +00:00
promql_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
quantile.go func name ref correct "qauntile" -> "quantile" (#5834) 2019-08-06 06:11:16 +01:00
query_logger.go Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
query_logger_test.go Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
test.go Third correction (#6012) 2019-09-20 10:48:56 +01:00
test_test.go Fix some spelling issues (#5361) 2019-03-14 14:38:54 +00:00
value.go fix word 'seriess' to 'series' (#5828) 2019-08-04 16:52:51 +01:00