BooleanExpANTLRHandler.java 文件源码

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

项目:BEAST 作者:
/**
 * Method that parses the current input of a BooleanExpCodeArea and returns a
 * FormalPropertyDescriptionParser.BooleanExpListContext object which can then be used for building an AST
 * out of the input.
 * @return a BooleanExpListContext node from the ANTLR generated ParseTree.
 */
public FormalPropertyDescriptionParser.BooleanExpListContext getParseTree() {
    String text = null;
    try {
        text = styledDocument.getText(0, styledDocument.getLength());
    } catch (BadLocationException e) {
        e.printStackTrace();
    }
    lexer.setInputStream(new ANTLRInputStream(text));
    CommonTokenStream ts = new CommonTokenStream(lexer);
    parser.setTokenStream(ts);
    return parser.booleanExpList();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号