DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
/*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library http://www.boost.org/ Copyright (c) 2001-2008 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #if !defined(CPP_PREDEF_MACROS_GRAMMAR_HPP_53858C9A_C202_4D60_AD92_DC9CAE4DBB43_INCLUDED) #define CPP_PREDEF_MACROS_GRAMMAR_HPP_53858C9A_C202_4D60_AD92_DC9CAE4DBB43_INCLUDED #include
#include
#include
#include
#include
#include
#include
#include
// this must occur after all of the includes and before any code appears #ifdef BOOST_HAS_ABI_HEADERS #include BOOST_ABI_PREFIX #endif /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { namespace grammars { /////////////////////////////////////////////////////////////////////////////// // define, whether the rule's should generate some debug output #define TRACE_PREDEF_MACROS_GRAMMAR \ bool(BOOST_SPIRIT_DEBUG_FLAGS_CPP & BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR) \ /**/ /////////////////////////////////////////////////////////////////////////////// // Encapsulation of the grammar for command line driven predefined macros. struct predefined_macros_grammar : public boost::spirit::grammar
{ template
struct definition { // 'normal' (parse_tree generating) rule type typedef boost::spirit::rule
rule_type; rule_type plain_define, macro_definition, macro_parameters; definition(predefined_macros_grammar const &/*self*/) { // import the spirit and cpplexer namespaces here using namespace boost::spirit; using namespace boost::wave; using namespace boost::wave::util; // set the rule id's for later use plain_define.set_id(BOOST_WAVE_PLAIN_DEFINE_ID); macro_parameters.set_id(BOOST_WAVE_MACRO_PARAMETERS_ID); macro_definition.set_id(BOOST_WAVE_MACRO_DEFINITION_ID); // recognizes command line defined macro syntax, i.e. // -DMACRO // -DMACRO= // -DMACRO=value // -DMACRO(x) // -DMACRO(x)= // -DMACRO(x)=value // This grammar resembles the overall structure of the cpp_grammar to // make it possible to reuse the parse tree traversal code plain_define = ( ch_p(T_IDENTIFIER) | pattern_p(KeywordTokenType, TokenTypeMask) | pattern_p(OperatorTokenType|AltExtTokenType, ExtTokenTypeMask) // and, bit_and etc. | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false ) >> !macro_parameters >> !macro_definition ; // parameter list macro_parameters = confix_p( no_node_d[ch_p(T_LEFTPAREN) >> *ch_p(T_SPACE)], !list_p( ( ch_p(T_IDENTIFIER) | pattern_p(KeywordTokenType, TokenTypeMask) | pattern_p(OperatorTokenType|AltExtTokenType, ExtTokenTypeMask) // and, bit_and etc. | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 | ch_p(T_ELLIPSIS) #endif ), no_node_d [ *ch_p(T_SPACE) >> ch_p(T_COMMA) >> *ch_p(T_SPACE) ] ), no_node_d[*ch_p(T_SPACE) >> ch_p(T_RIGHTPAREN)] ) ; // macro body (anything left until eol) macro_definition = no_node_d[ch_p(T_ASSIGN)] >> *anychar_p ; BOOST_SPIRIT_DEBUG_TRACE_RULE(plain_define, TRACE_PREDEF_MACROS_GRAMMAR); BOOST_SPIRIT_DEBUG_TRACE_RULE(macro_definition, TRACE_PREDEF_MACROS_GRAMMAR); BOOST_SPIRIT_DEBUG_TRACE_RULE(macro_parameters, TRACE_PREDEF_MACROS_GRAMMAR); } // start rule of this grammar rule_type const& start() const { return plain_define; } }; predefined_macros_grammar() { BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR_NAME(*this, "predefined_macros_grammar", TRACE_PREDEF_MACROS_GRAMMAR); } }; /////////////////////////////////////////////////////////////////////////////// #undef TRACE_PREDEF_MACROS_GRAMMAR /////////////////////////////////////////////////////////////////////////////// // // The following parse function is defined here, to allow the separation of // the compilation of the cpp_predefined_macros_grammar from the function // using it. // /////////////////////////////////////////////////////////////////////////////// #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 #define BOOST_WAVE_PREDEF_MACROS_GRAMMAR_GEN_INLINE #else #define BOOST_WAVE_PREDEF_MACROS_GRAMMAR_GEN_INLINE inline #endif template
BOOST_WAVE_PREDEF_MACROS_GRAMMAR_GEN_INLINE boost::spirit::tree_parse_info
predefined_macros_grammar_gen
::parse_predefined_macro ( LexIteratorT const &first, LexIteratorT const &last) { predefined_macros_grammar g; return boost::spirit::pt_parse (first, last, g); } #undef BOOST_WAVE_PREDEF_MACROS_GRAMMAR_GEN_INLINE /////////////////////////////////////////////////////////////////////////////// } // namespace grammars } // namespace wave } // namespace boost // the suffix header occurs after all of the code #ifdef BOOST_HAS_ABI_HEADERS #include BOOST_ABI_SUFFIX #endif #endif // !defined(CPP_PREDEF_MACROS_GRAMMAR_HPP_53858C9A_C202_4D60_AD92_DC9CAE4DBB43_INCLUDED)
cpp_predef_macros_grammar.hpp
Page URL
File URL
Prev
12/13
Next
Download
( 6 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.