boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { addToken(Token.LITERAL_BOOLEAN); { addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); return firstToken; { addToken(Token.ERROR_CHAR); { addToken(Token.ERROR_NUMBER_FORMAT); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken; { addToken(Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(Token.ANNOTATION); { addToken(Token.FUNCTION); { addToken(Token.ERROR_STRING_DOUBLE); addNullToken(); return firstToken; { addToken(Token.ERROR_IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addHyperlinkToken(temp,zzMarkedPos-1, Token.COMMENT_DOCUMENTATION); start = zzMarkedPos; { addToken(Token.LITERAL_CHAR); { addToken(Token.LITERAL_NUMBER_HEXADECIMAL);
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. * @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); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. * @see #addHyperlinkToken(int, int, int) */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, false); }
boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { addToken(Token.LITERAL_BOOLEAN); { addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); return firstToken; { addToken(Token.ERROR_CHAR); { addToken(Token.ERROR_NUMBER_FORMAT); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken; { addToken(Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(Token.FUNCTION); { addToken(Token.ERROR_STRING_DOUBLE); addNullToken(); return firstToken; { addToken(Token.ERROR_IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addToken(temp,zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addToken(temp,zzMarkedPos-1, Token.PREPROCESSOR); start = zzMarkedPos; { addToken(Token.VARIABLE); /* FIXME: Add token type to Token? */ { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addHyperlinkToken(temp,zzMarkedPos-1, Token.COMMENT_DOCUMENTATION); start = zzMarkedPos;
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); { addToken(Token.LITERAL_BOOLEAN); { addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); return firstToken; { addToken(Token.ERROR_CHAR); { addToken(Token.ERROR_NUMBER_FORMAT); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken; { addToken(Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(Token.ANNOTATION); { addToken(Token.FUNCTION); { addToken(Token.ERROR_STRING_DOUBLE); addNullToken(); return firstToken; { addToken(Token.ERROR_IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addHyperlinkToken(temp,zzMarkedPos-1, Token.COMMENT_DOCUMENTATION); start = zzMarkedPos; { addToken(Token.LITERAL_CHAR); { addToken(Token.LITERAL_NUMBER_HEXADECIMAL);
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 #addHyperlinkToken(int, int, int) */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, false); }
boolean eof = zzRefill(); { addToken(Token.IDENTIFIER); { addToken(Token.LITERAL_BOOLEAN); { addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); return firstToken; { addToken(Token.ERROR_CHAR); { addToken(Token.ERROR_NUMBER_FORMAT); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken; { addToken(Token.LITERAL_STRING_DOUBLE_QUOTE); { addToken(Token.FUNCTION); { addToken(Token.ERROR_STRING_DOUBLE); addNullToken(); return firstToken; { addToken(Token.ERROR_IDENTIFIER); { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addToken(temp,zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addToken(temp,zzMarkedPos-1, Token.PREPROCESSOR); start = zzMarkedPos; { addToken(Token.VARIABLE); /* FIXME: Add token type to Token? */ { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); addHyperlinkToken(temp,zzMarkedPos-1, Token.COMMENT_DOCUMENTATION); start = zzMarkedPos;
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); }
/** * 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); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. * @see #addHyperlinkToken(int, int, int) */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, false); }
/** * 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); }