Index: PirateTest.py =================================================================== RCS file: /cvs/pirate/pirate/PirateTest.py,v retrieving revision 1.53 diff -u -r1.53 PirateTest.py --- PirateTest.py 21 Jan 2004 19:54:19 -0000 1.53 +++ PirateTest.py 7 Oct 2004 07:42:42 -0000 @@ -116,6 +116,14 @@ self.assertEquals(res, "2 2\n") + def test_concat(self): + res = self.run( + """ + print "foo" + "bar" + """, dump=0) + self.assertEquals(res, "foobar\n") + + def test_compare(self): res = self.run( """ Index: __builtin__.py =================================================================== RCS file: /cvs/pirate/pirate/__builtin__.py,v retrieving revision 1.1 diff -u -r1.1 __builtin__.py --- __builtin__.py 11 Jan 2004 05:49:34 -0000 1.1 +++ __builtin__.py 7 Oct 2004 07:42:42 -0000 @@ -30,9 +30,7 @@ else: # step must be < 0, or we would have raised ValueError if stop >= start: # no work for us return [] - howmany = (start - stop - step - 1)/-step - - howmany = howmany - 2 #@TODO: fix the math in pirate!! + howmany = (start - stop - step - 1)/-step PARROT_INLINE('find_lex $P0, "howmany"') PARROT_INLINE('$I0 = $P0') Index: pirate.py =================================================================== RCS file: /cvs/pirate/pirate/pirate.py,v retrieving revision 1.63 diff -u -r1.63 pirate.py --- pirate.py 11 Jan 2004 05:57:58 -0000 1.63 +++ pirate.py 7 Oct 2004 07:42:43 -0000 @@ -350,6 +350,8 @@ self.append("%s = new PerlUndef" % dest) lside = self.compileExpression(node.left, allocate=1) rside = self.compileExpression(node.right) + if rside.startswith("'"): + rside = self.compileExpression(node.right, allocate=1) op = self.infixOps[node.__class__] self.append("%s = %s %s %s" % (dest, lside, op, rside)) @@ -1088,7 +1090,7 @@ return [(i+1, seq[i]) for i in range(len(seq))] def invoke(src, dump=0, lines=0): - i,o = os.popen4("parrot -") + i,o = os.popen4("parrot --python -") code = compile(src) if dump: print