aboutsummaryrefslogtreecommitdiff
path: root/gdb/scm-exp.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-10-05 22:15:49 +0000
committerPer Bothner <per@bothner.com>1995-10-05 22:15:49 +0000
commitc700638ca7c1c0d0dd2fac7983b2d59ca7217099 (patch)
tree26f626fff3ab5bc27552c5492ee56a42666f3f9c /gdb/scm-exp.c
parentdb552bdadca2fda93c84cfa89dd41b49ee9e9193 (diff)
downloadgdb-c700638ca7c1c0d0dd2fac7983b2d59ca7217099.zip
gdb-c700638ca7c1c0d0dd2fac7983b2d59ca7217099.tar.gz
gdb-c700638ca7c1c0d0dd2fac7983b2d59ca7217099.tar.bz2
* parse.c (write_dollar_variable): New function.
* c-exp.y (yylex): Replace code for recognizing '$' pseudo-variables with a call to write_dollar_variable. Simplify grammar correspondingly. * f-exp.y: Likewise. * m2-exp.y: Likewise. * ch-exp.y: Likewise. (Remove function match_dollar_tokens.) * scm-exp.c (scm_lreadr): Call write_dollar_variable to handle '$'.
Diffstat (limited to 'gdb/scm-exp.c')
-rw-r--r--gdb/scm-exp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/scm-exp.c b/gdb/scm-exp.c
index 4c98d64..8df6803 100644
--- a/gdb/scm-exp.c
+++ b/gdb/scm-exp.c
@@ -373,6 +373,11 @@ scm_lreadr (skipping)
if (!skipping)
{
str.length = lexptr - str.ptr;
+ if (str.ptr[0] == '$')
+ {
+ write_dollar_variable (str);
+ return;
+ }
write_exp_elt_opcode (OP_NAME);
write_exp_string (str);
write_exp_elt_opcode (OP_NAME);