-rw-r--r-- | expr-parse.lua | 15 |
diff --git a/expr-parse.lua b/expr-parse.lua index 20129478..85e770e9 100644 --- a/expr-parse.lua +++ b/expr-parse.lua @@ -135,6 +135,16 @@ local function schema(lexer, actions, accept_enums) return actions.schema(x, y, conds, enums) end +local function schema_multivar(lexer, actions) + local y = expr_list(lexer, actions, 0) + expect(lexer, '~') + local x = expr_list(lexer, actions) + local enums = enums(lexer, actions) + local conds = conditions(lexer, actions) + expect(lexer, 'EOF') + return actions.schema(x, y, conds, enums) +end + local expr_parse = {} function expr_parse.schema(formula, actions, accept_enums) @@ -142,6 +152,11 @@ function expr_parse.schema(formula, actions, accept_enums) return schema(l, actions, accept_enums) end +function expr_parse.schema_multivar(formula, actions) + local l = expr_lexer.new(formula) + return schema_multivar(l, actions) +end + function expr_parse.expr(formula, actions) local l = expr_lexer.new(formula) return expr(l, actions, 0) |