项目作者: TimKrause2

项目描述 :
flex and bison calculator demonstrating polymorphism in the abstract syntax tree
高级语言: C++
项目地址: git://github.com/TimKrause2/calc.git
创建时间: 2020-06-20T19:55:58Z
项目社区:https://github.com/TimKrause2/calc

开源协议:

下载


calc

flex and bison calculator demonstrating polymorphism in the abstract syntax tree

The original code comes from “flex & bison”. I though that I would implement the abstract syntax tree with a polymorphic class.

In order to build ‘calc’ from qt creator you’ll need to add two custom build steps. One for bison and one for flex and in that order. These build steps have to happen before anything else.
The command for bison is

  1. bison -o parser.cpp -d parser.ypp

The command for flex is

  1. flex -o lexer.cpp lexer.l

The working directory for both steps is

  1. %{sourceDir}