/**
* Computes the set of conflicting or ambiguous alternatives from a
* configuration set, if that information was not already provided by the
* parser.
*
* @param reportedAlts The set of conflicting or ambiguous alternatives, as
* reported by the parser.
* @param configs The conflicting or ambiguous configuration set.
* @return Returns {@code reportedAlts} if it is not {@code null}, otherwise
* returns the set of alternatives represented in {@code configs}.
*/
@NotNull
protected BitSet getConflictingAlts(@Nullable BitSet reportedAlts, @NotNull ATNConfigSet configs) {
if (reportedAlts != null) {
return reportedAlts;
}
BitSet result = new BitSet();
for (ATNConfig config : configs) {
result.set(config.alt);
}
return result;
}
DiagnosticErrorListener.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:Scratch-ApuC
作者:
评论列表
文章目录