TinyPy on OpenVMS/VAX

Skip to first unread message

Harry Roberts

Apr 9, 2010, 3:28:44 PM4/9/10
to tinypy
Hi all,

This should be treated more as a curiosity than an actual bug.

I did something stupid and compiled TinyPy on OpenVMS 7.1 in a VAX

Well, it compiles after a small change to the TP_DEFAULT macro (DEC C
compiler doesn't like it for some reason) and added in vsnprintf
support (no, the DEC C standard library doesn't include it), after
that it actually compiles without any warnings.

However something's not right, the check to include 'boot' in
py2bc.py doesn't act as expected... so I comment that out.

Now we can run tinypy, however compiling anything fails hard:
$ cc mymain.c
$ link mymain.c
$ tinypy :== $[harryr.tinypy]mymain.exe
$ tinypy test.py

File "py2bc.py", line 44, in tinypy
return import_fname(ARGV[0],'__main__')
File "py2bc.py", line 38, in import_fname
code = _compile(s,fname)
File "py2bc.py", line 7, in _compile
tokens = tokenize.tokenize(s)
File "tokenize.py", line 40, in tokenize
except: u_error('tokenize',s,T.f)
File "tokenize.py", line 13, in u_error
raise 'error: '+ctx+'\n'+r

error: tokenize

I haven't figured out how to get the DEC debugger working yet, but
maybe I'll manage to fix this some day.
Something in tokenize.py/do_tokenize is broken, and so is the
tokenize.py/u_error function, but it's too obscure for me to even hint
at an understanding, perhaps tp_add is doing some extremely weird

- Harry Roberts

Reply all
Reply to author
0 new messages