This is a simple lexer/parser I wrote while teaching myself about lex and yacc. It evaluates expressions closely resembling C infix syntax, omitting the assignments, function calls, etc. For example:
1 + 2
1 * 56 - 2
(1 - 2) * 5
(1 ^ 3) << 1
(true && false) || (false || true)
Throwing it on the web because when I searched around I found lots of examples much like this one but none of them in a state where they could actually be compiled, run and tinkered with.