move templates* lexers to gen root

This commit is contained in:
Sergey Ignatov
2014-04-26 13:32:46 +04:00
parent cbd64fa6f7
commit fc01dd0b3c
6 changed files with 152 additions and 176 deletions
@@ -1,20 +1,4 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* The following code was generated by JFlex 1.4.1 on 12.02.08 15:44 */
/* The following code was generated by JFlex 1.4.3 on 4/26/14 1:30 PM */
/* It's an automatically generated code. Do not modify it. */
package com.intellij.codeInsight.template.impl;
@@ -25,10 +9,10 @@ import com.intellij.lexer.FlexLexer;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.1
* on 12.02.08 15:44 from the specification file
* <tt>C:/JetBrains/IDEA/tools/lexer/_MacroLexer.flex</tt>
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 4/26/14 1:30 PM from the specification file
* <tt>/Users/ignatov/src/ultimate/tools/lexer/../../community/platform/lang-impl/src/com/intellij/codeInsight/template/impl/_MacroLexer.flex</tt>
*/
class _MacroLexer implements FlexLexer {
/** initial size of the lookahead buffer */
@@ -38,9 +22,19 @@ class _MacroLexer implements FlexLexer {
public static final int YYINITIAL = 0;
/**
* ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
* ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
0, 0
};
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
private static final String ZZ_CMAP_PACKED =
"\11\2\1\3\1\6\1\0\1\3\1\6\16\2\4\0\1\3\1\0"+
"\1\4\1\0\1\1\3\0\1\7\1\10\2\0\1\11\3\0\12\2"+
"\3\0\1\12\3\0\32\1\1\0\1\5\2\0\1\1\1\0\32\1"+
@@ -127,12 +121,12 @@ class _MacroLexer implements FlexLexer {
"\2\0\6\1\2\0\3\1\3\0\2\1\3\0\2\1\22\0\3\2"+
"\4\0";
/**
/**
* Translates characters to character classes
*/
private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
/**
/**
* Translates DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
@@ -161,7 +155,7 @@ class _MacroLexer implements FlexLexer {
}
/**
/**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
@@ -188,7 +182,7 @@ class _MacroLexer implements FlexLexer {
return j;
}
/**
/**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
@@ -309,7 +303,7 @@ class _MacroLexer implements FlexLexer {
_MacroLexer(java.io.Reader in) {
zzReader = in;
this.zzReader = in;
}
/**
@@ -322,7 +316,7 @@ class _MacroLexer implements FlexLexer {
this(new java.io.InputStreamReader(in));
}
/**
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
@@ -340,17 +334,14 @@ class _MacroLexer implements FlexLexer {
return map;
}
@Override
public final int getTokenStart(){
return zzStartRead;
}
@Override
public final int getTokenEnd(){
return getTokenStart() + yylength();
}
@Override
public void reset(CharSequence buffer, int start, int end,int initialState){
zzBuffer = buffer;
zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
@@ -377,7 +368,6 @@ class _MacroLexer implements FlexLexer {
/**
* Returns the current lexical state.
*/
@Override
public final int yystate() {
return zzLexicalState;
}
@@ -388,7 +378,6 @@ class _MacroLexer implements FlexLexer {
*
* @param newState the new lexical state
*/
@Override
public final void yybegin(int newState) {
zzLexicalState = newState;
}
@@ -476,7 +465,7 @@ class _MacroLexer implements FlexLexer {
private void zzDoEOF() {
if (!zzEOFDone) {
zzEOFDone = true;
}
}
@@ -488,7 +477,6 @@ class _MacroLexer implements FlexLexer {
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/
@Override
public IElementType advance() throws java.io.IOException {
int zzInput;
int zzAction;
@@ -512,14 +500,14 @@ class _MacroLexer implements FlexLexer {
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
zzState = zzLexicalState;
zzState = ZZ_LEXSTATE[zzLexicalState];
zzForAction: {
while (true) {
if (zzCurrentPosL < zzEndReadL)
zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++]:zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
@@ -539,7 +527,7 @@ class _MacroLexer implements FlexLexer {
break zzForAction;
}
else {
zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++]:zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
@@ -560,35 +548,35 @@ class _MacroLexer implements FlexLexer {
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 6:
case 6:
{ return MacroTokenType.RPAREN;
}
case 9: break;
case 4:
case 4:
{ return MacroTokenType.STRING_LITERAL;
}
case 10: break;
case 2:
case 2:
{ return MacroTokenType.IDENTIFIER;
}
case 11: break;
case 1:
case 1:
{ return TokenType.BAD_CHARACTER;
}
case 12: break;
case 5:
case 5:
{ return MacroTokenType.LPAREN;
}
case 13: break;
case 8:
case 8:
{ return MacroTokenType.EQ;
}
case 14: break;
case 7:
case 7:
{ return MacroTokenType.COMMA;
}
case 15: break;
case 3:
case 3:
{ return MacroTokenType.WHITE_SPACE;
}
case 16: break;
@@ -1,20 +1,4 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* The following code was generated by JFlex 1.4 on 3/26/05 7:57 PM */
/* The following code was generated by JFlex 1.4.3 on 4/26/14 1:30 PM */
/* It's an automatically generated code. Do not modify it. */
package com.intellij.codeInsight.template.impl;
@@ -24,10 +8,10 @@ import com.intellij.psi.tree.IElementType;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4
* on 3/26/05 7:57 PM from the specification file
* <tt>C:/Irida/tools/lexer/TemplateTextLexer.flex</tt>
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 4/26/14 1:30 PM from the specification file
* <tt>/Users/ignatov/src/ultimate/tools/lexer/../../community/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateTextLexer.flex</tt>
*/
class _TemplateTextLexer implements FlexLexer {
/** initial size of the lookahead buffer */
@@ -37,18 +21,28 @@ class _TemplateTextLexer implements FlexLexer {
public static final int YYINITIAL = 0;
/**
* ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
* ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
0, 0
};
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
private static final String ZZ_CMAP_PACKED =
"\44\0\1\2\13\0\12\1\7\0\32\1\4\0\1\1\1\0\32\1"+
"\uff85\0";
/**
/**
* Translates characters to character classes
*/
private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
/**
/**
* Translates DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
@@ -76,7 +70,7 @@ class _TemplateTextLexer implements FlexLexer {
}
/**
/**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
@@ -102,7 +96,7 @@ class _TemplateTextLexer implements FlexLexer {
return j;
}
/**
/**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
@@ -183,6 +177,9 @@ class _TemplateTextLexer implements FlexLexer {
the source of the yytext() string */
private CharSequence zzBuffer = "";
/** this buffer may contains the current text array to be matched when it is cheap to acquire it */
private char[] zzBufferArray;
/** the textposition at the last accepting state */
private int zzMarkedPos;
@@ -202,7 +199,7 @@ class _TemplateTextLexer implements FlexLexer {
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
private final boolean zzAtBOL = true;
private boolean zzAtBOL = true;
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
@@ -217,7 +214,7 @@ class _TemplateTextLexer implements FlexLexer {
_TemplateTextLexer(java.io.Reader in) {
zzReader = in;
this.zzReader = in;
}
/**
@@ -230,7 +227,7 @@ class _TemplateTextLexer implements FlexLexer {
this(new java.io.InputStreamReader(in));
}
/**
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
@@ -248,22 +245,21 @@ class _TemplateTextLexer implements FlexLexer {
return map;
}
@Override
public final int getTokenStart(){
return zzStartRead - zzPushbackPos;
return zzStartRead;
}
@Override
public final int getTokenEnd(){
return getTokenStart() + yylength();
}
@Override
public void reset(CharSequence buffer, int start, int end, int initialState){
public void reset(CharSequence buffer, int start, int end,int initialState){
zzBuffer = buffer;
zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
zzCurrentPos = zzMarkedPos = zzStartRead = start;
zzPushbackPos = 0;
zzAtEOF = false;
zzAtBOL = true;
zzEndRead = end;
yybegin(initialState);
}
@@ -283,7 +279,6 @@ class _TemplateTextLexer implements FlexLexer {
/**
* Returns the current lexical state.
*/
@Override
public final int yystate() {
return zzLexicalState;
}
@@ -294,7 +289,6 @@ class _TemplateTextLexer implements FlexLexer {
*
* @param newState the new lexical state
*/
@Override
public final void yybegin(int newState) {
zzLexicalState = newState;
}
@@ -320,7 +314,7 @@ class _TemplateTextLexer implements FlexLexer {
* @return the character at position pos
*/
public final char yycharat(int pos) {
return zzBuffer.charAt(zzStartRead+pos);
return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
}
@@ -382,7 +376,7 @@ class _TemplateTextLexer implements FlexLexer {
private void zzDoEOF() {
if (!zzEOFDone) {
zzEOFDone = true;
}
}
@@ -394,7 +388,6 @@ class _TemplateTextLexer implements FlexLexer {
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/
@Override
public IElementType advance() throws java.io.IOException {
int zzInput;
int zzAction;
@@ -404,6 +397,7 @@ class _TemplateTextLexer implements FlexLexer {
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
CharSequence zzBufferL = zzBuffer;
char[] zzBufferArrayL = zzBufferArray;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ_TRANS;
@@ -417,14 +411,14 @@ class _TemplateTextLexer implements FlexLexer {
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
zzState = zzLexicalState;
zzState = ZZ_LEXSTATE[zzLexicalState];
zzForAction: {
while (true) {
if (zzCurrentPosL < zzEndReadL)
zzInput = zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
@@ -444,7 +438,7 @@ class _TemplateTextLexer implements FlexLexer {
break zzForAction;
}
else {
zzInput = zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
@@ -465,15 +459,15 @@ class _TemplateTextLexer implements FlexLexer {
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 2:
case 2:
{ return TemplateTokenType.ESCAPE_DOLLAR;
}
case 4: break;
case 1:
case 1:
{ return TemplateTokenType.TEXT;
}
case 5: break;
case 3:
case 3:
{ return TemplateTokenType.VARIABLE;
}
case 6: break;
@@ -1,20 +1,4 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* The following code was generated by JFlex 1.4 on 3/26/05 7:57 PM */
/* The following code was generated by JFlex 1.4.3 on 4/26/14 1:28 PM */
/* It's an automatically generated code. Do not modify it. */
package com.intellij.ide.fileTemplates.impl;
@@ -24,10 +8,10 @@ import com.intellij.psi.tree.IElementType;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4
* on 3/26/05 7:57 PM from the specification file
* <tt>C:/Irida/tools/lexer/FileTemplateTextLexer.flex</tt>
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 4/26/14 1:28 PM from the specification file
* <tt>/Users/ignatov/src/ultimate/tools/lexer/../../community/platform/lang-impl/src/com/intellij/ide/fileTemplates/impl/FileTemplateTextLexer.flex</tt>
*/
class FileTemplateTextLexer implements FlexLexer {
/** initial size of the lookahead buffer */
@@ -37,18 +21,28 @@ class FileTemplateTextLexer implements FlexLexer {
public static final int YYINITIAL = 0;
/**
* ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
* ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
0, 0
};
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
private static final String ZZ_CMAP_PACKED =
"\43\0\1\6\1\3\13\0\12\2\7\0\32\1\4\0\1\1\1\0"+
"\32\1\1\4\1\0\1\5\uff82\0";
/**
/**
* Translates characters to character classes
*/
private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
/**
/**
* Translates DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
@@ -76,7 +70,7 @@ class FileTemplateTextLexer implements FlexLexer {
}
/**
/**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
@@ -103,7 +97,7 @@ class FileTemplateTextLexer implements FlexLexer {
return j;
}
/**
/**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
@@ -186,6 +180,9 @@ class FileTemplateTextLexer implements FlexLexer {
the source of the yytext() string */
private CharSequence zzBuffer = "";
/** this buffer may contains the current text array to be matched when it is cheap to acquire it */
private char[] zzBufferArray;
/** the textposition at the last accepting state */
private int zzMarkedPos;
@@ -205,7 +202,7 @@ class FileTemplateTextLexer implements FlexLexer {
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
private final boolean zzAtBOL = true;
private boolean zzAtBOL = true;
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
@@ -220,7 +217,7 @@ class FileTemplateTextLexer implements FlexLexer {
FileTemplateTextLexer(java.io.Reader in) {
zzReader = in;
this.zzReader = in;
}
/**
@@ -233,7 +230,7 @@ class FileTemplateTextLexer implements FlexLexer {
this(new java.io.InputStreamReader(in));
}
/**
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
@@ -251,22 +248,21 @@ class FileTemplateTextLexer implements FlexLexer {
return map;
}
@Override
public final int getTokenStart(){
return zzStartRead - zzPushbackPos;
return zzStartRead;
}
@Override
public final int getTokenEnd(){
return getTokenStart() + yylength();
}
@Override
public void reset(CharSequence buffer, int start, int end, int initialState){
public void reset(CharSequence buffer, int start, int end,int initialState){
zzBuffer = buffer;
zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
zzCurrentPos = zzMarkedPos = zzStartRead = start;
zzPushbackPos = 0;
zzAtEOF = false;
zzAtBOL = true;
zzEndRead = end;
yybegin(initialState);
}
@@ -286,7 +282,6 @@ class FileTemplateTextLexer implements FlexLexer {
/**
* Returns the current lexical state.
*/
@Override
public final int yystate() {
return zzLexicalState;
}
@@ -297,7 +292,6 @@ class FileTemplateTextLexer implements FlexLexer {
*
* @param newState the new lexical state
*/
@Override
public final void yybegin(int newState) {
zzLexicalState = newState;
}
@@ -323,7 +317,7 @@ class FileTemplateTextLexer implements FlexLexer {
* @return the character at position pos
*/
public final char yycharat(int pos) {
return zzBuffer.charAt(zzStartRead+pos);
return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
}
@@ -385,7 +379,7 @@ class FileTemplateTextLexer implements FlexLexer {
private void zzDoEOF() {
if (!zzEOFDone) {
zzEOFDone = true;
}
}
@@ -397,7 +391,6 @@ class FileTemplateTextLexer implements FlexLexer {
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/
@Override
public IElementType advance() throws java.io.IOException {
int zzInput;
int zzAction;
@@ -407,6 +400,7 @@ class FileTemplateTextLexer implements FlexLexer {
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
CharSequence zzBufferL = zzBuffer;
char[] zzBufferArrayL = zzBufferArray;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ_TRANS;
@@ -420,14 +414,14 @@ class FileTemplateTextLexer implements FlexLexer {
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
zzState = zzLexicalState;
zzState = ZZ_LEXSTATE[zzLexicalState];
zzForAction: {
while (true) {
if (zzCurrentPosL < zzEndReadL)
zzInput = zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
@@ -447,7 +441,7 @@ class FileTemplateTextLexer implements FlexLexer {
break zzForAction;
}
else {
zzInput = zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
@@ -468,15 +462,15 @@ class FileTemplateTextLexer implements FlexLexer {
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 2:
case 2:
{ return FileTemplateTokenType.MACRO;
}
case 4: break;
case 1:
case 1:
{ return FileTemplateTokenType.TEXT;
}
case 5: break;
case 3:
case 3:
{ return FileTemplateTokenType.DIRECTIVE;
}
case 6: break;
@@ -1,4 +1,4 @@
/* The following code was generated by JFlex 1.4.3 on 11/22/12 5:53 PM */
/* The following code was generated by JFlex 1.4.3 on 4/26/14 1:26 PM */
/* It's an automatically generated code. Do not modify it. */
package com.intellij.psi.search.scope.packageSet.lexer;
@@ -7,10 +7,10 @@ import com.intellij.lexer.FlexLexer;
/**
* This class is a scanner generated by
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 11/22/12 5:53 PM from the specification file
* <tt>C:/work/IDEA/tools/lexer/../../community/platform/lang-impl/src/com/intellij/psi/search/scope/packageSet/lexer/_ScopesLexer.flex</tt>
* on 4/26/14 1:26 PM from the specification file
* <tt>/Users/ignatov/src/ultimate/tools/lexer/../../community/platform/lang-impl/src/com/intellij/psi/search/scope/packageSet/lexer/_ScopesLexer.flex</tt>
*/
class _ScopesLexer implements FlexLexer {
/** initial size of the lookahead buffer */
@@ -25,14 +25,14 @@ class _ScopesLexer implements FlexLexer {
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
private static final int ZZ_LEXSTATE[] = {
0, 0
};
/**
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
private static final String ZZ_CMAP_PACKED =
"\11\2\1\3\1\3\1\0\2\3\16\2\4\0\1\3\1\7\1\0"+
"\1\22\1\1\1\0\1\6\1\0\1\14\1\15\1\20\2\0\1\10"+
"\1\16\1\21\12\4\1\17\6\0\32\1\1\12\1\0\1\13\1\0"+
@@ -119,12 +119,12 @@ class _ScopesLexer implements FlexLexer {
"\12\0\132\1\3\0\6\1\2\0\6\1\2\0\6\1\2\0\3\1"+
"\3\0\2\1\3\0\2\1\22\0\3\2\4\0";
/**
/**
* Translates characters to character classes
*/
private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
/**
/**
* Translates DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
@@ -154,7 +154,7 @@ class _ScopesLexer implements FlexLexer {
}
/**
/**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
@@ -182,7 +182,7 @@ class _ScopesLexer implements FlexLexer {
return j;
}
/**
/**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
@@ -307,8 +307,9 @@ class _ScopesLexer implements FlexLexer {
this((java.io.Reader)null);
}
_ScopesLexer(java.io.Reader in) {
zzReader = in;
this.zzReader = in;
}
/**
@@ -321,7 +322,7 @@ class _ScopesLexer implements FlexLexer {
this(new java.io.InputStreamReader(in));
}
/**
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
@@ -339,17 +340,14 @@ class _ScopesLexer implements FlexLexer {
return map;
}
@Override
public final int getTokenStart(){
return zzStartRead;
}
@Override
public final int getTokenEnd(){
return getTokenStart() + yylength();
}
@Override
public void reset(CharSequence buffer, int start, int end,int initialState){
zzBuffer = buffer;
zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
@@ -376,7 +374,6 @@ class _ScopesLexer implements FlexLexer {
/**
* Returns the current lexical state.
*/
@Override
public final int yystate() {
return zzLexicalState;
}
@@ -387,7 +384,6 @@ class _ScopesLexer implements FlexLexer {
*
* @param newState the new lexical state
*/
@Override
public final void yybegin(int newState) {
zzLexicalState = newState;
}
@@ -475,7 +471,7 @@ class _ScopesLexer implements FlexLexer {
private void zzDoEOF() {
if (!zzEOFDone) {
zzEOFDone = true;
}
}
@@ -487,7 +483,6 @@ class _ScopesLexer implements FlexLexer {
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/
@Override
public IElementType advance() throws java.io.IOException {
int zzInput;
int zzAction;
@@ -518,7 +513,7 @@ class _ScopesLexer implements FlexLexer {
while (true) {
if (zzCurrentPosL < zzEndReadL)
zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++]:zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
@@ -538,7 +533,7 @@ class _ScopesLexer implements FlexLexer {
break zzForAction;
}
else {
zzInput = zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++]:zzBufferL.charAt(zzCurrentPosL++);
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
@@ -559,75 +554,75 @@ class _ScopesLexer implements FlexLexer {
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 16:
case 16:
{ return ScopeTokenTypes.SHARP;
}
case 19: break;
case 6:
case 6:
{ return ScopeTokenTypes.MINUS;
}
case 20: break;
case 18:
case 18:
{ return ScopeTokenTypes.ANDAND;
}
case 21: break;
case 9:
case 9:
{ return ScopeTokenTypes.RBRACKET;
}
case 22: break;
case 3:
case 3:
{ return ScopeTokenTypes.WHITE_SPACE;
}
case 23: break;
case 13:
case 13:
{ return ScopeTokenTypes.COLON;
}
case 24: break;
case 11:
case 11:
{ return ScopeTokenTypes.RPARENTH;
}
case 25: break;
case 1:
case 1:
{ return ScopeTokenTypes.BAD_CHARACTER;
}
case 26: break;
case 12:
case 12:
{ return ScopeTokenTypes.DOT;
}
case 27: break;
case 2:
case 2:
{ return ScopeTokenTypes.IDENTIFIER;
}
case 28: break;
case 8:
case 8:
{ return ScopeTokenTypes.LBRACKET;
}
case 29: break;
case 17:
case 17:
{ return ScopeTokenTypes.OROR;
}
case 30: break;
case 4:
case 4:
{ return ScopeTokenTypes.INTEGER_LITERAL;
}
case 31: break;
case 5:
case 5:
{ return ScopeTokenTypes.EXCL;
}
case 32: break;
case 15:
case 15:
{ return ScopeTokenTypes.DIV;
}
case 33: break;
case 10:
case 10:
{ return ScopeTokenTypes.LPARENTH;
}
case 34: break;
case 14:
case 14:
{ return ScopeTokenTypes.ASTERISK;
}
case 35: break;
case 7:
case 7:
{ return ScopeTokenTypes.TILDE;
}
case 36: break;
+1
View File
@@ -5,6 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/testSources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="module" module-name="boot" />
<orderEntry type="inheritedJdk" />
@@ -11,6 +11,10 @@ import com.intellij.lexer.FlexLexer;
zzPushbackPos = 0;
zzAtEOF = offset < zzEndRead;
}
public _ScopesLexer() {
this((java.io.Reader)null);
}
%}
%unicode