<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Building an External DSL in C#</title>
	<atom:link href="http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/</link>
	<description></description>
	<lastBuildDate>Wed, 21 Jul 2010 08:01:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Glenn Block</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-126</link>
		<dc:creator>Glenn Block</dc:creator>
		<pubDate>Mon, 01 Feb 2010 03:50:46 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-126</guid>
		<description>Nice job Nick. I kept wondering while I read this whether or not your MEFX parser algorithim was the catalyst fo this ;-)</description>
		<content:encoded><![CDATA[<p>Nice job Nick. I kept wondering while I read this whether or not your MEFX parser algorithim was the catalyst fo this <img src='http://nblumhardt.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Blumhardt</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-122</link>
		<dc:creator>Nicholas Blumhardt</dc:creator>
		<pubDate>Sun, 31 Jan 2010 05:34:44 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-122</guid>
		<description>Steve, Parse.Char(&#039;\n&#039;) and Parse.Char(&#039;\r&#039;) work as expected, so you shouldn&#039;t have any trouble detecting newlines. You may need to create your own WhiteSpace/Token parsers though, because the default ones will eat up newlines.</description>
		<content:encoded><![CDATA[<p>Steve, Parse.Char(&#8216;\n&#8217;) and Parse.Char(&#8216;\r&#8217;) work as expected, so you shouldn&#8217;t have any trouble detecting newlines. You may need to create your own WhiteSpace/Token parsers though, because the default ones will eat up newlines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Strong</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-121</link>
		<dc:creator>Steve Strong</dc:creator>
		<pubDate>Fri, 29 Jan 2010 21:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-121</guid>
		<description>Very cool stuff!  Quick question - is there any way to handle start &amp; end of line recognition?</description>
		<content:encoded><![CDATA[<p>Very cool stuff!  Quick question &#8211; is there any way to handle start &amp; end of line recognition?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Callidus</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-119</link>
		<dc:creator>Mike Callidus</dc:creator>
		<pubDate>Fri, 29 Jan 2010 12:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-119</guid>
		<description>Thanks for your response, Nicholas.

That definitely helps, the mistake I made was separating the keyword TRIGGERS from the associated actions in the brackets.


		BEO &quot;judge&quot; {

			OK &quot;approved&quot; { 
				OK &quot;event ok&quot; STOP
			}

			NOK &quot;rejected&quot; { 
				NOK &quot;event nok&quot; STOP
			}

			DIR &quot;judgement management necessary&quot; { 
				DIR &quot;event to management&quot; TRIGGERS { DIR }
			}
		}

		DIR &quot;judgement by management&quot; {}



It&#039;s easy with your suggestion

		public static Parser Event =
			from code in Identifier.Named(&quot;[Event Identifier]&quot;)
			from name in QuotedText.Named(&quot;[Event QuotedText]&quot;)
			from actiecodes in ActionCodes.XOr(NoActionCodes)
			select new WorkflowEvent(code, name, actiecodes);

		public static Parser&lt;List&gt; NoActionCodes =
			from stopKeyword in Parse.String(&quot;STOP&quot;).Named(&quot;[STOP keyword]&quot;)
			select new List(); // empty list
		
		public static Parser&lt;List&gt; ActionCodes =
			from triggersKeyword in Parse.String(&quot;TRIGGERS&quot;).Named(&quot;[TRIGGERS keyword]&quot;)
			from lbracket in Parse.Char(&#039;{&#039;).Token().Named(&quot;[Left bracket action codes triggered by action code]&quot;)
			from actionCodes in ActionCode.Many().Named(&quot;[Action codes triggered by action code]&quot;)
			from rbracket in Parse.Char(&#039;}&#039;).Token().Named(&quot;[Right bracket action codes triggered by action code]&quot;)
			select new List(actionCodes);

Now I really like the way in can work both top down and bottom up with the parser methods.

It&#039;s easy to build from small parts and let tests drive the extension of the grammar incrementally.

/Mike</description>
		<content:encoded><![CDATA[<p>Thanks for your response, Nicholas.</p>
<p>That definitely helps, the mistake I made was separating the keyword TRIGGERS from the associated actions in the brackets.</p>
<p>		BEO &#8220;judge&#8221; {</p>
<p>			OK &#8220;approved&#8221; {<br />
				OK &#8220;event ok&#8221; STOP<br />
			}</p>
<p>			NOK &#8220;rejected&#8221; {<br />
				NOK &#8220;event nok&#8221; STOP<br />
			}</p>
<p>			DIR &#8220;judgement management necessary&#8221; {<br />
				DIR &#8220;event to management&#8221; TRIGGERS { DIR }<br />
			}<br />
		}</p>
<p>		DIR &#8220;judgement by management&#8221; {}</p>
<p>It&#8217;s easy with your suggestion</p>
<p>		public static Parser Event =<br />
			from code in Identifier.Named(&#8220;[Event Identifier]&#8220;)<br />
			from name in QuotedText.Named(&#8220;[Event QuotedText]&#8220;)<br />
			from actiecodes in ActionCodes.XOr(NoActionCodes)<br />
			select new WorkflowEvent(code, name, actiecodes);</p>
<p>		public static Parser&lt;List&gt; NoActionCodes =<br />
			from stopKeyword in Parse.String(&#8220;STOP&#8221;).Named(&#8220;[STOP keyword]&#8220;)<br />
			select new List(); // empty list</p>
<p>		public static Parser&lt;List&gt; ActionCodes =<br />
			from triggersKeyword in Parse.String(&#8220;TRIGGERS&#8221;).Named(&#8220;[TRIGGERS keyword]&#8220;)<br />
			from lbracket in Parse.Char(&#8216;{&#8216;).Token().Named(&#8220;[Left bracket action codes triggered by action code]&#8220;)<br />
			from actionCodes in ActionCode.Many().Named(&#8220;[Action codes triggered by action code]&#8220;)<br />
			from rbracket in Parse.Char(&#8216;}&#8217;).Token().Named(&#8220;[Right bracket action codes triggered by action code]&#8220;)<br />
			select new List(actionCodes);</p>
<p>Now I really like the way in can work both top down and bottom up with the parser methods.</p>
<p>It&#8217;s easy to build from small parts and let tests drive the extension of the grammar incrementally.</p>
<p>/Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Blumhardt</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-118</link>
		<dc:creator>Nicholas Blumhardt</dc:creator>
		<pubDate>Fri, 29 Jan 2010 02:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-118</guid>
		<description>Mike, I think you&#039;re looking for something along the lines of:

BracketedItems.XOr(Parse.Return(...))

Where the ... is a default value when the brackets are absent.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Mike, I think you&#8217;re looking for something along the lines of:</p>
<p>BracketedItems.XOr(Parse.Return(&#8230;))</p>
<p>Where the &#8230; is a default value when the brackets are absent.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Callidus</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-117</link>
		<dc:creator>Mike Callidus</dc:creator>
		<pubDate>Thu, 28 Jan 2010 17:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-117</guid>
		<description>This is great, keep up the good work!

I&#039;m writing a simple workflow grammar and have a question.

[INPUT]

BEO &quot;judge&quot; {
	OK &quot;approved&quot; { 
		OK &quot;event ok&quot; STOP {}
	}
	NOK &quot;rejected&quot; { 
		NOK &quot;event nok&quot; STOP {}
	}
	DIR &quot;judgement management necessary&quot; { 
 		DIR &quot;event to management&quot; TRIGGERS { DIR }
	}
}

DIR &quot;judgement by management&quot; {}

[/INPUT]

How can I make the brackets after the STOP keyword optional? 


DIR &quot;event to management&quot; TRIGGERS { DIR }

NOK &quot;event nok&quot; STOP {}


I would like it to be either 
TRIGGERS {DIR1 DIR2} 
or just
STOP

Kind regards,
Mike</description>
		<content:encoded><![CDATA[<p>This is great, keep up the good work!</p>
<p>I&#8217;m writing a simple workflow grammar and have a question.</p>
<p>[INPUT]</p>
<p>BEO &#8220;judge&#8221; {<br />
	OK &#8220;approved&#8221; {<br />
		OK &#8220;event ok&#8221; STOP {}<br />
	}<br />
	NOK &#8220;rejected&#8221; {<br />
		NOK &#8220;event nok&#8221; STOP {}<br />
	}<br />
	DIR &#8220;judgement management necessary&#8221; {<br />
 		DIR &#8220;event to management&#8221; TRIGGERS { DIR }<br />
	}<br />
}</p>
<p>DIR &#8220;judgement by management&#8221; {}</p>
<p>[/INPUT]</p>
<p>How can I make the brackets after the STOP keyword optional? </p>
<p>DIR &#8220;event to management&#8221; TRIGGERS { DIR }</p>
<p>NOK &#8220;event nok&#8221; STOP {}</p>
<p>I would like it to be either<br />
TRIGGERS {DIR1 DIR2}<br />
or just<br />
STOP</p>
<p>Kind regards,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Way of the Whiteboard, Modern Hardware, Writing DSLs with LINQ and Component Relationships &#124; Gamlor</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-73</link>
		<dc:creator>The Way of the Whiteboard, Modern Hardware, Writing DSLs with LINQ and Component Relationships &#124; Gamlor</dc:creator>
		<pubDate>Mon, 25 Jan 2010 19:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-73</guid>
		<description>[...] Blumhardt shows a beautiful way to create small external domain specific language using [...]</description>
		<content:encoded><![CDATA[<p>[...] Blumhardt shows a beautiful way to create small external domain specific language using [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lesya</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-57</link>
		<dc:creator>Lesya</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-57</guid>
		<description>It was interesting to read this article and I hope to read a new article about this subject in your site in the near time.</description>
		<content:encoded><![CDATA[<p>It was interesting to read this article and I hope to read a new article about this subject in your site in the near time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Blumhardt</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-54</link>
		<dc:creator>Nicholas Blumhardt</dc:creator>
		<pubDate>Wed, 20 Jan 2010 22:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-54</guid>
		<description>Another quick update - version 0.1.6 (on the website) now produces MUCH better error messages. More details to come.</description>
		<content:encoded><![CDATA[<p>Another quick update &#8211; version 0.1.6 (on the website) now produces MUCH better error messages. More details to come.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Morning Brew - Chris Alcock &#187; The Morning Brew #521</title>
		<link>http://nblumhardt.com/2010/01/building-an-external-dsl-in-c/comment-page-1/#comment-53</link>
		<dc:creator>The Morning Brew - Chris Alcock &#187; The Morning Brew #521</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:54:33 +0000</pubDate>
		<guid isPermaLink="false">http://nblumhardt.com/?p=95#comment-53</guid>
		<description>[...] Building an External DSL in C# - Nicholas Blumhardt looks at building a Domain Specific Language using C# and the Sprache parser creation library to create a questionnaire DSL example with source code provided for the sample. [...]</description>
		<content:encoded><![CDATA[<p>[...] Building an External DSL in C# &#8211; Nicholas Blumhardt looks at building a Domain Specific Language using C# and the Sprache parser creation library to create a questionnaire DSL example with source code provided for the sample. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
