Thank you, it worked like a charm :) I think I understand what you did.
Now I have two more conflicts right below, can you have a look at that too please?
Shift-reduce conflicts on inputs: CARD CHAR BYTE INT
The problem lies at routine level. I made routine a root to isolate it.
I think the collision is at FUNC_DECL and SYSTEM_DECL (both can start with a type):
this.Root = ROUTINE_LIST;
ROUTINE_LIST.Rule = MakePlusRule(ROUTINE_LIST, ROUTINE);
ROUTINE.Rule = (PROC_DECL | FUNC_DECL) + ROUTINE_BODY;
ROUTINE_BODY.Rule = SYSTEM_DECL_LIST | STATEMENTS | SYSTEM_DECL_LIST + STATEMENTS | Empty;
PROC_DECL.Rule = "PROC" + identifier + "(" + PARAM_DECL_LIST + ")";
FUNC_DECL.Rule = FUND_TYPE + "FUNC" + identifier + "(" + PARAM_DECL_LIST + ")";
PARAM_DECL_LIST.Rule = MakeStarRule(PARAM_DECL_LIST, PARAM_DECL);
PARAM_DECL.Rule = ...;
SYSTEM_DECL_LIST.Rule = MakePlusRule(SYSTEM_DECL_LIST, SYSTEM_DECL);
SYSTEM_DECL.Rule = VAR_DECL | RECORD_DEF;
VAR_DECL.Rule = FUND_DECL | POINTER_DECL | ARRAY_DECL | RECORD_DECL;
FUND_DECL.Rule = FUND_TYPE + FUND_IDENT_LIST;
STATEMENTS.Rule = MakePlusRule(STATEMENTS, STATEMENT);
STATEMENT.Rule = EXIT_STAT | ASSIGN_STAT | RETURN_STAT | ROUTINE_CALL_STAT | DO_OR_UNTIL_LOOP_STAT | WHILE_LOOP_STAT | FOR_LOOP_STAT | IF_STAT | CODE_BLOCK_STAT;
some example code presenting the problem:
INT FUNC F1(BYTE A)
INT FUNC F2(BYTE A)
INT FUNC F3(BYTE A)
PROC F3(BYTE A)
Routine can be declared with empty body (something like forward declaration)
Routine also don't have to end with RETURN.
The example code is perfectly correct from the grammar point of view.
Can you think about it please?