<p>I'm developing a compiler framework for .NET and want a flexible way of defining pipelines.  I've considered the following options:</p>

<ul>
<li>WWF</li>
<li>Custom XML pipeline description</li>
<li>Custom pipeline description in code (using Nemerle's macros to define syntax for it)</li>
<li>Other code-based description</li>
</ul>

<p>Requirements:</p>

<ul>
<li>Must not depend on functionality only in the later versions of .NET (3+) since it's intended to be cross-platform and be used on top of managed kernels, meaning semi-limited .NET functionality.</li>
<li>Must allow conditional pipeline building, so you can specify that certain command line options will correspond to certain elements and orders.</li>
</ul>

<p>WWF would be nice, but doesn't meet the first requirement.  The others would work but are less than optimal due to the work involved.</p>

<p>Does anyone know of a solution that will meet these goals with little to no modification?</p>

[{'answer_id': 63017, 'author': 'mbrodersen', 'author_id': 7284, 'author_profile': 'https://Stackoverflow.com/users/7284', 'pm_score': 1, 'selected': False, 'text': '<p>If you know Ruby then a solution is to write a simple internal DSL that can generate whatever pipeline data types and reader/writer code you need. Generating XML is a quick way to get started. You can always change the DSL to generate another format later if required.</p>\n\n<p>You may also want to look at the <a href="http://en.wikipedia.org/wiki/Phoenix_(compiler_framework)" rel="nofollow noreferrer">Microsoft Phoenix compiler</a> project for inspiration.</p>\n'}, {'answer_id': 182994, 'author': 'pmlarocque', 'author_id': 7419, 'author_profile': 'https://Stackoverflow.com/users/7419', 'pm_score': 0, 'selected': False, 'text': '<p>I know <a href="http://boo.codehaus.org/" rel="nofollow noreferrer">Boo</a> let you have fun with the compiler, not sure if it does in the manner you want.</p>\n'}]
['https://Stackoverflow.com/questions/62106', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4977/']