The Java implementation currently generares all code of the state machine into the method makeAutomata. However, with larger grammars this results in the java error "code too large", since a single method in a Java class may be at most 64KB of bytecode.
As a workaround, it is possible to touch the generated code manually and split the method makeAutomata into two (or more) methods, i.e. I have in makeAutomate the statement:
return makeAutomata2(edges,states,automata);
and the method
private static List<FA<Type>> makeAutomata2(List<Edge<Type>> edges, List<State<Type>> states, List<FA<Type>> automata) {...}
Maybe it is possible to split the method during generation, e.g. after generating about generating 1000 lines of code, makeAutomata2 will be called and so on.
The Java implementation currently generares all code of the state machine into the method makeAutomata. However, with larger grammars this results in the java error "code too large", since a single method in a Java class may be at most 64KB of bytecode.
As a workaround, it is possible to touch the generated code manually and split the method makeAutomata into two (or more) methods, i.e. I have in makeAutomate the statement:
return makeAutomata2(edges,states,automata);
and the methodprivate static List<FA<Type>> makeAutomata2(List<Edge<Type>> edges, List<State<Type>> states, List<FA<Type>> automata) {...}
Maybe it is possible to split the method during generation, e.g. after generating about generating 1000 lines of code, makeAutomata2 will be called and so on.