+/*----------------------------------------------------------------.
+| Handle `#line INT "FILE"'. ARGS has already skipped `#line '. |
+`----------------------------------------------------------------*/
+
+static void
+handle_syncline (char *args, location_t *location)
+{
+ int lineno = strtol (args, &args, 10);
+ const char *file = NULL;
+ file = strchr (args, '"') + 1;
+ *strchr (file, '"') = 0;
+ /* FIXME: Leaking... Can't free, as some locations are still
+ pointing to the old file name. */
+ infile = xstrdup (file);
+ location->file = infile;
+ location->last_line = lineno;
+}
+
+
+/*-------------------------------------------------------------.
+| Report an unexpected end of file at LOC. An end of file was |
+| encountered and the expected TOKEN_END was missing. After |
+| reporting the problem, pretend that TOKEN_END was found. |
+`-------------------------------------------------------------*/
+
+static void
+unexpected_end_of_file (location_t *loc, char const *token_end)
+{
+ size_t i = strlen (token_end);
+
+ complain_at (*loc, _("missing `%s' at end of file"), token_end);
+
+ /* Adjust location's last column so that any later message does not
+ mention the characters just inserted. */
+ loc->last_column -= i;
+
+ while (i != 0)
+ unput (token_end[--i]);
+}
+
+