You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prometheus/web/ui/module/lezer-promql
Julien Pivotto d0a3d44a45
Release 2.37.0
2 years ago
..
src Upgrade codemirror and lezer to the latest version (#10841) 2 years ago
test UI: stabilize dependencies and environment (#10517) 3 years ago
.gitignore enable ui module publication (#10876) 2 years ago
.npmignore enable ui module publication (#10876) 2 years ago
README.md Add readme for lezer-promql and update codemirror-promql readme (#10875) 2 years ago
build.sh UI: stabilize dependencies and environment (#10517) 3 years ago
generate-types.sh UI: stabilize dependencies and environment (#10517) 3 years ago
jest.config.cjs UI: stabilize dependencies and environment (#10517) 3 years ago
package.json Release 2.37.0 2 years ago
rollup.config.js UI: stabilize dependencies and environment (#10517) 3 years ago

README.md

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.