Hi Roger,

I don't know if this would work, but you could try the following. You could try to reduce the grammar size by removing some "?" and "*" operators and replace them by equivalent productions, in alternatives that contain _/more than one/_ such operator:

// original
p = x? y* z;
q = y* z*;

// modified
p = x1 y1 s;
q = y2 z1;
x1 = x?;
y1 = y*;
y2 = y*;
z1 = z*;

Sometimes, this reduces the size of the grammar used for computing the parser, possibly leading to a smaller parser. Note that I created y1 and y2, even though they look identical. The idea is that SableCC will inline the y1 (or y2) production if it is involved in a conflict. By separating both productions, SableCC won't inline the other unless it is also involved in a conflict.

Please let me know if this helps.

Good luck!

Etienne

On 2011-07-08 15:20, Pomeroy, Roger C wrote:
Iam getting the error message from java "code of method parse() is exceeding the 65535 bytes limit" ... I realize this is probably because I have a very large, complicated language definition, and I think the parse table is just getting too large. Has anyone else run into this, and (short of simplifying the language to reduce the parsing alternatives) is there another way to tackle the problem?

--
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org

_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion

Reply via email to