-----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 c...@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-----