<?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: Balanced parenthesis</title>
	<atom:link href="http://www.fsharp.it/2008/07/22/balanced-parenthesis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fsharp.it/2008/07/22/balanced-parenthesis/</link>
	<description>Functional programming on .Net</description>
	<lastBuildDate>Wed, 18 Aug 2010 12:04:06 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: A PROGRAMMING JOB INTERVIEW CHALLENGE #14 - 2D GEOMETRY &#124; Dev102.com</title>
		<link>http://www.fsharp.it/2008/07/22/balanced-parenthesis/comment-page-1/#comment-586</link>
		<dc:creator>A PROGRAMMING JOB INTERVIEW CHALLENGE #14 - 2D GEOMETRY &#124; Dev102.com</dc:creator>
		<pubDate>Tue, 05 Aug 2008 09:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=37#comment-586</guid>
		<description>[...] http://www.fsharp.it/2008/07/22/balanced-parenthesis/ by Claudio Cherubino. [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.fsharp.it/2008/07/22/balanced-parenthesis/" rel="nofollow">http://www.fsharp.it/2008/07/22/balanced-parenthesis/</a> by Claudio Cherubino. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Validating use of Parenthesis &#8226; OJ&#8217;s rants</title>
		<link>http://www.fsharp.it/2008/07/22/balanced-parenthesis/comment-page-1/#comment-556</link>
		<dc:creator>Validating use of Parenthesis &#8226; OJ&#8217;s rants</dc:creator>
		<pubDate>Wed, 23 Jul 2008 23:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=37#comment-556</guid>
		<description>[...] surprisingly similar to this solution over at Fsharp.it. It is different in that it allows non-bracket characters to be entered into the [...]</description>
		<content:encoded><![CDATA[<p>[...] surprisingly similar to this solution over at Fsharp.it. It is different in that it allows non-bracket characters to be entered into the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mat/Tia</title>
		<link>http://www.fsharp.it/2008/07/22/balanced-parenthesis/comment-page-1/#comment-554</link>
		<dc:creator>Mat/Tia</dc:creator>
		<pubDate>Wed, 23 Jul 2008 08:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=37#comment-554</guid>
		<description>Just to be theoretical :-), remember that &quot;pure&quot; regular expressions (I mean: something that can be translated into finite automatons) aren&#039;t expressive enough to solve the balanced-parenthesis problem.
It is also true that most regular expressions implementations are expanded so to fit also this as a special case.</description>
		<content:encoded><![CDATA[<p>Just to be theoretical <img src='http://www.fsharp.it/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> , remember that &#8220;pure&#8221; regular expressions (I mean: something that can be translated into finite automatons) aren&#8217;t expressive enough to solve the balanced-parenthesis problem.<br />
It is also true that most regular expressions implementations are expanded so to fit also this as a special case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: claudio</title>
		<link>http://www.fsharp.it/2008/07/22/balanced-parenthesis/comment-page-1/#comment-553</link>
		<dc:creator>claudio</dc:creator>
		<pubDate>Wed, 23 Jul 2008 06:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=37#comment-553</guid>
		<description>The trick to return true is hidden in this line:

&#124; [] -&gt; stack = List.Empty  

remember that = is the comparison operator, as the == operator in other languages.

This line says: when char_array is empty, if the stack is empty return true, otherwise return false.


Actually, I didn&#039;t use the is_closing function and I assumed that every character that is not an opening bracket will be a closing one. 

To be safe, I&#039;d add another line to the first pattern matching  and check if the examined character is a closing parenthesis.
Any other character should warn the user that the input string is not valid.</description>
		<content:encoded><![CDATA[<p>The trick to return true is hidden in this line:</p>
<p>| [] -> stack = List.Empty  </p>
<p>remember that = is the comparison operator, as the == operator in other languages.</p>
<p>This line says: when char_array is empty, if the stack is empty return true, otherwise return false.</p>
<p>Actually, I didn&#8217;t use the is_closing function and I assumed that every character that is not an opening bracket will be a closing one. </p>
<p>To be safe, I&#8217;d add another line to the first pattern matching  and check if the examined character is a closing parenthesis.<br />
Any other character should warn the user that the input string is not valid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.fsharp.it/2008/07/22/balanced-parenthesis/comment-page-1/#comment-552</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 23 Jul 2008 06:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=37#comment-552</guid>
		<description>When does this return true?
And when do you use is_closing?</description>
		<content:encoded><![CDATA[<p>When does this return true?<br />
And when do you use is_closing?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
