Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57279 - trunk/libs/spirit/example/qi/mini_c
From: joel_at_[hidden]
Date: 2009-11-01 18:43:26


Author: djowel
Date: 2009-11-01 18:43:26 EST (Sun, 01 Nov 2009)
New Revision: 57279
URL: http://svn.boost.org/trac/boost/changeset/57279

Log:
Fix. Disallow alpha or underscore after "int"
Text files modified:
   trunk/libs/spirit/example/qi/mini_c/mini_cc.hpp | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: trunk/libs/spirit/example/qi/mini_c/mini_cc.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/mini_c/mini_cc.hpp (original)
+++ trunk/libs/spirit/example/qi/mini_c/mini_cc.hpp 2009-11-01 18:43:26 EST (Sun, 01 Nov 2009)
@@ -37,6 +37,7 @@
 
     var_decl =
             "int"
+ >> !(alnum | '_') // make sure we have whole words
> !var_ref // make sure the variable isn't redeclared
> identifier [add_var(_1)]
> (';' | '=' > assignment_rhs(ref(nvars)-1))


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