blob: ac4addd7ba8b5edd9f7b8b92259d47016c4b793b [file] [log] [blame]
/* The following code was generated by JFlex 1.4.3 on 6/15/15 11:52 AM */
package com.android.tools.idea.lang.aidl.lexer;
import com.intellij.lexer.*;
import com.intellij.psi.tree.IElementType;
import static com.android.tools.idea.lang.aidl.lexer.AidlTokenTypes.*;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 6/15/15 11:52 AM from the specification file
* <tt>/usr/local/google/home/fuyaoz/src/studio-1.4-dev/tools/adt/idea/android/src/com/android/tools/idea/lang/aidl/lexer/_AidlLexer.flex</tt>
*/
public class _AidlLexer implements FlexLexer {
/** initial size of the lookahead buffer */
private static final int ZZ_BUFFERSIZE = 16384;
/** lexical states */
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 =
"\11\0\1\2\1\1\1\0\1\2\1\1\22\0\1\2\7\0\1\36"+
"\1\37\1\4\1\0\1\42\2\0\1\3\1\5\11\6\1\0\1\44"+
"\1\45\1\43\1\46\2\0\1\55\3\7\1\53\10\7\1\52\1\51"+
"\7\7\1\54\1\7\1\56\1\7\1\40\1\0\1\41\1\0\1\7"+
"\1\0\1\16\1\24\1\17\1\33\1\22\1\26\1\21\1\47\1\10"+
"\1\7\1\20\1\23\1\11\1\25\1\13\1\12\1\7\1\14\1\50"+
"\1\15\1\27\1\32\1\30\1\7\1\31\1\7\1\34\1\0\1\35"+
"\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();
private static final String ZZ_ACTION_PACKED_0 =
"\1\0\1\1\1\2\1\1\2\3\13\4\1\5\1\6"+
"\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+
"\1\17\2\4\1\20\1\0\1\4\1\21\15\4\1\0"+
"\2\4\1\22\3\4\1\23\1\24\12\4\1\25\6\4"+
"\1\26\1\27\1\4\1\30\2\4\1\31\4\4\1\32"+
"\5\4\1\33\2\4\1\34\1\4\1\35\3\4\1\36"+
"\2\4\1\37\1\40\2\4\1\41\1\42\4\4\1\43"+
"\2\4\1\44\1\4\1\45";
private static int [] zzUnpackAction() {
int [] result = new int[118];
int offset = 0;
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
return result;
}
private static int zzUnpackAction(String packed, int offset, int [] result) {
int i = 0; /* index in packed string */
int j = offset; /* index in unpacked array */
int l = packed.length();
while (i < l) {
int count = packed.charAt(i++);
int value = packed.charAt(i++);
do result[j++] = value; while (--count > 0);
}
return j;
}
/**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
private static final String ZZ_ROWMAP_PACKED_0 =
"\0\0\0\57\0\136\0\215\0\57\0\274\0\353\0\u011a"+
"\0\u0149\0\u0178\0\u01a7\0\u01d6\0\u0205\0\u0234\0\u0263\0\u0292"+
"\0\u02c1\0\57\0\57\0\57\0\57\0\57\0\57\0\57"+
"\0\57\0\57\0\57\0\57\0\u02f0\0\u031f\0\u034e\0\u037d"+
"\0\u03ac\0\u03db\0\u040a\0\u0439\0\u0468\0\u0497\0\u04c6\0\u04f5"+
"\0\u0524\0\u0553\0\u0582\0\u05b1\0\u05e0\0\u060f\0\u063e\0\u066d"+
"\0\u069c\0\u06cb\0\u06fa\0\u0729\0\u0758\0\u0787\0\353\0\353"+
"\0\u07b6\0\u07e5\0\u0814\0\u0843\0\u0872\0\u08a1\0\u08d0\0\u08ff"+
"\0\u092e\0\u095d\0\57\0\u098c\0\u09bb\0\u09ea\0\u0a19\0\u0a48"+
"\0\u0a77\0\353\0\353\0\u0aa6\0\353\0\u0ad5\0\u0b04\0\353"+
"\0\u0b33\0\u0b62\0\u0b91\0\u0bc0\0\353\0\u0bef\0\u0c1e\0\u0c4d"+
"\0\u0c7c\0\u0cab\0\353\0\u0cda\0\u0d09\0\353\0\u0d38\0\353"+
"\0\u0d67\0\u0d96\0\u0dc5\0\353\0\u0df4\0\u0e23\0\353\0\353"+
"\0\u0e52\0\u0e81\0\353\0\353\0\u0eb0\0\u0edf\0\u0f0e\0\u0f3d"+
"\0\353\0\u0f6c\0\u0f9b\0\353\0\u0fca\0\353";
private static int [] zzUnpackRowMap() {
int [] result = new int[118];
int offset = 0;
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
return result;
}
private static int zzUnpackRowMap(String packed, int offset, int [] result) {
int i = 0; /* index in packed string */
int j = offset; /* index in unpacked array */
int l = packed.length();
while (i < l) {
int high = packed.charAt(i++) << 16;
result[j++] = high | packed.charAt(i++);
}
return j;
}
/**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
private static final String ZZ_TRANS_PACKED_0 =
"\1\2\2\3\1\4\1\2\1\5\1\6\1\7\1\10"+
"\1\7\1\11\1\12\1\13\2\7\1\14\3\7\1\15"+
"\1\16\1\7\1\17\3\7\1\20\1\21\1\22\1\23"+
"\1\24\1\25\1\26\1\27\1\30\1\31\1\32\1\33"+
"\1\34\1\7\1\35\1\36\5\7\60\0\2\3\57\0"+
"\1\37\1\40\57\0\2\6\55\0\27\7\13\0\10\7"+
"\5\0\4\7\1\41\13\7\1\42\6\7\13\0\10\7"+
"\5\0\11\7\1\43\15\7\13\0\10\7\5\0\20\7"+
"\1\44\1\7\1\45\4\7\13\0\10\7\5\0\5\7"+
"\1\46\21\7\13\0\10\7\5\0\27\7\13\0\1\47"+
"\7\7\5\0\6\7\1\50\20\7\13\0\10\7\5\0"+
"\6\7\1\51\15\7\1\52\2\7\13\0\10\7\5\0"+
"\16\7\1\53\10\7\13\0\10\7\5\0\6\7\1\54"+
"\20\7\13\0\10\7\5\0\6\7\1\55\20\7\13\0"+
"\10\7\5\0\27\7\13\0\1\56\7\7\5\0\27\7"+
"\13\0\3\7\1\57\4\7\1\37\1\0\55\37\4\40"+
"\1\60\52\40\5\0\5\7\1\61\21\7\13\0\10\7"+
"\5\0\6\7\1\62\1\7\1\63\16\7\13\0\10\7"+
"\5\0\7\7\1\64\2\7\1\65\14\7\13\0\10\7"+
"\5\0\15\7\1\66\11\7\13\0\10\7\5\0\10\7"+
"\1\67\16\7\13\0\10\7\5\0\12\7\1\70\14\7"+
"\13\0\10\7\5\0\11\7\1\71\15\7\13\0\10\7"+
"\5\0\20\7\1\72\6\7\13\0\10\7\5\0\6\7"+
"\1\73\20\7\13\0\10\7\5\0\10\7\1\74\16\7"+
"\13\0\10\7\5\0\6\7\1\75\2\7\1\76\15\7"+
"\13\0\10\7\5\0\3\7\1\77\23\7\13\0\10\7"+
"\5\0\22\7\1\100\4\7\13\0\10\7\5\0\6\7"+
"\1\101\20\7\13\0\10\7\5\0\27\7\13\0\4\7"+
"\1\102\3\7\3\40\1\103\1\60\52\40\5\0\6\7"+
"\1\104\20\7\13\0\10\7\5\0\22\7\1\105\4\7"+
"\13\0\10\7\5\0\15\7\1\106\11\7\13\0\10\7"+
"\5\0\12\7\1\107\14\7\13\0\10\7\5\0\13\7"+
"\1\110\13\7\13\0\10\7\5\0\23\7\1\111\3\7"+
"\13\0\10\7\5\0\7\7\1\112\17\7\13\0\10\7"+
"\5\0\14\7\1\113\12\7\13\0\10\7\5\0\16\7"+
"\1\114\10\7\13\0\10\7\5\0\15\7\1\115\11\7"+
"\13\0\10\7\5\0\11\7\1\116\15\7\13\0\10\7"+
"\5\0\10\7\1\117\16\7\13\0\10\7\5\0\26\7"+
"\1\120\13\0\10\7\5\0\17\7\1\121\7\7\13\0"+
"\10\7\5\0\7\7\1\122\17\7\13\0\10\7\5\0"+
"\27\7\13\0\5\7\1\123\2\7\5\0\7\7\1\124"+
"\17\7\13\0\10\7\5\0\10\7\1\125\16\7\13\0"+
"\10\7\5\0\7\7\1\126\17\7\13\0\10\7\5\0"+
"\15\7\1\127\11\7\13\0\10\7\5\0\11\7\1\130"+
"\15\7\13\0\10\7\5\0\11\7\1\131\15\7\13\0"+
"\10\7\5\0\15\7\1\132\11\7\13\0\10\7\5\0"+
"\10\7\1\133\16\7\13\0\10\7\5\0\10\7\1\134"+
"\16\7\13\0\10\7\5\0\16\7\1\135\10\7\13\0"+
"\10\7\5\0\10\7\1\136\16\7\13\0\10\7\5\0"+
"\27\7\13\0\6\7\1\137\1\7\5\0\10\7\1\140"+
"\16\7\13\0\10\7\5\0\21\7\1\141\5\7\13\0"+
"\10\7\5\0\16\7\1\142\10\7\13\0\10\7\5\0"+
"\14\7\1\143\12\7\13\0\10\7\5\0\24\7\1\144"+
"\2\7\13\0\10\7\5\0\11\7\1\145\15\7\13\0"+
"\10\7\5\0\15\7\1\146\11\7\13\0\10\7\5\0"+
"\15\7\1\147\11\7\13\0\10\7\5\0\27\7\13\0"+
"\7\7\1\150\5\0\11\7\1\151\15\7\13\0\10\7"+
"\5\0\11\7\1\152\15\7\13\0\10\7\5\0\15\7"+
"\1\153\11\7\13\0\10\7\5\0\20\7\1\154\6\7"+
"\13\0\10\7\5\0\20\7\1\155\6\7\13\0\10\7"+
"\5\0\12\7\1\156\14\7\13\0\10\7\5\0\17\7"+
"\1\157\7\7\13\0\10\7\5\0\11\7\1\160\15\7"+
"\13\0\10\7\5\0\15\7\1\161\11\7\13\0\10\7"+
"\5\0\16\7\1\162\10\7\13\0\10\7\5\0\17\7"+
"\1\163\7\7\13\0\10\7\5\0\15\7\1\164\11\7"+
"\13\0\10\7\5\0\16\7\1\165\10\7\13\0\10\7"+
"\5\0\15\7\1\166\11\7\13\0\10\7";
private static int [] zzUnpackTrans() {
int [] result = new int[4089];
int offset = 0;
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
return result;
}
private static int zzUnpackTrans(String packed, int offset, int [] result) {
int i = 0; /* index in packed string */
int j = offset; /* index in unpacked array */
int l = packed.length();
while (i < l) {
int count = packed.charAt(i++);
int value = packed.charAt(i++);
value--;
do result[j++] = value; while (--count > 0);
}
return j;
}
/* error codes */
private static final int ZZ_UNKNOWN_ERROR = 0;
private static final int ZZ_NO_MATCH = 1;
private static final int ZZ_PUSHBACK_2BIG = 2;
private static final char[] EMPTY_BUFFER = new char[0];
private static final int YYEOF = -1;
private static java.io.Reader zzReader = null; // Fake
/* error messages for the codes above */
private static final String ZZ_ERROR_MSG[] = {
"Unkown internal scanner error",
"Error: could not match input",
"Error: pushback value was too large"
};
/**
* ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
*/
private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
private static final String ZZ_ATTRIBUTE_PACKED_0 =
"\1\0\1\11\2\1\1\11\14\1\13\11\3\1\1\0"+
"\17\1\1\0\22\1\1\11\63\1";
private static int [] zzUnpackAttribute() {
int [] result = new int[118];
int offset = 0;
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
return result;
}
private static int zzUnpackAttribute(String packed, int offset, int [] result) {
int i = 0; /* index in packed string */
int j = offset; /* index in unpacked array */
int l = packed.length();
while (i < l) {
int count = packed.charAt(i++);
int value = packed.charAt(i++);
do result[j++] = value; while (--count > 0);
}
return j;
}
/** the current state of the DFA */
private int zzState;
/** the current lexical state */
private int zzLexicalState = YYINITIAL;
/** this buffer contains the current text to be matched and is
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;
/** the textposition at the last state to be included in yytext */
private int zzPushbackPos;
/** the current text position in the buffer */
private int zzCurrentPos;
/** startRead marks the beginning of the yytext() string in the buffer */
private int zzStartRead;
/** endRead marks the last character in the buffer, that has been read
from input */
private int zzEndRead;
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
private boolean zzAtBOL = true;
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
/* user code: */
public _AidlLexer() {
this((java.io.Reader)null);
}
/**
* Creates a new scanner
*
* @param in the java.io.Reader to read input from.
*/
public _AidlLexer(java.io.Reader in) {
this.zzReader = in;
}
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
* @return the unpacked character translation table
*/
private static char [] zzUnpackCMap(String packed) {
char [] map = new char[0x10000];
int i = 0; /* index in packed string */
int j = 0; /* index in unpacked array */
while (i < 142) {
int count = packed.charAt(i++);
char value = packed.charAt(i++);
do map[j++] = value; while (--count > 0);
}
return map;
}
public final int getTokenStart(){
return zzStartRead;
}
public final int getTokenEnd(){
return getTokenStart() + yylength();
}
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);
}
/**
* Refills the input buffer.
*
* @return <code>false</code>, iff there was new input.
*
* @exception java.io.IOException if any I/O-Error occurs
*/
private boolean zzRefill() throws java.io.IOException {
return true;
}
/**
* Returns the current lexical state.
*/
public final int yystate() {
return zzLexicalState;
}
/**
* Enters a new lexical state
*
* @param newState the new lexical state
*/
public final void yybegin(int newState) {
zzLexicalState = newState;
}
/**
* Returns the text matched by the current regular expression.
*/
public final CharSequence yytext() {
return zzBuffer.subSequence(zzStartRead, zzMarkedPos);
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
*
* It is equivalent to yytext().charAt(pos), but faster
*
* @param pos the position of the character to fetch.
* A value from 0 to yylength()-1.
*
* @return the character at position pos
*/
public final char yycharat(int pos) {
return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
}
/**
* Returns the length of the matched text region.
*/
public final int yylength() {
return zzMarkedPos-zzStartRead;
}
/**
* Reports an error that occured while scanning.
*
* In a wellformed scanner (no or only correct usage of
* yypushback(int) and a match-all fallback rule) this method
* will only be called with things that "Can't Possibly Happen".
* If this method is called, something is seriously wrong
* (e.g. a JFlex bug producing a faulty scanner etc.).
*
* Usual syntax/scanner level error handling should be done
* in error fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
private void zzScanError(int errorCode) {
String message;
try {
message = ZZ_ERROR_MSG[errorCode];
}
catch (ArrayIndexOutOfBoundsException e) {
message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
}
throw new Error(message);
}
/**
* Pushes the specified amount of characters back into the input stream.
*
* They will be read again by then next call of the scanning method
*
* @param number the number of characters to be read again.
* This number must not be greater than yylength()!
*/
public void yypushback(int number) {
if ( number > yylength() )
zzScanError(ZZ_PUSHBACK_2BIG);
zzMarkedPos -= number;
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
*
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/
public IElementType advance() throws java.io.IOException {
int zzInput;
int zzAction;
// cached fields:
int zzCurrentPosL;
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
CharSequence zzBufferL = zzBuffer;
char[] zzBufferArrayL = zzBufferArray;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ_TRANS;
int [] zzRowMapL = ZZ_ROWMAP;
int [] zzAttrL = ZZ_ATTRIBUTE;
while (true) {
zzMarkedPosL = zzMarkedPos;
zzAction = -1;
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
zzState = ZZ_LEXSTATE[zzLexicalState];
zzForAction: {
while (true) {
if (zzCurrentPosL < zzEndReadL)
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
}
else {
// store back cached positions
zzCurrentPos = zzCurrentPosL;
zzMarkedPos = zzMarkedPosL;
boolean eof = zzRefill();
// get translated positions and possibly new buffer
zzCurrentPosL = zzCurrentPos;
zzMarkedPosL = zzMarkedPos;
zzBufferL = zzBuffer;
zzEndReadL = zzEndRead;
if (eof) {
zzInput = YYEOF;
break zzForAction;
}
else {
zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
if (zzNext == -1) break zzForAction;
zzState = zzNext;
int zzAttributes = zzAttrL[zzState];
if ( (zzAttributes & 1) == 1 ) {
zzAction = zzState;
zzMarkedPosL = zzCurrentPosL;
if ( (zzAttributes & 8) == 8 ) break zzForAction;
}
}
}
// store back cached position
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 8:
{ return RPARENTH;
}
case 38: break;
case 30:
{ return ONEWAY_KEYWORD;
}
case 39: break;
case 20:
{ return RPC_KEYWORD;
}
case 40: break;
case 14:
{ return LT;
}
case 41: break;
case 13:
{ return SEMICOLON;
}
case 42: break;
case 19:
{ return OUT_KEYWORD;
}
case 43: break;
case 23:
{ return LONG_KEYWORD;
}
case 44: break;
case 5:
{ return LCURLY;
}
case 45: break;
case 6:
{ return RCURLY;
}
case 46: break;
case 10:
{ return RBRACKET;
}
case 47: break;
case 27:
{ return FLOAT_KEYWORD;
}
case 48: break;
case 11:
{ return COMMA;
}
case 49: break;
case 16:
{ return COMMENT;
}
case 50: break;
case 37:
{ return FLATTENABLE_KEYWORD;
}
case 51: break;
case 25:
{ return VOID_KEYWORD;
}
case 52: break;
case 28:
{ return SHORT_KEYWORD;
}
case 53: break;
case 29:
{ return IMPORT_KEYWORD;
}
case 54: break;
case 7:
{ return LPARENTH;
}
case 55: break;
case 12:
{ return EQUALS;
}
case 56: break;
case 21:
{ return BLOCK_COMMENT;
}
case 57: break;
case 36:
{ return PARCELABLE_KEYWORD;
}
case 58: break;
case 35:
{ return INTERFACE_KEYWORD;
}
case 59: break;
case 34:
{ return BOOLEAN_KEYWORD;
}
case 60: break;
case 31:
{ return DOUBLE_KEYWORD;
}
case 61: break;
case 26:
{ return INOUT_KEYWORD;
}
case 62: break;
case 33:
{ return PACKAGE_KEYWORD;
}
case 63: break;
case 15:
{ return GT;
}
case 64: break;
case 32:
{ return ONEWAY;
}
case 65: break;
case 3:
{ return IDVALUE;
}
case 66: break;
case 22:
{ return CHAR_KEYWORD;
}
case 67: break;
case 9:
{ return LBRACKET;
}
case 68: break;
case 24:
{ return BYTE_KEYWORD;
}
case 69: break;
case 2:
{ return com.intellij.psi.TokenType.WHITE_SPACE;
}
case 70: break;
case 18:
{ return INT_KEYWORD;
}
case 71: break;
case 4:
{ return IDENTIFIER;
}
case 72: break;
case 17:
{ return IN_KEYWORD;
}
case 73: break;
case 1:
{ return com.intellij.psi.TokenType.BAD_CHARACTER;
}
case 74: break;
default:
if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
zzAtEOF = true;
return null;
}
else {
zzScanError(ZZ_NO_MATCH);
}
}
}
}
}