Skip to content

ConanCode96/mathCom

Repository files navigation

MathCom 😍

A compiler for nested multi mathematical operations (Addition, Subtraction, multiplication, division, exponentiation)

Milestones

  • added Lexer file (compiled with GNU::Flex)
  • added Parser file (compiled with GNU::Bison)
  • edited grammar production rules (now operations have the right precedence and associativity)
  • added support for floating point operations
  • added hexadecimal support
  • parentheses precedence adjustment
  • 3 unresolved shift/reduce conflicts from GNU::Bison

Steps to reproduce

  1. flex lexer.l
  2. bison -d parser.y
  3. gcc lex.yy.c parser.tab.c -o bin.exe
  4. bin.exe < input.txt or just bin.exe if you prefer to work from standard input stream

Releases

No releases published

Packages

No packages published