Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53492 - trunk/boost/spirit/home/support/detail/lexer
From: jamin.hanson_at_[hidden]
Date: 2009-05-31 08:50:46


Author: ben_hanson
Date: 2009-05-31 08:50:45 EDT (Sun, 31 May 2009)
New Revision: 53492
URL: http://svn.boost.org/trac/boost/changeset/53492

Log:
Max line length 80 chars.
Text files modified:
   trunk/boost/spirit/home/support/detail/lexer/generate_cpp.hpp | 21 ++++++++++++---------
   1 files changed, 12 insertions(+), 9 deletions(-)

Modified: trunk/boost/spirit/home/support/detail/lexer/generate_cpp.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/generate_cpp.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/generate_cpp.hpp 2009-05-31 08:50:45 EDT (Sun, 31 May 2009)
@@ -30,7 +30,8 @@
 
     if (sm_._lookup->size () == 0)
     {
- throw runtime_error ("Cannot generate code from an empty state machine");
+ throw runtime_error ("Cannot generate code from an empty "
+ "state machine");
     }
 
     std::string upper_name_ (__DATE__);
@@ -255,14 +256,14 @@
     }
     else
     {
- const std::size_t *lookup_ = &sm_._lookup[0]->front ();
- const std::size_t *dfa_ = &sm_._dfa[0]->front ();
+ const std::size_t *lookup_ = &sm_._lookup->front ()->front ();
+ const std::size_t *dfa_ = &sm_._dfa->front ()->front ();
         std::size_t i_ = 0;
         std::size_t j_ = 1;
         std::size_t count_ = lookups_ / 8;
 
         os_ << " static const std::size_t lookup_[";
- os_ << sm_._lookup[0]->size () << "] = {";
+ os_ << sm_._lookup->front ()->size () << "] = {";
 
         for (; i_ < count_; ++i_)
         {
@@ -287,8 +288,8 @@
         os_ << " static const std::size_t dfa_alphabet_ = " <<
             sm_._dfa_alphabet.front () << ";\n";
         os_ << " static const std::size_t dfa_[" <<
- sm_._dfa[0]->size () << "] = {";
- count_ = sm_._dfa[0]->size () / 8;
+ sm_._dfa->front ()->size () << "] = {";
+ count_ = sm_._dfa->front ()->size () / 8;
 
         for (i_ = 0; i_ < count_; ++i_)
         {
@@ -307,7 +308,7 @@
             }
         }
 
- const std::size_t mod_ = sm_._dfa[0]->size () % 8;
+ const std::size_t mod_ = sm_._dfa->front ()->size () % 8;
 
         if (mod_)
         {
@@ -334,8 +335,10 @@
     if (dfas_ > 1)
     {
         os_ << "again:\n";
- os_ << " const std::size_t * lookup_ = lookup_arr_[start_state_];\n";
- os_ << " std::size_t dfa_alphabet_ = dfa_alphabet_arr_[start_state_];\n";
+ os_ << " const std::size_t * lookup_ = "
+ "lookup_arr_[start_state_];\n";
+ os_ << " std::size_t dfa_alphabet_ = "
+ "dfa_alphabet_arr_[start_state_];\n";
         os_ << " const std::size_t *dfa_ = dfa_arr_[start_state_];\n";
     }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk