nonterminal "name", which matches either NAME or TYPENAME. */
%token <tsval> STRING
-%token <sval> NSSTRING /* ObjC Foundation "NSString" literal */
+%token <tsval> NSSTRING /* ObjC Foundation "NSString" literal */
%token SELECTOR /* ObjC "@selector" pseudo-operator */
%token <tsval> CHAR
%token <ssym> NAME /* BLOCKNAME defined below to give it higher precedence. */
}
;
-exp : NSSTRING /* ObjC NextStep NSString constant
- * of the form '@' '"' string '"'.
- */
+exp : NSSTRING
{
+ /* ObjC NextStep NSString constant of the
+ form '@' '"' string '"'. */
pstate->push_new<objc_nsstring_operation>
- (copy_name ($1));
+ (std::string ($1.ptr, $1.length));
}
;
struct type *type;
if (!target_has_execution ())
- return 0; /* Can't call into inferior to create NSString. */
+ error (_("evaluation of this expression "
+ "requires the target program to be active"));
stringValue[2] = value_string (str.c_str (), str.size () + 1, char_type);
stringValue[2] = value_coerce_array (stringValue[2]);