<?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: Flex and Bison in C++: An Example</title>
	<atom:link href="http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/</link>
	<description>Who knew that the Internet could be so delicious?</description>
	<lastBuildDate>Wed, 01 Sep 2010 15:30:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Robert Hollencamp</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-220</link>
		<dc:creator>Robert Hollencamp</dc:creator>
		<pubDate>Wed, 01 Sep 2010 15:30:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-220</guid>
		<description>The &lt;a href=&quot;http://sam.zoy.org/wtfpl/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;WTFPL&lt;/a&gt; sounds good to me; if you would prefer a different license let me know. Leaving a post saying &#039;this is useful, thanks&#039; would be great, but there are absolutely no restrictions on what you do with the code.</description>
		<content:encoded><![CDATA[<p>The <a href="http://sam.zoy.org/wtfpl/" target="_blank" rel="nofollow">WTFPL</a> sounds good to me; if you would prefer a different license let me know. Leaving a post saying &#8216;this is useful, thanks&#8217; would be great, but there are absolutely no restrictions on what you do with the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Micah Villmow</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-219</link>
		<dc:creator>Micah Villmow</dc:creator>
		<pubDate>Tue, 31 Aug 2010 23:19:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-219</guid>
		<description>Robert,
 What is the code license on your examples?
Thanks,</description>
		<content:encoded><![CDATA[<p>Robert,<br />
 What is the code license on your examples?<br />
Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Hollencamp</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-158</link>
		<dc:creator>Robert Hollencamp</dc:creator>
		<pubDate>Sun, 27 Jun 2010 05:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-158</guid>
		<description>I didn&#039;t try building this particular project, but I have worked with bison and flex in Visual Studio. You will need &lt;a href=&quot;http://gnuwin32.sourceforge.net/packages/bison.htm&quot; rel=&quot;nofollow&quot;&gt;Bison&lt;/a&gt; and &lt;a href=&quot;http://gnuwin32.sourceforge.net/packages/flex.htm&quot; rel=&quot;nofollow&quot;&gt;Flex&lt;/a&gt;. Microsoft &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa730877(VS.80).aspx&quot; rel=&quot;nofollow&quot;&gt;provides a custom build rule&lt;/a&gt; for Visual Studio that makes it fairly easy to integrate these tools into the VS IDE.</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t try building this particular project, but I have worked with bison and flex in Visual Studio. You will need <a href="http://gnuwin32.sourceforge.net/packages/bison.htm" rel="nofollow">Bison</a> and <a href="http://gnuwin32.sourceforge.net/packages/flex.htm" rel="nofollow">Flex</a>. Microsoft <a href="http://msdn.microsoft.com/en-us/library/aa730877(VS.80).aspx" rel="nofollow">provides a custom build rule</a> for Visual Studio that makes it fairly easy to integrate these tools into the VS IDE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dev</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-155</link>
		<dc:creator>Dev</dc:creator>
		<pubDate>Tue, 22 Jun 2010 08:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-155</guid>
		<description>Does this solution work with Visual studio environment? Or we need g++ type of compiler only.</description>
		<content:encoded><![CDATA[<p>Does this solution work with Visual studio environment? Or we need g++ type of compiler only.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-143</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 11 Jun 2010 00:11:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-143</guid>
		<description>Sorry, I need to describe my problem more.

bison waffleshop.y
flex waffleshop.l

work properly and no error output, but next

g++ lex.yy.cc Main.cpp waffleshop.tab.c -o waffleshop

returns quite a lot error reports.</description>
		<content:encoded><![CDATA[<p>Sorry, I need to describe my problem more.</p>
<p>bison waffleshop.y<br />
flex waffleshop.l</p>
<p>work properly and no error output, but next</p>
<p>g++ lex.yy.cc Main.cpp waffleshop.tab.c -o waffleshop</p>
<p>returns quite a lot error reports.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-142</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 10 Jun 2010 08:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-142</guid>
		<description>I am quite new to this, but have just tried to compile the files in Windows, 
===
bison waffleshop.y
flex waffleshop.l
g++ lex.yy.cc Main.cpp waffleshop.tab.c -o waffleshop
===
and failed with a lot of errors output.

Does this work for windows? Some of the errors are listed for your reference:
===
In file included from lex.yy.cc:238:
/usr/include/FlexLexer.h:130: error: expected unqualified-id before numeric constant
lex.yy.cc: In member function `virtual int Waffleshop::FlexScanner::yylex()&#039;:
lex.yy.cc:481: error: `cin&#039; undeclared (first use this function)
lex.yy.cc:481: error: (Each undeclared identifier is reported only once for each function it appears in.)
lex.yy.cc:484: error: `cout&#039; undeclared (first use this function)
lex.yy.cc:486: error: `yy_current_buffer&#039; undeclared (first use this function)
lex.yy.cc: At global scope:
lex.yy.cc:698: error: `ostream&#039; has not been declared
lex.yy.cc:699: error: ISO C++ forbids declaration of `arg_yyout&#039; with no type
lex.yy.cc:699: error: prototype for `yyFlexLexer::yyFlexLexer(istream*, int*)&#039; does not match any in class `yyFlexLexer&#039;
/usr/include/FlexLexer.h:112: error: candidates are: yyFlexLexer::yyFlexLexer(const yyFlexLexer&amp;)
/usr/include/FlexLexer.h:116: error:                 yyFlexLexer::yyFlexLexer(std::istream*, std::ostream*)
lex.yy.cc: In constructor `yyFlexLexer::yyFlexLexer(istream*, int*)&#039;:
lex.yy.cc:700: error: cannot convert `istream*&#039; to `std::istream*&#039; in assignment
lex.yy.cc:701: error: cannot convert `int*&#039; to `std::ostream*&#039; in assignment
lex.yy.cc:718: error: `yy_current_buffer&#039; undeclared (first use this function)
lex.yy.cc: In destructor `virtual yyFlexLexer::~yyFlexLexer()&#039;:
lex.yy.cc:730: error: `yy_current_buffer&#039; undeclared (first use this function)
...
===

Could you please give me some advices?</description>
		<content:encoded><![CDATA[<p>I am quite new to this, but have just tried to compile the files in Windows,<br />
===<br />
bison waffleshop.y<br />
flex waffleshop.l<br />
g++ lex.yy.cc Main.cpp waffleshop.tab.c -o waffleshop<br />
===<br />
and failed with a lot of errors output.</p>
<p>Does this work for windows? Some of the errors are listed for your reference:<br />
===<br />
In file included from lex.yy.cc:238:<br />
/usr/include/FlexLexer.h:130: error: expected unqualified-id before numeric constant<br />
lex.yy.cc: In member function `virtual int Waffleshop::FlexScanner::yylex()&#8217;:<br />
lex.yy.cc:481: error: `cin&#8217; undeclared (first use this function)<br />
lex.yy.cc:481: error: (Each undeclared identifier is reported only once for each function it appears in.)<br />
lex.yy.cc:484: error: `cout&#8217; undeclared (first use this function)<br />
lex.yy.cc:486: error: `yy_current_buffer&#8217; undeclared (first use this function)<br />
lex.yy.cc: At global scope:<br />
lex.yy.cc:698: error: `ostream&#8217; has not been declared<br />
lex.yy.cc:699: error: ISO C++ forbids declaration of `arg_yyout&#8217; with no type<br />
lex.yy.cc:699: error: prototype for `yyFlexLexer::yyFlexLexer(istream*, int*)&#8217; does not match any in class `yyFlexLexer&#8217;<br />
/usr/include/FlexLexer.h:112: error: candidates are: yyFlexLexer::yyFlexLexer(const yyFlexLexer&amp;)<br />
/usr/include/FlexLexer.h:116: error:                 yyFlexLexer::yyFlexLexer(std::istream*, std::ostream*)<br />
lex.yy.cc: In constructor `yyFlexLexer::yyFlexLexer(istream*, int*)&#8217;:<br />
lex.yy.cc:700: error: cannot convert `istream*&#8217; to `std::istream*&#8217; in assignment<br />
lex.yy.cc:701: error: cannot convert `int*&#8217; to `std::ostream*&#8217; in assignment<br />
lex.yy.cc:718: error: `yy_current_buffer&#8217; undeclared (first use this function)<br />
lex.yy.cc: In destructor `virtual yyFlexLexer::~yyFlexLexer()&#8217;:<br />
lex.yy.cc:730: error: `yy_current_buffer&#8217; undeclared (first use this function)<br />
&#8230;<br />
===</p>
<p>Could you please give me some advices?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Hollencamp</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-9</link>
		<dc:creator>Robert Hollencamp</dc:creator>
		<pubDate>Tue, 09 Mar 2010 01:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-9</guid>
		<description>I ended up removing the offending paragraph completely - it really didn&#039;t add anything to the post and gave people the wrong impression about the differences between the C skeleton and C++ skeleton. If you are playing with tools like Flex and Bison you probably know enough to decide for yourself whether you should use C or C++, so the pros and cons of this argument are left for the reader to decide.</description>
		<content:encoded><![CDATA[<p>I ended up removing the offending paragraph completely &#8211; it really didn&#8217;t add anything to the post and gave people the wrong impression about the differences between the C skeleton and C++ skeleton. If you are playing with tools like Flex and Bison you probably know enough to decide for yourself whether you should use C or C++, so the pros and cons of this argument are left for the reader to decide.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Hollencamp</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-8</link>
		<dc:creator>Robert Hollencamp</dc:creator>
		<pubDate>Mon, 08 Mar 2010 17:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-8</guid>
		<description>I was not trying to say C scanners / parsers could not be made thread safe - all I meant was that C++ scanners / parsers don&#039;t require any additional configuration to make them so. I&#039;ll reword the paragraph to make this clearer.

The example is intentionally sparse in features to make it simple and easy to follow / understand. For a more feature rich (and more complex) example, check out Timo Bingmann&#039;s example.

As far as my example not being portable to anything besides Flex and Bison, the title of the post is &#039;Flex and Bison in C++...&#039; :P</description>
		<content:encoded><![CDATA[<p>I was not trying to say C scanners / parsers could not be made thread safe &#8211; all I meant was that C++ scanners / parsers don&#8217;t require any additional configuration to make them so. I&#8217;ll reword the paragraph to make this clearer.</p>
<p>The example is intentionally sparse in features to make it simple and easy to follow / understand. For a more feature rich (and more complex) example, check out Timo Bingmann&#8217;s example.</p>
<p>As far as my example not being portable to anything besides Flex and Bison, the title of the post is &#8216;Flex and Bison in C++&#8230;&#8217; <img src='http://www.thewaffleshop.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: redbrain</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-7</link>
		<dc:creator>redbrain</dc:creator>
		<pubDate>Mon, 08 Mar 2010 16:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-7</guid>
		<description>Well i don&#039;t agree with your statement that the C lexer and parsers are not thread safe, you can generate the reentrant parsers fine. Flex is an implementation of the LEX language to generate a lexer and bison is an implementation of YACC each with many many more rich features in you lexer and parser are neither portable to anything other than flex and bison neither is the C++ code since you use #pragma once. http://en.wikipedia.org/wiki/Pragma_once

Really i find this syntactic sugar for calling yyparse and really you havent got enough features to set input sources via get/set since fully abstracted C++ gives rise to the pattern of dont touch the implementation code rather use member access on the object. Though really I don&#039;t see the benefit in using C++ over C other than STL.</description>
		<content:encoded><![CDATA[<p>Well i don&#8217;t agree with your statement that the C lexer and parsers are not thread safe, you can generate the reentrant parsers fine. Flex is an implementation of the LEX language to generate a lexer and bison is an implementation of YACC each with many many more rich features in you lexer and parser are neither portable to anything other than flex and bison neither is the C++ code since you use #pragma once. <a href="http://en.wikipedia.org/wiki/Pragma_once" rel="nofollow">http://en.wikipedia.org/wiki/Pragma_once</a></p>
<p>Really i find this syntactic sugar for calling yyparse and really you havent got enough features to set input sources via get/set since fully abstracted C++ gives rise to the pattern of dont touch the implementation code rather use member access on the object. Though really I don&#8217;t see the benefit in using C++ over C other than STL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/comment-page-1/#comment-5</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 07 Mar 2010 12:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.thewaffleshop.net/?p=53#comment-5</guid>
		<description>Hey, thanks. I&#039;ve never seen these tools used in C++ mode, this actually makes me more inclined to use them. I hated how crusty the code output of Bison felt, but this alleviates most problems with the C code.</description>
		<content:encoded><![CDATA[<p>Hey, thanks. I&#8217;ve never seen these tools used in C++ mode, this actually makes me more inclined to use them. I hated how crusty the code output of Bison felt, but this alleviates most problems with the C code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
