Chomp Help ========== Chomp is the command line interface for Chompy. (See ABOUT.) Commands ======== Note: input is NOT case sensitive. ABOUT - about Chompy. ADD - adds a to the current Chompy world. e.g1 ADD S = NP + VP e.g2 ADD world1.wld (See parser syntax below.) DELETE [n] - Deletes rule n. DELETE - Delete all rules. END - quits the program. EXIT - quits the program. HELP - this help screen. IS "" A "" - This is command recursively checks to see if the source string is a form of the target string, using the rules in the Chompy world. e.g. given the following rules: SENTENCE = NP + VP SENTENCE = NP NP = DET + NOUN NP = NOUN DET = the NOUN = dog VP = VERB VERB = ran and the query: IS "the dog ran" a "SENTENCE" the program will parse the source string as follows: the dog ran -> DET NOUN VERB DET NOUN VERB -> NP VP NP VP -> SENTENCE returning: Yes! The string "THE DOG RAN" is a form of "S". N.B the 'A' in IS "" A "" is optional and so are any other comments apart from IS and the first and second quotes. i.e. the query IS "the dog ran" a sentence of the form "SENTENCE" and IS "the dog ran" "SENTENCE" are both valid. LIST [] - list all the rules in the current Chompy world to the file . List to standard output when is not specified. PARSE - parses the given rule without adding it to the world. (See ADD.) PAUSE [n] - sets the length of the output list before each pause. Where n = 0, the output is not paused. Else report the current setting. QUIT - quits the program. SAVE [] - saves the world to or saves the current Chompy world to the last used if there is one. TIMER [ON|OFF] - Set the timer on or off, else reports the current state of the timer. Parser syntax ============= The following syntax is allowed by the parser. Recursive Rules --------------- must be of the following form: = + + ... + where and are valid strings. i.e. they must not contain any spaces. Note: All alphabetic characters are converted to uppercase. Files ----- may be included as the only argument on a line apart from a comment in the following form: or // this is a commented file name Where the contents of is inserted at the current rule position in the parsed file. ** END **