Skip to content

flex and bison calculator demonstrating polymorphism in the abstract syntax tree

Notifications You must be signed in to change notification settings

TimKrause2/calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

bison -o parser.cpp -d parser.ypp

The command for flex is

flex -o lexer.cpp lexer.l

The working directory for both steps is

%{sourceDir}

About

flex and bison calculator demonstrating polymorphism in the abstract syntax tree

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published