Add new test case for ambiguity grammars
Implements depth first search of graphs