https://github.com/thecoder93/compilers
A little parser written in C
https://github.com/thecoder93/compilers
Last synced: 2 months ago
JSON representation
A little parser written in C
- Host: GitHub
- URL: https://github.com/thecoder93/compilers
- Owner: thecoder93
- Created: 2016-01-27T14:44:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-27T14:46:50.000Z (over 10 years ago)
- Last Synced: 2025-01-01T10:17:28.790Z (over 1 year ago)
- Language: C
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
_____ _ _ _____ _
/ ___|(_) | | / __ \ | |
\ `--. _ _ __ ___ _ __ | | ___ | / \/ __ _ | | ___
`--. \| || '_ ` _ \ | '_ \ | | / _ \ | | / _` || | / __|
/\__/ /| || | | | | || |_) || || __/ | \__/\| (_| || || (__
\____/ |_||_| |_| |_|| .__/ |_| \___| \____/ \__,_||_| \___|
______ _ | | _ ___ _ _
| ___ \ | ||_| | | / _ \ | | | |
| |_/ /_ _ ___ | |__ __| | ___ __ __ _ __ / /_\ \ _ _ | |_ ___ _ __ ___ __ _ | |_ __ _
| __/| | | |/ __|| '_ \ / _` | / _ \\ \ /\ / /| '_ \ | _ || | | || __|/ _ \ | '_ ` _ \ / _` || __|/ _` |
| | | |_| |\__ \| | | || (_| || (_) |\ V V / | | | | | | | || |_| || |_| (_) || | | | | || (_| || |_| (_| |
\_| \__,_||___/|_| |_| \__,_| \___/ \_/\_/ |_| |_| \_| |_/ \__,_| \__|\___/ |_| |_| |_| \__,_| \__|\__,_|
This software accept a matemathical expression and it provides the result.
For example: (-2+5)^(-4)*3+2*(8-7*((7+2)-3))
Result is: −67,96
This software make use a pushdown model and use a scanner and a parser for to interpret the characters.
To compile using the make command.
For launch the software use:
./simple_calc
This software manage only this operator:
-
+
*
/
^
%
If you write 00, the software provides an error.
The same for any other expression syntactically incorrect.
You can not use these expressions:
-(5)
+2-2