luxmsbi-lpe
LPE parser
Two grammars
Standard LPE grammar
basically follows LISP notation but written with C-like function call semantics. Example:
Dot (
) separated function calls will compose to left thread
call:
Semicolon (
) separated function calls will compose to
call:
Arrays notation
will result in
call:
=>
Logical LPE grammar
Some functions will have special syntax for their arguments. Currently only
syntax is supported.
For example, it is used for
function, which has single logical expression argument with 3 operations:
,
,
.
Logical operations may use any LPE expression as argumants. Brackets are preserved with call to obvious
function.
[ "where", [ "or", [ "()", [ "and", "a", [ "or", "b", "c" ] ] ], [ "or", [ "()", [ "<", [ "avg", "d" ], [ "avg", "e" ] ] ], [ "()", [ "and", [ "=", "e", 20 ], [ "parse_kv", [ "->", "locations", "src_id" ] ] ] ] ] ]]
Note, that dot notation in arguments
is currently interpreted as
call.
Run from cli
Tests
Run tests:
Описание
Lux Path Expressions Lexer and Parser implementation in Javascript
Языки
JavaScript