Re: [Boost-bugs] [Boost C++ Libraries] #7090: Provide an option to parse only preprocessor directives

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7090: Provide an option to parse only preprocessor directives
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-05 18:49:46


#7090: Provide an option to parse only preprocessor directives
----------------------------------+-----------------------------------------
  Reporter: scrawl123@… | Owner: hkaiser
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: wave
   Version: Boost 1.49.0 | Severity: Optimization
Resolution: | Keywords:
----------------------------------+-----------------------------------------

Comment (by hkaiser):

 Replying to [ticket:7090 scrawl123@…]:

> My concern is the speed. One source file with about 100 lines takes
 about 5 MS to parse. From what I read in the docs, boost::wave uses a cpp-
 lexer to parse _all_ code-tokens. But for my application this is not
 necessary. What I need is _not_ a list of all tokens (that I can assemble
 into a result string), I want only the result string. Is there a way to
 turn this off? I have looked through all samples and tests but did not
 find a way to parse only preprocessor directives and ignore the rest of
 the file.

 That's by design, so there is no way to turn it off.

> I have also read on this bugtracker that #define
 BOOST_WAVE_SUPPORT_THREADING 0 is supposed to make it much faster. However
 this is not an option for me because I can't ship the boost libraries, I
 expect the users to have them installed already.

 The Wave libraries shipped with Boost are generated from small cpp files
 which essentially just explicitly instantiate a couple of templates (see
 $BOOST_ROOT/libs/wave/src). You could easily add those 5 or 6 cpp files to
 your projects and be independent from the Boost.Wave binaries a user might
 have installed.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7090#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC