• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2
3def pcall(f, N):
4    if N == 0:
5        print >>f, '    f(0)'
6        return
7
8    print >>f, '    f('
9    pcall(f, N - 1)
10    print >>f, '     )'
11
12def main():
13    f = open('t.c','w')
14    print >>f, 'int f(int n) { return n; }'
15    print >>f, 'int t() {'
16    print >>f, '  return'
17    pcall(f, 10000)
18    print >>f, '  ;'
19    print >>f, '}'
20
21if __name__ == "__main__":
22    import sys
23    sys.setrecursionlimit(100000)
24    main()
25