Adding all the files for an integer version of Funky: Groovy
[Funky.git] / lib / Funky / Private / LiteralParserPolicy.h
blobde448b46de9f7cd996714ec0396c9964091dadcd
1 #ifndef _funky_private_literalparserpolicy_h
2 #define _funky_private_literalparserpolicy_h
4 #include "ParserIDs.h"
6 namespace Funky
8 namespace Private
10 template < typename LiteralType >
11 struct LiteralParserPolicy;
13 template <>
14 struct LiteralParserPolicy< double >
16 template < typename ScannerT >
17 struct definition
19 definition()
21 using namespace boost::spirit;
22 literal_ = leaf_node_d[lexeme_d[real_p]]
25 boost::spirit::rule< ScannerT, boost::spirit::parser_context<>, boost::spirit::parser_tag< literal_id__ > > literal_;
29 template <>
30 struct LiteralParserPolicy< int >
32 template < typename ScannerT >
33 struct definition
35 definition()
37 using namespace boost::spirit;
38 literal_ = leaf_node_d[lexeme_d[int_p]]
41 boost::spirit::rule< ScannerT, boost::spirit::parser_context<>, boost::spirit::parser_tag< literal_id__ > > literal_;
47 #endif