Skip to content

arxeiss/go-expression-calculator

Repository files navigation

Expression calculator in Go

Custom implementation of calculator which accept string as an input. And handles parentheses and operator precedence properly.

The idea to try implement custom expression calculator raised from the puzzle of Day 18 of Advent of Code 2020.

How to run

  1. Clone repository
  2. Build calculator with make build
  3. Execute calculator with ./calculator and show help with ./calculator --help

Blog posts

About each part I'm also writing article on Dev.to and my personal blog.

  1. Lexer - Dev.To 🇬🇧 & kutac.cz 🇨🇿
  2. Shunting yard parser - Dev.To 🇬🇧 & kutac.cz 🇨🇿
  3. AST & Evaluator - Dev.To 🇬🇧 & kutac.cz 🇨🇿
  4. Recursive descent parser - Dev.To 🇬🇧 & kutac.cz 🇨🇿