llvm-gcc-4.2-2.9/gcc/cp/parser.c
/* Parse an Objective-C expression, which feeds into a primary-expression
   above.

   objc-expression:
     objc-message-expression
     objc-string-literal
     objc-encode-expression
     objc-protocol-expression
     objc-selector-expression

  Returns a tree representation of the expression.  */
Parse an Objective-C expression, which feeds into a primary-expression
above.



Returns a tree representation of the expression.
Parse an Objective - C expression which feeds into a primary - expression above . Returns a tree representation of the expression .
static tree
cp_parser_objc_expression (cp_parser* parser)
{
  cp_token *kwd = cp_lexer_peek_token (parser->lexer);
  switch (kwd->type)
    {
    case CPP_OPEN_SQUARE:
      return cp_parser_objc_message_expression (parser);
    case CPP_OBJC_STRING:
      kwd = cp_lexer_consume_token (parser->lexer);
      return objc_build_string_object (kwd->u.value);
    case CPP_KEYWORD:
      switch (kwd->keyword)
	{
	case RID_AT_ENCODE:
	  return cp_parser_objc_encode_expression (parser);
	case RID_AT_PROTOCOL:
	  return cp_parser_objc_protocol_expression (parser);
	case RID_AT_SELECTOR:
	  return cp_parser_objc_selector_expression (parser);
	default:
	  break;
	}
    default:
      error ("misplaced %<@%D%> Objective-C++ construct", kwd->u.value);
      cp_parser_skip_to_end_of_block_or_statement (parser);
    }
  return error_mark_node;
}
static tree cp_parser_objc_expression ( cp_parser * parser ) { cp_token * kwd = cp_lexer_peek_token ( parser -> lexer ) ; switch ( kwd -> type ) { case CPP_OPEN_SQUARE : return cp_parser_objc_message_expression ( parser ) ; case CPP_OBJC_STRING : kwd = cp_lexer_consume_token ( parser -> lexer ) ; return objc_build_string_object ( kwd -> u . value ) ; case CPP_KEYWORD : switch ( kwd -> keyword ) { case RID_AT_ENCODE : return cp_parser_objc_encode_expression ( parser ) ; case RID_AT_PROTOCOL : return cp_parser_objc_protocol_expression ( parser ) ; case RID_AT_SELECTOR : return cp_parser_objc_selector_expression ( parser ) ; default : break ; } default : error ( " " , kwd -> u . value ) ; cp_parser_skip_to_end_of_block_or_statement ( parser ) ; } return error_mark_node ; }
Parse an Objective-C expression, which feeds into a primary-expression
above.
Parse an Objective - C expression which feeds into a primary - expression above .
/* Try to figure out what kind of declaration is present.  */