From 41d24756da4fc592f48cc60aa72b4a1042fd9e3d Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Thu, 22 May 2025 08:20:41 +0200 Subject: updated readme --- res/syntax.ebnf | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'res/syntax.ebnf') 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 -- cgit v1.2.3