Skip to content

yassineaddi/recursive-descent-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

recursive-descent-parser

A recursive-descent parser in C, that evaluates arithmetic expressions

$ gcc parser.c -o parser
$ parser
> 3+9
12
> 10 * 4  * 2 * 3 / 8
30
> 5 - - - + - (3 + 4) - +2
10
> 2^10
1024

what does it do?

  • addition
  • subtraction
  • single-digit numbers
  • multi-digit numbers
  • multiplication
  • division
  • negation
  • parentheses
  • exponentiation
  • floating point
  • error handling

Releases

No releases published

Packages

No packages published

Languages