github.com/luxms/luxmsbi-lpe ↗
Lux Path Expressions Lexer and Parser implementation in Javascript
Open this visualization on its own page →
Contributors
4
Lines of Code
529
From
2019-02-11
To
2021-02-10
About luxms/luxmsbi-lpe
Luxms LPE is a JavaScript implementation of a lexer and parser for Lux Path Expressions, a domain-specific language that combines LISP-style composition with C-like function call syntax. The parser supports two grammar modes: a standard LPE grammar that uses dot notation for left-threaded function composition and semicolon notation for sequential operations, and a logical grammar that provides special syntax for logical expressions used in functions like `where` with support for `and`, `or`, and `not` operations.
The language uses familiar notation for arrays and expressions, parsing constructs like `f1(1,b,c).f2(d,e,f)` into nested array representations suitable for further processing. The implementation includes both lexical analysis and full parsing capabilities, with CLI support for testing expressions directly from the command line. The project comes with comprehensive test coverage, including dedicated SQL test cases, making it suitable for developers building query languages or expression evaluation systems that need a more human-readable syntax layer.