asset.pipeline.jsx.JsxLexer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsx-asset-pipeline Show documentation
Show all versions of jsx-asset-pipeline Show documentation
JSX Transpiler Extension for the JVM Based Asset-Pipeline.
/* The following code was generated by JFlex 1.6.1 */
package asset.pipeline.jsx;
import asset.pipeline.jsx.symbols.*;
import java.util.ArrayList;
import java.io.*;
/**
* This class is a JSX lexer.
* @author David Estes
*/
class JsxLexer {
/** This character denotes the end of file */
public static final int YYEOF = -1;
/** initial size of the lookahead buffer */
private static final int ZZ_BUFFERSIZE = 16384;
/** lexical states */
public static final int YYINITIAL = 0;
public static final int STRINGDOUBLE = 2;
public static final int STRINGSINGLE = 4;
public static final int JSXOPENINGELEMENT = 6;
public static final int JSXSELFCLOSINGELEMENT = 8;
public static final int JSXELEMENT = 10;
public static final int JSXATTRIBUTES = 12;
public static final int JSXATTRIBUTE = 14;
public static final int JSXATTRIBUTEVALUE = 16;
public static final int JSXCHILDREN = 18;
public static final int ASSIGNMENTEXPRESSION = 20;
public static final int ASSIGNMENTEXPRESSIONVALUE = 22;
public static final int ATTRIBUTEEXPRESSION = 24;
/**
* 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, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
8, 8, 9, 9, 10, 10, 5, 5, 5, 5
};
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
"\11\7\1\3\1\2\1\12\1\3\1\1\16\7\4\0\1\3\1\0"+
"\1\24\1\0\1\6\2\0\1\25\2\0\1\5\2\0\1\21\1\15"+
"\1\4\12\23\1\14\1\0\1\10\1\20\1\11\2\0\32\22\1\0"+
"\1\26\2\0\1\22\1\0\15\22\1\30\3\22\1\31\1\22\1\27"+
"\6\22\1\16\1\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\6\7\2\0"+
"\12\7\2\0\4\6\40\0\1\6\27\0\2\7\6\0\12\7\13\0"+
"\1\7\1\0\1\7\1\0\1\7\4\0\2\7\10\6\1\0\44\6"+
"\4\0\24\7\1\0\2\7\5\6\13\7\1\0\44\7\11\0\1\7"+
"\71\0\53\6\24\7\1\6\12\7\6\0\6\6\4\7\4\6\3\7"+
"\1\6\3\7\2\6\7\7\3\6\4\7\15\6\14\7\1\6\17\7"+
"\2\0\46\6\1\0\1\6\5\0\1\6\2\0\53\6\1\0\u014d\6"+
"\1\0\4\6\2\0\7\6\1\0\1\6\1\0\4\6\2\0\51\6"+
"\1\0\4\6\2\0\41\6\1\0\4\6\2\0\7\6\1\0\1\6"+
"\1\0\4\6\2\0\17\6\1\0\71\6\1\0\4\6\2\0\103\6"+
"\2\0\3\7\40\0\20\6\20\0\126\6\2\0\6\6\3\0\u026c\6"+
"\2\0\21\6\1\12\32\6\5\0\113\6\3\0\13\6\7\0\15\6"+
"\1\0\4\6\3\7\13\0\22\6\3\7\13\0\22\6\2\7\14\0"+
"\15\6\1\0\3\6\1\0\2\7\14\0\64\6\40\7\3\0\1\6"+
"\3\0\2\6\1\7\2\0\12\7\41\0\4\7\1\0\12\7\6\0"+
"\131\6\7\0\5\6\2\7\42\6\1\7\1\6\5\0\106\6\12\0"+
"\37\6\1\0\14\7\4\0\14\7\12\0\12\7\36\6\2\0\5\6"+
"\13\0\54\6\4\0\32\6\6\0\12\7\46\0\27\6\5\7\4\0"+
"\65\6\12\7\1\0\35\7\2\0\13\7\6\0\12\7\15\0\1\6"+
"\10\0\16\7\1\0\2\7\77\0\5\7\57\6\21\7\7\6\4\0"+
"\12\7\21\0\11\7\14\0\3\7\36\6\15\7\2\6\12\7\54\6"+
"\16\7\14\0\44\6\24\7\10\0\12\7\3\0\3\6\12\7\44\6"+
"\2\0\11\6\7\0\53\6\2\0\3\6\20\0\3\7\1\0\25\7"+
"\4\6\1\7\6\6\1\7\2\6\3\7\1\6\5\0\300\6\72\7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\2\6\13\7"+
"\34\6\10\7\2\0\27\6\15\7\14\0\35\6\3\0\4\7\57\6"+
"\16\7\16\0\1\6\12\7\6\0\5\6\1\7\12\6\12\7\5\6"+
"\1\0\51\6\16\7\11\0\3\6\1\7\10\6\2\7\2\0\12\7"+
"\6\0\27\6\3\0\1\6\3\7\62\6\1\7\1\6\3\7\2\6"+
"\2\7\5\6\2\7\1\6\1\7\1\6\30\0\3\6\2\0\13\6"+
"\5\7\2\0\3\6\2\7\12\0\6\6\2\0\6\6\2\0\6\6"+
"\11\0\7\6\1\0\7\6\1\0\53\6\1\0\16\6\6\0\163\6"+
"\10\7\1\0\2\7\2\0\12\7\6\0\u2ba4\6\14\0\27\6\4\0"+
"\61\6\u2104\0\u016e\6\2\0\152\6\46\0\7\6\14\0\5\6\5\0"+
"\1\6\1\7\12\6\1\0\15\6\1\0\5\6\1\0\1\6\1\0"+
"\2\6\1\0\2\6\1\0\154\6\41\0\u016b\6\22\0\100\6\2\0"+
"\66\6\50\0\15\6\3\0\20\7\20\0\20\7\3\0\2\6\30\0"+
"\3\6\31\0\1\6\6\0\5\6\1\0\207\6\2\0\1\7\4\0"+
"\1\6\13\0\12\7\7\0\32\6\4\0\1\6\1\0\32\6\13\0"+
"\131\6\3\0\6\6\2\0\6\6\2\0\6\6\2\0\3\6\3\0"+
"\2\6\3\0\2\6\22\0\3\7\4\0\14\6\1\0\32\6\1\0"+
"\23\6\1\0\2\6\1\0\17\6\2\0\16\6\42\0\173\6\105\0"+
"\65\6\210\0\1\7\202\0\35\6\3\0\61\6\17\0\1\7\37\0"+
"\40\6\15\0\36\6\5\0\46\6\5\7\5\0\36\6\2\0\44\6"+
"\4\0\10\6\1\0\5\6\52\0\236\6\2\0\12\7\6\0\44\6"+
"\4\0\44\6\4\0\50\6\10\0\64\6\234\0\u0137\6\11\0\26\6"+
"\12\0\10\6\230\0\6\6\2\0\1\6\1\0\54\6\1\0\2\6"+
"\3\0\1\6\2\0\27\6\12\0\27\6\11\0\37\6\101\0\23\6"+
"\1\0\2\6\12\0\26\6\12\0\32\6\106\0\70\6\6\0\2\6"+
"\100\0\1\6\3\7\1\0\2\7\5\0\4\7\4\6\1\0\3\6"+
"\1\0\35\6\2\0\3\7\4\0\1\7\40\0\35\6\3\0\35\6"+
"\43\0\10\6\1\0\34\6\2\7\31\0\66\6\12\0\26\6\12\0"+
"\23\6\15\0\22\6\156\0\111\6\67\0\63\6\15\0\63\6\15\0"+
"\44\6\4\7\10\0\12\7\u0146\0\52\6\1\0\2\7\3\0\2\6"+
"\116\0\35\6\12\0\1\6\10\0\26\6\13\7\137\0\25\6\33\0"+
"\27\6\11\0\3\7\65\6\17\7\37\0\12\7\17\0\4\7\55\6"+
"\13\7\2\0\1\7\17\0\1\7\2\0\31\6\7\0\12\7\6\0"+
"\3\7\44\6\16\7\1\0\12\7\4\0\1\6\2\7\1\6\10\0"+
"\43\6\1\7\2\0\1\6\11\0\3\7\60\6\16\7\4\6\4\0"+
"\4\7\1\0\14\7\1\6\1\0\1\6\43\0\22\6\1\0\31\6"+
"\14\7\6\0\1\7\101\0\7\6\1\0\1\6\1\0\4\6\1\0"+
"\17\6\1\0\12\6\7\0\57\6\14\7\5\0\12\7\6\0\4\7"+
"\1\0\10\6\2\0\2\6\2\0\26\6\1\0\7\6\1\0\2\6"+
"\1\0\5\6\1\0\2\7\1\6\7\7\2\0\2\7\2\0\3\7"+
"\2\0\1\6\6\0\1\7\5\0\5\6\2\7\2\0\7\7\3\0"+
"\5\7\213\0\65\6\22\7\4\6\5\0\12\7\4\0\1\7\3\6"+
"\36\0\60\6\24\7\2\6\1\0\1\6\10\0\12\7\246\0\57\6"+
"\7\7\2\0\11\7\27\0\4\6\2\7\42\0\60\6\21\7\3\0"+
"\1\6\13\0\12\7\46\0\53\6\15\7\1\6\7\0\12\7\66\0"+
"\33\6\2\0\17\7\4\0\12\7\306\0\54\6\17\7\145\0\100\6"+
"\12\7\25\0\10\6\2\0\1\6\2\0\10\6\1\0\2\6\1\0"+
"\30\6\6\7\1\0\2\7\2\0\4\7\1\6\1\7\1\6\2\7"+
"\14\0\12\7\106\0\10\6\2\0\47\6\7\7\2\0\7\7\1\6"+
"\1\0\1\6\1\7\33\0\1\6\12\7\50\6\7\7\1\6\4\7"+
"\10\0\1\7\10\0\1\6\13\7\56\6\20\7\3\0\1\6\42\0"+
"\71\6\u0107\0\11\6\1\0\45\6\10\7\1\0\10\7\1\6\17\0"+
"\12\7\30\0\36\6\2\0\26\7\1\0\16\7\111\0\7\6\1\0"+
"\2\6\1\0\46\6\6\7\3\0\1\7\1\0\2\7\1\0\7\7"+
"\1\6\1\7\10\0\12\7\6\0\6\6\1\0\2\6\1\0\40\6"+
"\5\7\1\0\2\7\1\0\5\7\1\6\7\0\12\7\u0136\0\23\6"+
"\4\7\271\0\1\6\54\0\4\6\37\0\u039a\6\146\0\157\6\21\0"+
"\304\6\u0abc\0\u042f\6\1\0\11\7\u0fc7\0\u0247\6\u21b9\0\u0239\6\7\0"+
"\37\6\1\0\12\7\146\0\36\6\2\0\5\7\13\0\60\6\7\7"+
"\11\0\4\6\14\0\12\7\11\0\25\6\5\0\23\6\u02b0\0\100\6"+
"\200\0\113\6\4\0\1\7\1\6\67\7\7\0\4\7\15\6\100\0"+
"\2\6\1\0\1\6\1\7\13\0\2\7\16\0\u17f8\6\10\0\u04d6\6"+
"\52\0\11\6\u22f7\0\u011f\6\61\0\3\6\21\0\4\6\10\0\u018c\6"+
"\u0904\0\153\6\5\0\15\6\3\0\11\6\7\0\12\6\3\0\2\7"+
"\1\0\4\7\u14c1\0\5\7\3\0\26\7\2\0\7\7\36\0\4\7"+
"\224\0\3\7\u01bb\0\125\6\1\0\107\6\1\0\2\6\2\0\1\6"+
"\2\0\2\6\2\0\4\6\1\0\14\6\1\0\1\6\1\0\7\6"+
"\1\0\101\6\1\0\4\6\2\0\10\6\1\0\7\6\1\0\34\6"+
"\1\0\4\6\1\0\5\6\1\0\1\6\3\0\7\6\1\0\u0154\6"+
"\2\0\31\6\1\0\31\6\1\0\37\6\1\0\31\6\1\0\37\6"+
"\1\0\31\6\1\0\37\6\1\0\31\6\1\0\37\6\1\0\31\6"+
"\1\0\10\6\2\0\62\7\u0200\0\67\7\4\0\62\7\10\0\1\7"+
"\16\0\1\7\26\0\5\7\1\0\17\7\u0550\0\7\7\1\0\21\7"+
"\2\0\7\7\1\0\2\7\1\0\5\7\325\0\55\6\3\0\7\7"+
"\7\6\2\0\12\7\4\0\1\6\u0171\0\54\6\16\7\5\0\1\6"+
"\u0500\0\305\6\13\0\7\7\51\0\104\6\7\7\1\6\4\0\12\7"+
"\u0356\0\1\6\u014f\0\4\6\1\0\33\6\1\0\2\6\1\0\1\6"+
"\2\0\1\6\1\0\12\6\1\0\4\6\1\0\1\6\1\0\1\6"+
"\6\0\1\6\4\0\1\6\1\0\1\6\1\0\1\6\1\0\3\6"+
"\1\0\2\6\1\0\1\6\2\0\1\6\1\0\1\6\1\0\1\6"+
"\1\0\1\6\1\0\1\6\1\0\2\6\1\0\1\6\2\0\4\6"+
"\1\0\7\6\1\0\4\6\1\0\4\6\1\0\1\6\1\0\12\6"+
"\1\0\21\6\5\0\3\6\1\0\5\6\1\0\21\6\u0d34\0\12\7"+
"\u0406\0\ua6de\6\42\0\u1035\6\13\0\336\6\2\0\u1682\6\16\0\u1d31\6"+
"\u0c1f\0\u021e\6\u05e2\0\u134b\6\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uecc0\0"+
"\1\7\36\0\140\7\200\0\360\7\uffff\0\uffff\0\ufe12\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 =
"\13\0\4\1\1\2\1\3\1\4\1\5\1\6\1\7"+
"\1\4\1\7\1\10\1\11\2\5\1\12\1\13\1\5"+
"\1\14\1\15\1\5\1\16\1\17\1\20\2\5\1\4"+
"\1\21\1\22\1\1\2\0\1\23\1\24\1\25\1\26"+
"\1\27\2\0\1\30\1\31\4\0\1\12\3\0\1\14"+
"\1\0\1\32\2\0\1\33\3\0\1\34\2\10\1\12"+
"\4\0\1\14\2\0\1\1\1\35\1\10\2\36\2\0"+
"\1\37\2\0\1\40\3\0";
private static int [] zzUnpackAction() {
int [] result = new int[95];
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\32\0\64\0\116\0\150\0\202\0\234\0\266"+
"\0\320\0\352\0\u0104\0\u011e\0\u0138\0\u0152\0\u016c\0\u011e"+
"\0\u011e\0\u0186\0\u011e\0\u011e\0\u01a0\0\u01ba\0\u01d4\0\u01ee"+
"\0\u011e\0\u0208\0\u0222\0\u023c\0\u011e\0\u0256\0\u0270\0\u011e"+
"\0\u028a\0\u011e\0\u011e\0\u02a4\0\u02be\0\u02d8\0\u011e\0\u011e"+
"\0\u011e\0\u02f2\0\u030c\0\u0326\0\u011e\0\u011e\0\u011e\0\u011e"+
"\0\u011e\0\u0340\0\u035a\0\u011e\0\u011e\0\u0374\0\u038e\0\u03a8"+
"\0\u03c2\0\u03dc\0\u03f6\0\u0410\0\u042a\0\u0444\0\u028a\0\u028a"+
"\0\u045e\0\u02d8\0\u02d8\0\u0478\0\u0492\0\u04ac\0\u011e\0\u04c6"+
"\0\u04e0\0\u04fa\0\u0514\0\u052e\0\u0548\0\u0562\0\u057c\0\u0596"+
"\0\u05b0\0\u0478\0\u011e\0\u05ca\0\u0514\0\u011e\0\u05e4\0\u05fe"+
"\0\u011e\0\u0618\0\u0632\0\u05e4\0\u064c\0\u0666\0\u0680";
private static int [] zzUnpackRowMap() {
int [] result = new int[95];
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\14\1\15\2\14\1\16\3\14\1\17\13\14\1\20"+
"\1\21\4\14\1\22\2\23\21\22\1\24\1\22\1\25"+
"\3\22\1\26\2\23\22\26\1\24\1\27\3\26\1\23"+
"\1\15\2\14\2\23\1\30\2\23\1\31\10\23\1\30"+
"\4\23\3\30\1\23\1\15\2\14\1\32\1\23\1\30"+
"\13\23\1\30\4\23\3\30\33\23\1\15\2\14\1\33"+
"\1\23\1\34\2\23\1\35\4\23\1\36\3\23\1\34"+
"\4\23\3\34\1\23\1\15\2\14\2\23\1\37\11\23"+
"\1\40\1\23\1\37\4\23\3\37\1\23\1\15\2\14"+
"\12\23\1\41\5\23\1\42\1\43\4\23\10\44\1\45"+
"\1\23\4\44\1\46\1\23\12\44\16\47\1\50\1\51"+
"\12\47\34\0\1\14\33\0\1\52\1\53\32\0\1\54"+
"\13\0\1\54\4\0\3\54\1\22\2\0\21\22\1\0"+
"\1\22\1\0\3\22\24\0\1\55\2\0\1\56\1\57"+
"\1\60\1\26\2\0\22\26\2\0\3\26\25\0\1\61"+
"\1\0\1\56\1\57\1\60\6\0\2\30\3\0\1\30"+
"\1\62\1\63\4\0\2\30\3\0\3\30\11\0\1\64"+
"\31\0\1\65\23\0\1\66\2\0\2\67\3\0\1\67"+
"\1\70\3\0\1\71\1\72\2\34\3\0\3\34\15\0"+
"\1\73\22\0\2\74\3\0\1\74\1\75\4\0\1\76"+
"\2\37\3\0\3\37\17\77\1\100\12\77\10\44\2\0"+
"\4\44\2\0\12\44\4\0\1\101\1\0\1\54\13\0"+
"\1\54\4\0\3\54\17\102\1\103\12\102\1\52\1\15"+
"\1\14\27\52\5\104\1\105\24\104\4\54\1\106\4\54"+
"\1\107\20\54\6\0\1\110\13\0\1\110\4\0\3\110"+
"\6\0\1\111\13\0\1\111\4\0\3\111\3\0\1\66"+
"\14\0\1\71\17\0\2\67\3\0\1\67\1\70\5\0"+
"\2\67\3\0\3\67\6\0\1\112\13\0\1\112\4\0"+
"\3\112\3\0\1\71\12\0\1\113\5\0\1\114\1\115"+
"\7\0\1\66\14\0\1\71\3\72\3\0\3\72\15\0"+
"\1\116\22\0\2\74\3\0\1\74\1\75\5\0\2\74"+
"\3\0\3\74\6\0\1\117\13\0\1\117\4\0\3\117"+
"\21\0\3\76\3\0\3\76\6\0\1\120\13\0\1\120"+
"\4\0\3\120\5\104\1\121\30\104\1\122\1\121\24\104"+
"\4\54\1\106\4\54\1\123\20\54\6\0\2\110\3\0"+
"\1\110\6\0\2\110\3\0\3\110\6\0\1\124\1\111"+
"\3\0\1\111\6\0\1\124\1\111\3\0\3\124\3\0"+
"\1\66\2\0\2\112\3\0\1\112\4\0\1\71\1\0"+
"\2\112\3\0\3\112\17\113\1\125\12\113\24\114\1\126"+
"\5\114\25\115\1\126\4\115\15\0\1\127\22\0\2\117"+
"\3\0\1\117\6\0\2\117\3\0\3\117\1\0\3\130"+
"\2\0\2\120\1\0\1\131\1\130\1\120\1\132\1\133"+
"\4\0\2\120\3\0\3\120\4\104\1\14\1\121\24\104"+
"\6\0\2\124\3\0\1\124\1\0\1\63\4\0\2\124"+
"\3\0\3\124\17\127\1\134\12\127\1\0\3\130\5\0"+
"\1\131\2\130\24\0\1\135\13\0\1\135\4\0\3\135"+
"\6\0\1\136\13\0\1\136\4\0\3\136\1\0\3\130"+
"\2\0\2\135\1\0\1\131\1\130\1\135\6\0\2\135"+
"\3\0\3\135\1\0\3\130\2\0\1\137\1\136\1\0"+
"\1\131\1\130\1\136\6\0\1\137\1\136\3\0\3\137"+
"\1\0\3\130\2\0\2\137\1\0\1\131\1\130\1\137"+
"\1\0\1\133\4\0\2\137\3\0\3\137";
private static int [] zzUnpackTrans() {
int [] result = new int[1690];
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;
/* error messages for the codes above */
private static final String ZZ_ERROR_MSG[] = {
"Unknown internal scanner error",
"Error: could not match input",
"Error: pushback value was too large"
};
/**
* ZZ_ATTRIBUTE[aState] contains the attributes of state aState
*/
private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
private static final String ZZ_ATTRIBUTE_PACKED_0 =
"\13\0\1\11\3\1\2\11\1\1\2\11\4\1\1\11"+
"\3\1\1\11\2\1\1\11\1\1\2\11\3\1\3\11"+
"\1\1\2\0\5\11\2\0\2\11\4\0\1\1\3\0"+
"\1\1\1\0\1\1\2\0\1\1\3\0\1\11\3\1"+
"\4\0\1\1\2\0\1\1\1\11\2\1\1\11\2\0"+
"\1\11\2\0\1\1\3\0";
private static int [] zzUnpackAttribute() {
int [] result = new int[95];
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 input device */
private java.io.Reader zzReader;
/** 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 char zzBuffer[] = new char[ZZ_BUFFERSIZE];
/** the textposition at the last accepting state */
private int zzMarkedPos;
/** 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;
/** number of newlines encountered up to the start of the matched text */
private int yyline;
/** the number of characters up to the start of the matched text */
private int yychar;
/**
* the number of characters from the last newline up to the start of the
* matched text
*/
private int yycolumn;
/**
* 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;
/** denotes if the user-EOF-code has already been executed */
private boolean zzEOFDone;
/**
* The number of occupied positions in zzBuffer beyond zzEndRead.
* When a lead/high surrogate has been read from the input stream
* into the final zzBuffer position, this will have a value of 1;
* otherwise, it will have a value of 0.
*/
private int zzFinalHighSurrogate = 0;
/* user code: */
StringBuffer string = new StringBuffer();
int curleyBraceCounter = 0;
ArrayList elementStack = new ArrayList();
JsxAttribute attribute;
private Symbol symbol(String name) {
Symbol sym = new GenericSymbol(name,null, yyline,yycolumn,yychar);
if(elementStack.size() == 0) {
return sym;
} else {
Symbol element = elementStack.get(elementStack.size()-1);
element.appendChild(sym);
return null;
}
}
private Symbol symbol(String name, String value) {
Symbol sym = new GenericSymbol(name,value, yyline,yycolumn,yychar);
if(elementStack.size() == 0) {
return sym;
} else {
Symbol element = elementStack.get(elementStack.size()-1);
element.appendChild(sym);
return null;
}
}
private Symbol jsxElement(String value) {
Symbol sym = new JsxElement("JSXElement",value, yyline,yycolumn-1,yychar-1);
if(elementStack.size() == 0) {
elementStack.add(sym);
return sym;
} else {
Symbol element = elementStack.get(elementStack.size()-1);
elementStack.add(sym);
element.appendChild(sym);
return null;
}
}
private void addAttributeSymbol(String name, String value) {
JsxAttribute attr = new JsxAttribute(name,value, yyline,yycolumn,yychar);
Symbol sym = elementStack.get(elementStack.size()-1);
sym.appendAttribute(attr);
}
private void addAttributeSymbol(JsxAttribute attr) {
Symbol sym = elementStack.get(elementStack.size()-1);
sym.appendAttribute(attr);
}
private void closeJsxElement() {
Symbol sym = elementStack.get(elementStack.size()-1);
sym.setLength(yychar - sym.getPosition() + yylength());
elementStack.remove(elementStack.size()-1);
}
/**
* Creates a new scanner
*
* @param in the java.io.Reader to read input from.
*/
JsxLexer(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[0x110000];
int i = 0; /* index in packed string */
int j = 0; /* index in unpacked array */
while (i < 3646) {
int count = packed.charAt(i++);
char value = packed.charAt(i++);
do map[j++] = value; while (--count > 0);
}
return map;
}
/**
* Refills the input buffer.
*
* @return false
, iff there was new input.
*
* @exception java.io.IOException if any I/O-Error occurs
*/
private boolean zzRefill() throws java.io.IOException {
/* first: make room (if you can) */
if (zzStartRead > 0) {
zzEndRead += zzFinalHighSurrogate;
zzFinalHighSurrogate = 0;
System.arraycopy(zzBuffer, zzStartRead,
zzBuffer, 0,
zzEndRead-zzStartRead);
/* translate stored positions */
zzEndRead-= zzStartRead;
zzCurrentPos-= zzStartRead;
zzMarkedPos-= zzStartRead;
zzStartRead = 0;
}
/* is the buffer big enough? */
if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
/* if not: blow it up */
char newBuffer[] = new char[zzBuffer.length*2];
System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
zzBuffer = newBuffer;
zzEndRead += zzFinalHighSurrogate;
zzFinalHighSurrogate = 0;
}
/* fill the buffer with new input */
int requested = zzBuffer.length - zzEndRead;
int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
/* not supposed to occur according to specification of java.io.Reader */
if (numRead == 0) {
throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
}
if (numRead > 0) {
zzEndRead += numRead;
/* If numRead == requested, we might have requested to few chars to
encode a full Unicode character. We assume that a Reader would
otherwise never return half characters. */
if (numRead == requested) {
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
zzFinalHighSurrogate = 1;
}
}
/* potentially more input available */
return false;
}
/* numRead < 0 ==> end of stream */
return true;
}
/**
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
if (zzReader != null)
zzReader.close();
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
*
* All internal variables are reset, the old input stream
* cannot be reused (internal buffer is discarded and lost).
* Lexical state is set to ZZ_INITIAL.
*
* Internal scan buffer is resized down to its initial length, if it has grown.
*
* @param reader the new input stream
*/
public final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
zzFinalHighSurrogate = 0;
yyline = yychar = yycolumn = 0;
zzLexicalState = YYINITIAL;
if (zzBuffer.length > ZZ_BUFFERSIZE)
zzBuffer = new char[ZZ_BUFFERSIZE];
}
/**
* 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 String yytext() {
return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
}
/**
* Returns the character at position pos 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 zzBuffer[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 Symbol yylex() throws java.io.IOException, JsxParserException
{
int zzInput;
int zzAction;
// cached fields:
int zzCurrentPosL;
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
char [] zzBufferL = zzBuffer;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ_TRANS;
int [] zzRowMapL = ZZ_ROWMAP;
int [] zzAttrL = ZZ_ATTRIBUTE;
while (true) {
zzMarkedPosL = zzMarkedPos;
yychar+= zzMarkedPosL-zzStartRead;
boolean zzR = false;
int zzCh;
int zzCharCount;
for (zzCurrentPosL = zzStartRead ;
zzCurrentPosL < zzMarkedPosL ;
zzCurrentPosL += zzCharCount ) {
zzCh = Character.codePointAt(zzBufferL, zzCurrentPosL, zzMarkedPosL);
zzCharCount = Character.charCount(zzCh);
switch (zzCh) {
case '\u000B':
case '\u000C':
case '\u0085':
case '\u2028':
case '\u2029':
yyline++;
yycolumn = 0;
zzR = false;
break;
case '\r':
yyline++;
yycolumn = 0;
zzR = true;
break;
case '\n':
if (zzR)
zzR = false;
else {
yyline++;
yycolumn = 0;
}
break;
default:
zzR = false;
yycolumn += zzCharCount;
}
}
if (zzR) {
// peek one character ahead if it is \n (if we have counted one line too much)
boolean zzPeek;
if (zzMarkedPosL < zzEndReadL)
zzPeek = zzBufferL[zzMarkedPosL] == '\n';
else if (zzAtEOF)
zzPeek = false;
else {
boolean eof = zzRefill();
zzEndReadL = zzEndRead;
zzMarkedPosL = zzMarkedPos;
zzBufferL = zzBuffer;
if (eof)
zzPeek = false;
else
zzPeek = zzBufferL[zzMarkedPosL] == '\n';
}
if (zzPeek) yyline--;
}
zzAction = -1;
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
zzState = ZZ_LEXSTATE[zzLexicalState];
// set up zzAction for empty match case:
int zzAttributes = zzAttrL[zzState];
if ( (zzAttributes & 1) == 1 ) {
zzAction = zzState;
}
zzForAction: {
while (true) {
if (zzCurrentPosL < zzEndReadL) {
zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
zzCurrentPosL += Character.charCount(zzInput);
}
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 = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
zzCurrentPosL += Character.charCount(zzInput);
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
if (zzNext == -1) break zzForAction;
zzState = zzNext;
zzAttributes = zzAttrL[zzState];
if ( (zzAttributes & 1) == 1 ) {
zzAction = zzState;
zzMarkedPosL = zzCurrentPosL;
if ( (zzAttributes & 8) == 8 ) break zzForAction;
}
}
}
// store back cached position
zzMarkedPos = zzMarkedPosL;
if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
zzAtEOF = true;
return null;
}
else {
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 1:
{ /* ignore */
}
case 33: break;
case 2:
{ string.setLength(0); yybegin(STRINGDOUBLE);
}
case 34: break;
case 3:
{ string.setLength(0); yybegin(STRINGSINGLE);
}
case 35: break;
case 4:
{ string.append( yytext() );
}
case 36: break;
case 5:
{ throw new JsxParserException("Illegal character <"+
yytext()+"> found on line: " + (yyline+1) + " col: " + (yycolumn+1) );
}
case 37: break;
case 6:
{ if(attribute != null) { yybegin(JSXATTRIBUTES); attribute.setValue(string.toString()) ; addAttributeSymbol(attribute); } else {yybegin(YYINITIAL);}
}
case 38: break;
case 7:
{ string.append('\\');
}
case 39: break;
case 8:
{ yybegin(JSXATTRIBUTES);Symbol sym = jsxElement(yytext()); if(sym != null) {return sym;}
}
case 40: break;
case 9:
{ yybegin(JSXCHILDREN);
}
case 41: break;
case 10:
{ attribute = new JsxAttribute("JSXAttribute",null,yyline,yycolumn,yychar);attribute.setName(yytext());addAttributeSymbol(attribute);
}
case 42: break;
case 11:
{ yybegin(JSXOPENINGELEMENT); yypushback(yylength()) ; attribute = null;
}
case 43: break;
case 12:
{ attribute.setName(yytext());
}
case 44: break;
case 13:
{ yybegin(JSXATTRIBUTEVALUE);
}
case 45: break;
case 14:
{ yybegin(STRINGDOUBLE); string.setLength(0);
}
case 46: break;
case 15:
{ yybegin(STRINGSINGLE); string.setLength(0);
}
case 47: break;
case 16:
{ symbol("JSXText",yytext());
}
case 48: break;
case 17:
{ string.append(yytext()); curleyBraceCounter++;
}
case 49: break;
case 18:
{ if(curleyBraceCounter > 0) { string.append(yytext()); curleyBraceCounter--; } else if(attribute != null) {attribute.setValue(string.toString());addAttributeSymbol(attribute); yybegin(JSXATTRIBUTES);string.setLength(0);} else {yybegin(JSXCHILDREN); symbol("JSXAssignmentExpression",string.toString());string.setLength(0);}
}
case 50: break;
case 19:
{ string.append('\"');
}
case 51: break;
case 20:
{ string.append('\t');
}
case 52: break;
case 21:
{ string.append('\n');
}
case 53: break;
case 22:
{ string.append('\r');
}
case 54: break;
case 23:
{ string.append('\'');
}
case 55: break;
case 24:
{ closeJsxElement(); if(elementStack.size() == 0) { yybegin(YYINITIAL); } else { yybegin(JSXCHILDREN); }
}
case 56: break;
case 25:
{ yybegin(JSXSELFCLOSINGELEMENT); yypushback(yylength()); attribute = null;
}
case 57: break;
case 26:
{ yybegin(ASSIGNMENTEXPRESSION);string.setLength(0);yypushback(yylength() - 1);attribute.setAttributeType("assignmentExpression");
}
case 58: break;
case 27:
{ yybegin(ASSIGNMENTEXPRESSION);yypushback(yylength() - 1);string.setLength(0);
}
case 59: break;
case 28:
{ yybegin(JSXOPENINGELEMENT);yypushback(yylength()-1);
}
case 60: break;
case 29:
{ yybegin(JSXSELFCLOSINGELEMENT);yypushback(yylength()-1);
}
case 61: break;
case 30:
{ yybegin(JSXATTRIBUTE);yypushback(yylength()); attribute = new JsxAttribute("JSXAttribute",null,yyline,yycolumn,yychar);
}
case 62: break;
case 31:
{ closeJsxElement(); if(elementStack.size() == 0) { yybegin(YYINITIAL); } else { yybegin(JSXCHILDREN);}
}
case 63: break;
case 32:
{ string.setLength(0);attribute = new JsxAttribute("JSXAttribute",null,yyline,yycolumn,yychar);attribute.setAttributeType("spreadAttribute"); yypushback(yylength()-4); yybegin(ASSIGNMENTEXPRESSION);
}
case 64: break;
default:
zzScanError(ZZ_NO_MATCH);
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy