diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-06-14 08:25:07 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-06-14 08:25:07 +0000 |
commit | f4db54055cd36d83622f77949fd6ab7c67198101 (patch) | |
tree | fdaa9a05f9cc98d05bb9049d7772de6ea8216b68 /perlyline.pl | |
parent | 2d31dd6aa775ba3ae596182dab64c54df2e34ba1 (diff) | |
download | perl-f4db54055cd36d83622f77949fd6ab7c67198101.tar.gz |
Add new step to run_byacc which:
A. Corrects #line NNN "perly.c" lines so warnings etc. are trackable
B. Adds extra () to the two if (var = ...) constructs gcc -Wall winges about.
p4raw-id: //depot/perlio@10586
Diffstat (limited to 'perlyline.pl')
-rw-r--r-- | perlyline.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perlyline.pl b/perlyline.pl new file mode 100644 index 0000000000..f360fb41ef --- /dev/null +++ b/perlyline.pl @@ -0,0 +1,11 @@ +$line = 1; +while (<>) + { + $line++; + # 1st correct #line directives for perly.c itself + s/^(#line\s+)\d+(\s*"perly\.c"\s*)$/$1$line$2/; + # now add () round things gcc dislikes + s/if \(yyn = yydefred\[yystate\]\)/if ((yyn = yydefred[yystate]))/; + s/if \(yys = getenv\("YYDEBUG"\)\)/if ((yys = getenv("YYDEBUG")))/; + print; + } |