From 94ffa8407566de48f55036ce705924d7ee111d25 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 1 Nov 2010 14:29:21 +0100 Subject: Improve formating of Yecc error messages The formating of Yecc's error messages has been improved. (Thanks to Joe Armstrong.) --- lib/parsetools/include/yeccpre.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/parsetools/include/yeccpre.hrl') diff --git a/lib/parsetools/include/yeccpre.hrl b/lib/parsetools/include/yeccpre.hrl index 39dea0552d..80a3afbdb6 100644 --- a/lib/parsetools/include/yeccpre.hrl +++ b/lib/parsetools/include/yeccpre.hrl @@ -167,7 +167,7 @@ yecctoken2string({char,_,C}) -> io_lib:write_char(C); yecctoken2string({var,_,V}) -> io_lib:format("~s", [V]); yecctoken2string({string,_,S}) -> io_lib:write_unicode_string(S); yecctoken2string({reserved_symbol, _, A}) -> io_lib:write(A); -yecctoken2string({_Cat, _, Val}) -> io_lib:write(Val); +yecctoken2string({_Cat, _, Val}) -> io_lib:format("~p",[Val]); yecctoken2string({dot, _}) -> "'.'"; yecctoken2string({'$end', _}) -> []; -- cgit v1.2.3