[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No resource files possible?



Hello,

is there any possiblity to switch off generating a resource
file which is then accessed with
getResourceAsStream(filename) and to switch on generating
the requested arrays inline within the class?

This is needed for automatic .class-file-dependancy
generators (to create a distribution which just contains the
classes needed for running the software), which use a set of
classes (typical with only one element, the class with the
main()-method to be invoked) and see which classes are
referenced by the classes in the set but are not part of the
set and add the missing classes to the set and doing this
again until all references are traversed.

This mechanism can collect classes but not resources
referenced by classes. Former versions of SableCC seemed to
generate the arrays inline (as there are comments within the
generated classes). It would be very good to have this
feature back.

I know that there are valid reasons for exporting large data
tables from source code to files, particularly the 64kb
method size limit. But this limit can also be circumvented
by splitting the method in multiple part-methods. This is
especially easy for methods which just generate|copy data.

Xuân.