• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ATNConfigSet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.antlr.v4.runtime.atn.ATNConfigSet的典型用法代码示例。如果您正苦于以下问题:Java ATNConfigSet类的具体用法?Java ATNConfigSet怎么用?Java ATNConfigSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ATNConfigSet类属于org.antlr.v4.runtime.atn包,在下文中一共展示了ATNConfigSet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setPrecedenceDfa

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
/**
 * Sets whether this is a precedence DFA. If the specified value differs
 * from the current DFA configuration, the following actions are taken;
 * otherwise no changes are made to the current DFA.
 *
 * <ul>
 * <li>The {@link #states} map is cleared</li>
 * <li>If {@code precedenceDfa} is {@code false}, the initial state
 * {@link #s0} is set to {@code null}; otherwise, it is initialized to a new
 * {@link DFAState} with an empty outgoing {@link DFAState#edges} array to
 * store the start states for individual precedence values.</li>
 * <li>The {@link #precedenceDfa} field is updated</li>
 * </ul>
 *
 * @param precedenceDfa {@code true} if this is a precedence DFA; otherwise,
 * {@code false}
 */
public final synchronized void setPrecedenceDfa(boolean precedenceDfa) {
	if (this.precedenceDfa != precedenceDfa) {
		this.states.clear();
		if (precedenceDfa) {
			DFAState precedenceState = new DFAState(new ATNConfigSet());
			precedenceState.edges = new DFAState[0];
			precedenceState.isAcceptState = false;
			precedenceState.requiresFullContext = false;
			this.s0 = precedenceState;
		}
		else {
			this.s0 = null;
		}

		this.precedenceDfa = precedenceDfa;
	}
}
 
开发者ID:MegaApuTurkUltra,项目名称:Scratch-ApuC,代码行数:35,代码来源:DFA.java


示例2: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(@NotNull Parser recognizer,
							@NotNull DFA dfa,
							int startIndex,
							int stopIndex,
							boolean exact,
							@Nullable BitSet ambigAlts,
							@NotNull ATNConfigSet configs)
{
	if (exactOnly && !exact) {
		return;
	}

	String format = "reportAmbiguity d=%s: ambigAlts=%s, input='%s'";
	String decision = getDecisionDescription(recognizer, dfa);
	BitSet conflictingAlts = getConflictingAlts(ambigAlts, configs);
	String text = recognizer.getTokenStream().getText(Interval.of(startIndex, stopIndex));
	String message = String.format(format, decision, conflictingAlts, text);
	recognizer.notifyErrorListeners(message);
}
 
开发者ID:MegaApuTurkUltra,项目名称:Scratch-ApuC,代码行数:21,代码来源:DiagnosticErrorListener.java


示例3: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(@NotNull Parser recognizer,
							@NotNull DFA dfa,
							int startIndex,
							int stopIndex,
							boolean exact,
							@Nullable BitSet ambigAlts,
							@NotNull ATNConfigSet configs)
{
}
 
开发者ID:paypal,项目名称:digraph-parser,代码行数:11,代码来源:GraphParser.java


示例4: reportAttemptingFullContext

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAttemptingFullContext(@NotNull Parser recognizer,
										@NotNull DFA dfa,
										int startIndex,
										int stopIndex,
										@Nullable BitSet conflictingAlts,
										@NotNull ATNConfigSet configs)
{
}
 
开发者ID:paypal,项目名称:digraph-parser,代码行数:10,代码来源:GraphParser.java


示例5: reportContextSensitivity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportContextSensitivity(@NotNull Parser recognizer,
									 @NotNull DFA dfa,
									 int startIndex,
									 int stopIndex,
									 int prediction,
									 @NotNull ATNConfigSet configs)
{
}
 
开发者ID:paypal,项目名称:digraph-parser,代码行数:10,代码来源:GraphParser.java


示例6: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
    public void reportAmbiguity(
            Parser recognizer,
            DFA dfa,
            int startIndex,
            int stopIndex,
            boolean exact,
            BitSet ambigAlts,
            ATNConfigSet configs) {
        hasAmbiguity = true;
        ambiguityCount++;
//        allFields.put("__Ambiguity__",new AgentField("true"));
    }
 
开发者ID:nielsbasjes,项目名称:yauaa,代码行数:14,代码来源:UserAgent.java


示例7: reportAttemptingFullContext

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAttemptingFullContext(
        Parser recognizer,
        DFA dfa,
        int startIndex,
        int stopIndex,
        BitSet conflictingAlts,
        ATNConfigSet configs) {
}
 
开发者ID:nielsbasjes,项目名称:yauaa,代码行数:10,代码来源:UserAgent.java


示例8: reportContextSensitivity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportContextSensitivity(
        Parser recognizer,
        DFA dfa,
        int startIndex,
        int stopIndex,
        int prediction,
        ATNConfigSet configs) {

}
 
开发者ID:nielsbasjes,项目名称:yauaa,代码行数:11,代码来源:UserAgent.java


示例9: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(
        Parser recognizer,
        DFA dfa,
        int startIndex,
        int stopIndex,
        boolean exact,
        BitSet ambigAlts,
        ATNConfigSet configs) {
    // Ignore this type of problem
}
 
开发者ID:nielsbasjes,项目名称:yauaa,代码行数:12,代码来源:MatcherAction.java


示例10: reportAttemptingFullContext

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAttemptingFullContext(
        Parser recognizer,
        DFA dfa,
        int startIndex,
        int stopIndex,
        BitSet conflictingAlts,
        ATNConfigSet configs) {
    // Ignore this type of problem
}
 
