boolean eof = zzRefill(); { addToken(Token.OPERATOR); yybegin(CSS_VALUE); { addToken(Token.ERROR_NUMBER_FORMAT); { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); addEndToken(INTERNAL_CSS_CHAR - cssPrevState); return firstToken; { start = zzMarkedPos-1; yybegin(INATTR_SINGLE_SCRIPT); { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.MARKUP_DTD); { addToken(Token.SEPARATOR); yybegin(CSS_PROPERTY); { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(INTAG); { addToken(Token.RESERVED_WORD_2); { addToken(start,zzStartRead+1, Token.COMMENT_MULTILINE); yybegin(cssPrevState); { start = zzMarkedPos-2; cssPrevState = zzLexicalState; yybegin(CSS_C_STYLE_COMMENT); addToken(start,zzStartRead, Token.LITERAL_CHAR); addEndToken(INTERNAL_IN_JS_CHAR_VALID); addToken(start,zzStartRead, Token.ERROR_CHAR); addEndToken(INTERNAL_IN_JS_CHAR_INVALID); { addToken(Token.WHITESPACE);
public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; setLanguageIndex(languageIndex); start = text.offset; s = text; try { yyreset(zzReader); yybegin(state); return yylex(); } catch (IOException ioe) { ioe.printStackTrace();
/** * 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; }
boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { yybegin(INTAG_SCRIPT); addToken(start,zzStartRead, Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(Token.LITERAL_BOOLEAN); { addToken(Token.SEPARATOR); yybegin(INTAG); { addToken(Token.ERROR_CHAR); { addToken(Token.ERROR_NUMBER_FORMAT); { yybegin(JAVASCRIPT); addToken(Token.SEPARATOR); { start = zzMarkedPos-1; yybegin(INATTR_SINGLE_SCRIPT); { addToken(start,zzStartRead-1, Token.VARIABLE); return firstToken; { addToken(Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); addEndToken(INTERNAL_IN_JS_MLC); return firstToken; { addToken(Token.FUNCTION); { addEndToken(INTERNAL_IN_JS); return firstToken; { start = zzMarkedPos-2; yybegin(DTD);
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); }
/** * 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; }
/** * Adds the token specified to the current linked list of tokens as an * "end token;" that is, at <code>zzMarkedPos</code>. * * @param tokenType The token's type. */ private void addEndToken(int tokenType) { addToken(zzMarkedPos,zzMarkedPos, tokenType); }
boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { yybegin(INTAG_SCRIPT); addToken(start,zzStartRead, Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(Token.LITERAL_BOOLEAN); { addToken(Token.ERROR_CHAR); { addToken(Token.ERROR_NUMBER_FORMAT); { start = zzMarkedPos-1; yybegin(INATTR_SINGLE_SCRIPT); { int count = yylength(); addToken(zzStartRead,zzStartRead, Token.MARKUP_TAG_DELIMITER); zzMarkedPos -= (count-1); //yypushback(count-1); yybegin(INTAG_CHECK_TAG_NAME); { yybegin(YYINITIAL); addToken(Token.MARKUP_TAG_DELIMITER); { addToken(start,zzStartRead-1, Token.VARIABLE); return firstToken; { addToken(Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); addEndToken(INTERNAL_IN_JS_MLC); return firstToken; { addToken(Token.FUNCTION);
resetTokenList(); this.offsetShift = -text.offset + startOffset; yyreset(zzReader); yybegin(state); return yylex(); } catch (IOException ioe) { ioe.printStackTrace();
/** * 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; }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. * @see #addToken(int, int, int) */ private void addHyperlinkToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, true); }
boolean eof = zzRefill(); { addToken(Token.OPERATOR); yybegin(CSS_VALUE); { addToken(Token.ERROR_NUMBER_FORMAT); { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); addEndToken(INTERNAL_CSS_CHAR - cssPrevState); return firstToken; { start = zzMarkedPos-1; yybegin(INATTR_SINGLE_SCRIPT); { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.MARKUP_DTD); { addToken(Token.SEPARATOR); yybegin(CSS_PROPERTY); { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(INTAG); { addToken(Token.RESERVED_WORD_2); { addToken(start,zzStartRead+1, Token.COMMENT_MULTILINE); yybegin(cssPrevState); { start = zzMarkedPos-2; cssPrevState = zzLexicalState; yybegin(CSS_C_STYLE_COMMENT); addToken(start,zzStartRead, Token.LITERAL_CHAR); addEndToken(INTERNAL_IN_JS_CHAR_VALID); addToken(start,zzStartRead, Token.ERROR_CHAR); addEndToken(INTERNAL_IN_JS_CHAR_INVALID); { addToken(Token.WHITESPACE);
resetTokenList(); this.offsetShift = -text.offset + startOffset; yyreset(zzReader); yybegin(state); return yylex(); } catch (IOException ioe) { ioe.printStackTrace();
/** * 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; }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so); }
public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; setLanguageIndex(languageIndex); start = text.offset; s = text; try { yyreset(zzReader); yybegin(state); return yylex(); } catch (IOException ioe) { ioe.printStackTrace();
/** * Adds the token specified to the current linked list of tokens as an * "end token;" that is, at <code>zzMarkedPos</code>. * * @param tokenType The token's type. */ private void addEndToken(int tokenType) { addToken(zzMarkedPos,zzMarkedPos, tokenType); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so); }