]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Simplify Bison error message reporting.
authorNick Bowler <nbowler@draconx.ca>
Thu, 20 Jul 2023 02:22:10 +0000 (22:22 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 20 Jul 2023 02:22:10 +0000 (22:22 -0400)
Bison emits a bunch of code to pretty print token names for error
messages, doing things like removing quotes and backslashes.

But this is all totally pointless: all of the relevant strings are
already correctly formatted (in part because fix-yytname.awk does
some of this at compile time), and the process will not alter them.
They simply need to be copied as-is.

Fortunately, Bison provides a simple mechanism to replace this with
our own function, and wouldn't you know it we already have a suitable
copying function in the library, so let's use that.


No differences found