Merge pull request #540 from sharwell/fix-528
Updated documentation for ParserATNSimulator.getConflictingAlts
This commit is contained in:
commit
9c6023b385
|
@ -1617,7 +1617,17 @@ public class ParserATNSimulator extends ATNSimulator {
|
|||
return new ATNConfig(config, t.target, newContext);
|
||||
}
|
||||
|
||||
protected BitSet getConflictingAlts(ATNConfigSet configs) {
|
||||
/**
|
||||
* Gets a {@link BitSet} containing the alternatives in {@code configs}
|
||||
* which are part of one or more conflicting alternative subsets.
|
||||
*
|
||||
* @param configs The {@link ATNConfigSet} to analyze.
|
||||
* @return The alternatives in {@code configs} which are part of one or more
|
||||
* conflicting alternative subsets. If {@code configs} does not contain any
|
||||
* conflicting subsets, this method returns an empty {@link BitSet}.
|
||||
*/
|
||||
@NotNull
|
||||
protected BitSet getConflictingAlts(@NotNull ATNConfigSet configs) {
|
||||
Collection<BitSet> altsets = PredictionMode.getConflictingAltSubsets(configs);
|
||||
return PredictionMode.getAlts(altsets);
|
||||
}
|
||||
|
|
|
@ -556,7 +556,7 @@ public enum PredictionMode {
|
|||
* </pre>
|
||||
*/
|
||||
@NotNull
|
||||
public static Collection<BitSet> getConflictingAltSubsets(ATNConfigSet configs) {
|
||||
public static Collection<BitSet> getConflictingAltSubsets(@NotNull ATNConfigSet configs) {
|
||||
AltAndContextMap configToAlts = new AltAndContextMap();
|
||||
for (ATNConfig c : configs) {
|
||||
BitSet alts = configToAlts.get(c);
|
||||
|
|
Loading…
Reference in New Issue