January 2013
Intermediate to advanced
328 pages
8h 5m
English
We’ve just seen how to strip away parts of a grammar based upon a simple Boolean variable. It wasn’t that the grammar matched the same input in multiple ways; we simply wanted to turn off certain language constructs. Now our goal is to force the parser to deactivate all but one interpretation of an ambiguous input phrase. Using our maze analogy, a maze and passphrase are ambiguous when we can follow multiple paths through the maze to the exit using that single passphrase. Predicates are like doors on path forks that we can open and close to direct movement through the maze.
Read now
Unlock full access