A small example of a calculator written with flex / bison.
Compile using the Makefile
$ make
or manually on Linux, follow this steps:
$ bison -d calc.y
$ flex calc.l
$ gcc calc.tab.c lex.yy.c -o calc -lm
$ ./calc
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up| Type | Name | Latest commit message | Commit time |
|---|---|---|---|
| Failed to load latest commit information. | |||
|
|
.gitignore |
|
|
|
|
LICENSE |
|
|
|
|
Makefile |
|
|
|
|
README.md |
|
|
|
|
calc.l |
|
|
|
|
calc.y |
|
|
A small example of a calculator written with flex / bison.
Compile using the Makefile
$ make
or manually on Linux, follow this steps:
$ bison -d calc.y
$ flex calc.l
$ gcc calc.tab.c lex.yy.c -o calc -lm
$ ./calc