Arthur Sonzogni 2b3b529408 Initial commit.
2018-01-20 10:47:45 +01:00
2018-01-20 10:47:45 +01:00
2018-01-20 10:47:45 +01:00
2018-01-20 10:47:45 +01:00
2018-01-20 10:47:45 +01:00

ANTLR Cmake Starter

Description

A ready to use starter project using ANTLR with cmake.

There are no dependencies. The script /tools/antlr/download_and_build.sh will get you ANTLR.

## Instruction


# Download ANTLR and build the CPP runtime.
cd tools/antlr
./download_and_build.sh
cd ../..

# Build the project
mkdir build
cd build
cmake ..
make
./src/main

Output example

Please enter an expression (for instance (1+2)*(3-4)/(5-6))
input = 4/2-3*3+1-1
Result = -9
Tree = 
             
             4
            
           ÷ 
          ╱ ╲
         ╱   2        
      -         3
     ╱ ╲       ╱
    ╱   ╲     x 
   ╱     ╲   ╱ ╲
  ╱       ╲ ╱   3
          +    
-           ╲ 
 ╲           ╲
  ╲           1
   ╲          
    ╲ 
     ╲
      1
      
S
Description
No description provided
Readme MIT 1.2 MiB
Languages
C++ 82.4%
HTML 6%
CMake 5.4%
CSS 3.5%
ANTLR 2.3%
Other 0.4%