blob: 1750a5fca031da62783666b81da076e3f7846dee [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001#!/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()