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 voidaccept(org.antlr.runtime.Token token)booleanhasNext()org.antlr.runtime.Tokennext()voidremove()
-
-
-
Method Detail
-
accept
public void accept(org.antlr.runtime.Token token)
- Specified by:
acceptin interfaceITokenAcceptor
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<org.antlr.runtime.Token>
-
next
public org.antlr.runtime.Token next()
- Specified by:
nextin interfacejava.util.Iterator<org.antlr.runtime.Token>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<org.antlr.runtime.Token>
-
-