/** * <copyright> * </copyright> * * */ package robot.resource.robot.mopp; public class RobotAntlrScanner implements robot.resource.robot.IRobotTextScanner { private org.antlr.runtime3_4_0.Lexer antlrLexer; public RobotAntlrScanner(org.antlr.runtime3_4_0.Lexer antlrLexer) { this.antlrLexer = antlrLexer; } public robot.resource.robot.IRobotTextToken getNextToken() { if (antlrLexer.getCharStream() == null) { return null; } final org.antlr.runtime3_4_0.Token current = antlrLexer.nextToken(); if (current == null || current.getType() < 0) { return null; } robot.resource.robot.IRobotTextToken result = new robot.resource.robot.mopp.RobotANTLRTextToken(current); return result; } public void setText(String text) { antlrLexer.setCharStream(new org.antlr.runtime3_4_0.ANTLRStringStream(text)); } }