Branch: Tag:

2007-05-02

2007-05-02 17:43:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Changed implementation and syntax for the subtypes for strings. push_string_type() is no more.

Rev: lib/modules/Getopt.pmod:1.32
Rev: src/encode.c:1.242
Rev: src/language.yacc:1.374
Rev: src/modules/sprintf/sprintf.c:1.144
Rev: src/pike_types.c:1.305
Rev: src/pike_types.h:1.109
Rev: src/svalue.h:1.145

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: language.yacc,v 1.373 2007/03/03 16:46:13 grubba Exp $ + || $Id: language.yacc,v 1.374 2007/05/02 17:43:32 grubba Exp $   */      %pure_parser
1461:    free_node($2);    free_node($4);    } -  ; -  - opt_string_width: /* Empty */ +  | '(' error ')'    { -  push_string_type(32); +  push_int_type(MIN_INT32, MAX_INT32); +  yyerror("Expected integer range.");    } -  | '(' ')' -  { -  push_string_type(32); -  } -  | '(' TOK_NUMBER ')' -  { -  INT_TYPE width = 32; +  ;    -  if($2->token == F_CONSTANT) { -  if ($2->u.sval.type == T_INT) { -  width = $2->u.sval.u.integer; -  } -  } -  -  push_string_type(width); -  -  free_node($2); -  } -  | '(' error ')' + opt_string_width: opt_int_range    { -  yyerror("Expected string width value (0..32)."); +  push_type(T_STRING);    }    ;