Check-in [35b5ee4192]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:35b5ee41921717dd5673c4e06fda6d064d74127e
Date: 2009-10-25 15:45:33
User: stephan
Comment:a fix for rule_list 2-type impl
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to maketypelist.pl

Old (bcab098c7a8d7472) New (6c9cf09fc41199a8)
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 ######################################################################## 2 ########################################################################
3 # A quick hack to generate C++ class templates for use with the 3 # A quick hack to generate C++ class templates for use with the
4 # parsepp library. 4 # parsepp library.
5 # 5 #
32 hidden lines
38 print "\n"; 38 print "\n";
39 next; 39 next;
40 } 40 }
41 if( 2 == $i ) { 41 if( 2 == $i ) {
42 print "template <class T1, class T2>\n"; 42 print "template <class T1, class T2>\n";
43 print "struct rule_list_2 : rule_list_base<T1,T2> {};\n"; | 43 print "struct rule_list_2 : rule_list_base<T1, rule_list_base<T2,nil_t> > {};\n";
44 print "template <char_type V1, char_type V2>\n"; 44 print "template <char_type V1, char_type V2>\n";
45 print "struct char_list_2 : char_list_base<V1,char_list_base<V2,nil_t> > {};\n"; 45 print "struct char_list_2 : char_list_base<V1,char_list_base<V2,nil_t> > {};\n";
46 print "\n"; 46 print "\n";
47 next; 47 next;
48 } 48 }
53 hidden lines
102 print "\n"; 102 print "\n";
103 next; 103 next;
104 } 104 }
105 if( 2 == $i ) { 105 if( 2 == $i ) {
106 print "template <class T1, class T2>\n"; 106 print "template <class T1, class T2>\n";
107 print "struct rule_list<T1, T2".$nils."> : rule_list_base<T1,T2> {};\n"; | 107 print "struct rule_list<T1, T2".$nils."> : rule_list_base<T1, rule_list_base<T2,nil_t> > {};\n";
108 print "\n"; 108 print "\n";
109 print "template <char_type V1, char_type V2>\n"; 109 print "template <char_type V1, char_type V2>\n";
110 print "struct char_list<V1,V2".$zeros."> : char_list_base< V1, char_list_base<V2,nil_t> > {};\n"; 110 print "struct char_list<V1,V2".$zeros."> : char_list_base< V1, char_list_base<V2,nil_t> > {};\n";
111 print "\n"; 111 print "\n";
112 next; 112 next;
36 hidden lines
149 print "template <char_type V1 = ${defaultInt}, ".$intdecllistDefaults.">\n"; 149 print "template <char_type V1 = ${defaultInt}, ".$intdecllistDefaults.">\n";
150 print "struct char_list : char_list_".$i."<V1, ".$Vlist."> {};\n"; 150 print "struct char_list : char_list_".$i."<V1, ".$Vlist."> {};\n";
151 } 151 }
152 print "\n"; 152 print "\n";
153 } 153 }

Changes to parsepp_numeric.hpp

Old (b5a7c2cabde267dd) New (e6f09eb24ca0a58e)
1 #ifndef S11N_NET_PARSEPP_NUMERIC_HPP_INCLUDED 1 #ifndef S11N_NET_PARSEPP_NUMERIC_HPP_INCLUDED
2 #define S11N_NET_PARSEPP_NUMERIC_HPP_INCLUDED 2 #define S11N_NET_PARSEPP_NUMERIC_HPP_INCLUDED
3 #include <cerrno> 3 #include <cerrno>
4 #include <cstdlib> 4 #include <cstdlib>
5 namespace Ps { 5 namespace Ps {
32 hidden lines
38 enum Types { 38 enum Types {
39 Unknown, 39 Unknown,
40 Double, 40 Double,
41 Integer, 41 Integer,
42 OctalInteger, 42 OctalInteger,
43 HexInteger, | 43 HexInteger
44 }; 44 };
45 typedef long double value_type; 45 typedef long double value_type;
46 /** 46 /**
47 The numeric type (from the Types enum). 47 The numeric type (from the Types enum).
48 */ 48 */
141 hidden lines
190 r_or< rule_list< read_hexnum, read_octnum, read_double, read_int > > 190 r_or< rule_list< read_hexnum, read_octnum, read_double, read_int > >
191 {}; 191 {};
192 192
193 }} // namespaces 193 }} // namespaces
194 #endif // S11N_NET_PARSEPP_NUMERIC_HPP_INCLUDED 194 #endif // S11N_NET_PARSEPP_NUMERIC_HPP_INCLUDED