2009-12-04 02:40:58 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2018-12-19 00:07:37 +08:00
|
|
|
from __future__ import absolute_import, division, print_function
|
2009-12-04 02:40:58 +08:00
|
|
|
def pcall(f, N):
|
|
|
|
if N == 0:
|
2018-12-18 16:36:33 +08:00
|
|
|
print(' f(0)', file=f)
|
2009-12-04 02:40:58 +08:00
|
|
|
return
|
|
|
|
|
2018-12-18 16:36:33 +08:00
|
|
|
print(' f(', file=f)
|
2009-12-04 02:40:58 +08:00
|
|
|
pcall(f, N - 1)
|
2018-12-18 16:36:33 +08:00
|
|
|
print(' )', file=f)
|
2009-12-04 02:40:58 +08:00
|
|
|
|
|
|
|
def main():
|
|
|
|
f = open('t.c','w')
|
2018-12-18 16:36:33 +08:00
|
|
|
print('int f(int n) { return n; }', file=f)
|
|
|
|
print('int t() {', file=f)
|
|
|
|
print(' return', file=f)
|
2009-12-04 02:40:58 +08:00
|
|
|
pcall(f, 10000)
|
2018-12-18 16:36:33 +08:00
|
|
|
print(' ;', file=f)
|
|
|
|
print('}', file=f)
|
2009-12-04 02:40:58 +08:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
import sys
|
|
|
|
sys.setrecursionlimit(100000)
|
|
|
|
main()
|