PREV INDEX NEXT

Author: Stan Eisenstat
Subject: The deliverables for Homework #2 parsley
Date: Friday, 25 Sep 2020, 08:24:23


There seems to be some confusion over the deliverables for Homework #2
parsley.

parsley prompts for and reads lines from stdin, breaks the lines into
tokens, parses the tokens into a tree of commands, and writes the tree
in in-order to stdout.

The code for parsley is in two parts:

A) Hwk2/mainParsley.c

   * prompts for and reads lines from stdin;

   * calls parse() to break the lines into tokens and parse the tokens
     into a tree of commands; and

   * writes the tree in in-order to stdout.

B) Your source files implement parse(), which, given a string with the
   line read from stdin,

   * [Tokenization] breaks the string into a sequence of tokens of the
     types described in the specification (TEXT tokens, redirection
     symbols, pipeline symbols, command operators, command terminators,
     and parentheses);

   * [Parsing] parses the sequence of tokens using the grammar in the
     Appendix and Hwk2/parsley.h; and

   * [Building the CMD Tree] creates and returns a tree of command
     structs as specified in the Appendix and Hwk2/parsley.h.

As I mentioned in an earlier post, [T]okenization, [P]arsing, and
[B]uilding may be done sequentially (T then P then B), or partly in
parallel (T+P then B or T then P+B) or entirely in parallel (T+P+B).

--Stan-
PREV INDEX NEXT