Code Monkey home page Code Monkey logo

rshell2's Introduction

assignment2

In this assignment, please finish two things:

1 In "CS100_Assignment1.pdf", finish setting up your “Assignment” github repo, and writing an epic for assignment 2.

2 Finish everything mentioned in "CS100_Assignment2.pdf".

rshell Summary:

IMPORTANT: to end rshell session type 'terminate' command.

the functionality of this rshell is split into four classes

- Package
- Packager
- Executer
- Controller

Package Class: This class is design to act as a container of user input. It contains within it two vectors, one for holding input commands, and another for holding connectors.

Packager Class: This class is designed to take an input string and parse through it and packaing the string into a set of packages. the parsing process involves two stages, the initial parse splits the input by semicolons. The second pass takes an individual command split by the previous parse and places the present commands and connectors into seperate vectors within a package, and then adds that package to a vector of packages.

Executer Class: This class receives a vector of packages from the Packager class and performs a final parse and clean up of the commands prior to execution. This final parse is crucial as it will identify whether the user has passed the terminate shell function. This class is also resposible for executing the user commands and determining whether or not commands should be executed based on the connectors that were passed.

Controller: This class is essentially the conductor, it takes the functionality of the Package, Packager, and Executer class and calls commands in the order required to run rshell. The controller contains a single function, receiveAndRun which will receive and execute input and return a true boolean value if the user passes a 'terminate' command.

rShell.cpp: this file creates a container and continously loops its receiveAndRun function until it returns a true value.

Bugs:

- echo '\n' will result in a space in rshell, while if I run this command in the terminal I receive a \n

rshell2's People

Contributors

bryan8x8 avatar ljian006 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.