org.peaseplate.internal.lang
Class Tokenizer

java.lang.Object
  extended by org.peaseplate.internal.lang.Tokenizer

public class Tokenizer
extends java.lang.Object


Nested Class Summary
static class Tokenizer.Type
           
 
Constructor Summary
Tokenizer(TemplateLocator locator, int line, int column, char[] code, int offset, int length)
           
 
Method Summary
 int getTokenColumn()
           
 int getTokenLine()
           
 Tokenizer.Type getTokenType()
           
 java.lang.Object getTokenValue()
           
 Tokenizer.Type readKeyToken()
          Parses the next token as key identifier KeyIdentifier = (LETTER | DIGIT | "_" | "-" | "." | "/") {LETTER | DIGIT | "_" | "-" | "." | "/"}
 Tokenizer.Type readToken()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tokenizer

public Tokenizer(TemplateLocator locator,
                 int line,
                 int column,
                 char[] code,
                 int offset,
                 int length)
Method Detail

getTokenType

public Tokenizer.Type getTokenType()

getTokenValue

public java.lang.Object getTokenValue()

getTokenLine

public int getTokenLine()

getTokenColumn

public int getTokenColumn()

readToken

public Tokenizer.Type readToken()
                         throws TokenizerException
Throws:
TokenizerException

readKeyToken

public Tokenizer.Type readKeyToken()
                            throws TokenizerException
Parses the next token as key identifier KeyIdentifier = (LETTER | DIGIT | "_" | "-" | "." | "/") {LETTER | DIGIT | "_" | "-" | "." | "/"}

Returns:
the next token
Throws:
TokenizerException - on occasion

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008. All Rights Reserved.