in reply to Re: Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskell
in thread Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskell
You are right. My intent was to use /^-?\d+$/ but somehow I "forgot" to insert the anchors. :-( Curiously, when emulating the regex in hand-rolled Haskell code, I somehow "remembered" to insert the anchors. :-) I've updated the Perl code in the root node by inserting the anchors. The Haskell isStrDigit function already checks for all digits (equivalent to using the anchors) and so does not require update. Thanks ambrus.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Tales from writing a RPN evaluator in Perl 5, Perl 6 and Haskell
by TimToady (Parson) on Jan 05, 2006 at 17:21 UTC |