aboutsummaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-04-24 22:26:32 +0000
committerMichael Snyder <msnyder@vmware.com>2002-04-24 22:26:32 +0000
commit665132f945eb6865fb7b86affb68c4019d46c36f (patch)
treef9721bbac2b2833b462f4b8b0309246c2119c037 /gdb/parser-defs.h
parent6ff9af88cb43cdc514a673322e4247fc138cecdc (diff)
downloadgdb-665132f945eb6865fb7b86affb68c4019d46c36f.zip
gdb-665132f945eb6865fb7b86affb68c4019d46c36f.tar.gz
gdb-665132f945eb6865fb7b86affb68c4019d46c36f.tar.bz2
2002-04-24 Michael Snyder <msnyder@redhat.com>
* parser-defs.h (prev_lexptr): New external variable. * parse.c (parse_exp_1): Set prev_lexptr to null before calling the language-specific parser. * c-exp.y (yylex): Set prev_lexptr to start of current token. (yyerror): Use prev_lexptr in error reporting.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 5b2e47b..ece2849 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -150,6 +150,10 @@ extern struct type *follow_types (struct type *);
extern char *lexptr;
+/* After a token has been recognized, this variable points to it.
+ Currently used only for error reporting. */
+extern char *prev_lexptr;
+
/* Tokens that refer to names do so with explicit pointer and length,
so they can share the storage that lexptr is parsing.