+/* Concatenate strings before returning them to the parser. This isn't quite
+ as good as having it done in the lexer, but it's better than nothing. */
+
+static int
+yylexstring ()
+{
+ enum cpp_ttype next_type;
+ tree orig = yylval.ttype;
+
+ next_type = c_lex (&yylval.ttype);
+ if (next_type == CPP_STRING
+ || next_type == CPP_WSTRING
+ || (next_type == CPP_NAME && yylexname () == STRING))
+ {
+ varray_type strings;
+
+ifc
+ static int last_lineno = 0;
+ static const char *last_input_filename = 0;
+ if (warn_traditional && !in_system_header
+ && (input_line != last_lineno || !last_input_filename ||
+ strcmp (last_input_filename, input_filename)))
+ {
+ warning ("traditional C rejects string concatenation");
+ last_lineno = input_line;
+ last_input_filename = input_filename;
+ }
+end ifc
+
+ VARRAY_TREE_INIT (strings, 32, "strings");
+ VARRAY_PUSH_TREE (strings, orig);
+
+ do
+ {
+ VARRAY_PUSH_TREE (strings, yylval.ttype);
+ next_type = c_lex (&yylval.ttype);
+ }
+ while (next_type == CPP_STRING
+ || next_type == CPP_WSTRING
+ || (next_type == CPP_NAME && yylexname () == STRING));
+
+ yylval.ttype = combine_strings (strings);
+ }
+ else
+ yylval.ttype = orig;
+
+ /* We will have always read one token too many. */
+ _cpp_backup_tokens (parse_in, 1);
+
+ return STRING;
+}