x3_fun's People
x3_fun's Issues
Request: Step by step test driven grammar development example.
I've been trying to work with spirit in a test driven development way, but i am finding it difficult to get any kind of process together. It is difficult to test rules in isolation, or in any structured way.
Can you extend this example to start building a grammar where you start building a an initial base test, and then build the rule to parse it. Then extend the test to another part of the grammar etc.
Examples are outdated, do not build due to API changes in version 1.67.0
From Spirit changelog:
Removed with_context PR#239.
Here are links to related changes that break compilation:
How to add boolean functions and string functions
How can x3_fun be enhanced to handle more complex expressions that contain doubles and their functions along with booleans and bool functions and strings and string functions?
Missing annotations
When reading ast.hpp, I expected operation
and expression
to be annotated. But when inspecting the values of id_first
& id_last
, most still equal -1.
It seems that only the outer expression and expressions within parentheses are annotated.
I adapted parse_expression_test.cpp
to parse a single expression from command line and put annotated text between brackets.
https://github.com/m-dhooge/x3_fun/tree/annotation/
Here are my results:
$ ./print 2*3
[2*3] [](2 [] * 3)
$ ./print 1+2*3-4/5
[1+2*3-4/5]( []1 [] + [](2 [] * 3) [] - [](4 [] / 5))
$ ./print (1+2)*(3-4)/5
[(1+2)*(3-4)/5] []( [1+2]( []1 [] + []2) [] * [3-4]( []3 [] - []4) [] / 5)
Debian/Arch Build/Run instructions
I noticed when we use the standard installed debian/arch boost environments, they have stuff installed in a way that bjam/cmake don't behave as expected when building. In order to circumvent these problems, the easiest way is to ensure you do have boost tools installed, cmake installed, then finally rebuild the latest boost libs from sources yourselves.
apt-get install libboost-tools-dev cmake cmake-curses-gui
pacman -S boost-libs
pacman -S boost-build
cd /usr/local/
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download
tar xvf boost_1_59_0.tar.gz
cd boost_1_59_0/
bjam
export BOOST_ROOT=/usr/local/boost_1_59_0
cd /usr/local/boost_1_59_0/tools/build
./bootstrap.sh
./b2 install --prefix=/usr/local/boost_1_59_0
Add to ~/.bashrc
export BOOST_ROOT=/usr/local/boost_1_59_0
export PATH=$PATH:$BOOST_ROOT/bin
logout and login
cd ~/Downloads/
git clone https://github.com/cierelabs/x3_fun.git
cd x3_fun
bjam -a -d+2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.