Giter Site home page Giter Site logo

x3_fun's People

Contributors

djowel avatar mjcaisse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.