boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.LITERAL_BACKQUOTE); addToken(temp,zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; { if (start==zzStartRead) { addToken(Token.COMMENT_DOCUMENTATION); yybegin(YYINITIAL); } { addToken(Token.ERROR_NUMBER_FORMAT); { start = zzMarkedPos-1; yybegin(STRING); { if (start==zzStartRead) { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; } { addToken(Token.FUNCTION); { boolean highlightedAsRegex = false; if (firstToken==null) { addToken(Token.REGEX); highlightedAsRegex = true; if (regexCanFollow(t)) { addToken(Token.REGEX); highlightedAsRegex = true; addToken(zzStartRead, zzStartRead, Token.OPERATOR); zzStartRead = zzCurrentPos = zzMarkedPos = temp; { addToken(Token.VARIABLE);
public Token getTokenList(Segment text, int initialTokenType, int startOffset) { 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 tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); }
/** * 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); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.LITERAL_BACKQUOTE); addToken(temp,zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; { if (start==zzStartRead) { addToken(Token.COMMENT_DOCUMENTATION); yybegin(YYINITIAL); } { addToken(Token.ERROR_NUMBER_FORMAT); { start = zzMarkedPos-1; yybegin(STRING); { if (start==zzStartRead) { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; } { addToken(Token.FUNCTION); { addToken(Token.VARIABLE); { addToken(Token.ERROR_IDENTIFIER); { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOT_SINGLE_QUOTED); return firstToken; { addToken(Token.COMMENT_EOL); addNullToken(); return firstToken; { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; { if (start==zzStartRead) { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addToken(temp,zzMarkedPos-1, Token.COMMENT_EOL); start = zzMarkedPos; } { start = zzStartRead; yybegin(HEREDOC_EOF_SINGLE_QUOTED);
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); }
boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.LITERAL_BACKQUOTE); addToken(temp,zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; { if (start==zzStartRead) { addToken(Token.COMMENT_DOCUMENTATION); yybegin(YYINITIAL); } { addToken(Token.ERROR_NUMBER_FORMAT); { start = zzMarkedPos-1; yybegin(STRING); { if (start==zzStartRead) { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; } { addToken(Token.FUNCTION); { boolean highlightedAsRegex = false; if (firstToken==null) { addToken(Token.REGEX); highlightedAsRegex = true; if (regexCanFollow(t)) { addToken(Token.REGEX); highlightedAsRegex = true; addToken(zzStartRead, zzStartRead, Token.OPERATOR); zzStartRead = zzCurrentPos = zzMarkedPos = temp; { addToken(Token.VARIABLE);
public Token getTokenList(Segment text, int initialTokenType, int startOffset) { 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 tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); }
boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.LITERAL_BACKQUOTE); addToken(temp,zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; { if (start==zzStartRead) { addToken(Token.COMMENT_DOCUMENTATION); yybegin(YYINITIAL); } { addToken(Token.ERROR_NUMBER_FORMAT); { start = zzMarkedPos-1; yybegin(STRING); { if (start==zzStartRead) { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; } { addToken(Token.FUNCTION); { addToken(Token.VARIABLE); { addToken(Token.ERROR_IDENTIFIER); { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOT_SINGLE_QUOTED); return firstToken; { addToken(Token.COMMENT_EOL); addNullToken(); return firstToken; { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; { if (start==zzStartRead) { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addToken(temp,zzMarkedPos-1, Token.COMMENT_EOL); start = zzMarkedPos; } { start = zzStartRead; yybegin(HEREDOC_EOF_SINGLE_QUOTED);
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); }
/** * 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 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); }