diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-22 08:20:41 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-22 08:20:41 +0200 |
commit | 41d24756da4fc592f48cc60aa72b4a1042fd9e3d (patch) | |
tree | 93b90e319755b79208062133532c0ec850ea2bcd /res | |
parent | 06142bdac01ba7a8040361a53a5afb15023e9248 (diff) | |
download | imp-41d24756da4fc592f48cc60aa72b4a1042fd9e3d.tar.gz imp-41d24756da4fc592f48cc60aa72b4a1042fd9e3d.zip |
updated readme
Diffstat (limited to 'res')
-rw-r--r-- | res/syntax.ebnf | 12 |
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 |