Commit 2e6eddfc by Alexandre Oliva Committed by Alexandre Oliva

parse.y (apparent_template_type): new type

	* parse.y (apparent_template_type): new type
	(named_complex_class_head_sans_basetype): use it
	* Makefile.in (CONFLICTS): one new conflict
	* parse.c: Regenerated

From-SVN: r23495
parent 5dd21ded
1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
* parse.y (apparent_template_type): new type
(named_complex_class_head_sans_basetype): use it
* Makefile.in (CONFLICTS): one new conflict
* parse.c: Regenerated
1998-11-01 Mark Mitchell <mark@markmitchell.com> 1998-11-01 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (COMPARE_STRICT): New macro. * cp-tree.h (COMPARE_STRICT): New macro.
......
...@@ -218,7 +218,7 @@ parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \ ...@@ -218,7 +218,7 @@ parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
`echo $(PARSE_C) | sed 's,^\./,,'` `echo $(PARSE_C) | sed 's,^\./,,'`
CONFLICTS = expect 35 shift/reduce conflicts and 42 reduce/reduce conflicts. CONFLICTS = expect 36 shift/reduce conflicts and 42 reduce/reduce conflicts.
$(PARSE_H) : $(PARSE_C) $(PARSE_H) : $(PARSE_C)
$(PARSE_C) : $(srcdir)/parse.y $(PARSE_C) : $(srcdir)/parse.y
@echo $(CONFLICTS) @echo $(CONFLICTS)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -253,6 +253,7 @@ empty_parms () ...@@ -253,6 +253,7 @@ empty_parms ()
%type <ttype> template_header template_parm_list template_parm %type <ttype> template_header template_parm_list template_parm
%type <ttype> template_type_parm template_template_parm %type <ttype> template_type_parm template_template_parm
%type <code> template_close_bracket %type <code> template_close_bracket
%type <ttype> apparent_template_type
%type <ttype> template_type template_arg_list template_arg_list_opt %type <ttype> template_type template_arg_list template_arg_list_opt
%type <ttype> template_arg %type <ttype> template_arg
%type <ttype> condition xcond paren_cond_or_null %type <ttype> condition xcond paren_cond_or_null
...@@ -908,6 +909,15 @@ template_type: ...@@ -908,6 +909,15 @@ template_type:
| self_template_type | self_template_type
; ;
apparent_template_type:
template_type
| identifier '<' template_arg_list_opt '>'
.finish_template_type
{
cp_error ("template class %T was not declared yet", $1);
$$ = $5;
}
self_template_type: self_template_type:
SELFNAME '<' template_arg_list_opt template_close_bracket SELFNAME '<' template_arg_list_opt template_close_bracket
.finish_template_type .finish_template_type
...@@ -2197,9 +2207,9 @@ named_complex_class_head_sans_basetype: ...@@ -2197,9 +2207,9 @@ named_complex_class_head_sans_basetype:
current_aggr = $1; current_aggr = $1;
$$ = handle_class_head ($1, NULL_TREE, $3); $$ = handle_class_head ($1, NULL_TREE, $3);
} }
| aggr template_type | aggr apparent_template_type
{ current_aggr = $$; $$ = $2; } { current_aggr = $$; $$ = $2; }
| aggr nested_name_specifier template_type | aggr nested_name_specifier apparent_template_type
{ current_aggr = $$; $$ = $3; } { current_aggr = $$; $$ = $3; }
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment