Skip to content

chikaku/simple_calculator_cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple calculator command

command line simple calculator and library

Context Free Grammar

Left Recursion

Goal -> Statement

Statement -> Expression

Expression -> Expression + Term | Expression - Term | Term | + Term | - Term

Term -> Term * Factor | Term / Factor | Factor

Factor -> ( Expression ) | Factor ^ Factor| number

Right Recursion

Goal -> Statement

Statement -> Expression

Expression -> Term Expression' | + Term Expression' | - Term Expression'

Expression' -> + Term Expression' | - Term Expression' | ε

Term -> Factor Term'

Term' -> * Factor Term' | / Factor Term' | ε

Factor -> ( Expression ) Factor' | number Factor'

Factor' -> ^ Factor | ε

About

command line simple calculator and library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages