LL1AltBlock.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:codebuff 作者:
public LL1AltBlock(OutputModelFactory factory, GrammarAST blkAST, List<CodeBlockForAlt> alts) {
    super(factory, blkAST, alts);
    this.decision = ((DecisionState)blkAST.atnState).decision;

    /** Lookahead for each alt 1..n */
    IntervalSet[] altLookSets = factory.getGrammar().decisionLOOK.get(decision);
    altLook = getAltLookaheadAsStringLists(altLookSets);

    IntervalSet expecting = IntervalSet.or(altLookSets); // combine alt sets
    this.error = getThrowNoViableAlt(factory, blkAST, expecting);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号