X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e9071366c3104e4e4a2490c16d53e7eeef670f45..0049ec8628e5a320d055a0cea8676a58cec60986:/src/location.h?ds=sidebyside diff --git a/src/location.h b/src/location.h index 542c6320..0b4f715a 100644 --- a/src/location.h +++ b/src/location.h @@ -1,5 +1,5 @@ /* Locations for Bison - Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -44,9 +44,9 @@ typedef struct static inline void boundary_set (boundary *b, const char *f, int l, int c) { - b->file = f; - b->line = l; - b->column = c; + b->file = f; + b->line = l; + b->column = c; } /* Return nonzero if A and B are equal boundaries. */ @@ -71,6 +71,7 @@ typedef struct #define YYLTYPE location +#define EMPTY_LOCATION_INIT {{NULL, 0, 0}, {NULL, 0, 0}} extern location const empty_location; /* Set *LOC and adjust scanner cursor to account for token TOKEN of @@ -80,4 +81,7 @@ void location_compute (location *loc, void location_print (FILE *out, location loc); +/* LOC_STR must be formatted as `file:line.column', it will be modified. */ +void boundary_set_from_string (boundary *bound, char *loc_str); + #endif /* ! defined LOCATION_H_ */