Dan Sugalski wrote:
Leopold Toetsch wrote:Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 3:10 PM -0700 8/16/04, Danny Werner (via RT) wrote:
Examples from the 2th aoudad book (page 127) did not turn out as expected. Being completely new to this, I did not know where to put the testcode.
And now the test's in. Thanks!
You guys are great. I tried to fix it myself but my c skills are abominable. (BNF and regex somewhat better, but those appeared to be not enough for the code generation).
And fails with:
print -0x2a
Another one the lexer doesn't cope with. Is it reasonable to allow that?
I missed that one. Let's not allow negative hex/oct/binary numbers.
Heh. That is my feeling too. A was amazed when I read the examples in the book (p127), that's why I gave it a try.
An OCT 0[oO][0-7]+ for octals, if only for symmetry (octal is in the format specifiers), would seem fitting, though.
I guess you'll have to make some notes about this for the next edition of the book anyway. No - next edition will be two books: One about Perl6, one about Parrot :-)
Those get treated as unsigned, though if they spill over into the sign bit you end up with a negative number.
Well, another one of these: "We need exact PDDs for, well, all". BTW my request WRT integer PMCs isn't really fully answered.
That's what PDD 17's for. It ought to be filled in better, I agree.
Thank you both for your prompt response.