1BEGIN { FS="("; state = 0 } 2 3/^ public/ { ftype = $0; state = 1 } 4 5{ if (state == 1) 6 state = 2 7 else if (state == 2) 8 { print ftype,$1,"();"; state = 0 } 9} 10