I'm looking to create my own custom domain specific language that outputs HTML.
Basically, I want to be able to create quizzes using my own markup, but have that compiled / generated into HTML. For example:
> What is your favorite color?
* Blue
* Green
* Red
should output
<form action="" method="post">
<ul>
<li>What is your favorite color?</li>
<input type="radio" name="q1" answer="a" /> Blue <br />
<input type="radio" name="q1" answer="b" /> Green <br />
<input type="radio" name="q1" answer="c" /> Red <br />
</ul>
I know that ANTLR does something similar it but doesn't have an HTML output. Any other suggestions?