[erlang-questions] erlc: interesting error message

Richard A. O'Keefe ok@REDACTED
Fri Jan 24 03:12:53 CET 2014


On 24/01/2014, at 5:05 AM, Tuncer Ayaz wrote:
[When there is a syntax error at the end of a file,
 you get a message
	<file>:<line> syntax error before: <nothing>
] Thoughts?

It would clearly be more helpful if it said
	syntax error before: end of file.

Grepping in the sources, I see a lot of
	["syntax error before: ", yecctoken2string(Token)]
occurrences.  It looks as though
	yecctoken2string({'$end',_}) -> [];
could be replaced by
	yecctoken2string({'$end',_}) -> "end of file";

If I'm right about where this is coming from, there are
lots of instances of it and they should probably all be
fixed.





More information about the erlang-questions mailing list