开发者ID:nielsbasjes,项目名称:yauaa,代码行数:11,代码来源:MatcherAction.java


示例11: reportContextSensitivity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportContextSensitivity(
        Parser recognizer,
        DFA dfa,
        int startIndex,
        int stopIndex,
        int prediction,
        ATNConfigSet configs) {
    // Ignore this type of problem
}
 
开发者ID:nielsbasjes,项目名称:yauaa,代码行数:11,代码来源:MatcherAction.java


示例12: reportContextSensitivity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportContextSensitivity(
    final Parser recognizer,
    final DFA dfa,
    final int startIndex,
    final int stopIndex,
    final int prediction,
    final ATNConfigSet configs) {
  this.messages
      .add("Context sensitivity violation, at " + startIndex + " until " + stopIndex + ", " + recognizer.getTokenStream().getText(Interval.of(startIndex, stopIndex))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
 
开发者ID:AndreasWBartels,项目名称:libraries,代码行数:12,代码来源:JSSDReader.java


示例13: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(
    final Parser recognizer,
    final DFA dfa,
    final int startIndex,
    final int stopIndex,
    final boolean exact,
    final BitSet ambigAlts,
    final ATNConfigSet configs) {
  this.messages
      .add("ambiguity, at " + startIndex + " until " + stopIndex + ", " + recognizer.getTokenStream().getText(Interval.of(startIndex, stopIndex))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
 
开发者ID:AndreasWBartels,项目名称:libraries,代码行数:13,代码来源:JSSDReader.java


示例14: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(Parser recognizer,
                            DFA dfa,
                            int startIndex,
                            int stopIndex,
                            boolean exact,
                            BitSet ambigAlts,
                            ATNConfigSet configs)
{
    log.put(Type.AMBIGUITY, "Ambiguity " + startIndex + " " + stopIndex);
}
 
开发者ID:julianthome,项目名称:inmemantlr,代码行数:12,代码来源:InmemantlrErrorListener.java


示例15: reportAttemptingFullContext

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAttemptingFullContext(Parser recognizer,
                                        DFA dfa,
                                        int startIndex,
                                        int stopIndex,
                                        BitSet conflictingAlts,
                                        ATNConfigSet configs)
{
    log.put(Type.FULL_CTX, "Attempting full Context " + startIndex + " " +
            stopIndex);
}
 
开发者ID:julianthome,项目名称:inmemantlr,代码行数:12,代码来源:InmemantlrErrorListener.java


示例16: reportContextSensitivity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportContextSensitivity(Parser recognizer,
                                     DFA dfa,
                                     int startIndex,
                                     int stopIndex,
                                     int prediction,
                                     ATNConfigSet configs)
{
    log.put(Type.CTX_SSTV, "Context Sensitivity " + startIndex + " " +
            stopIndex);
}
 
开发者ID:julianthome,项目名称:inmemantlr,代码行数:12,代码来源:InmemantlrErrorListener.java


示例17: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) {
  LOG.warn("reportAmbiguity:");
  LOG.warn("recognizer={}", recognizer);
  LOG.warn("dfa={}", dfa);
  LOG.warn("startIndex={}", startIndex);
  LOG.warn("stopIndex={}", stopIndex);
  LOG.warn("exact={}", exact);
  LOG.warn("ambigAlts={}", ambigAlts);
  LOG.warn("configs={}", configs);
  parseErrors.add("ambiguity at (" + startIndex + ".." + stopIndex + ")");
}
 
开发者ID:HuygensING,项目名称:antioch,代码行数:13,代码来源:QueryErrorListener.java


示例18: reportContextSensitivity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) {
  LOG.warn("reportContextSensitivity:");
  LOG.warn("recognizer={}", recognizer);
  LOG.warn("dfa={}", dfa);
  LOG.warn("startIndex={}", startIndex);
  LOG.warn("stopIndex={}", stopIndex);
  LOG.warn("prediction={}", prediction);
  LOG.warn("configs={}", configs);
  parseErrors.add("contextSensitivity at (" + startIndex + ".." + stopIndex + ")");
}
 
开发者ID:HuygensING,项目名称:antioch,代码行数:12,代码来源:QueryErrorListener.java


示例19: reportAttemptingFullContext

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) {
  LOG.warn("reportAttemptingFullContext:");
  LOG.warn("recognizer={}", recognizer);
  LOG.warn("dfa={}", dfa);
  LOG.warn("startIndex={}", startIndex);
  LOG.warn("stopIndex={}", stopIndex);
  LOG.warn("conflictingAlts={}", conflictingAlts);
  LOG.warn("configs={}", configs);
  parseErrors.add("attemptingFullContext at (" + startIndex + ".." + stopIndex + ")");
}
 
开发者ID:HuygensING,项目名称:antioch,代码行数:12,代码来源:QueryErrorListener.java


示例20: reportAmbiguity

import org.antlr.v4.runtime.atn.ATNConfigSet; //导入依赖的package包/类
@Override
public void reportAmbiguity(Parser parser,
                            DFA dfa,
                            int i,
                            int i1,
                            boolean b,
                            BitSet bitSet,
                            ATNConfigSet atnConfigSet) {

}
 
开发者ID:alexsaveliev,项目名称:srclib-basic,代码行数:11,代码来源:DefaultErrorListener.java



注:本文中的org.antlr.v4.runtime.atn.ATNConfigSet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WebAttributes类代码示例发布时间:2022-05-21
下一篇:
Java Frame类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap