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

Subject: [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:34:39


#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
 Keywords: |
---------------------------------+------------------------------------------
 I use boost::wave to preprocess shader source files. I have a macro system
 that allows me to execute certain things if the code path the macro is in
 "survives" the preprocessing step. So far, so good.

 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.

 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7090>
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