sharwell/antlr4 — pull request #16 by sharwell (2014-08-31 22:03:41+00:00)
Title: Multiple prediction fixes

This pull request resolves multiple issues identified in the prediction algorithm used by the optimized fork. The issues were identified while revisiting the algorithm to investigate the cause of tunnelvisionlabs/antlr4cs#71.

## Summary

* Improved computation and storage of conflict information
* Improved computation and storage of accept state information
* Improved detection of cases where LL fallback is required to ensure correct predictions

## Compile-time breaking changes

* Removed fields
* `DFAState.isAcceptState` (use `isAcceptState()` instead)
* `DFAState.prediction` (use `getPrediction()` instead)
* `DFAState.lexerActionExecutor` (use `getLexerActionExecutor()` instead)
* Removed methods
* `ATNConfig.isHidden()`
* `ATNConfig.setHidden(boolean)`
* `ATNConfigSet.stripHiddenConfigs()`
* `ATNConfigSet.setConflictingAlts(BitSet)` (use `setConflictInfo(ConflictInfo)` instead)
* `ParserATNSimulator.resolveToMinAlt(DFAState, BitSet)`

## Runtime breaking changes

* Code which relied on `DFAState.isAcceptState` when using `PredictionMode.LL_EXACT_AMBIG_DETECTION` will need to be updated to check `ATNConfigSet.isExactConflict()` in addition to `ATNConfigSet.getConflictingAlts()`. For more information, see the documentation for `ParserATNSimulator.isAcceptState(DFAState, boolean)`.

## Functional, non-breaking changes

* In some cases, semantic predicates which were not evaluated during past releases are evaluated during prediction after this update. This is a non-breaking change for predicates which adhere to the underlying purity assumption for semantic predicates.
* The `ParserATNSimulator.optimize_hidden_conflicted_configs` field no longer has any effect.