basic_arith_interpreter's Introduction
How to Run: ========== 1. unzip HW1_LNJ.zip /*extract the zip file*/ 2. cd HW1_LNJ 3. make 4. ./arith Instrictions run tests: ====================== 1. mytest.bat file is present in the "./HW1_LNJ/tests" folder. Copy this file in the tests folder of test harness. Run following command. sh test.sh Program Description : ==================== This programs contains Implemention of ARITH in C++ As per the requirement, this program does the following things: - gets inputs via stdin and output via stdout - parses the input into tokens and evaluates the expression - Currently it supports - multiplication, division, addition, subtraction. - unary operators (-(int)) - All operations are supported for integers. Requirements: c++ compiler Grammar The grammar in the homework is <expr> ::== <int> |<expr> + <expr> |<expr> * <expr> to capture the order of predence, my grammar is Grammer: ======= <Primary> :: = NUMBER | - primary | (expression) <expression> :: = term + expression | term - expression | term <term> :: = <primary> / <term> | <primary> * <term> | <primary> Reference: Grammar, Syntax and Semantics: https://opendsa-server.cs.vt.edu/ODSA/Books/PL/html/index.html Python tutorial to understand concepts: https://ruslanspivak.com/lsbasi-part7/ Implementation: c++ forum (http://www.cplusplus.com/forum/general/1116/2/)
basic_arith_interpreter's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.