当前位置: 首页>>代码示例>>Java>>正文


Java ATNConfigSet类代码示例

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


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


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