prometheus/web/ui/lezer-promql
Augustin Husson 34d5c8dfaf restart prometheus ui
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2024-02-21 11:58:29 +01:00
..
src restart prometheus ui 2024-02-21 11:58:29 +01:00
test restart prometheus ui 2024-02-21 11:58:29 +01:00
.gitignore restart prometheus ui 2024-02-21 11:58:29 +01:00
.npmignore restart prometheus ui 2024-02-21 11:58:29 +01:00
build.sh restart prometheus ui 2024-02-21 11:58:29 +01:00
generate-types.sh restart prometheus ui 2024-02-21 11:58:29 +01:00
jest.config.cjs restart prometheus ui 2024-02-21 11:58:29 +01:00
package.json restart prometheus ui 2024-02-21 11:58:29 +01:00
README.md restart prometheus ui 2024-02-21 11:58:29 +01:00
rollup.config.js restart prometheus ui 2024-02-21 11:58:29 +01:00

lezer-promql

Overview

This is a PromQL grammar for the lezer parser system. It is inspired by the initial grammar coming from Prometheus written in yacc.

This library is stable but doesn't provide any guideline of how to use it as it has been integrated into codemirror-promql. If you want to use this library, you perhaps want to actually use @prometheus-io/codemirror-promql instead.

Note: This library is a lezer-based implementation of the authoritative, goyacc-based PromQL grammar. Any changes to the authoritative grammar need to be reflected in this package as well.

Installation

This package is available as an npm package:

npm install --save @prometheus-io/lezer-promql

Note: you will have to manually install the lezer dependencies as it is a peer dependency to this package.

npm install --save @lezer/lr @lezer/highlight

Development

Building

npm i
npm run build

Testing

npm run test

License

The code is licensed under an Apache 2.0 license.