<?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"
	>
<channel>
	<title>Comments on: Parsing Javascript Parser</title>
	<atom:link href="http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/</link>
	<description>The act of making love, tenderly.</description>
	<pubDate>Mon, 06 Oct 2008 18:56:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Ruby Tutorial: Scraping Muxtape for mp3 + iTunes playlist creation &#171; Leveraging Visionary Paradigms</title>
		<link>http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-27680</link>
		<dc:creator>Ruby Tutorial: Scraping Muxtape for mp3 + iTunes playlist creation &#171; Leveraging Visionary Paradigms</dc:creator>
		<pubDate>Sun, 20 Apr 2008 23:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-27680</guid>
		<description>&lt;p&gt;[...] since the JavaScript to parse is not all that hard. To do the parsing, I briefly considered RKelly, which looks very interesting, but there is no gem yet, so I passed. I just use Hpricot to parse [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] since the JavaScript to parse is not all that hard. To do the parsing, I briefly considered RKelly, which looks very interesting, but there is no gem yet, so I passed. I just use Hpricot to parse [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Patterson</title>
		<link>http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-21064</link>
		<dc:creator>Aaron Patterson</dc:creator>
		<pubDate>Thu, 03 Jan 2008 23:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-21064</guid>
		<description>&lt;p&gt;Thanks!  Absolutely.  All nodes in the parse tree implement the to_dots method.  So if you find your node, you can call .to_dots on it and get the parse tree below it.&lt;/p&gt;

&lt;p&gt;Here is the code:
&lt;code lang="ruby"&gt;
parser = RKelly::Parser.new
tree = parser.parse(File.read(ARGV[0]))
puts tree.value.find { &#124;x&#124; x.value == '$' }.to_dots
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tenderlovemaking.com/wp-content/uploads/2008/01/out.dot" rel="nofollow"&gt;Here&lt;/a&gt; is the dot file.  Here is the image:
&lt;a href="http://www.flickr.com/photos/aaronp/2163652809/" title="prototype dollar function by fakebeard, on Flickr" rel="nofollow"&gt;&lt;img src="http://farm3.static.flickr.com/2004/2163652809_8a926e379f_m.jpg" width="240" height="122" alt="prototype dollar function" /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks!  Absolutely.  All nodes in the parse tree implement the to_dots method.  So if you find your node, you can call .to_dots on it and get the parse tree below it.</p>
<p>Here is the code:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;">parser = RKelly::Parser.<span class="me1">new</span><br />
tree = parser.<span class="me1">parse</span><span class="br0">&#40;</span>File.<span class="me1">read</span><span class="br0">&#40;</span>ARGV<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="kw3">puts</span> tree.<span class="me1">value</span>.<span class="me1">find</span> <span class="br0">&#123;</span> |x| x.<span class="me1">value</span> == &#8216;$&#8217; <span class="br0">&#125;</span>.<span class="me1">to_dots</span></div>
</div>
<p><a href="http://tenderlovemaking.com/wp-content/uploads/2008/01/out.dot" rel="nofollow" >Here</a> is the dot file.  Here is the image:<br />
<a href="http://www.flickr.com/photos/aaronp/2163652809/" title="prototype dollar function by fakebeard, on Flickr" rel="nofollow" onclick="javascript:urchinTracker ('/outbound/comment/www.flickr.com');"><img src="http://farm3.static.flickr.com/2004/2163652809_8a926e379f_m.jpg" width="240" height="122" alt="prototype dollar function" /></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Dupont</title>
		<link>http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-21063</link>
		<dc:creator>Andrew Dupont</dc:creator>
		<pubDate>Thu, 03 Jan 2008 22:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-21063</guid>
		<description>&lt;p&gt;Great work, Aaron. Think you could generate a chart of some small portion of Prototype, like the $ function?&lt;/p&gt;

&lt;p&gt;We've been looking at rbNarcissus as a possible foundation for some internal tools that would make the Prototype Core team's lives easier, but it looks like RKelly might be the better way to go.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great work, Aaron. Think you could generate a chart of some small portion of Prototype, like the $ function?</p>
<p>We&#8217;ve been looking at rbNarcissus as a possible foundation for some internal tools that would make the Prototype Core team&#8217;s lives easier, but it looks like RKelly might be the better way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Patterson</title>
		<link>http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-20706</link>
		<dc:creator>Aaron Patterson</dc:creator>
		<pubDate>Wed, 26 Dec 2007 21:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-20706</guid>
		<description>&lt;p&gt;Not yet.  The parse tree is not quite the same.  I may get it to output the same thing as ParseTree, but for now I'm focusing on writing an interpreter.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Not yet.  The parse tree is not quite the same.  I may get it to output the same thing as ParseTree, but for now I&#8217;m focusing on writing an interpreter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Anderson</title>
		<link>http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-20705</link>
		<dc:creator>Chris Anderson</dc:creator>
		<pubDate>Wed, 26 Dec 2007 21:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://tenderlovemaking.com/2007/12/24/parsing-javascript-parser/#comment-20705</guid>
		<description>&lt;p&gt;Does RKelly output the same as ParseTree? Maybe you could teach it to, and then execute the Javascript as Ruby. How wicked is that?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Does RKelly output the same as ParseTree? Maybe you could teach it to, and then execute the Javascript as Ruby. How wicked is that?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
