本文整理汇总了Java中org.antlr.tool.ErrorManager.internalError方法的典型用法代码示例。如果您正苦于以下问题:Java ErrorManager.internalError方法的具体用法?Java ErrorManager.internalError怎么用?Java ErrorManager.internalError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.antlr.tool.ErrorManager
的用法示例。
在下文中一共展示了ErrorManager.internalError方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTransition
import org.antlr.tool.ErrorManager; //导入方法依赖的package包/类
public void addTransition(Transition e) {
if ( e==null ) {
throw new IllegalArgumentException("You can't add a null transition");
}
if ( numTransitions>transition.length ) {
throw new IllegalArgumentException("You can only have "+transition.length+" transitions");
}
if ( e!=null ) {
transition[numTransitions] = e;
numTransitions++;
// Set the "back pointer" of the target state so that it
// knows about the label of the incoming edge.
Label label = e.label;
if ( label.isAtom() || label.isSet() ) {
if ( ((NFAState)e.target).incidentEdgeLabel!=null ) {
ErrorManager.internalError("Clobbered incident edge");
}
((NFAState)e.target).incidentEdgeLabel = e.label;
}
}
}
示例2: size
import org.antlr.tool.ErrorManager; //导入方法依赖的package包/类
public int size() {
if ( elements.size()!=super.size() ) {
ErrorManager.internalError("OrderedHashSet: elements and set size differs; "+
elements.size()+"!="+super.size());
}
return elements.size();
}
示例3: run
import org.antlr.tool.ErrorManager; //导入方法依赖的package包/类
public void run() {
for (int decision=i; decision<=j; decision++) {
NFAState decisionStartState = grammar.getDecisionNFAStartState(decision);
if ( decisionStartState.getNumberOfTransitions()>1 ) {
grammar.createLookaheadDFA(decision);
}
}
// now wait for others to finish
try {
barrier.waitForRelease();
}
catch(InterruptedException e) {
ErrorManager.internalError("what the hell? DFA interruptus", e);
}
}
示例4: run
import org.antlr.tool.ErrorManager; //导入方法依赖的package包/类
public void run() {
for (int decision=i; decision<=j; decision++) {
NFAState decisionStartState = grammar.getDecisionNFAStartState(decision);
if ( decisionStartState.getNumberOfTransitions()>1 ) {
grammar.createLookaheadDFA(decision,true);
}
}
// now wait for others to finish
try {
barrier.waitForRelease();
}
catch(InterruptedException e) {
ErrorManager.internalError("what the hell? DFA interruptus", e);
}
}