gpt4 book ai didi

java - ANTLR-4.7.1 :The type ANTLRInputStream is deprecated

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:47:19 24 4
gpt4 key购买 nike

<分区>

import  org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.tree.*;

public class Test{
public static void main(String[] args) throws Exception{

ANTLRInputStream input = new ANTLRInputStream(System.in);

ArrayInitLexer lexer = new ArrayInitLexer(input);

CommonTokenStream tokens = new CommonTokenStream(lexer);

ArrayInitParser parser = new ArrayInitParser(tokens);

ParseTree tree = parser.init();
System.out.println(tree.toStringTree(parser));


}
}

找到了官方API(http://www.antlr.org/api/Java/index.html),但还是不知道怎么解决。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com