promql-parser
promql-parser copied to clipboard
PromQL Rust parser
[**MetricQL**](https://docs.victoriametrics.com/keyconcepts/#metricsql) is an enhanced extension of **PromQL**, And is backward-compatible with **PromQL**. Currently, **MetricQL** already supports using the "**or**" operator to connect label filters as follows: For example, the following...
@yuanbohan Hi Yuanbo, I want to support or filter but even if I add something in promql.y I get the error "invalid promql query", I am new to yacc and...
Source: https://github.com/openobserve/openobserve/blob/96a08ef31c7651306ee5c3d251d882fdce993506/Cargo.toml#L116
Use String in terms of easy coding for now. [Chumsky](https://github.com/zesterer/chumsky) can be a good choice. This should include at least: - Parser - Lexer
## Reference - [calc_manual_lex](https://github.com/softdevteam/grmtools/blob/f68c63f40d9c0a76ca2ed4a06db8c954052451a9/lrlex/examples/calc_manual_lex/src/main.rs#L54) - [grmtools parsing idioms](https://softdevteam.github.io/grmtools/latest_release/book/parsing_idioms.html?highlight=string#grmtools-parsing-idioms)
- https://github.com/prometheus/prometheus/issues/11170 - https://github.com/prometheus/prometheus/issues/11218
In fact the unescape should be handled on lex. But the current impl of lex only verifies if the escape sequence is valid, instead of really escaping them.
This might not be an issue at all, but to record different behaviour between our parser and prometheus default. For this query statement, the output of prometheus 3.0 `parse_query` of...