mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use ArrayList instead of LinkedList
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
/* The following code was generated by JFlex 1.4.3 on 10/24/14 12:41 PM */
|
||||
/* The following code was generated by JFlex 1.4.3 on 10/24/14 2:25 PM */
|
||||
|
||||
/* It's an automatically generated code. Do not modify it. */
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import com.intellij.lexer.FlexLexer;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import java.util.LinkedList;
|
||||
import java.util.EnumSet;
|
||||
import com.intellij.psi.StringEscapesTokenTypes;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
|
||||
* on 10/24/14 12:41 PM from the specification file
|
||||
* on 10/24/14 2:25 PM from the specification file
|
||||
* <tt>/Users/bas/Projects/IntelliJ IDEA Ultimate/tools/lexer/../../community/RegExpSupport/src/org/intellij/lang/regexp/regexp-lexer.flex</tt>
|
||||
*/
|
||||
class _RegExLexer implements FlexLexer {
|
||||
@@ -404,7 +405,7 @@ class _RegExLexer implements FlexLexer {
|
||||
|
||||
/* user code: */
|
||||
// This adds support for nested states. I'm no JFlex pro, so maybe this is overkill, but it works quite well.
|
||||
private final LinkedList<Integer> states = new LinkedList();
|
||||
private final ArrayList<Integer> states = new ArrayList();
|
||||
|
||||
// This was an idea to use the regex implementation for XML schema regexes (which use a slightly different syntax)
|
||||
// as well, but is currently unfinished as it requires to tweak more places than just the lexer.
|
||||
@@ -433,11 +434,11 @@ class _RegExLexer implements FlexLexer {
|
||||
}
|
||||
|
||||
private void yypushstate(int state) {
|
||||
states.addFirst(yystate());
|
||||
states.add(yystate());
|
||||
yybegin(state);
|
||||
}
|
||||
private void yypopstate() {
|
||||
final int state = states.removeFirst();
|
||||
final int state = states.remove(states.size() - 1);
|
||||
yybegin(state);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import com.intellij.lexer.FlexLexer;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import java.util.LinkedList;
|
||||
import java.util.EnumSet;
|
||||
import com.intellij.psi.StringEscapesTokenTypes;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
%%
|
||||
@@ -20,7 +21,7 @@ import com.intellij.psi.StringEscapesTokenTypes;
|
||||
|
||||
%{
|
||||
// This adds support for nested states. I'm no JFlex pro, so maybe this is overkill, but it works quite well.
|
||||
private final LinkedList<Integer> states = new LinkedList();
|
||||
private final ArrayList<Integer> states = new ArrayList();
|
||||
|
||||
// This was an idea to use the regex implementation for XML schema regexes (which use a slightly different syntax)
|
||||
// as well, but is currently unfinished as it requires to tweak more places than just the lexer.
|
||||
@@ -49,11 +50,12 @@ import com.intellij.psi.StringEscapesTokenTypes;
|
||||
}
|
||||
|
||||
private void yypushstate(int state) {
|
||||
states.addFirst(yystate());
|
||||
states.add(yystate());
|
||||
yybegin(state);
|
||||
}
|
||||
|
||||
private void yypopstate() {
|
||||
final int state = states.removeFirst();
|
||||
final int state = states.remove(states.size() - 1);
|
||||
yybegin(state);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user