1 Star 0 Fork 1

zcy543814 / GoCompiler_antlr

forked from victayria77 / GoCompiler_antlr 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
GoParserBase.java 681 Bytes
一键复制 编辑 原始数据 按行查看 历史
import java.util.List;
import org.antlr.v4.runtime.*;
/**
* All parser methods that used in grammar (p, prev, notLineTerminator, etc.)
* should start with lower case char similar to parser rules.
*/
public abstract class GoParserBase extends Parser
{
protected GoParserBase(TokenStream input) {
super(input);
}
/**
* Returns true if the current Token is a closing bracket (")" or "}")
*/
protected boolean closingBracket()
{
BufferedTokenStream stream = (BufferedTokenStream)_input;
int prevTokenType = stream.LA(1);
return prevTokenType == GoParser.R_CURLY || prevTokenType == GoParser.R_PAREN;
}
}
Java
1
https://gitee.com/zcy543814/go-compiler_antlr.git
git@gitee.com:zcy543814/go-compiler_antlr.git
zcy543814
go-compiler_antlr
GoCompiler_antlr
phase1_simpleExpression

搜索帮助

53164aa7 5694891 3bd8fe86 5694891