Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Latest commit

 

History

History
14 lines (11 loc) · 978 Bytes

readme.md

File metadata and controls

14 lines (11 loc) · 978 Bytes

Simple expression calc

A simple calculator with operator precedence based on the same principles as a language interpreter (lexical analysis & parsing). Operator precedence is handled using the shunting yard algorithm.

General information

  • supported operators: ^ / * - +
  • limitations: results can't be bigger than the range of int in the c language -> values exceeding that are undefined

How to run

  • check the releases tab for executables (linux & windows supported)
  • or compile for yourself using cmake
    • some compilers that dont need libm may cause an error, to fix it just change the link_libm flag in CMakeLists.txt
    • visual studio has hard time compiling this (as it's written in c not c++) and therefore requires you to use the debug runtime library (hence the big windows executable size)
  • or run it online