X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/05e25f2384b96708ffaaf01e77f432736bd99d83..75ae8299840bbd854fa2474d38402bbb933c6511:/src/scan-code.l diff --git a/src/scan-code.l b/src/scan-code.l index bff3280a..cced97bf 100644 --- a/src/scan-code.l +++ b/src/scan-code.l @@ -78,8 +78,9 @@ static bool untyped_var_seen; /* POSIX says that a tag must be both an id and a C union member, but historically almost any character is allowed in a tag. We disallow - NUL and newline, as this simplifies our implementation. */ -tag [^\0\n>]+ + NUL and newline, as this simplifies our implementation. We allow + "->" as a means to dereference a pointer. */ +tag ([^\0\n>]|->)+ /* Zero or more instances of backslash-newline. Following GCC, allow white space between the backslash and the newline. */ @@ -595,7 +596,8 @@ fetch_type_name (char *cp, char const **type_name, if (*cp == '<') { *type_name = ++cp; - while (*cp != '>') + /* Series of non-'>' or "->". */ + while (*cp != '>' || cp[-1] == '-') ++cp; /* The '>' symbol will be later replaced by '\0'. Original