From 957a1c32939d1e25e76c87ad5323f05be825bc11 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 20 Apr 1996 19:55:24 -0400 Subject: (typespec): Made equivalent to (id ). (non_empty_protocolrefs): New nonterminal. From-SVN: r11858 --- gcc/c-parse.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 41fb8aa..a5223cd 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -224,7 +224,8 @@ ifobjc %type keywordexpr keywordarglist keywordarg %type myparms myparm optparmlist reservedwords objcselectorexpr %type selectorarg keywordnamelist keywordname objcencodeexpr -%type objc_string protocolrefs identifier_list objcprotocolexpr +%type objc_string non_empty_protocolrefs protocolrefs identifier_list objcprotocolexpr + %type CLASSNAME OBJC_STRING OBJECTNAME end ifobjc @@ -1041,6 +1042,11 @@ ifobjc { $$ = get_static_reference ($1, $2); } | OBJECTNAME protocolrefs { $$ = get_object_reference ($2); } + +/* Make "" equivalent to "id " + - nisse@lysator.liu.se */ + | non_empty_protocolrefs + { $$ = get_object_reference ($1); } end ifobjc | TYPEOF '(' expr ')' { $$ = TREE_TYPE ($3); } @@ -2440,7 +2446,11 @@ protocolrefs: { $$ = NULL_TREE; } - | ARITHCOMPARE identifier_list ARITHCOMPARE + | non_empty_protocolrefs + ; + +non_empty_protocolrefs: + ARITHCOMPARE identifier_list ARITHCOMPARE { if ($1 == LT_EXPR && $3 == GT_EXPR) $$ = $2; -- cgit v1.1