style: prefer 'FOO ()' to 'FOO' for function-like macros

* src/flex-scanner.h (STRING_GROW, STRING_FINISH, STRING_FREE):
Make them function-like macros.
Adjust dependencies.
This commit is contained in:
Akim Demaille
2020-06-13 08:11:22 +02:00
parent 1998606a90
commit c857ed4f72
5 changed files with 55 additions and 55 deletions

View File

@@ -94,22 +94,22 @@ int FLEX_PREFIX (lex_destroy) (void);
keep (to construct ID, STRINGS etc.). Use the following macros to
use it.
Use STRING_GROW to append what has just been matched, and
STRING_FINISH to end the string (it puts the ending 0).
STRING_FINISH also stores this string in LAST_STRING, which can be
used, and which is used by STRING_FREE to free the last string. */
Use STRING_GROW () to append what has just been matched, and
STRING_FINISH () to end the string (it puts the ending 0).
STRING_FINISH () also stores this string in LAST_STRING, which can be
used, and which is used by STRING_FREE () to free the last string. */
#ifndef FLEX_NO_OBSTACK
static struct obstack obstack_for_string;
# define STRING_GROW \
# define STRING_GROW() \
obstack_grow (&obstack_for_string, yytext, yyleng)
# define STRING_FINISH \
# define STRING_FINISH() \
(last_string = obstack_finish0 (&obstack_for_string))
# define STRING_FREE \
# define STRING_FREE() \
obstack_free (&obstack_for_string, last_string)
#endif