<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>timwhitlock.info &#187; parser</title>
	<atom:link href="http://timwhitlock.info/blog/tag/parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://timwhitlock.info</link>
	<description>Tim Whitlock&#039;s personal site and blog</description>
	<lastBuildDate>Thu, 15 Dec 2011 13:51:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>jParser release in the pipeline</title>
		<link>http://timwhitlock.info/blog/2009/02/24/jparser-release-in-the-pipeline/</link>
		<comments>http://timwhitlock.info/blog/2009/02/24/jparser-release-in-the-pipeline/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 23:46:41 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jParser]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2009/02/24/jparser-release-in-the-pipeline/</guid>
		<description><![CDATA[I&#8217;ve received quite a few emails recently asking me where the code is for jParser. I&#8217;ve had to disappoint so far, because it&#8217;s not currently available for download. My web analytics also tells me that a lot of people are finding this blog by Googling &#8220;php javascript parser&#8220;. There&#8217;s clearly a need out there, so [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;ve received quite a few emails recently asking me where the code is for <a href="http://web.2point1.com/2008/05/09/full-javascript-parser-for-php/">jParser</a>.</strong></p>
<p>I&#8217;ve had to disappoint so far, because it&#8217;s not currently available for download. My web analytics also tells me that a lot of people are finding this blog by Googling &#8220;<em>php javascript parser</em>&#8220;. There&#8217;s clearly a need out there, so I&#8217;d better do something about it.</p>
<p>I know why I want a JavaScript parser, but what kind of things might you need it for? What API features/functions would you like to see? Please post a comment and let me know. Watch this space for a release, and in the mean time here&#8217;s some food for thought &#8230;</p>
<p><span id="more-98"></span></p>
<h4>Do you really need a full parser?</h4>
<p>Perhaps all you really need is a <em>tokenizer</em>. Suppose you want to <a href="http://timwhitlock.info/plug/examples/JavaScript/j_token_html.php" target="_blank">highlight JavaScript code</a> &#8211; you don&#8217;t need a full parser; all you need to do is break the source code into meaningful chunks (strings, numbers etc..) . How these chunks work together to form <em>syntax </em>is not an issue. I envisage releasing a lighter-weight library containing just the tokenizer (<em>jTokenizer </em>I guess). This will work exactly the same as the <a href="http://www.php.net/manual/en/ref.tokenizer.php" target="_blank">PHP tokenizer functions</a>.</p>
<h4>Minifying, or obfuscating JavaScript</h4>
<p>If you&#8217;re after a minifier, there are lighter-weight PHP options available. However, I&#8217;ve released a command line version of my <a href="http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/" target="_blank">JavaScript minifier and obfuscator</a> which is quite handy. It&#8217;s more powerful than most JavaScript minifiers, because it supports <a href="http://web.2point1.com/2008/06/01/jparser-now-with-automatic-semicolon-insertion/">automatic semicolon insertion</a>. This means it can reduce any code to a single line.</p>
]]></content:encoded>
			<wfw:commentRss>http://timwhitlock.info/blog/2009/02/24/jparser-release-in-the-pipeline/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

