cvs commit: src/bin/sh expand.c parser.c parser.h
Stefan Farfeleder
stefanf at FreeBSD.org
Sun Nov 5 18:36:06 UTC 2006
stefanf 2006-11-05 18:36:05 UTC
FreeBSD src repository
Modified files:
bin/sh expand.c parser.c parser.h
Log:
When parsing an invalid parameter expansion (eg. ${} or ${foo at bar}) do not
issue a syntax error immediately but save the information that it is erroneous
for later when the parameter expansion is actually done. This means eg. "false
&& ${}" will not generate an error which seems to be required by POSIX.
Include the invalid parameter expansion in the error message (sometimes
abbreviated with ... because recovering it would require a lot of code).
PR: 105078
Submitted by: emaste
Revision Changes Path
1.50 +5 -0 src/bin/sh/expand.c
1.58 +19 -9 src/bin/sh/parser.c
1.11 +1 -0 src/bin/sh/parser.h
More information about the cvs-src
mailing list