Package org.eclipse.xtext.parser.antlr
Class TokenAcceptor
- java.lang.Object
-
- org.eclipse.xtext.parser.antlr.TokenAcceptor
-
- All Implemented Interfaces:
java.util.Iterator<org.antlr.runtime.Token>
,ITokenAcceptor
public class TokenAcceptor extends java.lang.Object implements ITokenAcceptor, java.util.Iterator<org.antlr.runtime.Token>
Simple implementation of an ITokenAcceptor based on the assumption that the calls to accept and next will be alternating with only a few exceptions.
-
-
Constructor Summary
Constructors Constructor Description TokenAcceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(org.antlr.runtime.Token token)
boolean
hasNext()
org.antlr.runtime.Token
next()
void
remove()
-
-
-
Method Detail
-
accept
public void accept(org.antlr.runtime.Token token)
- Specified by:
accept
in interfaceITokenAcceptor
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<org.antlr.runtime.Token>
-
next
public org.antlr.runtime.Token next()
- Specified by:
next
in interfacejava.util.Iterator<org.antlr.runtime.Token>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<org.antlr.runtime.Token>
-
-