1%The grammar files are saved in grammars.pl
    2
    3class_statement(Data,Class_name,constructor(Params1,Body1)) -->
    4        namespace(Data,Data1,Class_name,Indent),
    5        %put this at the beginning of each statement without a semicolon
    6        constructor_(Data,[
    7			function_name(Data,Class_name,Class_name,Params1),
    8			parameters(Data1,Params1),
    9			statements(Data1,_,Body1),
   10			Indent
   11		]).
   12
   13class_statement(Data,_,static_method(Name1,Type1,Params1,Body1)) -->
   14        namespace(Data,Data1,Name1,Indent),
   15        %put this at the beginning of each statement without a semicolon
   16        static_method_(Data, [
   17			function_name(Data,Type1,Name1,Params1),
   18			type(Data,Type1),
   19			parameters(Data1,Params1),
   20			statements(Data1,Type1,Body1),
   21			Indent
   22		]).
   23
   24class_statement(Data,_,instance_method(Name1,Type1,Params1,Body1)) -->
   25	namespace(Data,Data1,Name1,Indent),
   26	instance_method_(Data,[
   27			function_name(Data,Type1,Name1,Params1),
   28			type(Data1,Type1),
   29			parameters(Data1,Params1),
   30			statements(Data1,Type1,Body1),
   31			Indent
   32	]).
   33
   34class_statement(Data,_,initialize_static_var_with_value(Type,Name,Expr)) -->
   35	initialize_static_var_with_value_(Data,[
   36		type(Data,Type),
   37		var_name_(Data,Type,Name),
   38		expr(Data,Type,Expr)
   39	]).
   40
   41class_statement(Data,_,initialize_instance_var(Type,Name)) -->
   42	initialize_instance_var_(Data,[
   43		type(Data,Type),
   44		var_name_(Data,Type,Name)
   45	]).
   46
   47class_statement(Data,_,initialize_instance_var_with_value_(Name,Expr,Type)) -->
   48	initialize_instance_var_with_value_(Data,[
   49		var_name_(Data,Type,Name),
   50		expr(Data,Type,Expr),
   51		type(Data,Type)
   52	])