src/Pure/Syntax/parser.ML
changeset 6165 a7d74bf9da52
parent 4913 44c6f462c8fa
child 6844 3909657a7da6
equal deleted inserted replaced
6164:a0e9501d56f8 6165:a7d74bf9da52
   790   let
   790   let
   791     val msg =
   791     val msg =
   792       if null toks then Pretty.str "Inner syntax error: unexpected end of input"
   792       if null toks then Pretty.str "Inner syntax error: unexpected end of input"
   793       else
   793       else
   794         Pretty.block (Pretty.str "Inner syntax error at: \"" ::
   794         Pretty.block (Pretty.str "Inner syntax error at: \"" ::
   795           Pretty.breaks (map (Pretty.str o str_of_token) (rev (tl (rev toks)))) @
   795           Pretty.breaks (map (Pretty.str o Symbol.output o str_of_token)
       
   796 		 (rev (tl (rev toks)))) @
   796           [Pretty.str "\""]);
   797           [Pretty.str "\""]);
   797     val expected =
   798     val expected =
   798       Pretty.strs ("Expected tokens: " :: map (quote o str_of_token) allowed);
   799       Pretty.strs ("Expected tokens: " :: map (quote o str_of_token) allowed);
   799   in
   800   in
   800     error (Pretty.string_of (Pretty.blk (0, [msg, Pretty.fbrk, expected])))
   801     error (Pretty.string_of (Pretty.blk (0, [msg, Pretty.fbrk, expected])))