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
/*============================================================================= Copyright (c) 2002-2003 Joel de Guzman Copyright (c) 2002-2003 Hartmut Kaiser http://spirit.sourceforge.net/ Use, modification and distribution is subject to 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(BOOST_SPIRIT_PARSER_CONTEXT_HPP) #define BOOST_SPIRIT_PARSER_CONTEXT_HPP /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // // default_parser_context_base class { default context base } // /////////////////////////////////////////////////////////////////////////// struct default_parser_context_base { template
struct aux {}; }; /////////////////////////////////////////////////////////////////////////// // // parser_context_base class { base class of all context classes } // /////////////////////////////////////////////////////////////////////////// struct parser_context_base {}; /////////////////////////////////////////////////////////////////////////// // // parser_context class { default context } // /////////////////////////////////////////////////////////////////////////// struct nil_t; template
struct parser_context_linker; template
struct parser_context : parser_context_base { typedef AttrT attr_t; typedef default_parser_context_base base_t; typedef parser_context_linker
> context_linker_t; template
parser_context(ParserT const&) {} template
void pre_parse(ParserT const&, ScannerT const&) {} template
ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&) { return hit; } }; /////////////////////////////////////////////////////////////////////////// // // context_aux class // // context_aux
is a class derived from the // ContextT's nested base_t::base
template class. (see // default_parser_context_base::aux for an example). // // Basically, this class provides ContextT dependent optional // functionality to the derived class DerivedT through the CRTP // idiom (Curiously recurring template pattern). // /////////////////////////////////////////////////////////////////////////// template
struct context_aux : public ContextT::base_t::template aux
{}; /////////////////////////////////////////////////////////////////////////// // // parser_scanner_linker and parser_scanner_linker classes // { helper templates for the rule extensibility } // // This classes can be 'overloaded' (defined elsewhere), to plug // in additional functionality into the non-terminal parsing process. // /////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_SPIRIT_PARSER_SCANNER_LINKER_DEFINED) #define BOOST_SPIRIT_PARSER_SCANNER_LINKER_DEFINED template
struct parser_scanner_linker : public ScannerT { parser_scanner_linker(ScannerT const scan_) : ScannerT(scan_) {} }; #endif // !defined(BOOST_SPIRIT_PARSER_SCANNER_LINKER_DEFINED) ////////////////////////////////// #if !defined(BOOST_SPIRIT_PARSER_CONTEXT_LINKER_DEFINED) #define BOOST_SPIRIT_PARSER_CONTEXT_LINKER_DEFINED template
struct parser_context_linker : public ContextT { template
parser_context_linker(ParserT const& p) : ContextT(p) {} template
void pre_parse(ParserT const& p, ScannerT const& scan) { ContextT::pre_parse(p, scan); } template
ResultT& post_parse(ResultT& hit, ParserT const& p, ScannerT const& scan) { return ContextT::post_parse(hit, p, scan); } }; #endif // !defined(BOOST_SPIRIT_PARSER_CONTEXT_LINKER_DEFINED) /////////////////////////////////////////////////////////////////////////// // // BOOST_SPIRIT_CONTEXT_PARSE helper macro // // The original implementation uses a template class. However, we // need to lessen the template instantiation depth to help inferior // compilers that sometimes choke on deep template instantiations. // The objective is to avoid code redundancy. A macro, in this case // is an obvious solution. Sigh! // // WARNING: INTERNAL USE ONLY. NOT FOR PUBLIC CONSUMPTION. // /////////////////////////////////////////////////////////////////////////// #define BOOST_SPIRIT_CONTEXT_PARSE(scan, this_, scanner_t, context_t, result_t) \ scanner_t scan_wrap(scan); \ context_t context_wrap(this_); \ context_wrap.pre_parse(this_, scan_wrap); \ result_t hit = parse_main(scan); \ return context_wrap.post_parse(hit, this_, scan_wrap); } // namespace spirit } // namespace boost #endif
parser_context.hpp
Page URL
File URL
Prev
2/6
Next
Download
( 5 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.