From 91fcd1584b47b95f35043b1ac1c4f8ca92a6e16f Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 9 Jul 2000 09:19:44 +0000 Subject: cpphash.h: ISvspace, is_vspace, is_nvspace: New. * cpphash.h: ISvspace, is_vspace, is_nvspace: New. IShspace, ISspace: Update. * cppinit.c: ISTABLE: Update. V: New. * cpplex.c (IS_HSPACE, S_NEWLINE): Remove. (IS_DIRECTIVE): Rename KNOWN_DIRECTIVE. (skip_block_comment, skip_line_comment, parse_string, lex_line): Use is_vspace rather than IS_NEWLINE. (skip_whitespace, lex_line): Clean up to use is_nvspace. (lex_line): Use KNOWN_DIRECTIVE. Any kind of directive gets a BOL flag. (lex_next): Unconditionally stop if within a directive. Treat directives within macro invocations as directives (after parse_args emits error), not as the argument. * testsuite/gcc.dg/cpp/directiv.c: New tests. * testsuite/gcc.dg/cpp/undef1.c: Update. From-SVN: r34933 --- gcc/cppinit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/cppinit.c') diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 0882634..88a3e8c 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -138,6 +138,7 @@ enum { QUOTE = 0, BRACKET, SYSTEM, AFTER }; #define A(x) s(x, ISidnum|ISidstart) #define N(x) s(x, ISidnum|ISnumstart) #define H(x) s(x, IShspace|ISspace) +#define V(x) s(x, ISvspace|ISspace) #define S(x) s(x, ISspace) ISTABLE @@ -153,14 +154,17 @@ ISTABLE N('1') N('2') N('3') N('4') N('5') N('6') N('7') N('8') N('9') N('0') - H('\0') H(' ') H('\t') H('\v') H('\f') + H(' ') H('\t') - S('\n') + V('\n') V('\r') + + S('\0') S('\v') S('\f') END #undef A #undef N #undef H +#undef V #undef S #undef s #undef ISTABLE -- cgit v1.1