|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54790 - trunk/boost/spirit/home/support/detail/lexer
From: jamin.hanson_at_[hidden]
Date: 2009-07-08 04:42:39
Author: ben_hanson
Date: 2009-07-08 04:42:38 EDT (Wed, 08 Jul 2009)
New Revision: 54790
URL: http://svn.boost.org/trac/boost/changeset/54790
Log:
Corner case fix to human readable state machine.
Text files modified:
trunk/boost/spirit/home/support/detail/lexer/state_machine.hpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
Modified: trunk/boost/spirit/home/support/detail/lexer/state_machine.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/state_machine.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/state_machine.hpp 2009-07-08 04:42:38 EDT (Wed, 08 Jul 2009)
@@ -291,7 +291,13 @@
iter_._data.eol_index = ptr_->front ()._eol_index;
iter_._token_iter = ptr_->front ()._transitions.begin ();
iter_._token_end = ptr_->front ()._transitions.end ();
- ++iter_;
+
+ // Deal with case where there is only a bol or eol
+ // but no other transitions.
+ if (iter_._transitions)
+ {
+ ++iter_;
+ }
}
return iter_;
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