/[bison]/bison/data/bison.simple
ViewVC logotype

Diff of /bison/data/bison.simple

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by akim, Sun Apr 7 15:30:31 2002 UTC revision 1.8 by akim, Sun Apr 7 17:44:59 2002 UTC
# Line 1  Line 1 
1  m4_divert(-1)  m4_divert(-1)
2    
3    # b4_sint_type(MAX)
4    # -----------------
5    # Return the smallest signed int type able to handle the number MAX.
6    m4_define([b4_sint_type],
7    [m4_if(m4_eval([$1 <= 127]),        [1], [signed char],
8           m4_eval([$1 <= 32767]),      [1], [signed short],
9           m4_eval([$1 <= 2147483647]), [1], [signed int],
10           [m4_fatal([no signed int type for $1])])])
11    
12    
13    # b4_uint_type(MAX)
14    # -----------------
15    # Return the smallest unsigned int type able to handle the number MAX.
16    m4_define([b4_uint_type],
17    [m4_if(m4_eval([$1 <= 255]),        [1], [unsigned char],
18           m4_eval([$1 <= 65535]),      [1], [unsigned short],
19           m4_eval([$1 <= 4294967295]), [1], [unsigned int],
20           [m4_fatal([no unsigned int type for $1])])])
21    
22    
23  m4_define_default([b4_input_suffix], [.y])  m4_define_default([b4_input_suffix], [.y])
24    
25  m4_define_default([b4_output_parser_suffix],  m4_define_default([b4_output_parser_suffix],
# Line 248  b4_token_defines(b4_tokens) Line 268  b4_token_defines(b4_tokens)
268  #define YYMAXUTOK  b4_maxtok  #define YYMAXUTOK  b4_maxtok
269    
270  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
271    typedef b4_uint_type(b4_token_number_max) yy_token_number_type;
272  #define YYTRANSLATE(x) ((unsigned)(x) <= b4_maxtok ? yytranslate[[x]] : b4_nsym)  #define YYTRANSLATE(x) ((unsigned)(x) <= b4_maxtok ? yytranslate[[x]] : b4_nsym)
273    
274  /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX.  */  /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX.  */
275  static const char yytranslate[[]] =  static const yy_token_number_type yytranslate[[]] =
276  {  {
277    b4_translate    b4_translate
278  };  };

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26