/* Bison Grammar Scanner -*- C -*-
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
/* Bracketed identifiers support. */
%x SC_BRACKETED_ID SC_RETURN_BRACKETED_ID
-letter [-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]
-id {letter}({letter}|[0-9])*
+letter [.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]
+id {letter}({letter}|[-0-9])*
directive %{id}
int [0-9]+
%%
%{
/* Nesting level of the current code in braces. */
- int braces_level IF_LINT (= 0);
+ int braces_level PACIFY_CC (= 0);
/* Parent context state, when applicable. */
- int context_state IF_LINT (= 0);
+ int context_state PACIFY_CC (= 0);
/* Location of most recent identifier, when applicable. */
- location id_loc IF_LINT (= empty_location);
+ location id_loc PACIFY_CC (= empty_location);
/* Where containing code started, when applicable. Its initial
value is relevant only when yylex is invoked in the SC_EPILOGUE
/* Where containing comment or string or character literal started,
when applicable. */
- boundary token_start IF_LINT (= scanner_cursor);
+ boundary token_start PACIFY_CC (= scanner_cursor);
%}
{
char *after_num;
unsigned long int lineno = strtoul (args, &after_num, 10);
- char *file = strchr (after_num, '"') + 1;
- *strchr (file, '"') = '\0';
+ char *file = mbschr (after_num, '"') + 1;
+ *mbschr (file, '"') = '\0';
if (INT_MAX <= lineno)
{
warn_at (loc, _("line number overflow"));