Re: [BUG] dash doesn't report syntax error when it should on stray "fi"
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Chet Ramey wrote: > The way I read 2.10.2, Posix requires that the "fi" resolve to the > reserved word `fi' in this case, since it's in a position where a > command name is expected (Rule 1, [Command Name]). I would think that > would make it a syntax error in any application, conforming or not. Yes, I think you're right. For some reason I thought that using reserved words in ways not permitted by the grammar produced undefined behavior, to support shells with extensions like the arithmetic "for". But now that I read more closely, it looks like "function", "[[", "]]", and "select" produce unspecified behavior but everything else is pretty well specified. Thanks for clarifying. -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[LARTC] [Bugtraq] [Yosemite Forum] [Photo]