danielduan/TimeTravelShell
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
CS111 Lab 1b Kenneth Shi 304063313 Jia Dan Duan 604022222 Lab 1b Submission: Implemented lab 1b, and everything seems to be working. However, our 1A is still not completely fixed, so the same issues are around and may cause problems when running 1b. The currently implemented commands: -Simple -AND -OR -Sequence (although our 1A doesn't process sequences correctly so we're unable to test accuracy) -Subshell -Pipe The outputs for our tests seem to match the same terminal outputs we we're assuming everything is implemented correctly. Lab 1a Submission: We tried to make everything work and all the features should be implemented. There are errors noted below. We are also unable to make dist because of them so we tar'd it ourselves. Implementation: We first read in bytes one at a time, and then process it into a giant character array buffer. We check for any possible syntax errors, and if there are, we print out the error (without the line number). Next, the string buffer is passed into a function that will turn the string into a bunch of "tokens", each holding either an operator or a string. These are pushed into two different stacks, and processed the same way we would process math equations with stacks. Known errors: *precedence is not taken into account in certain && or || against | or paranthesis *in certain commands, parsing will introduce an unknown character at the end of the string *line number is not printed upon errors