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