ruby/tool/ytab.sed

11 строки
185 B
Sed
Executable File

#!/bin/sed -f
/^int yydebug;/{
i\
#ifndef yydebug
a\
#endif
}
s/^[ ]*\(yyerror[ ]*([ ]*parser,\)/parser_\1/
s!^ *extern char \*getenv();!/* & */!
s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/