Skip to content

Simple interactive environment which calculate math expression, support functions and variables

Notifications You must be signed in to change notification settings

berkut998/Math_REPL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math_REPL

Simple interactive environment which calculate math expression, support functions and variables

Supported grammar:

function ::= fn-keyword fn-name { identifier } fn-operator expression

fn-name ::= identifier

fn-operator ::= '=>'

fn-keyword ::= 'fn'

expression ::= factor | expression operator expression

factor ::= number | identifier | assignment | '(' expression ')' | function-call

assignment ::= identifier '=' expression

function-call ::= fn-name { expression }

operator ::= '+' | '-' | '*' | '/' | '%'

identifier ::= letter | '_' { identifier-char }

identifier-char ::= '_' | letter | digit

number ::= { digit } [ '.' digit { digit } ]

letter ::= 'a' | 'b' | ... | 'y' | 'z' | 'A' | 'B' | ... | 'Y' | 'Z'

digit ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

Application screenshots:

image

About

Simple interactive environment which calculate math expression, support functions and variables

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages