rev 522 - in trunk: pr/test src
SVN User <[email protected]> Thu, 20 May 2004 20:01:02 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-05-20 20:00:58 -0400 (Thu, 20 May 2004)
New Revision: 522
Modified:
trunk/pr/test/test.pr
trunk/src/prothon.y
Log:
fixed triple-quote string emitting spurious quote char
Modified: trunk/pr/test/test.pr
===================================================================
--- trunk/pr/test/test.pr 2004-05-20 23:44:27 UTC (rev 521)
+++ trunk/pr/test/test.pr 2004-05-21 00:00:58 UTC (rev 522)
@@ -1,54 +1,3 @@
#!/usr/bin/env prothon
-def refer(start, attrname):
- mro = self.protoList()
- n = mro.len()
- i = 0
- while i < n:
- if mro[i] is start:
- break
- i += 1
- if i == n:
- raise AttributeError
- while True:
- i += 1
- if i == n:
- break
- o = mro[i]
- attrs = o.attrs()
- if attrname in attrs:
- a = attrs[attrname]
- if a.hasProto?(Func):
- return a
- return a
- raise AttributeError
-
-object ModInt(Int):
- modulo = 10
- def call_(i=0):
- call = refer(ModInt, 'call_')
- return call{self}(i % self.modulo)
-
- def add_(other):
- if self.modulo != other.modulo:
- raise TypeError
- proto = self.protoList()[1]
- add = refer(ModInt, 'add_')
- x = proto(add{self}(other))
- print "new", x
- return x
-
-object Mod8Int(ModInt):
- modulo = 8
-
-m = Mod8Int(1)
-n = Mod8Int(1)
-for i in 1000:
- m = m + n
- if (m != i % 8):
- print "test failed:",i
- Sys.exit(1)
-
-print """
-All tests passed
-"""
+print """"""
\ No newline at end of file
Modified: trunk/src/prothon.y
===================================================================
--- trunk/src/prothon.y 2004-05-20 23:44:27 UTC (rev 521)
+++ trunk/src/prothon.y 2004-05-21 00:00:58 UTC (rev 522)
@@ -878,9 +878,10 @@
int c2;
if ((c2=getch(state)) == q_char )
triple_flag = 1;
- else
+ else {
ungetch(c2, state);
ungetch(c, state);
+ }
} else
ungetch(c, state);
while(1){