se.chalmers.cs.gf.parse.lex
Class IgnoreLexer

java.lang.Object
  extended by se.chalmers.cs.gf.parse.lex.IgnoreLexer
All Implemented Interfaces:
Lexer

public class IgnoreLexer
extends java.lang.Object
implements Lexer

A lexer which takes the output from another lexer and removes all WORD tokens not in a given set. String and integer literal tokens are retained.


Constructor Summary
IgnoreLexer(Lexer lexer, java.util.Set<java.lang.String> keepWords)
           
 
Method Summary
 java.util.List<Token> lex(java.lang.CharSequence input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreLexer

public IgnoreLexer(Lexer lexer,
                   java.util.Set<java.lang.String> keepWords)
Method Detail

lex

public java.util.List<Token> lex(java.lang.CharSequence input)
Specified by:
lex in interface Lexer