]> git.draconx.ca Git - cdecl99.git/blobdiff - src/parse.y
libcdecl: Simplify Bison error message reporting.
[cdecl99.git] / src / parse.y
index a993ea6100459e100bd3f367da553b35f7541d0f..f507d5b6ee106e163f7c98a0e31150c906672efa 100644 (file)
        ALLOC(ptr, sizeof (type)); \
        *(ptr) = (type) { __VA_ARGS__ }; \
 } while (0)
+
+/*
+ * With the postprocessing performed by fix-yytname.awk, all the symbol
+ * name strings can be used directly in error messages and there is no
+ * need for any string processing.
+ */
+#define yytnamerr(a, b) cdecl__strlcpy(a, b, (a) ? INT_MAX : 0)
 %}
 
 %code requires {