diff options
author | David Henkel-Wallace <gumby@cygnus> | 1991-11-15 23:16:29 +0000 |
---|---|---|
committer | David Henkel-Wallace <gumby@cygnus> | 1991-11-15 23:16:29 +0000 |
commit | 4c53d9ca84b57631a94d409387a3eb178f01fe75 (patch) | |
tree | 948774449e5e73401076d2fb523a04968c01c580 /gdb/c-exp.y | |
parent | e11b54be2460ab9028463c081c869dd80eda30e5 (diff) | |
download | gdb-4c53d9ca84b57631a94d409387a3eb178f01fe75.zip gdb-4c53d9ca84b57631a94d409387a3eb178f01fe75.tar.gz gdb-4c53d9ca84b57631a94d409387a3eb178f01fe75.tar.bz2 |
ansi name abuse changes
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 0c51cd2..f428818 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -135,6 +135,7 @@ int yyparse (); %token <ssym> NAME_OR_INT NAME_OR_UINT %token STRUCT UNION ENUM SIZEOF UNSIGNED COLONCOLON +%token TEMPLATE %token ERROR /* Special type cases, put in to allow the parser to distinguish different @@ -831,6 +832,10 @@ typebase { $$ = $2.type; } | SIGNED { $$ = builtin_type_int; } + | TEMPLATE name '<' type '>' + { $$ = lookup_template_type(copy_name($2), $4, + expression_context_block); + } ; typename: TYPENAME @@ -1289,6 +1294,8 @@ yylex () case 8: if (!strncmp (tokstart, "unsigned", 8)) return UNSIGNED; + if (!strncmp (tokstart, "template", 8)) + return TEMPLATE; break; case 6: if (!strncmp (tokstart, "struct", 6)) @@ -1403,7 +1410,7 @@ void yyerror (msg) char *msg; { - error (msg ? msg : "Invalid syntax in expression."); + error (error (msg ? msg : "Invalid syntax in expression."); } /* Table mapping opcodes into strings for printing operators |