intellij-plugin-v4 icon indicating copy to clipboard operation
intellij-plugin-v4 copied to clipboard

Show where in the grammar an input phrase can reach.

Open parrt opened this issue 11 years ago • 0 comments

Sam says: in the IDE extend ProfilingATNSimulator. override getTargetState and computeTargetState (or something like that), along with the corresponding method that's used in LL parsing. look in ProfilingATNSimulator for the comment describing the calculation of the # of DFA states computed during LL parsing that'll show you the method to hook, since it returns a DFASTate. If they click an ambiguous decision, parse again from the top, and when you get to the ambiguous decision keep a log of the DFAState instances traversed, and give them a list of those states. As they click each state in the list, highlight the next token that could match (final ATN states in the closure).

parrt avatar Jun 27 '14 17:06 parrt