Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2011 Hartmut Kaiser
|
Chris@16
|
3 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
4
|
Chris@16
|
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7 ==============================================================================*/
|
Chris@16
|
8 #if !defined(BOOST_SPIRIT_BINARY_MAY_08_2007_0808AM)
|
Chris@16
|
9 #define BOOST_SPIRIT_BINARY_MAY_08_2007_0808AM
|
Chris@16
|
10
|
Chris@16
|
11 #if defined(_MSC_VER)
|
Chris@16
|
12 #pragma once
|
Chris@16
|
13 #endif
|
Chris@16
|
14
|
Chris@16
|
15 #include <boost/spirit/home/support/common_terminals.hpp>
|
Chris@16
|
16 #include <boost/spirit/home/support/detail/endian.hpp>
|
Chris@16
|
17 #include <boost/spirit/home/qi/detail/attributes.hpp>
|
Chris@16
|
18 #include <boost/spirit/home/qi/parser.hpp>
|
Chris@16
|
19 #include <boost/spirit/home/qi/meta_compiler.hpp>
|
Chris@16
|
20 #include <boost/spirit/home/qi/domain.hpp>
|
Chris@16
|
21 #include <boost/spirit/home/qi/detail/assign_to.hpp>
|
Chris@16
|
22 #include <boost/spirit/home/qi/skip_over.hpp>
|
Chris@16
|
23 #include <boost/spirit/home/support/common_terminals.hpp>
|
Chris@16
|
24 #include <boost/fusion/include/at.hpp>
|
Chris@16
|
25 #include <boost/mpl/or.hpp>
|
Chris@16
|
26 #include <boost/type_traits/is_integral.hpp>
|
Chris@16
|
27 #include <boost/type_traits/is_enum.hpp>
|
Chris@16
|
28 #include <boost/type_traits/is_floating_point.hpp>
|
Chris@16
|
29 #include <boost/config.hpp>
|
Chris@16
|
30
|
Chris@16
|
31 #define BOOST_SPIRIT_ENABLE_BINARY(name) \
|
Chris@16
|
32 template <> \
|
Chris@16
|
33 struct use_terminal<qi::domain, tag::name> \
|
Chris@16
|
34 : mpl::true_ {}; \
|
Chris@16
|
35 \
|
Chris@16
|
36 template <typename A0> \
|
Chris@16
|
37 struct use_terminal<qi::domain \
|
Chris@16
|
38 , terminal_ex<tag::name, fusion::vector1<A0> > > \
|
Chris@16
|
39 : mpl::or_<is_integral<A0>, is_enum<A0> > {}; \
|
Chris@16
|
40 \
|
Chris@16
|
41 template <> \
|
Chris@16
|
42 struct use_lazy_terminal<qi::domain, tag::name, 1> : mpl::true_ {}; \
|
Chris@16
|
43 \
|
Chris@16
|
44 /***/
|
Chris@16
|
45
|
Chris@16
|
46 #define BOOST_SPIRIT_ENABLE_BINARY_IEEE754(name) \
|
Chris@16
|
47 template<> \
|
Chris@16
|
48 struct use_terminal<qi::domain, tag::name>: mpl::true_ {}; \
|
Chris@16
|
49 \
|
Chris@16
|
50 template<typename A0> \
|
Chris@16
|
51 struct use_terminal<qi::domain, terminal_ex<tag::name, \
|
Chris@16
|
52 fusion::vector1<A0> > >: is_floating_point<A0> {}; \
|
Chris@16
|
53 \
|
Chris@16
|
54 template<> \
|
Chris@16
|
55 struct use_lazy_terminal<qi::domain, tag::name, 1>: mpl::true_ {}; \
|
Chris@16
|
56 \
|
Chris@16
|
57 /***/
|
Chris@16
|
58
|
Chris@16
|
59 namespace boost { namespace spirit
|
Chris@16
|
60 {
|
Chris@16
|
61 ///////////////////////////////////////////////////////////////////////////
|
Chris@16
|
62 // Enablers
|
Chris@16
|
63 ///////////////////////////////////////////////////////////////////////////
|
Chris@16
|
64 BOOST_SPIRIT_ENABLE_BINARY(byte_) // enables byte_
|
Chris@16
|
65 BOOST_SPIRIT_ENABLE_BINARY(word) // enables word
|
Chris@16
|
66 BOOST_SPIRIT_ENABLE_BINARY(big_word) // enables big_word
|
Chris@16
|
67 BOOST_SPIRIT_ENABLE_BINARY(little_word) // enables little_word
|
Chris@16
|
68 BOOST_SPIRIT_ENABLE_BINARY(dword) // enables dword
|
Chris@16
|
69 BOOST_SPIRIT_ENABLE_BINARY(big_dword) // enables big_dword
|
Chris@16
|
70 BOOST_SPIRIT_ENABLE_BINARY(little_dword) // enables little_dword
|
Chris@16
|
71 #ifdef BOOST_HAS_LONG_LONG
|
Chris@16
|
72 BOOST_SPIRIT_ENABLE_BINARY(qword) // enables qword
|
Chris@16
|
73 BOOST_SPIRIT_ENABLE_BINARY(big_qword) // enables big_qword
|
Chris@16
|
74 BOOST_SPIRIT_ENABLE_BINARY(little_qword) // enables little_qword
|
Chris@16
|
75 #endif
|
Chris@16
|
76 BOOST_SPIRIT_ENABLE_BINARY_IEEE754(bin_float)
|
Chris@16
|
77 BOOST_SPIRIT_ENABLE_BINARY_IEEE754(big_bin_float)
|
Chris@16
|
78 BOOST_SPIRIT_ENABLE_BINARY_IEEE754(little_bin_float)
|
Chris@16
|
79 BOOST_SPIRIT_ENABLE_BINARY_IEEE754(bin_double)
|
Chris@16
|
80 BOOST_SPIRIT_ENABLE_BINARY_IEEE754(big_bin_double)
|
Chris@16
|
81 BOOST_SPIRIT_ENABLE_BINARY_IEEE754(little_bin_double)
|
Chris@16
|
82 }}
|
Chris@16
|
83
|
Chris@16
|
84 #undef BOOST_SPIRIT_ENABLE_BINARY
|
Chris@16
|
85 #undef BOOST_SPIRIT_ENABLE_BINARY_IEEE754
|
Chris@16
|
86
|
Chris@16
|
87 namespace boost { namespace spirit { namespace qi
|
Chris@16
|
88 {
|
Chris@16
|
89 #ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
|
Chris@16
|
90 using boost::spirit::byte_;
|
Chris@16
|
91 using boost::spirit::word;
|
Chris@16
|
92 using boost::spirit::big_word;
|
Chris@16
|
93 using boost::spirit::little_word;
|
Chris@16
|
94 using boost::spirit::dword;
|
Chris@16
|
95 using boost::spirit::big_dword;
|
Chris@16
|
96 using boost::spirit::little_dword;
|
Chris@16
|
97 #ifdef BOOST_HAS_LONG_LONG
|
Chris@16
|
98 using boost::spirit::qword;
|
Chris@16
|
99 using boost::spirit::big_qword;
|
Chris@16
|
100 using boost::spirit::little_qword;
|
Chris@16
|
101 #endif
|
Chris@16
|
102 using boost::spirit::bin_float;
|
Chris@16
|
103 using boost::spirit::big_bin_float;
|
Chris@16
|
104 using boost::spirit::little_bin_float;
|
Chris@16
|
105 using boost::spirit::bin_double;
|
Chris@16
|
106 using boost::spirit::big_bin_double;
|
Chris@16
|
107 using boost::spirit::little_bin_double;
|
Chris@16
|
108 #endif
|
Chris@16
|
109
|
Chris@16
|
110 using boost::spirit::byte_type;
|
Chris@16
|
111 using boost::spirit::word_type;
|
Chris@16
|
112 using boost::spirit::big_word_type;
|
Chris@16
|
113 using boost::spirit::little_word_type;
|
Chris@16
|
114 using boost::spirit::dword_type;
|
Chris@16
|
115 using boost::spirit::big_dword_type;
|
Chris@16
|
116 using boost::spirit::little_dword_type;
|
Chris@16
|
117 #ifdef BOOST_HAS_LONG_LONG
|
Chris@16
|
118 using boost::spirit::qword_type;
|
Chris@16
|
119 using boost::spirit::big_qword_type;
|
Chris@16
|
120 using boost::spirit::little_qword_type;
|
Chris@16
|
121 #endif
|
Chris@16
|
122 using boost::spirit::bin_float_type;
|
Chris@16
|
123 using boost::spirit::big_bin_float_type;
|
Chris@16
|
124 using boost::spirit::little_bin_float_type;
|
Chris@16
|
125 using boost::spirit::bin_double_type;
|
Chris@16
|
126 using boost::spirit::big_bin_double_type;
|
Chris@16
|
127 using boost::spirit::little_bin_double_type;
|
Chris@16
|
128
|
Chris@16
|
129 namespace detail
|
Chris@16
|
130 {
|
Chris@16
|
131 template <int bits>
|
Chris@16
|
132 struct integer
|
Chris@16
|
133 {
|
Chris@16
|
134 #ifdef BOOST_HAS_LONG_LONG
|
Chris@16
|
135 BOOST_SPIRIT_ASSERT_MSG(
|
Chris@16
|
136 bits == 8 || bits == 16 || bits == 32 || bits == 64,
|
Chris@16
|
137 not_supported_binary_size, ());
|
Chris@16
|
138 #else
|
Chris@16
|
139 BOOST_SPIRIT_ASSERT_MSG(
|
Chris@16
|
140 bits == 8 || bits == 16 || bits == 32,
|
Chris@16
|
141 not_supported_binary_size, ());
|
Chris@16
|
142 #endif
|
Chris@16
|
143 };
|
Chris@16
|
144
|
Chris@16
|
145 template <>
|
Chris@16
|
146 struct integer<8>
|
Chris@16
|
147 {
|
Chris@16
|
148 enum { size = 1 };
|
Chris@16
|
149 typedef uint_least8_t type;
|
Chris@16
|
150 };
|
Chris@16
|
151
|
Chris@16
|
152 template <>
|
Chris@16
|
153 struct integer<16>
|
Chris@16
|
154 {
|
Chris@16
|
155 enum { size = 2 };
|
Chris@16
|
156 typedef uint_least16_t type;
|
Chris@16
|
157 };
|
Chris@16
|
158
|
Chris@16
|
159 template <>
|
Chris@16
|
160 struct integer<32>
|
Chris@16
|
161 {
|
Chris@16
|
162 enum { size = 4 };
|
Chris@16
|
163 typedef uint_least32_t type;
|
Chris@16
|
164 };
|
Chris@16
|
165
|
Chris@16
|
166 #ifdef BOOST_HAS_LONG_LONG
|
Chris@16
|
167 template <>
|
Chris@16
|
168 struct integer<64>
|
Chris@16
|
169 {
|
Chris@16
|
170 enum { size = 8 };
|
Chris@16
|
171 typedef uint_least64_t type;
|
Chris@16
|
172 };
|
Chris@16
|
173 #endif
|
Chris@16
|
174
|
Chris@16
|
175 template <int bits>
|
Chris@16
|
176 struct floating_point
|
Chris@16
|
177 {
|
Chris@16
|
178 BOOST_SPIRIT_ASSERT_MSG(
|
Chris@16
|
179 bits == 32 || bits == 64,
|
Chris@16
|
180 not_supported_binary_size, ());
|
Chris@16
|
181 };
|
Chris@16
|
182
|
Chris@16
|
183 template <>
|
Chris@16
|
184 struct floating_point<32>
|
Chris@16
|
185 {
|
Chris@16
|
186 enum { size = 4 };
|
Chris@16
|
187 typedef float type;
|
Chris@16
|
188 };
|
Chris@16
|
189
|
Chris@16
|
190 template <>
|
Chris@16
|
191 struct floating_point<64>
|
Chris@16
|
192 {
|
Chris@16
|
193 enum { size = 8 };
|
Chris@16
|
194 typedef double type;
|
Chris@16
|
195 };
|
Chris@16
|
196
|
Chris@16
|
197 ///////////////////////////////////////////////////////////////////////
|
Chris@16
|
198 template <BOOST_SCOPED_ENUM(boost::endian::endianness) bits>
|
Chris@16
|
199 struct what;
|
Chris@16
|
200
|
Chris@16
|
201 template <>
|
Chris@16
|
202 struct what<boost::endian::endianness::native>
|
Chris@16
|
203 {
|
Chris@16
|
204 static std::string is()
|
Chris@16
|
205 {
|
Chris@16
|
206 return "native-endian binary";
|
Chris@16
|
207 }
|
Chris@16
|
208 };
|
Chris@16
|
209
|
Chris@16
|
210 template <>
|
Chris@16
|
211 struct what<boost::endian::endianness::little>
|
Chris@16
|
212 {
|
Chris@16
|
213 static char const* is()
|
Chris@16
|
214 {
|
Chris@16
|
215 return "little-endian binary";
|
Chris@16
|
216 }
|
Chris@16
|
217 };
|
Chris@16
|
218
|
Chris@16
|
219 template <>
|
Chris@16
|
220 struct what<boost::endian::endianness::big>
|
Chris@16
|
221 {
|
Chris@16
|
222 static char const* is()
|
Chris@16
|
223 {
|
Chris@16
|
224 return "big-endian binary";
|
Chris@16
|
225 }
|
Chris@16
|
226 };
|
Chris@16
|
227 }
|
Chris@16
|
228
|
Chris@16
|
229 ///////////////////////////////////////////////////////////////////////////
|
Chris@16
|
230 template <typename T, BOOST_SCOPED_ENUM(boost::endian::endianness) endian, int bits>
|
Chris@16
|
231 struct any_binary_parser : primitive_parser<any_binary_parser<T, endian, bits> >
|
Chris@16
|
232 {
|
Chris@16
|
233 template <typename Context, typename Iterator>
|
Chris@16
|
234 struct attribute
|
Chris@16
|
235 {
|
Chris@16
|
236 typedef boost::endian::endian<endian, typename T::type,
|
Chris@16
|
237 bits> type;
|
Chris@16
|
238 };
|
Chris@16
|
239
|
Chris@16
|
240 template <typename Iterator, typename Context
|
Chris@16
|
241 , typename Skipper, typename Attribute>
|
Chris@16
|
242 bool parse(Iterator& first, Iterator const& last
|
Chris@16
|
243 , Context& /*context*/, Skipper const& skipper
|
Chris@16
|
244 , Attribute& attr_param) const
|
Chris@16
|
245 {
|
Chris@16
|
246 qi::skip_over(first, last, skipper);
|
Chris@16
|
247
|
Chris@16
|
248 typename attribute<Context, Iterator>::type attr_;
|
Chris@16
|
249 unsigned char* bytes = reinterpret_cast<unsigned char*>(&attr_);
|
Chris@16
|
250
|
Chris@16
|
251 Iterator it = first;
|
Chris@16
|
252 for (unsigned int i = 0; i < sizeof(attr_); ++i)
|
Chris@16
|
253 {
|
Chris@16
|
254 if (it == last)
|
Chris@16
|
255 return false;
|
Chris@16
|
256 *bytes++ = *it++;
|
Chris@16
|
257 }
|
Chris@16
|
258
|
Chris@16
|
259 first = it;
|
Chris@16
|
260 spirit::traits::assign_to(attr_, attr_param);
|
Chris@16
|
261 return true;
|
Chris@16
|
262 }
|
Chris@16
|
263
|
Chris@16
|
264 template <typename Context>
|
Chris@16
|
265 info what(Context& /*context*/) const
|
Chris@16
|
266 {
|
Chris@16
|
267 return info(qi::detail::what<endian>::is());
|
Chris@16
|
268 }
|
Chris@16
|
269 };
|
Chris@16
|
270
|
Chris@16
|
271 ///////////////////////////////////////////////////////////////////////////
|
Chris@16
|
272 template <typename V, typename T
|
Chris@16
|
273 , BOOST_SCOPED_ENUM(boost::endian::endianness) endian, int bits>
|
Chris@16
|
274 struct binary_lit_parser
|
Chris@16
|
275 : primitive_parser<binary_lit_parser<V, T, endian, bits> >
|
Chris@16
|
276 {
|
Chris@16
|
277 template <typename Context, typename Iterator>
|
Chris@16
|
278 struct attribute
|
Chris@16
|
279 {
|
Chris@16
|
280 typedef unused_type type;
|
Chris@16
|
281 };
|
Chris@16
|
282
|
Chris@16
|
283 binary_lit_parser(V n_)
|
Chris@16
|
284 : n(n_) {}
|
Chris@16
|
285
|
Chris@16
|
286 template <typename Iterator, typename Context
|
Chris@16
|
287 , typename Skipper, typename Attribute>
|
Chris@16
|
288 bool parse(Iterator& first, Iterator const& last
|
Chris@16
|
289 , Context& /*context*/, Skipper const& skipper
|
Chris@16
|
290 , Attribute& attr_param) const
|
Chris@16
|
291 {
|
Chris@16
|
292 qi::skip_over(first, last, skipper);
|
Chris@16
|
293
|
Chris@16
|
294 // Even if the endian types are not pod's (at least not in the
|
Chris@16
|
295 // definition of C++03) it seems to be safe to assume they are
|
Chris@16
|
296 // (but in C++0x the endian types _are_ PODs).
|
Chris@16
|
297 // This allows us to treat them as a sequence of consecutive bytes.
|
Chris@16
|
298 boost::endian::endian<endian, typename T::type, bits> attr_;
|
Chris@16
|
299
|
Chris@16
|
300 #if defined(BOOST_MSVC)
|
Chris@16
|
301 // warning C4244: 'argument' : conversion from 'const int' to 'foo', possible loss of data
|
Chris@16
|
302 #pragma warning(push)
|
Chris@16
|
303 #pragma warning(disable: 4244)
|
Chris@16
|
304 #endif
|
Chris@16
|
305 attr_ = n;
|
Chris@16
|
306 #if defined(BOOST_MSVC)
|
Chris@16
|
307 #pragma warning(pop)
|
Chris@16
|
308 #endif
|
Chris@16
|
309
|
Chris@16
|
310 unsigned char* bytes = reinterpret_cast<unsigned char*>(&attr_);
|
Chris@16
|
311
|
Chris@16
|
312 Iterator it = first;
|
Chris@16
|
313 for (unsigned int i = 0; i < sizeof(attr_); ++i)
|
Chris@16
|
314 {
|
Chris@16
|
315 if (it == last || *bytes++ != static_cast<unsigned char>(*it++))
|
Chris@16
|
316 return false;
|
Chris@16
|
317 }
|
Chris@16
|
318
|
Chris@16
|
319 first = it;
|
Chris@16
|
320 spirit::traits::assign_to(attr_, attr_param);
|
Chris@16
|
321 return true;
|
Chris@16
|
322 }
|
Chris@16
|
323
|
Chris@16
|
324 template <typename Context>
|
Chris@16
|
325 info what(Context& /*context*/) const
|
Chris@16
|
326 {
|
Chris@16
|
327 return info(qi::detail::what<endian>::is());
|
Chris@16
|
328 }
|
Chris@16
|
329
|
Chris@16
|
330 V n;
|
Chris@16
|
331 };
|
Chris@16
|
332
|
Chris@16
|
333 ///////////////////////////////////////////////////////////////////////////
|
Chris@16
|
334 // Parser generators: make_xxx function (objects)
|
Chris@16
|
335 ///////////////////////////////////////////////////////////////////////////
|
Chris@16
|
336 template <typename T, BOOST_SCOPED_ENUM(boost::endian::endianness) endian, int bits>
|
Chris@16
|
337 struct make_binary_parser
|
Chris@16
|
338 {
|
Chris@16
|
339 typedef any_binary_parser<T, endian, bits> result_type;
|
Chris@16
|
340 result_type operator()(unused_type, unused_type) const
|
Chris@16
|
341 {
|
Chris@16
|
342 return result_type();
|
Chris@16
|
343 }
|
Chris@16
|
344 };
|
Chris@16
|
345
|
Chris@16
|
346 template <typename V, typename T
|
Chris@16
|
347 , BOOST_SCOPED_ENUM(boost::endian::endianness) endian, int bits>
|
Chris@16
|
348 struct make_binary_lit_parser
|
Chris@16
|
349 {
|
Chris@16
|
350 typedef binary_lit_parser<V, T, endian, bits> result_type;
|
Chris@16
|
351 template <typename Terminal>
|
Chris@16
|
352 result_type operator()(Terminal const& term, unused_type) const
|
Chris@16
|
353 {
|
Chris@16
|
354 return result_type(fusion::at_c<0>(term.args));
|
Chris@16
|
355 }
|
Chris@16
|
356 };
|
Chris@16
|
357
|
Chris@16
|
358 #define BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(name, endiantype, bits) \
|
Chris@16
|
359 template <typename Modifiers> \
|
Chris@16
|
360 struct make_primitive<tag::name, Modifiers> \
|
Chris@16
|
361 : make_binary_parser<detail::integer<bits>, \
|
Chris@16
|
362 boost::endian::endianness::endiantype, bits> {}; \
|
Chris@16
|
363 \
|
Chris@16
|
364 template <typename Modifiers, typename A0> \
|
Chris@16
|
365 struct make_primitive< \
|
Chris@16
|
366 terminal_ex<tag::name, fusion::vector1<A0> > , Modifiers> \
|
Chris@16
|
367 : make_binary_lit_parser<A0, detail::integer<bits>, \
|
Chris@16
|
368 boost::endian::endianness::endiantype, bits> {}; \
|
Chris@16
|
369 \
|
Chris@16
|
370 /***/
|
Chris@16
|
371
|
Chris@16
|
372 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(byte_, native, 8)
|
Chris@16
|
373 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(word, native, 16)
|
Chris@16
|
374 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(big_word, big, 16)
|
Chris@16
|
375 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(little_word, little, 16)
|
Chris@16
|
376 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(dword, native, 32)
|
Chris@16
|
377 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(big_dword, big, 32)
|
Chris@16
|
378 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(little_dword, little, 32)
|
Chris@16
|
379 #ifdef BOOST_HAS_LONG_LONG
|
Chris@16
|
380 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(qword, native, 64)
|
Chris@16
|
381 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(big_qword, big, 64)
|
Chris@16
|
382 BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE(little_qword, little, 64)
|
Chris@16
|
383 #endif
|
Chris@16
|
384
|
Chris@16
|
385 #undef BOOST_SPIRIT_MAKE_BINARY_PRIMITIVE
|
Chris@16
|
386
|
Chris@16
|
387 #define BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(name, endiantype, bits) \
|
Chris@16
|
388 template<typename Modifiers> \
|
Chris@16
|
389 struct make_primitive<tag::name, Modifiers> \
|
Chris@16
|
390 : make_binary_parser<detail::floating_point<bits>, \
|
Chris@16
|
391 boost::endian::endianness::endiantype, bits> {}; \
|
Chris@16
|
392 \
|
Chris@16
|
393 template<typename Modifiers, typename A0> \
|
Chris@16
|
394 struct make_primitive< \
|
Chris@16
|
395 terminal_ex<tag::name, fusion::vector1<A0> >, Modifiers> \
|
Chris@16
|
396 : make_binary_lit_parser<A0, detail::floating_point<bits>, \
|
Chris@16
|
397 boost::endian::endianness::endiantype, \
|
Chris@16
|
398 bits> {}; \
|
Chris@16
|
399 \
|
Chris@16
|
400 /***/
|
Chris@16
|
401
|
Chris@16
|
402 BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(bin_float, native, 32)
|
Chris@16
|
403 BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(big_bin_float, big, 32)
|
Chris@16
|
404 BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(little_bin_float, little, 32)
|
Chris@16
|
405 BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(bin_double, native, 64)
|
Chris@16
|
406 BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(big_bin_double, big, 64)
|
Chris@16
|
407 BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE(little_bin_double, little, 64)
|
Chris@16
|
408
|
Chris@16
|
409 #undef BOOST_SPIRIT_MAKE_BINARY_IEEE754_PRIMITIVE
|
Chris@16
|
410
|
Chris@16
|
411 }}}
|
Chris@16
|
412
|
Chris@16
|
413 #endif
|