The following code triggers the "memory exhausted" error/crash in the parser: int a; int i; void calc() { if (i == 1) a = 0; else if (i == 2) a = 0; else if (i == 3) a = 0; else if (i == 4) a = 1; else if (i == 5) a = 1; else if (i == 6) a = 1; else if (i == 7) a = 1; else if (i == 8) a = 1; else if (i == 9) a = 1; else if (i == 10) a = 1; else if (i == 11) a = 1; else if (i == 12) a = 1; else if (i == 13) a = 1; else if (i == 14) a = 1; else if (i == 15) a = 1; else if (i == 16) a = 2; else if (i == 17) a = 2; else if (i == 18) a = 3; else if (i == 19) a = 3; else if (i == 20) a = 3; else if (i == 21) a = 4; else if (i == 22) a = 4; else if (i == 23) a = 4; else if (i == 24) a = 4; else if (i == 25) a = 4; else if (i == 26) a = 4; else if (i == 27) a = 4; } The error is indicated around "i==24", which hits the stack limit bison allocates for right-recursive rules. The solution is probably to rewrite the if-then-else rules to use left recursion (which consumes almost no stack).
fixed in uppaal branch