<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Building Grammars (and Parsers) on the Fly</title>
	<atom:link href="http://blog.johanneslink.net/2009/08/09/building-grammars-and-parsers-on-the-fly/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.johanneslink.net/2009/08/09/building-grammars-and-parsers-on-the-fly/</link>
	<description>Johannes Link's Travels through Software Devlopment Space</description>
	<lastBuildDate>Mon, 22 Mar 2010 08:38:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Bernd Schiffer</title>
		<link>http://blog.johanneslink.net/2009/08/09/building-grammars-and-parsers-on-the-fly/#comment-202</link>
		<dc:creator>Bernd Schiffer</dc:creator>
		<pubDate>Thu, 13 Aug 2009 22:41:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johanneslink.net/?p=200#comment-202</guid>
		<description>I often hear the point you mentioned, that internal DSLs would restricts the syntax and that non-techs won&#039;t be able to handle them.

I agree with that. So I came up with a mix of both. My example is not a DSL. &quot;10 km&quot; is not a internal Groovy DSL. But &quot;10.km&quot; (see the dot) is. All I have to do to convert the external &quot;10 km&quot;-DSL into an internal &quot;10.km&quot; one is to delete the dot. I&#039;ve done that by a simple regular expression.

So, my point is: Isn&#039;t it totally enough to build an internal DSL and to do some cosmetic surgery with simple tools like regular expressions? Do you really need extra tools for that?

I&#039;m eager to see your example. I&#039;ve set an reminder on that to December 31th, 2009 :)</description>
		<content:encoded><![CDATA[<p>I often hear the point you mentioned, that internal DSLs would restricts the syntax and that non-techs won&#8217;t be able to handle them.</p>
<p>I agree with that. So I came up with a mix of both. My example is not a DSL. &#8220;10 km&#8221; is not a internal Groovy DSL. But &#8220;10.km&#8221; (see the dot) is. All I have to do to convert the external &#8220;10 km&#8221;-DSL into an internal &#8220;10.km&#8221; one is to delete the dot. I&#8217;ve done that by a simple regular expression.</p>
<p>So, my point is: Isn&#8217;t it totally enough to build an internal DSL and to do some cosmetic surgery with simple tools like regular expressions? Do you really need extra tools for that?</p>
<p>I&#8217;m eager to see your example. I&#8217;ve set an reminder on that to December 31th, 2009 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johanneslink</title>
		<link>http://blog.johanneslink.net/2009/08/09/building-grammars-and-parsers-on-the-fly/#comment-201</link>
		<dc:creator>johanneslink</dc:creator>
		<pubDate>Thu, 13 Aug 2009 19:02:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johanneslink.net/?p=200#comment-201</guid>
		<description>My example has been badly chosen as for the WHY of using an on-the-fly parser. Sometimes internal DSL restrict the syntax too much to be usable for non-tech analysts, testers or customers. Imagine you want to use (parts of) prose texts to be used as executable scenarios. Maybe I&#039;ll blog such an example later... this year ;-).</description>
		<content:encoded><![CDATA[<p>My example has been badly chosen as for the WHY of using an on-the-fly parser. Sometimes internal DSL restrict the syntax too much to be usable for non-tech analysts, testers or customers. Imagine you want to use (parts of) prose texts to be used as executable scenarios. Maybe I&#8217;ll blog such an example later&#8230; this year <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernd Schiffer</title>
		<link>http://blog.johanneslink.net/2009/08/09/building-grammars-and-parsers-on-the-fly/#comment-200</link>
		<dc:creator>Bernd Schiffer</dc:creator>
		<pubDate>Thu, 13 Aug 2009 18:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.johanneslink.net/?p=200#comment-200</guid>
		<description>This parser might be powerful. However, it&#039;s hart for me to see why, for this purpose, an external DSL would be better than an internal one.

The Cucumber example of yours is an internal DSL. You want &quot;[s]light variations, like using “put in” instead of “entered into...”. But I can&#039;t see how you&#039;ve done that with Pars4SJM. However, you solved another example with Parse4SJM: adding numbers.

Well, even the Groovy Parse4SJM solution here is still much too heavy weight. That&#039;s because you chose an external DSL. An internal DSL would do much better here, e.g. a Groovy one. I think a internal Groovy DSL could deal with the adding numbers thing in one line of code, maybe two, but that&#039;d be all.

(Might want to have a look at this.
Blog: http://berndschiffer.blogspot.com/2007/02/kilometerfresser.html
Code: http://www.bytemycode.com/snippets/snippet/593/
Skip the GUI and the formatting parts and you&#039;ll end up with a one or two liner.)

There could be limits in the use of an internal DSL here, but I don&#039;t see why you could not fix your main problem with an internal DSL, too. The benefit would be a light weight kind of tool: your programming language of choice.

So, what power are you looking for in external DSLs that you could not find in an internal DSL?</description>
		<content:encoded><![CDATA[<p>This parser might be powerful. However, it&#8217;s hart for me to see why, for this purpose, an external DSL would be better than an internal one.</p>
<p>The Cucumber example of yours is an internal DSL. You want &#8220;[s]light variations, like using “put in” instead of “entered into&#8230;”. But I can&#8217;t see how you&#8217;ve done that with Pars4SJM. However, you solved another example with Parse4SJM: adding numbers.</p>
<p>Well, even the Groovy Parse4SJM solution here is still much too heavy weight. That&#8217;s because you chose an external DSL. An internal DSL would do much better here, e.g. a Groovy one. I think a internal Groovy DSL could deal with the adding numbers thing in one line of code, maybe two, but that&#8217;d be all.</p>
<p>(Might want to have a look at this.<br />
Blog: <a href="http://berndschiffer.blogspot.com/2007/02/kilometerfresser.html" rel="nofollow">http://berndschiffer.blogspot.com/2007/02/kilometerfresser.html</a><br />
Code: <a href="http://www.bytemycode.com/snippets/snippet/593/" rel="nofollow">http://www.bytemycode.com/snippets/snippet/593/</a><br />
Skip the GUI and the formatting parts and you&#8217;ll end up with a one or two liner.)</p>
<p>There could be limits in the use of an internal DSL here, but I don&#8217;t see why you could not fix your main problem with an internal DSL, too. The benefit would be a light weight kind of tool: your programming language of choice.</p>
<p>So, what power are you looking for in external DSLs that you could not find in an internal DSL?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
