Skip to content
Snippets Groups Projects
Commit 29f6828b authored by pm3g19's avatar pm3g19
Browse files

Created grammar for simple version of the language

parent 1d408e81
No related branches found
No related tags found
No related merge requests found
--tokens
.in
.out
\ No newline at end of file
Parser.y 0 → 100644
Prog : .in SetNames .out SetFuncCalls
SetNames : SetName
| SetName, SetNames
VarNames : VarName
| VarName, VarNames
SetSetFuncCalls : SetFuncCall {[SetFuncCall]}
| SetFuncCall; SetFuncCalls {SetFuncCall:SetFuncCalls}
SetFuncCall : filter '['SetName']' (Func)
Func : \'('VarNames')' -> Expr
\(r) -> r[1] == "hello"
Expr : Expr == Expr
| Expr'['Nat']'
| String
| VarName
| Record
| true
| false
Record : '['Exprs']'
Exprs : Expr
| Expr','Exprs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment