Skip to content
Snippets Groups Projects
Commit ec962757 authored by Jens Bendisposto's avatar Jens Bendisposto
Browse files

Part of the fix for PROB-295

parent a7bfe4c9
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven'
project.version = '3.2.7-SNAPSHOT'
project.version = '3.2.8'
project.group = 'de.stups'
repositories {
......
......@@ -46,9 +46,14 @@ public class Lexer implements ITokenListContainer
private final StringBuffer text = new StringBuffer();
private List<IToken> tokenList;
private final Queue<IToken> nextList = new LinkedBlockingQueue<IToken>();
private IToken tok;
public Queue<IToken> getNextList() {
return nextList;
}
public List<IToken> getTokenList() {
return tokenList;
}
......@@ -74,6 +79,7 @@ public class Lexer implements ITokenListContainer
filter();
if (token != null) {
getTokenList().add(token);
nextList.add(token);
}
}
......@@ -92,7 +98,7 @@ public class Lexer implements ITokenListContainer
filterWrap();
}
return this.token;
return (Token) nextList.peek();
}
public Token next() throws LexerException, IOException
......@@ -103,7 +109,7 @@ public class Lexer implements ITokenListContainer
filterWrap();
}
Token result = this.token;
Token result = (Token) nextList.poll();
this.setToken(null);
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment