Skip to content

基于boost.spirit x3的简易四则运算计算器

Notifications You must be signed in to change notification settings

jiangzhuti/SpiritCalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

SpiritCalc

ebnf:

expr ::= term { (+|-) term }*
term ::= factor { (*|/) factor }*
factor ::= ( expr )
     | NUM

[jzt@lq-rog SpiritCalc]$ g++ -o calc main.cpp 
[jzt@lq-rog SpiritCalc]$ ./calc 
3+5+2/(1-3*(2+6/2))
7.85714
2+/3
failed to parse at: "+/3"
q

About

基于boost.spirit x3的简易四则运算计算器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages