<?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: Parsing STEP</title>
	<atom:link href="http://justrakudoit.wordpress.com/2012/10/10/parsing-step/feed/" rel="self" type="application/rss+xml" />
	<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/</link>
	<description>I Never Metaop I Didn&#039;t Like</description>
	<lastBuildDate>Thu, 07 Mar 2013 12:58:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jakub Narebski (@jnareb)</title>
		<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/#comment-2899</link>
		<dc:creator><![CDATA[Jakub Narebski (@jnareb)]]></dc:creator>
		<pubDate>Wed, 17 Oct 2012 18:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=455#comment-2899</guid>
		<description><![CDATA[I wonder how hard would be to add proper Perl6 interface to libmarpa C library (the core of Marpa)...]]></description>
		<content:encoded><![CDATA[<p>I wonder how hard would be to add proper Perl6 interface to libmarpa C library (the core of Marpa)&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: skids</title>
		<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/#comment-2872</link>
		<dc:creator><![CDATA[skids]]></dc:creator>
		<pubDate>Thu, 11 Oct 2012 00:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=455#comment-2872</guid>
		<description><![CDATA[When faced with this same problem in defining an IPv4 address parser that understands masks/wildcards, I settled on a very similar solution.  Rather than define a &quot;loose&quot; grammar though, I decided it was best just to document the tokens that users could override in the manpage, because there were several ways to loosen the grammar up and a user might want any given combination of them.

Note that one can also do the same thing with the companion &quot;actions&quot; class of production rules.  You can also override the grammar&#039;s parse method to link the default production rules with the class:

&lt;code&gt;

our grammar Strict {

    method parse($target, :$rule?, :$actions = Actions, *%opt) {
        nextwith($target, :rule($rule), :actions($actions), %opt);
    }

    method emit($target, :$rule = &#039;TOP&#039;, :$emit = Emit, *%opt) {
        # for now just call designated rule.
        $emit.&quot;$rule&quot;($target);
    }
}

&lt;/code&gt;

...the second &quot;emit&quot; method is something I added that mirrors the &quot;actions&quot; and produces the correct text to serialize an AST after modifying it.  I think that&#039;s a pattern we will see a lot of so it might be worthy of some spec work...]]></description>
		<content:encoded><![CDATA[<p>When faced with this same problem in defining an IPv4 address parser that understands masks/wildcards, I settled on a very similar solution.  Rather than define a &#8220;loose&#8221; grammar though, I decided it was best just to document the tokens that users could override in the manpage, because there were several ways to loosen the grammar up and a user might want any given combination of them.</p>
<p>Note that one can also do the same thing with the companion &#8220;actions&#8221; class of production rules.  You can also override the grammar&#8217;s parse method to link the default production rules with the class:</p>
<p><code></p>
<p>our grammar Strict {</p>
<p>    method parse($target, :$rule?, :$actions = Actions, *%opt) {<br />
        nextwith($target, :rule($rule), :actions($actions), %opt);<br />
    }</p>
<p>    method emit($target, :$rule = 'TOP', :$emit = Emit, *%opt) {<br />
        # for now just call designated rule.<br />
        $emit."$rule"($target);<br />
    }<br />
}</p>
<p></code></p>
<p>&#8230;the second &#8220;emit&#8221; method is something I added that mirrors the &#8220;actions&#8221; and produces the correct text to serialize an AST after modifying it.  I think that&#8217;s a pattern we will see a lot of so it might be worthy of some spec work&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colomon</title>
		<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/#comment-2871</link>
		<dc:creator><![CDATA[colomon]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 19:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=455#comment-2871</guid>
		<description><![CDATA[That&#039;s actually an interesting question.  By spec, the files are ASCII.  In practice, you frequently see files in.... err, I don&#039;t know the correct technical term, but 8-bit characters with high bit clear meaning ASCII and high bit set meaning ISO 8859 page 1 I think.  Being able to read both would be a good thing.  I would not be surprised to someday find UTF-8 files as well.  Really, only characters in STEP strings can sensibly be non-ASCII, so it&#039;s not too hard to suss out the meaning intended.  On the other hand, I have no idea how to usefully handle those differences in Perl 6 input.]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s actually an interesting question.  By spec, the files are ASCII.  In practice, you frequently see files in&#8230;. err, I don&#8217;t know the correct technical term, but 8-bit characters with high bit clear meaning ASCII and high bit set meaning ISO 8859 page 1 I think.  Being able to read both would be a good thing.  I would not be surprised to someday find UTF-8 files as well.  Really, only characters in STEP strings can sensibly be non-ASCII, so it&#8217;s not too hard to suss out the meaning intended.  On the other hand, I have no idea how to usefully handle those differences in Perl 6 input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/#comment-2870</link>
		<dc:creator><![CDATA[Bruce]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 18:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=455#comment-2870</guid>
		<description><![CDATA[If the files are ASCII and not UTF-8, be sure to flag it as such.  Parsing involves many substr-type operations which are much more expensive on UTF-8 strings than strings of fixed-width characters.]]></description>
		<content:encoded><![CDATA[<p>If the files are ASCII and not UTF-8, be sure to flag it as such.  Parsing involves many substr-type operations which are much more expensive on UTF-8 strings than strings of fixed-width characters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colomon</title>
		<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/#comment-2868</link>
		<dc:creator><![CDATA[colomon]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 12:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=455#comment-2868</guid>
		<description><![CDATA[I haven&#039;t, but that will probably be my fallback if I cannot get things going fast enough in Rakudo.  But jnthn++ has gotten me another 18 seconds already today, and is working on further improvements...]]></description>
		<content:encoded><![CDATA[<p>I haven&#8217;t, but that will probably be my fallback if I cannot get things going fast enough in Rakudo.  But jnthn++ has gotten me another 18 seconds already today, and is working on further improvements&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakub Narebski (@jnareb)</title>
		<link>http://justrakudoit.wordpress.com/2012/10/10/parsing-step/#comment-2867</link>
		<dc:creator><![CDATA[Jakub Narebski (@jnareb)]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 12:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=455#comment-2867</guid>
		<description><![CDATA[Have you tried using Perl 5&#039;s Marpa?]]></description>
		<content:encoded><![CDATA[<p>Have you tried using Perl 5&#8242;s Marpa?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
