Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #12129
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Include column in syntax error message |
| Date | 2015-12-28 20:24 -0500 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.1199.1451352257.843.bug-bash@gnu.org> (permalink) |
| References | <5679DA1D.4080906@richtercloud.de> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/22/15 6:17 PM, Karl-Philipp Richter wrote: > Hi, > Currently, syntax error messages like ``bash: syntax error near > unexpected token `;'``, e.g. after issuing `echo a &; echo b &; echo c > &;` aren't as helpful as they could be. It'd be nice to know at which > column, i.e. which `;`, the message refers to by adding the column to > the error message, e.g. ``bash: syntax error near unexpected token `;' > (col. y)``. That's not easy to do with yacc/bison, which often reads one or more tokens ahead before determining whether or not a syntax error occurred. That's why the error message uses the token that caused the error, not the current input string index. - -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlaB4KMACgkQu1hp8GTqdKu0ywCdG6JzYZJs10GiqElPKOgU+BZ9 puMAoJBril6ditjbFIAZM/Ec5d7BX1jq =3YU/ -----END PGP SIGNATURE-----
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Include column in syntax error message Chet Ramey <chet.ramey@case.edu> - 2015-12-28 20:24 -0500
csiph-web