diff options
author | Joel E. Denny <jdenny@ces.clemson.edu> | 2006-08-10 04:53:04 +0000 |
---|---|---|
committer | Joel E. Denny <jdenny@ces.clemson.edu> | 2006-08-10 04:53:04 +0000 |
commit | f9bfc42aa704603fc3aeb18be00c78871569a0b4 (patch) | |
tree | 22f3ad4ef844484c6f5f520b4c6a63608a6a15d1 /src/flex-scanner.h | |
parent | 06e8700a000fb661a3d15db8e1dfeb6bfcccf86d (diff) | |
download | bison-f9bfc42aa704603fc3aeb18be00c78871569a0b4.tar.gz |
Clean up scanners a bit.
* src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
definitions so gcc won't warn when obstack_for_string is unused.
* src/scan-code.l: config.h and system.h are already #include'd by
scan-code-c.c, so get rid of them here.
* src/scan-gram.l: Likewise.
* src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
definitions rather than duplicating the rest of it.
* src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
Diffstat (limited to 'src/flex-scanner.h')
-rw-r--r-- | src/flex-scanner.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/flex-scanner.h b/src/flex-scanner.h index bf190afd..3e16234c 100644 --- a/src/flex-scanner.h +++ b/src/flex-scanner.h @@ -1,4 +1,4 @@ -/* Common parts between scan-code.l and scan-gram.l. +/* Common parts between scan-code.l, scan-gram.l, and scan-skel.l. Copyright (C) 2006 Free Software Foundation, Inc. @@ -59,6 +59,8 @@ int FLEX_PREFIX (lex_destroy) (void); 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 \ @@ -72,3 +74,5 @@ static struct obstack obstack_for_string; #define STRING_FREE \ obstack_free (&obstack_for_string, last_string) + +#endif |