From deeea62737696c75897f321cbf637101dc00dec3 Mon Sep 17 00:00:00 2001 From: laurenz Date: Wed, 24 Apr 2024 22:02:26 +0200 Subject: [PATCH] public static void main string args --- src/main/antlr/Decaf.g4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/antlr/Decaf.g4 b/src/main/antlr/Decaf.g4 index 388690b..fee030c 100644 --- a/src/main/antlr/Decaf.g4 +++ b/src/main/antlr/Decaf.g4 @@ -8,8 +8,8 @@ var : type id ';' | type id '=' expr';'; returntype : type | VOID; type : INT | BOOL | CHAR; -meth : PUBLIC? 'static'? returntype id '(' params? ')' block | mainmeth; -mainmeth : PUBLIC 'static' 'void' 'main' '(' params? ')' block; +meth : PUBLIC? returntype id '(' params? ')' block | mainmeth; +mainmeth : PUBLIC 'static' 'void' 'main' '(' 'String[] args' ')' block; params : param (',' param)*; param : type id;