文件名称:C/C++表达式解析(可用于脚本解析功能实现)
文件大小:125KB
文件格式:ZIP
更新时间:2019-01-03 04:18:46
数值运算 逻辑判断 表达式 解析
A simple command line calculator that uses a recursive descent parser, written in C. Made as an exercise in tokenizing and parsing... ## Supported features Below is the BNF of the parser. The functions are named and behave the same as those found in C64 BASIC. expression = ["+"|"-"] term {("+"|"-"|"OR") term} . term = factor {( "*" | "/" | "AND" ) factor} . factor = func "(" expression ")" | number | "(" expression ")" . func = ABS | AND | ATN | COS | EXP | INT | LOG | NOT | OR | RND | SGN | SIN | SQR | TAN
【文件预览】:
expression-master
----t()
--------Makefile(755B)
--------main.c(2KB)
----src()
--------tokenizer.c(3KB)
--------parser.c(5KB)
--------main.c(1KB)
----expression.png(135KB)
----README.md(1KB)
----Makefile(1KB)
----.gitignore(168B)
----include()
--------tokenizer.h(512B)
--------parser.h(241B)