Generating code on the fly?

Hello,

I know that YouTrack is written using MPS (know = I have read that... and hope it is true). It has nice ticket search system... DSL. Does YouTrack generate code on the fly (dynamically)? If yes, how one could generate code using some language written using MPS on the fly? Or if I am wrong and it is not possible how to generate for example Java code so that some Java library, standalone jar is made so anybody can use that library in "normal" Java programming? So the case is that someone writes something using MPS and than generate jar library so that that jar is used for example as a plugin in some another application?

Thanks in advance,
Mark
1 comment
Hi Mark,

although the web and db layer of YouTrack has been developed using MPS languages, the YouTrack search box itself is not implemented through MPS - it is not a projectional editor but a plain-text text field, after all, and so its processing involves parsing.

I'd be interested to hear more details on how you envision the on-the-fly code generation. MPS in general gives you two options - code generation and interpretation, although focusing strongly on the former. Your DSL code can be generated into .java files, for example, those then get compiled and packaged into jar files, if you need so.

Other Java code can integrate either with the generated .java files, compiled .class files or use the .jar files.

Vaclav
0

Please sign in to leave a comment.