diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-04-24 22:26:32 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-04-24 22:26:32 +0000 |
commit | 665132f945eb6865fb7b86affb68c4019d46c36f (patch) | |
tree | f9721bbac2b2833b462f4b8b0309246c2119c037 /gdb/parse.c | |
parent | 6ff9af88cb43cdc514a673322e4247fc138cecdc (diff) | |
download | gdb-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/parse.c')
-rw-r--r-- | gdb/parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/parse.c b/gdb/parse.c index 1a1003b..9c1f3e1 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -76,6 +76,7 @@ int arglist_len; union type_stack_elt *type_stack; int type_stack_depth, type_stack_size; char *lexptr; +char *prev_lexptr; char *namecopy; int paren_depth; int comma_terminates; @@ -1126,6 +1127,7 @@ parse_exp_1 (char **stringptr, struct block *block, int comma) struct cleanup *old_chain; lexptr = *stringptr; + prev_lexptr = NULL; paren_depth = 0; type_stack_depth = 0; |