protected void parseZeroOrMoreWs() { if (!s.eol() && !s.eof()) { while (s.peekCharIs(' ')) { s.advance(1); } } }
public boolean peekCharIs(char c) { if (eol() || eof()) { return false; } return peekChar() == c; }
public boolean peekCharIs(char c) { if (eol() || eof()) { return false; } return peekChar() == c; }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
protected void parseZeroOrMoreWs() { if (!stream.eol() && !stream.eof()) { while (stream.peekCharIs(' ')) { stream.advance(1); } } }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
protected void forceParseNlOrEof() throws OBOFormatParserException { parseZeroOrMoreWs(); if (s.eol()) { s.advanceLine(); return; } if (s.eof()) { return; } error("expected newline or end of line but found: "+s.rest()); }
public boolean peekCharIs(char c) { if (eol() || eof()) { return false; } return peekChar() == c; }
protected void parseZeroOrMoreWs() { if (!stream.eol() && !stream.eof()) { while (stream.peekCharIs(' ')) { stream.advance(1); } } }
protected void parseZeroOrMoreWs() { if (!stream.eol() && !stream.eof()) { while (stream.peekCharIs(' ')) { stream.advance(1); } } }
protected void parseOneOrMoreWs() throws OBOFormatParserException { if (s.eol() || s.eof()) { error("Expected at least one white space at pos: "+s.pos); } int n = 0; while (s.peekCharIs(' ')) { s.advance(1); n++; } if ( n == 0) { error("Expected at least one white space at pos: "+s.pos); } }
protected void parseOneOrMoreWs() { if (stream.eol() || stream.eof()) { error("Expected at least one white space at pos: " + stream.pos); } int n = 0; while (stream.peekCharIs(' ')) { stream.advance(1); n++; } if (n == 0) { error("Expected at least one white space at pos: " + stream.pos); } }
protected void parseZeroOrMoreWs() { if (!stream.eol() && !stream.eof()) { while (stream.peekCharIs(' ')) { stream.advance(1); } } }
protected void forceParseNlOrEof() { parseZeroOrMoreWs(); if (stream.eol()) { stream.advanceLine(); return; } if (stream.eof()) { return; } error("expected newline or end of line but found: " + stream.rest()); }
protected void forceParseNlOrEof() { parseZeroOrMoreWs(); if (stream.eol()) { stream.advanceLine(); return; } if (stream.eof()) { return; } error("expected newline or end of line but found: " + stream.rest()); }
protected void forceParseNlOrEof() { parseZeroOrMoreWs(); if (stream.eol()) { stream.advanceLine(); return; } if (stream.eof()) { return; } error("expected newline or end of line but found: " + stream.rest()); }
protected void forceParseNlOrEof() { parseZeroOrMoreWs(); if (stream.eol()) { stream.advanceLine(); return; } if (stream.eof()) { return; } error("expected newline or end of line but found: " + stream.rest()); }
public boolean peekCharIs(char c) { if (eol() || eof()) { return false; } return peekChar() == c; }
public boolean peekCharIs(char c) { if (eol() || eof()) { return false; } return peekChar() == c; }