I did check out the web page you have provided. However, it is not related to EJS (Easy java simulation).

A program can generate .m file if the program follow the specification of .m file format and generate it.
I knew that EJS can work with mathlab (read .m file) and EJS cab be used to be a front end for mathlab.
However, I did not know that it is possible to generate .m file from EJS.