<?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: On Lexers, Syntax Highlighting and a good suggestion.</title>
	<atom:link href="http://mikegrouchy.com/on-lexers-syntax-highlighting-and-a-good-suggestion/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikegrouchy.com/on-lexers-syntax-highlighting-and-a-good-suggestion/</link>
	<description></description>
	<lastBuildDate>Thu, 21 Jan 2010 21:20:37 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mike</title>
		<link>http://mikegrouchy.com/on-lexers-syntax-highlighting-and-a-good-suggestion/comment-page-1/#comment-27</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 18 Jul 2009 12:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://mikegrouchy.com/?p=100#comment-27</guid>
		<description>I have actually checked out pygments and it did look good, Ideally I&#039;m in no rush to get the project done(and don&#039;t know what I am going to use it for) so at this point, I am pretty sure I am going to code everything myself. 

As for using FSM(or FSA I guess), I have considering that as well, being able to only read each character in the text once would mean the it will be fast, and fast and small are what I am going for. So that is definitely an option I am considering.</description>
		<content:encoded><![CDATA[<p>I have actually checked out pygments and it did look good, Ideally I&#8217;m in no rush to get the project done(and don&#8217;t know what I am going to use it for) so at this point, I am pretty sure I am going to code everything myself. </p>
<p>As for using FSM(or FSA I guess), I have considering that as well, being able to only read each character in the text once would mean the it will be fast, and fast and small are what I am going for. So that is definitely an option I am considering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason G</title>
		<link>http://mikegrouchy.com/on-lexers-syntax-highlighting-and-a-good-suggestion/comment-page-1/#comment-26</link>
		<dc:creator>Jason G</dc:creator>
		<pubDate>Fri, 17 Jul 2009 20:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://mikegrouchy.com/?p=100#comment-26</guid>
		<description>You can write a trivial lexer in no time at all, but it&#039;ll most likely be relatively inefficient. By trivial I&#039;m thinking one that tries all possibilities from the current character. Rather brute force.

One suggestion is to write up your own lexer-like &quot;generator&quot; based off of some format. That way you can reuse the code over all the languages you support. For example, http://en.wikipedia.org/wiki/Flex_lexical_analyser is something I&#039;ve used in the past, and you could use similar ideas.

Also, if you&#039;re open to using existing software, I have another suggestion. Since you&#039;re using Python/Django, http://pygments.org/ would be an option for lexers. If not, even checking out its source might give you some ideas.

Finally, if you&#039;re just lookin&#039; for some learnin&#039;, then implementing one yourself is good stuff. If you&#039;d really like to get in all kinds of learning, consider building a (finite) state machine from something similar to the input that Flex uses.

Have fun! :D

P.S. Thanks for the compliments. You&#039;re too kind :P</description>
		<content:encoded><![CDATA[<p>You can write a trivial lexer in no time at all, but it&#8217;ll most likely be relatively inefficient. By trivial I&#8217;m thinking one that tries all possibilities from the current character. Rather brute force.</p>
<p>One suggestion is to write up your own lexer-like &#8220;generator&#8221; based off of some format. That way you can reuse the code over all the languages you support. For example, <a href="http://en.wikipedia.org/wiki/Flex_lexical_analyser" rel="nofollow">http://en.wikipedia.org/wiki/Flex_lexical_analyser</a> is something I&#8217;ve used in the past, and you could use similar ideas.</p>
<p>Also, if you&#8217;re open to using existing software, I have another suggestion. Since you&#8217;re using Python/Django, <a href="http://pygments.org/" rel="nofollow">http://pygments.org/</a> would be an option for lexers. If not, even checking out its source might give you some ideas.</p>
<p>Finally, if you&#8217;re just lookin&#8217; for some learnin&#8217;, then implementing one yourself is good stuff. If you&#8217;d really like to get in all kinds of learning, consider building a (finite) state machine from something similar to the input that Flex uses.</p>
<p>Have fun! <img src='http://mikegrouchy.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>P.S. Thanks for the compliments. You&#8217;re too kind <img src='http://mikegrouchy.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
