4 ms·
Interestingly I came up with a similar algorithm like Relooper when I translated C to Python code. First I translate all C code to mostly equivalent Python code
by albertzeyer 7y ago
Interestingly I came up with a similar algorithm like Relooper when I translated C to Python code. First I translate all C code to mostly equivalent Python code but including some gotos, and then I get rid of those gotos by introducing some more loops. The current solution is simple but the resulting function could be slow.
https://github.com/albertz/PyCParser/blob/080a7b0472444fd366006c44fc15e388122989bd/goto.py#L102 https://github.com/albertz/PyCParser/blob/080a7b0472444fd366...