calculateLongestTerminalChain added to the grammar.
Refactoring the GLLParser class. Some sanity checks. The deepEquals method for ambiguous nodes should be fixed though