Skip to content

jsphbtst/math-interpreter-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To run the Math Interpreter, compile the project first using make:

make

After which, run the executable:

./main

Two ways to exit the REPL:

  1. type exit; or
  2. hit ctrl + z or cmd + .

Grammar Rules:

<expr> ::= <expr> + <term> |
           <expr> - <term> |
           <term>

<term> ::= <term> * <factor> |
           <term> / <factor> |
           <factor>

<factor> ::= (<expr>) |
             <trigOp>(<expr>) |
             <expOp>(<expr>) |
             number

<trigOp> ::= sin | cos | tan

<expOp> ::= exp | log | ln

About

Math Interpreter REPL in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors