slurpy -> slimp slump slimp -> A rest_slimp rest_slimp -> H rest_slimp -> B slimp C rest_slimp -> slump C slump -> d_or_e F f_string end d_or_e -> D d_or_e -> E f_string -> F f_string | lambda end -> slump end -> G Some strings in the language: AHDFG, ADFGCDFFFFFG, ABAEFGCCDFEFFFFFFG Some strings NOT in the lanuage: AHDFGA, DFGAH, ABABCC
Later we'll learn about a process that uses recursive descent parsing
With this program, we can accept or reject the individual inputs. An example input might be:
AHDFG DFGAH ADFGCDFFFFGwith output: ACCEPT, REJECT, ACCEPT