當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。