Skip to content
A simple calculator written using lex and yacc
C
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
Makefile
README.md
calc.h
calc.y
khash.h
lexer.l
number.c

README.md

calc

A simple calculator made with lex and yacc. Trying to make it feature compatable with jisoncalc. Supports floating point math.

Using

$ make
$ echo '5 + 5' | ./calc
10
$ ./calc
>> foo = 2 * 3
=> 6
>> bar = foo ^ 2
=> 36
>> baz = foo + bar
=> 42
>> 3 + 4.3
=> 7.3

License

calc is licensed under the terms of the GPLv2.

calc contains khash.h which is licensed under the terms of the MIT license. More info can be found here: http://attractivechaos.awardspace.com/khash.h.html

Something went wrong with that request. Please try again.