GitXplorerGitXplorer
j

math_interpreter

public
3 stars
1 forks
0 issues

Commits

List of commits on branch main.
Verified
988e7a53e3b77ce5ce56311bd2f0746bf96484d5

Update README.md

jjosethz00 committed 4 years ago
Unverified
a14fca33ae9b7735d33683ac362237fb245c31b0

Merge branch 'main' of https://github.com/josethz00/math_interpreter into main

jjosethz00 committed 4 years ago
Verified
38ffe8d0effca22270c936572bee0074bebcf162

Update README.md

jjosethz00 committed 4 years ago
Verified
413a20f5eb308f30a7a4dbacc578e593af55763d

Update README.md

jjosethz00 committed 4 years ago
Unverified
3507d5e903d25174846cd09e053bff5621536705

feat: makefile updated to autorun the interpreter

jjosethz00 committed 4 years ago
Unverified
2665110a354ade430ac47e98dbf74297eacf6ec4

feat: calc.y grammar expanded to match new lex tokens

jjosethz00 committed 4 years ago

README

The README file for this repository.

Basic Math Interpreter

This is a simple math expression interpreter written with C, Lex and Yacc

  1. Use make command in your terminal to compile .y, .l and .c files and then run

Limitations:

  • For now, the language only supports variables with integer variables, not floats neither strings
  • The supported operators are: = (assignment), - (subtraction), + (sum), * (multiplication), / (division), sqrtof (square root of) and powerof (power of)
  • Operators precedence is not supported yet

Language grammar examples:

a = 10;
print a;
a = 10 + 191;
print a;
a = 90;
print a;
a = a + 22;
print a;
a = 10;
b = 30;
c = a + b;
print c;