/[bison]/bison/data/lalr1.cc
ViewVC logotype

Diff of /bison/data/lalr1.cc

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

revision 1.1 by akim, Thu Jun 27 12:08:20 2002 UTC revision 1.2 by akim, Fri Jun 28 17:27:29 2002 UTC
# Line 1  Line 1 
1  m4_divert(-1)  m4_divert(-1)
   
2  # C++ skeleton for Bison  # C++ skeleton for Bison
3  # Copyright (C) 2002 Free Software Foundation, Inc.  # Copyright (C) 2002 Free Software Foundation, Inc.
4    
# Line 18  m4_divert(-1) Line 17  m4_divert(-1)
17  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18  # 02111-1307  USA  # 02111-1307  USA
19    
20    m4_include([c.m4])
 # b4_sint_type(MAX)  
 # -----------------  
 # Return the smallest signed int type able to handle the number MAX.  
 m4_define([b4_sint_type],  
 [m4_if(m4_eval([$1 <= 127]),        [1], [signed char],  
        m4_eval([$1 <= 32767]),      [1], [signed short],  
        [signed int])])  
   
   
 # b4_uint_type(MAX)  
 # -----------------  
 # Return the smallest unsigned int type able to handle the number MAX.  
 m4_define([b4_uint_type],  
 [m4_if(m4_eval([$1 <= 255]),        [1], [unsigned char],  
        m4_eval([$1 <= 65535]),      [1], [unsigned short],  
        [unsigned int])])  
   
21    
22  # b4_lhs_value([TYPE])  # b4_lhs_value([TYPE])
23  # --------------------  # --------------------
# Line 67  m4_define([b4_rhs_location], Line 49  m4_define([b4_rhs_location],
49  [location_stack_@<:@m4_eval([$1 - $2])@:>@])  [location_stack_@<:@m4_eval([$1 - $2])@:>@])
50    
51    
 # b4_token_define(TOKEN-NAME, TOKEN-NUMBER)  
 # -----------------------------------------  
 # Output the definition of this token as #define.  
 m4_define([b4_token_define],  
 [#define $1 $2  
 ])  
   
   
 # b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)  
 # -------------------------------------------------------  
 # Output the definition of the tokens as #define.  
 m4_define([b4_token_defines],  
 [m4_map([b4_token_define], [$@])])  
   
52  m4_define_default([b4_input_suffix], [.y])  m4_define_default([b4_input_suffix], [.y])
53    
54  m4_define_default([b4_output_parser_suffix],  m4_define_default([b4_output_parser_suffix],
# Line 118  m4_define([b4_constructor], Line 86  m4_define([b4_constructor],
86        ],        ],
87                      [])])                      [])])
88    
 m4_define([b4_copyright],  
           [/* -*- C++ -*- */  
 /* A Bison parser, made from b4_filename,  
    by GNU bison b4_version.  */  
   
 /* Skeleton output parser for bison,  
    Copyright 2002 Free Software Foundation, Inc.  
   
    This program is free software; you can redistribute it and/or modify  
    it under the terms of the GNU General Public License as published by  
    the Free Software Foundation; either version 2, or (at your option)  
    any later version.  
   
    This program is distributed in the hope that it will be useful,  
    but WITHOUT ANY WARRANTY; without even the implied warranty of  
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
    GNU General Public License for more details.  
   
    You should have received a copy of the GNU General Public License  
    along with this program; if not, write to the Free Software  
    Foundation, Inc., 59 Temple Place - Suite 330,  
    Boston, MA 02111-1307, USA.  */  
   
 /* As a special exception, when this file is copied by Bison into a  
    Bison output file, you may use that output file without restriction.  
    This special exception was added by the Free Software Foundation  
    in version 1.24 of Bison.  */])  
89    
90  m4_divert(0)dnl  m4_divert(0)dnl
91  #output "b4_output_header_name"  #output "b4_output_header_name"
92  b4_copyright  b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
93                 [2002])
94  #ifndef b4_header_guard  #ifndef b4_header_guard
95  # define b4_header_guard  # define b4_header_guard
96    
# Line 353  namespace yy Line 295  namespace yy
295  #endif /* not b4_header_guard */  #endif /* not b4_header_guard */
296    
297  #output "b4_output_prefix[]b4_output_infix[].cc"  #output "b4_output_prefix[]b4_output_infix[].cc"
298  b4_copyright  b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
299                 [2002])
300    
301  #include "b4_output_header_name"  #include "b4_output_header_name"
302    
# Line 831  const yy::b4_name::TokenNumberType yy::b Line 774  const yy::b4_name::TokenNumberType yy::b
774  b4_epilogue  b4_epilogue
775    
776  #output "stack.hh"  #output "stack.hh"
777  b4_copyright  b4_copyright([2002])
778    
779  #ifndef BISON_STACK_HH  #ifndef BISON_STACK_HH
780  # define BISON_STACK_HH  # define BISON_STACK_HH
# Line 928  namespace yy Line 871  namespace yy
871  #endif // not BISON_STACK_HH  #endif // not BISON_STACK_HH
872    
873  #output "location.hh"  #output "location.hh"
874  b4_copyright  b4_copyright([2002])
875    
876  #ifndef BISON_LOCATION_HH  #ifndef BISON_LOCATION_HH
877  # define BISON_LOCATION_HH  # define BISON_LOCATION_HH

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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