# @bpmn-io/lezer-feel

> Lezer-based FEEL grammar

Latest version **3.0.1** (published 2026-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bpmn-io/lezer-feel
pnpm add @bpmn-io/lezer-feel
yarn add @bpmn-io/lezer-feel
bun add @bpmn-io/lezer-feel
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2026-06-05 |
| First published | 2025-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 20.12.0 |
| Dependencies | 3 |
| Unpacked size | 126.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nico Rehwaldt |
| Maintainers | bpmn-io-admin, nikku, barmac, philippfromme, maxtru, skaiir-camunda, vsgoulart, barinali, jarekdanielak, ev-camunda, alekseymanetov |

## Links

- npm: https://www.npmjs.com/package/@bpmn-io/lezer-feel
- Repository: https://github.com/bpmn-io/lezer-feel
- Homepage: https://github.com/bpmn-io/lezer-feel#readme
- Issues: https://github.com/bpmn-io/lezer-feel/issues
- npm.io page: https://npm.io/package/@bpmn-io/lezer-feel

## Dependencies (3)

- [min-dash](https://npm.io/package/min-dash.md) ^5.0.0
- [@lezer/lr](https://npm.io/package/@lezer/lr.md) ^1.4.10
- [@lezer/highlight](https://npm.io/package/@lezer/highlight.md) ^1.2.3

## Recent versions

- 3.0.1 (latest) — 2026-06-05
- 3.0.0 — 2026-06-05
- 2.5.0 — 2026-06-05
- 2.4.0 — 2026-04-20
- 2.3.2 — 2026-04-13
- 2.3.1 — 2026-03-16
- 2.3.0 — 2026-02-11
- 2.2.1 — 2026-02-10
- 2.1.0 — 2026-01-24
- 2.0.0 — 2025-12-05
- 1.9.0 — 2025-08-21

## README

# @bpmn-io/lezer-feel

[![CI](https://github.com/bpmn-io/lezer-feel/actions/workflows/CI.yml/badge.svg)](https://github.com/bpmn-io/lezer-feel/actions/workflows/CI.yml)

> [!NOTE]
> This is a fork of [lezer-feel](https://github.com/nikku/lezer-feel)

This is a [DMN](https://www.omg.org/spec/DMN/) FEEL grammar for the
[Lezer](https://lezer.codemirror.net/) parser system.


## Usage

Parse FEEL to a [`Tree`](https://lezer.codemirror.net/docs/ref/#common.Tree):

```javascript
import {
  parser
} from '@bpmn-io/lezer-feel';

// parse <Expression>
parser.parse('foo > 1');
```


#### Choose Dialect

Use `Expression` or `UnaryTests` as a [top node](https://lezer.codemirror.net/docs/ref/#lr.LRParser.topNode) depending on which FEEL dialect you intend to parse:

```javascript
import {
  parser
} from '@bpmn-io/lezer-feel';

const unaryParser = parser.configure({
  top: 'UnaryTests'
})

// parse <UnaryTests>
unaryParser.parse('> 100');
```


#### Provide Context

Override the default [context tracker](https://lezer.codemirror.net/docs/ref/#lr.ParserConfig.contextTracker) to enable context sensitive parsing based on inputs:

```javascript
import {
  parser,
  trackVariables
} from '@bpmn-io/lezer-feel';

const contextTracker = trackVariables({
  'if foo then bar': 1
});

const contextualParser = parser.configure({
  contextTracker
});

// recognizes <if foo then bar> as a <VariableName>
contextualParser.parse('if foo then bar');
```


## Development

```shell
# build and test
npm run all

# test
npm test

# test (debug)
LOG=fparse:dbg,fparse,context,parse npm test
```

Prefix [individual](./test/expressions.txt) [tests](./test/unary-tests.txt) with a `*` to test them in focus mode:

```markdown
# *ArithmeticExpression (error)

...
```


## Related

* [feelin](https://github.com/bpmn-io/feelin) - Interpreter for the FEEL language
* [feel-playground](https://github.com/nikku/feel-playground) - A visual playground to learn the FEEL language
* [lang-feel](https://github.com/nikku/lang-feel) - Integration into a [CodeMirror](https://codemirror.net/) editor

## License

The code is licensed under an MIT license.

---
_Source: https://npm.io/package/@bpmn-io/lezer-feel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
