Updated DialogueGraphVisitor to handle new grammar