org.antlr.runtime.DFA Java Examples

The following examples show how to use org.antlr.runtime.DFA. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractInternalHighlightingAntlrParser.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Extracted to reduce generated Antlr parser size.
 */
protected static short[][] unpackEncodedStringArray(String[] arr) {
	int numStates = arr.length;
	short[][] result = new short[numStates][];
	for (int i = 0; i < numStates; i++) {
		result[i] = DFA.unpackEncodedString(arr[i]);
	}
	return result;
}
 
Example #2
Source File: AbstractInternalAntlrParser.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.9
 */
protected static short[][] unpackEncodedStringArray(String[] arr) {
	int numStates = arr.length;
	short[][] result = new short[numStates][];
	for (int i = 0; i < numStates; i++) {
		result[i] = DFA.unpackEncodedString(arr[i]);
	}
	return result;
}
 
Example #3
Source File: BaseInternalContentAssistParser.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected static short[][] unpackEncodedStringArray(String[] arr) {
	int numStates = arr.length;
	short[][] result = new short[numStates][];
	for (int i = 0; i < numStates; i++) {
		result[i] = DFA.unpackEncodedString(arr[i]);
	}
	return result;
}