net.sourceforge.templat.lexer
Class TemplateLexer

java.lang.Object
  extended by net.sourceforge.templat.lexer.TemplateLexer

public class TemplateLexer
extends Object

Lexer to analyze a given template and fully tokenize its contents. Pass the template to be lexed, as a CharSequence, into the constructor. Then call lex to perform the lexing.

Author:
Chris Mosher

Constructor Summary
TemplateLexer(CharSequence template)
          Initializes the lexer to read from the given template.
 
Method Summary
 void lex(List<TemplateToken> rToken)
          Lexigraphically analyzes this lexer's template into tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateLexer

public TemplateLexer(CharSequence template)
Initializes the lexer to read from the given template.

Parameters:
template - the contents of the template
Method Detail

lex

public void lex(List<TemplateToken> rToken)
         throws TemplateLexingException
Lexigraphically analyzes this lexer's template into tokens. The resulting tokens are appended to the given List.

Parameters:
rToken - List to append the tokens to
Throws:
TemplateLexingException