[Python] Python can't handle this much while using recursion and setrecursionlimit() breaks it...

Discussão em 'Python' iniciado por Stack, Abril 5, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to make a interpreter for the Nexus Language, which you can find the code here. The problem is, when importing files, the code reads the file and runs it (just like it would run the main file), then grab its Symbol Table (in which stores the variables) and gets the variable/function you tried to import.
    When importing a lot of stuff, python gets that I'm running the Lexer, Parser and Interpreter a lot of times... and simply gives up, throwing the error instantly. I searched around and found sys.setrecursionlimit() but this somehow makes my code don't run. Maybe there's a while loop I'm not aware, but when writing less code or less importing on a .nxs file, Python handles it with no problem.
    I'm lost, completely lost.

    Continue reading...

Compartilhe esta Página