Nope, it seems that the code is correct after all. Perhaps a bit unclear, but correct. So shame on me!<div><br></div><div><br></div><div>Cheers,</div><div>Mikael<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Mikael Lyngvig</b> <span dir="ltr"><<a href="mailto:mikael@lyngvig.org">mikael@lyngvig.org</a>></span><br>Date: 2012/5/14<br>Subject: Tiny bug in Kaleidoscope sample<br>To: <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>
<br><br>Hi,<div><br></div><div>As far as I can tell, there's a tiny error in the sample code for the Kaleidoscope interpreter, which is part of the Tutorial:</div><div><br></div><div> 1. The function GetTokPrecedence() returns -1 on error (i.e. if the input character is a character value above 127).</div>
<div> 2. The caller of GetTokPrecedence() never checks for this so if the input character is an 8-bit character, it is treated as a valid binary operator.</div><div><br></div><div>I know this won't make the planet explode and that mankind will possibly survive another 200 years despite this bug, but I thought you'd want to know.</div>
<div><br></div><div><br></div><div>Cheers,</div><div>Mikael Lyngvig</div>
</div><br><br clear="all"><div><br></div>-- <br>-- Earth is a soddy place. Stay away!<br>
</div>