State of source generation
I am a little confused by messages in this forum about the state of
source generation that MPS offers right now. It is clear that Java can
be the source language. A message from Igor mentions XML. Obviously
MPS /will/ support anything at all... though it is not clear if it
supports anything at all right now. So for example, what if I want to
generate a series of JavaScript files with generated source; can I do
that? Obviously I've got to define my concepts, and somewhere or
another (I don't yet know MPS enough to know), I'm going to specify the
transformation algorithm.
I'm investigating the possibility of using MPS immediately to ...
essentially make up for serious language shortcomings in a target
language "X" that I don't want to name. For example, no classes/structs
to keep data together; I only have arrays of the same data type. Ack!
I suppose I could create a more powerful language that I know and just
map it... but this whole domain-specific emphasis has made me realize it
is better to come up with something specific to my application's domain.
I could specify the program in a mixed declarative / imperative style
that suits my purposes. I can deal with MPS glitches provided they
aren't show-stoppers.
~ David Smiley
Please sign in to leave a comment.
David Smiley wrote:
I meant destination language.
~ Dave
At the moment MPS only offers generation to java and xml.
We are working on few improvements which would give more freedom to outer developers in applying LOP to practice.
To make whole picture clear I will summarize current state and plans (for next build) regarding different aspects of language development:
Language basics (structure, editor, typesystem, actions) - to a greater extent covered by DSLs and API
Generators from language (templates, rules, configs) - covered by DSLs and API, planned: some rework and usabilility improvements
Filegen (text/files production from generated models) - java/xml, not extensible, planned: API + configurability
Language as target (projection editor, generator class, configs) - covered by DSLs and API, planned: some rework and usabilility improvements
Model persistence (load/write models from/to files. It is not LOP but this feature allows to develop structured editors for existing languages. i.e. log4j, ant etc). planned: API + configurability
Igor.