public static void main string args

This commit is contained in:
laurenz 2024-04-24 22:02:26 +02:00
parent d9182e369d
commit deeea62737

View File

@ -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;