NOTE: the latest version is 4.0.0
Elastic Expression
Expr can help you to define kind of syntax like And, Or, ....
An Expr Type represent all AST's branchs
Expr
type AST = And AST AST | Or AST AST | Exclude AST | Exact String | Word String | Prefix String
In our case, to follow the production rules AST will be Expr
AST
type Expr = And Expr Expr | Exact String | Exclude Expr | Or Expr Expr | Prefix String | Word String
An
ExprType represent all AST's branchsIn our case, to follow the production rules
ASTwill beExpr