|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77966 - in trunk/libs/spirit/example/qi/compiler_tutorial: conjure1 mini_c
From: joel_at_[hidden]
Date: 2012-04-13 20:00:04
Author: djowel
Date: 2012-04-13 20:00:03 EDT (Fri, 13 Apr 2012)
New Revision: 77966
URL: http://svn.boost.org/trac/boost/changeset/77966
Log:
fix for identifier rule not allowing identifiers that start with a keyword (e.g. fortify)
Text files modified:
trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/expression_def.hpp | 2 +-
trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/expression_def.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/expression_def.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/expression_def.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/expression_def.hpp 2012-04-13 20:00:03 EDT (Fri, 13 Apr 2012)
@@ -100,7 +100,7 @@
argument_list = -(expr % ',');
identifier =
- !keywords
+ !lexeme[keywords >> !(alnum | '_')]
>> raw[lexeme[(alpha | '_') >> *(alnum | '_')]]
;
Modified: trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/expression_def.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/expression_def.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/expression_def.hpp 2012-04-13 20:00:03 EDT (Fri, 13 Apr 2012)
@@ -144,7 +144,7 @@
argument_list = -(expr % ',');
identifier =
- !keywords
+ !lexeme[keywords >> !(alnum | '_')]
>> raw[lexeme[(alpha | '_') >> *(alnum | '_')]]
;
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