boolean eof = zzRefill(); { addToken(Token.PREPROCESSOR); { if (varDepths==null) { varDepths = new Stack<Boolean>(); } else { varDepths.clear(); } varDepths.push(Boolean.FALSE); start = zzMarkedPos-2; yybegin(VAR); { addNullToken(); return firstToken; { addToken(Token.LITERAL_CHAR); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); { addToken(Token.WHITESPACE); { addToken(Token.RESERVED_WORD); { addToken(Token.LITERAL_BACKQUOTE); { addToken(Token.IDENTIFIER); { if (varDepths==null) { varDepths = new Stack<Boolean>(); } else { varDepths.clear(); } varDepths.push(Boolean.TRUE); start = zzMarkedPos-2; yybegin(VAR); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken;
/** * Returns the first token in the linked list of tokens generated * from <code>text</code>. This method must be implemented by * subclasses so they can correctly implement syntax highlighting. * * @param text The text from which to get tokens. * @param initialTokenType The token type we should start with. * @param startOffset The offset into the document at which * <code>text</code> starts. * @return The first <code>Token</code> in a linked list representing * the syntax highlighted text. */ @Override public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; s = text; try { yyreset(zzReader); yybegin(Token.NULL); return yylex(); } catch (IOException ioe) { ioe.printStackTrace(); return new TokenImpl(); } }
/** * 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); }
private static int [] zzUnpackAction() { int [] result = new int[129]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
/** * 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); }
private static int [] zzUnpackAction() { int [] result = new int[129]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
boolean eof = zzRefill(); { addToken(Token.PREPROCESSOR); { addNullToken(); return firstToken; { addToken(Token.LITERAL_CHAR); { if (varDepths==null) { varDepths = new Stack(); } else { varDepths.clear(); } varDepths.push(Boolean.FALSE); start = zzMarkedPos-2; yybegin(VAR); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); { addToken(Token.WHITESPACE); { addToken(Token.RESERVED_WORD); { addToken(Token.LITERAL_BACKQUOTE); { addToken(Token.IDENTIFIER); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken; { addToken(Token.ERROR_STRING_DOUBLE); addNullToken(); return firstToken;
/** * Returns the first token in the linked list of tokens generated * from <code>text</code>. This method must be implemented by * subclasses so they can correctly implement syntax highlighting. * * @param text The text from which to get tokens. * @param initialTokenType The token type we should start with. * @param startOffset The offset into the document at which * <code>text</code> starts. * @return The first <code>Token</code> in a linked list representing * the syntax highlighted text. */ public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; s = text; try { yyreset(zzReader); yybegin(Token.NULL); return yylex(); } catch (IOException ioe) { ioe.printStackTrace(); return new DefaultToken(); } }
/** * 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); }
private static int [] zzUnpackAction() { int [] result = new int[129]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
boolean eof = zzRefill(); { addToken(Token.PREPROCESSOR); { addNullToken(); return firstToken; { addToken(Token.LITERAL_CHAR); { if (varDepths==null) { varDepths = new Stack(); } else { varDepths.clear(); } varDepths.push(Boolean.FALSE); start = zzMarkedPos-2; yybegin(VAR); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); { addToken(Token.WHITESPACE); { addToken(Token.RESERVED_WORD); { addToken(Token.LITERAL_BACKQUOTE); { addToken(Token.IDENTIFIER); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken; { addToken(Token.ERROR_STRING_DOUBLE); addNullToken(); return firstToken;
/** * Returns the first token in the linked list of tokens generated * from <code>text</code>. This method must be implemented by * subclasses so they can correctly implement syntax highlighting. * * @param text The text from which to get tokens. * @param initialTokenType The token type we should start with. * @param startOffset The offset into the document at which * <code>text</code> starts. * @return The first <code>Token</code> in a linked list representing * the syntax highlighted text. */ public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; s = text; try { yyreset(zzReader); yybegin(Token.NULL); return yylex(); } catch (IOException ioe) { ioe.printStackTrace(); return new DefaultToken(); } }
/** * 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); }
private static int [] zzUnpackAction() { int [] result = new int[129]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
boolean eof = zzRefill(); { addToken(Token.PREPROCESSOR); { if (varDepths==null) { varDepths = new Stack<Boolean>(); } else { varDepths.clear(); } varDepths.push(Boolean.FALSE); start = zzMarkedPos-2; yybegin(VAR); { addNullToken(); return firstToken; { addToken(Token.LITERAL_CHAR); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); varDepths.pop(); if (varDepths.empty()) { addToken(start,zzStartRead, Token.VARIABLE); yybegin(YYINITIAL); { addToken(Token.WHITESPACE); { addToken(Token.RESERVED_WORD); { addToken(Token.LITERAL_BACKQUOTE); { addToken(Token.IDENTIFIER); { if (varDepths==null) { varDepths = new Stack<Boolean>(); } else { varDepths.clear(); } varDepths.push(Boolean.TRUE); start = zzMarkedPos-2; yybegin(VAR); { addToken(Token.ERROR_CHAR); addNullToken(); return firstToken;
/** * Returns the first token in the linked list of tokens generated * from <code>text</code>. This method must be implemented by * subclasses so they can correctly implement syntax highlighting. * * @param text The text from which to get tokens. * @param initialTokenType The token type we should start with. * @param startOffset The offset into the document at which * <code>text</code> starts. * @return The first <code>Token</code> in a linked list representing * the syntax highlighted text. */ @Override public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; s = text; try { yyreset(zzReader); yybegin(Token.NULL); return yylex(); } catch (IOException ioe) { ioe.printStackTrace(); return new TokenImpl(); } }
/** * 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; }