+/* Parses an attribute name optionally followed by an index inside square
+ brackets. Returns the attribute name or NULL if there was a parse error.
+ Stores the index into *INDEX. */
+static char *
+parse_attribute_name (struct lexer *lexer, size_t *index)