Parser.y 531 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
Prog : .in SetNames .out SetFuncCalls

SetNames : SetName
    | SetName, SetNames
    
VarNames : VarName
    | VarName, VarNames

SetSetFuncCalls : SetFuncCall    {[SetFuncCall]}
    | SetFuncCall; SetFuncCalls   {SetFuncCall:SetFuncCalls}

SetFuncCall : filter '['SetName']' (Func)
mnay1u19's avatar
mnay1u19 committed
13
--filter[A](\r -> r[2] /= "")
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Func : \'('VarNames')' -> Expr
\(r) -> r[1] == "hello"

Expr : Expr == Expr
    | Expr'['Nat']'
    | String
    | VarName
    | Record
    | true
    | false


Record : '['Exprs']'
Exprs : Expr
mnay1u19's avatar
mnay1u19 committed
28
29
      | Expr','Exprs