MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - Code Generator Tutorials
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Code Generator Tutorials

 Post Reply Post Reply
Author
Message
mpierce View Drop Down
Member
Member
Avatar

Joined: 22.Jul.2010
Location: Cheney, WA, USA
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mpierce Quote  Post ReplyReply Direct Link To This Post Topic: Code Generator Tutorials
    Posted: 22.Jul.2010 at 03:26
Greetings,
 
I'm definitely a noob when it  comes to domain specific modeling and languages. I'm currently designing a DSML for designing simple programs for an educational concurrent virtual machine (very limited capabilities so not a lot of features to the language) and I'm now at the stage where I need to create the code generators.
 
I've read the documentation on MERL and am looking for more, if there is any. I'll start hammering away at it, but I'm hoping there are some more explanations/tutorials in addition to the online manuals.
 
Thanks and best regards,
 
Mathew Pierce
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 643
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 22.Jul.2010 at 14:20

Hi Mathew,

The manuals contain about 70 pages on generators, with the main content being in Workbench Chapter 5: Generators. The Watch and S60 Mobile Phone examples add some more: you can read and work through those links, and at the same time in the demo repository in MetaEdit+ you can see the models, metamodels, generators and output, and step through the generators with the debugger.

If you've read the manuals and walked through the examples, getting your hands dirty is probably the best way to proceed. Do a quick recap of 5.3.1 Getting started with MERL, and dive in to some relatively simple part of what you need to generate, e.g. the top-level structure.
 
Once you have more than a few dozen lines of MERL, you'll want to think about how best to structure your generators. A page of brief advice is in 5.1.2 Building non-trivial generators. The DSM book would also be useful, with over 70 pages on generators covering theory, practice, and in-depth examples.
 
Of course, feel free to post here if you get stuck!
Back to Top
mpierce View Drop Down
Member
Member
Avatar

Joined: 22.Jul.2010
Location: Cheney, WA, USA
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mpierce Quote  Post ReplyReply Direct Link To This Post Posted: 22.Jul.2010 at 21:08
Many Thanks Steve! I did start doing some coding, mimicking some of the examples, and now I'm starting to get it. I've also got the book so I'll delve into that too. I'm having a blast with this stuff, probably the most fun I've had doing design in 15 years! :)
 
Best regards,
 
Matt
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.023 seconds.