Add a comment describing a possible future optimization to applyPrecedenceFilter

This commit is contained in:
Sam Harwell 2014-03-23 11:33:42 -05:00
parent 10558a7bea
commit 336a1197e8
1 changed files with 4 additions and 0 deletions

View File

@ -1064,6 +1064,10 @@ public class ParserATNSimulator extends ATNSimulator {
continue; continue;
} }
/* In the future, this elimination step could be updated to also
* filter the prediction context for alternatives predicting alt>1
* (basically a graph subtraction algorithm).
*/
PredictionContext context = statesFromAlt1.get(config.state.stateNumber); PredictionContext context = statesFromAlt1.get(config.state.stateNumber);
if (context != null && context.equals(config.context)) { if (context != null && context.equals(config.context)) {
// eliminated // eliminated