Next: , Previous: , Up: End of parse   [Contents][Index]


9.2 Determining EOP from exhaustion

An exhaustion-loving application that does not know the length of its input may want to terminate the parse in case of exhaustion on success, in effect treating exhaustion as an end-of-input indicator. These applications will usually want to treat exhaustion on failure as an error.

An example of such an application would be the language consisting entirely of strings of balanced parentheses. HTML might also be treated as an exhaustion-loving language, with the parse terminating at the /html tag.