|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61576 - trunk/libs/spirit/example/scheme/test/qi
From: joel_at_[hidden]
Date: 2010-04-26 09:00:32
Author: djowel
Date: 2010-04-26 09:00:31 EDT (Mon, 26 Apr 2010)
New Revision: 61576
URL: http://svn.boost.org/trac/boost/changeset/61576
Log:
lists of ints grammar almost working
Added:
trunk/libs/spirit/example/scheme/test/qi/calc.scm (contents, props changed)
Text files modified:
trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
Added: trunk/libs/spirit/example/scheme/test/qi/calc.scm
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/example/scheme/test/qi/calc.scm 2010-04-26 09:00:31 EDT (Mon, 26 Apr 2010)
@@ -0,0 +1,10 @@
+; The calculator in spirit.scheme
+
+(define expression) ; forward declaration
+
+(define expression
+ (qi:>> (qi:int_)
+ (qi:*
+ (qi:|
+ (qi:>> (qi:char_ "+") (qi:int_))
+ (qi:>> (qi:char_ "-") (qi:int_))))))
\ No newline at end of file
Modified: trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp
==============================================================================
--- trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp (original)
+++ trunk/libs/spirit/example/scheme/test/qi/qi_interpreter.cpp 2010-04-26 09:00:31 EDT (Mon, 26 Apr 2010)
@@ -575,6 +575,8 @@
interpreter parser(in, filename, &env);
+ //~ fragments[parser["expression"]()];
+
BOOST_TEST(!test("1 + 1",
fragments[parser["expression"]()], space));
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