aboutsummaryrefslogtreecommitdiff
path: root/res/syntax.ebnf
diff options
context:
space:
mode:
Diffstat (limited to 'res/syntax.ebnf')
-rw-r--r--res/syntax.ebnf12
1 files changed, 12 insertions, 0 deletions
diff --git a/res/syntax.ebnf b/res/syntax.ebnf
index 85990c5..af6b5ea 100644
--- a/res/syntax.ebnf
+++ b/res/syntax.ebnf
@@ -44,4 +44,16 @@ statement = "skip"
| ( "if" , boolean_expression , "then" , statement , "else" , statement , "end" )
| ( "while" , boolean_expression , "do" , statement , "end" )
| ( "var" , variable , ":=", arithmetic_expression , "in" , statement , "end" )
+ | proc_decl
+ | proc_call
+ ;
+
+arg_list = variable
+ | ( arg_list , "," , variable )
+ ;
+
+proc_decl = "procedure" , identifier , "(" , arg_list , ";" , arg_list , ")" , "begin" , statement , "end"
+ ;
+
+proc_call = identifier , "(" , arg_list , ";" , arg_list , ")"
; \ No newline at end of file