[Types-sig] Viper module compiler begun
Bill Tutt
billtut@microsoft.com
Mon, 27 Dec 1999 12:54:06 -0800
> -----Original Message-----
> From: skaller [mailto:skaller@maxtal.com.au]
>
> Greg Stein wrote:
> > > skaller wrote:
> > >
> > > Last time I tried that, it crashed unceremoniously.
> > > Has that been fixed?
> >
> > Not much of a bug report. Get serious. How the heck should
> I know whether
> > that particular bug has been fixed?
> >
> > "oh. it broke. fix it." *snort*
> >
> > As far as I know, P2C can successfully convert *any* module
> into a Python
> > extension model.
>
> Here's what I get with the latest version:
> Did I do something wrong?
>
> [root@ruby] ~/py2c>python gencode.py gencode.py __gencode.c
> _gencode.py
> Traceback (innermost last):
> File "gencode.py", line 35, in ?
> genc.Generator(args[0], args[1], args[2])
> File "genc.py", line 91, in __init__
> tree = t.parsefile(input)
> File "transformer.py", line 176, in parsefile
> return self.parsesuite(file.read())
> File "transformer.py", line 166, in parsesuite
> return self.transform(parser.suite(text))
> parser.ParserError: Could not parse string.
Well, that indeed is a strange incident given that Python's internal parser
liked thef ile and then subsequently didn't like the file. :)
I've gone and stuck the current contents of CVS at:
http://lima.mudlib.org/~rassilon/p2c/p2c-cvs.zip
This should produce slightly happier output, the compiled transformer.py
actually works and shaves one whole second off the execution time of
translating genc.py.
I haven't yet been able to test genc.py's compiled C code completly since
MSVC has this annoying habit of stop emitting line #s in its debug info
after the 64kth line. (Ugh.)
Bill