+
+#define ALLOC_ARRAY(ptr, length_) do { \
+ ALLOC_ITEM_DECLARATOR(ptr); \
+ (ptr)->type = CDECL_DECL_ARRAY; \
+ (ptr)->u.array.vla = NULL; \
+ (ptr)->u.array.length = length_; \
+} while (0)
+
+#define ALLOC_POINTER(ptr, qualifiers_, child_) do { \
+ ALLOC_ITEM_DECLARATOR(ptr); \
+ (ptr)->child = child_; \
+ (ptr)->type = CDECL_DECL_POINTER; \
+ (ptr)->u.pointer.qualifiers = qualifiers_; \
+} while (0)
+
+#define ALLOC_DECLSPEC(ptr, type_) do { \
+ ALLOC_ITEM_DECLSPEC(ptr); \
+ (ptr)->type = type_; \
+ (ptr)->ident = NULL; \
+} while (0)
+
+#define ALLOC_DECL(ptr, specifiers_, declarators_) do { \
+ ALLOC_ITEM_DECL(ptr); \
+ (ptr)->specifiers = specifiers_; \
+ (ptr)->declarators = declarators_; \
+} 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) ( (a) ? yytnamerr_copy(a, b) \
+ : strlen(b) )
+
+static size_t yytnamerr_copy(char *dst, const char *src)
+{
+ return cdecl__strlcpy(dst, src, strlen(src)+1);
+}