rzuckerm / whitespace-python

A Whitespace interpreter written in Python.
https://web.archive.org/web/20150717190859/http://compsoc.dur.ac.uk:80/whitespace/
MIT License
0 stars 0 forks source link

Source code character limit? #3

Closed rzuckerm closed 4 days ago

rzuckerm commented 1 week ago

From @eli-kaituri-minco (dwayne/whitespace-python#8): I wrote a transpiler so I could reasonably code golf in whitespace, so my source code is of decent length. Going over ~2440 characters in the source code file seems to trigger a recursion error due to max depth reached. Is this an inherent limitation due to the implementation of the parser as a recursive function in Python? Or is this a fixable issue within the interpreter code itself?

rzuckerm commented 1 week ago

@eli-kaituri-minco I suspect this code may be to blame:

There's really no reason to do these recursively.

Do you have a stack trace that you can share, as well as the code that is causing this?