private int nextChar() { previousLength = currentLength; int c = input.read(); currentLength = 1; return c; }
@Override public Token<CPTokenId> nextToken() { //just read whole input while(input.read() != LexerInput.EOF) {}; //and create one big token return input.readLength() > 0 ? tokenFactory.createToken(CPTokenId.CSS) : null; }
private CharSequence getPossibleTagName() { int actChar; int prev_read = input.readLength(); //remember the size of the read sequence int read = 0; while(true) { actChar = input.read(); read++; if(!(Character.isLetter(actChar) || Character.isDigit(actChar) || (actChar == '_') || (actChar == '-') || (actChar == ':') || (actChar == '.') || (actChar == '/')) || (actChar == EOF)) { // EOL or not alpha //end of tagname CharSequence tagName = input.readText().subSequence(prev_read, prev_read + read - 1); input.backup(read); //put the lookahead text back to the buffer return tagName; } } }
int ch = input.read();
public void consume() { int c = input.read(); index++; charPositionInLine++; if (c == '\n') { line++; charPositionInLine = 0; } }
private int read() { int result = input.read(); if (result == LexerInput.EOF) { result = CharStream.EOF; } return result; }
public Token<DoxygenTokenId> nextToken() { int ch = input.read(); while (CndLexerUtilities.isCppIdentifierPart(input.read())) {} ch = input.read(); ch = input.read(); ch = input.read(); boolean wasFirst = first; first = false; ch = input.read(); if (ch == '>' || ch == EOF) { return token(DoxygenTokenId.HTML_TAG);
@Override public int read() throws IOException { int c = input.read(); if (c == LexerInput.EOF) { // Private //return RubyYaccLexer.EOF; return -1; } return c; } }
@Override public int read(char[] buf, int off, int len) throws IOException { for (int i = 0; i < len; i++) { int c = input.read(); if (c == LexerInput.EOF) { return -1; } buf[i + off] = (char) c; } return len; }
public char read () { index++; return (char) input.read (); }
public int read(char[] buf, int off, int len) throws IOException { for (int i = 0; i < len; i++) { int c = input.read(); if (c == LexerInput.EOF) { return -1; } buf[i + off] = (char)c; } return len; }
/** * This function reads new symbol */ protected final int read() { int c = input.read(); if (c == '\t') { if (lineColomn < 5) { lineColomn = 5; } } lineColomn++; return c; }
public char next () { char ch = (char) input.read (); input.backup (1); return ch; }
@SuppressWarnings("fallthrough") protected final int read() { boolean skipEscapedLF = true; int c = input.read(); if (skipEscapedLF) { // skip escaped LF int next; while (c == '\\') { switch (input.read()) { case '\r': input.consumeNewline(); // nobreak case '\n': escapedLF = true; next = input.read(); break; default: input.backup(1); assert c == '\\' : "must be backslash " + (char)c; return c; // normal backslash, not escaped LF } c = next; } } return c; }
@SuppressWarnings("fallthrough") protected final int read(boolean skipEscapedLF) { int c = input.read(); escapedEatenChars = 0; if (skipEscapedLF) { // skip escaped LF while (c == '\\') { escapedEatenChars++; switch (input.read()) { case '\r': if (consumeNewline()) { next = input.read(); break; default:
private boolean followsScriptletExpressionDelimiter(int actChar) { if(actChar == '<') { int next = input.read(); if(next == '%') { next = input.read(); if(next == '=') { //yes, it follows return true; } else { input.backup(2); //backup %+next } } else { input.backup(1); //backup next } } return false; }
int c = lexerInput.read();
int c = lexerInput.read(); if (c == LexerInput.EOF) { hitEOF = true;