Past-pm printing the return value of the main routine

2006-12-12 Thread Allison Randal
In Punie or Perl 6, when I execute a simple statement: print "2"; It prints "21". This is because a) the return value of a successful print is "1", b) the main routine is returning the value of the last statement (note this is correct for Perl, but isn't correct for all languages), and c) H

Re: Past-pm basic string types

2006-12-12 Thread Allison Randal
Patrick R. Michaud wrote: PAST-pm expects it to be pretty rare that a HLL's string literal format will exactly match what works as a string literal in PIR, so PAST::Val nodes expect the HLL to have already decoded the string constant according to whatever rules the HLL uses. Then PAST-pm can

Re: Past-pm basic string types

2006-12-12 Thread Patrick R. Michaud
On Tue, Dec 12, 2006 at 09:43:39AM -0800, Allison Randal wrote: > Patrick, what's the best way to pass-through string types from a > compiler to Parrot without doing full string processing? To pass the > current tests, Punie only needs Parrot's single- and double-quoted > strings, but Past-pm is

Re: Past-pm printing the return value of the main routine

2006-12-12 Thread Allison Randal
Patrick R. Michaud wrote: What revision number are you working with? I think this was fixed in a later revision of HLLCompiler. Aye, this was yesterday. Working now. Allison

Re: Past-pm printing the return value of the main routine

2006-12-12 Thread Patrick R. Michaud
On Tue, Dec 12, 2006 at 09:47:16AM -0800, Allison Randal wrote: > In Punie or Perl 6, when I execute a simple statement: > > print "2"; > > It prints "21". This is because a) the return value of a successful > print is "1", b) the main routine is returning the value of the last > statement (n

Past-pm printing the return value of the main routine

2006-12-12 Thread Allison Randal
In Punie or Perl 6, when I execute a simple statement: print "2"; It prints "21". This is because a) the return value of a successful print is "1", b) the main routine is returning the value of the last statement (note this is correct for Perl, but isn't correct for all languages), and c) H

Past-pm basic string types

2006-12-12 Thread Allison Randal
Patrick, what's the best way to pass-through string types from a compiler to Parrot without doing full string processing? To pass the current tests, Punie only needs Parrot's single- and double-quoted strings, but Past-pm is escaping them. So: print "\n"; reaches the PIR translation as: