这是我的语法文件,这是我的 SimpleBaseListner.java 文件
// Generated from Simple.g4 by ANTLR 4.7.1
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
* This interface defines a complete listener for a parse tree produced by
* {@link SimpleParser}.
*/
public interface SimpleListener extends ParseTreeListener {
/**
* Enter a parse tree produced by {@link SimpleParser#file}.
* @param ctx the parse tree
*/
void enterFile(SimpleParser.FileContext ctx);
/**
* Exit a parse tree produced by {@link SimpleParser#file}.
* @param ctx the parse tree
*/
void exitFile(SimpleParser.FileContext ctx);
/**
* Enter a parse tree produced by {@link SimpleParser#func}.
* @param ctx the parse tree
*/
void enterFunc(SimpleParser.FuncContext ctx);
/**
* Exit a parse tree produced by {@link SimpleParser#func}.
* @param ctx the parse tree
*/
void exitFunc(SimpleParser.FuncContext ctx);
/**
* Enter a parse tree produced by {@link SimpleParser#arg}.
* @param ctx the parse tree
*/
void enterArg(SimpleParser.ArgContext ctx);
/**
* Exit a parse tree produced by {@link SimpleParser#arg}.
* @param ctx the parse tree
*/
void exitArg(SimpleParser.ArgContext ctx);
/**
* Enter a parse tree produced by {@link SimpleParser#body}.
* @param ctx the parse tree
*/
void enterBody(SimpleParser.BodyContext ctx);
/**
* Exit a parse tree produced by {@link SimpleParser#body}.
* @param ctx the parse tree
*/
当我使用编译它时javac SimpleBaseListner.java,出现以下
我是 Antlr4 的新手,我不知道这里出了什么问题。虽然是说找不到符号,但是这个类型的Scope是在语法文件中定义的。因此,据我所知,它应该在 Antlr4 编译语法文件时定义。
有人能帮我吗?
相关分类