net.aethersanctum.curlyml
Class Scanner

java.lang.Object
  extended by net.aethersanctum.curlyml.Scanner

public class Scanner
extends java.lang.Object

scanner does nothing but pull tokens from the stream. Don't use this directly, use a Parser instead.

Author:
ben
See Also:
Parser

Nested Class Summary
static class Scanner.Token
          types of tokens we are interested in.
 
Constructor Summary
Scanner(java.io.InputStream is)
           
Scanner(java.io.Reader r)
           
 
Method Summary
 int getColumnNumber()
           
 Scanner.Token getCurrentToken()
          gets the current token
 int getLineNumber()
           
 java.lang.String getString()
          get body of last-gotten text token
 Scanner.Token getToken()
          collect the next new token, assigns it to the current one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scanner

public Scanner(java.io.Reader r)

Scanner

public Scanner(java.io.InputStream is)
Method Detail

getLineNumber

public int getLineNumber()

getColumnNumber

public int getColumnNumber()

getToken

public Scanner.Token getToken()
                       throws java.io.IOException,
                              SyntaxException
collect the next new token, assigns it to the current one

Returns:
Throws:
java.io.IOException
SyntaxException

getString

public java.lang.String getString()
get body of last-gotten text token

Returns:

getCurrentToken

public Scanner.Token getCurrentToken()
gets the current token

Returns: