Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49748 - trunk/boost/spirit/home/support/detail/lexer
From: jamin.hanson_at_[hidden]
Date: 2008-11-14 10:17:36


Author: ben_hanson
Date: 2008-11-14 10:17:35 EST (Fri, 14 Nov 2008)
New Revision: 49748
URL: http://svn.boost.org/trac/boost/changeset/49748

Log:
bol bug fixes.
Text files modified:
   trunk/boost/spirit/home/support/detail/lexer/input.hpp | 16 +++++++++-------
   1 files changed, 9 insertions(+), 7 deletions(-)

Modified: trunk/boost/spirit/home/support/detail/lexer/input.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/input.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/input.hpp 2008-11-14 10:17:35 EST (Fri, 14 Nov 2008)
@@ -113,7 +113,7 @@
                         (&_input->_state_machine->_lookup->front ()->front (),
                         _input->_state_machine->_dfa_alphabet.front (),
                         &_input->_state_machine->_dfa->front ()->front (),
- _input->_begin, _data.end, _input->_end);
+ _data.bol, _data.end, _input->_end);
                 }
                 else
                 {
@@ -129,7 +129,7 @@
                     _input->_state_machine->_seen_EOL_assertion)
                 {
                     _data.id = next (*_input->_state_machine, _data.state,
- _input->_begin, _data.end, _input->_end);
+ _data.bol, _data.end, _input->_end);
                 }
                 else
                 {
@@ -147,13 +147,12 @@
 
         std::size_t next (const basic_state_machine
             <typename Traits::char_type> &state_machine_,
- std::size_t &start_state_, const FwdIter &start_,
+ std::size_t &start_state_, bool bol_,
             FwdIter &start_token_, const FwdIter &end_)
         {
             if (start_token_ == end_) return 0;
 
         again:
- bool bol_ = _data.bol;
             const std::size_t * lookup_ = &state_machine_._lookup[start_state_]->
                 front ();
             std::size_t dfa_alphabet_ = state_machine_._dfa_alphabet[start_state_];
@@ -228,7 +227,11 @@
                 _data.bol = end_bol_;
                 start_token_ = end_token_;
 
- if (id_ == 0) goto again;
+ if (id_ == 0)
+ {
+ bol_ = _data.bol;
+ goto again;
+ }
             }
             else
             {
@@ -299,11 +302,10 @@
 
         std::size_t next (const std::size_t * const lookup_,
             const std::size_t dfa_alphabet_, const std::size_t * const dfa_,
- FwdIter const &start_, FwdIter &start_token_, FwdIter const &end_)
+ bool bol_, FwdIter &start_token_, FwdIter const &end_)
         {
             if (start_token_ == end_) return 0;
 
- bool bol_ = _data.bol;
             const std::size_t *ptr_ = dfa_ + dfa_alphabet_;
             FwdIter curr_ = start_token_;
             bool end_state_ = *ptr_ != 0;


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