org.quasiliteral.syntax
Class ReplayLexer

java.lang.Object
  |
  +--org.quasiliteral.syntax.ReplayLexer
All Implemented Interfaces:
LexerFace, Marker, PassByProxy

public class ReplayLexer
extends Object
implements LexerFace

Untamed: The large number of bogus messages in this class is a symptom of a need to refactor.

Author:
Mark S. Miller

Field Summary
private  AstroBuilder myBuilder
           
private  int myNextToken
           
private  Astro[] myTokens
           
 
Fields inherited from interface org.quasiliteral.syntax.LexerFace
EOFCHAR, EOFTOK
 
Fields inherited from interface org.erights.e.elib.serial.PassByProxy
HONORARY, HONORED_NAMES
 
Constructor Summary
ReplayLexer(Astro[] tokens, AstroBuilder builder)
          Enabled:
 
Method Summary
 Astro composite(short tagCode, Object data, SourceSpan optSpan)
          Enabled:
 boolean isEndOfFile()
          Enabled:
 void needMore(String msg)
          Enabled:
 Astro nextToken()
          Enabled:
 Astro[] nextTopLevelUnit()
          Enabled:
 void reset()
          Enabled:
 void setSource(Twine newSource)
          Enabled:
 void syntaxError(String msg)
          Enabled: XXX This really sucks compared to BaseLexer#syntaxError) for printing to a human, but at least it does report where the error is adequately for programmatic use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myTokens

private final Astro[] myTokens

myNextToken

private int myNextToken

myBuilder

private final AstroBuilder myBuilder
Constructor Detail

ReplayLexer

public ReplayLexer(Astro[] tokens,
                   AstroBuilder builder)
Enabled:

Method Detail

setSource

public void setSource(Twine newSource)
Enabled:

Specified by:
setSource in interface LexerFace

reset

public void reset()
Enabled:

Specified by:
reset in interface LexerFace

composite

public Astro composite(short tagCode,
                       Object data,
                       SourceSpan optSpan)
Enabled:

Specified by:
composite in interface LexerFace

nextTopLevelUnit

public Astro[] nextTopLevelUnit()
                         throws IOException,
                                SyntaxException
Enabled:

Specified by:
nextTopLevelUnit in interface LexerFace
IOException
SyntaxException

nextToken

public Astro nextToken()
                throws IOException,
                       SyntaxException
Enabled:

Specified by:
nextToken in interface LexerFace
IOException
SyntaxException

syntaxError

public void syntaxError(String msg)
                 throws SyntaxException
Enabled: XXX This really sucks compared to BaseLexer#syntaxError) for printing to a human, but at least it does report where the error is adequately for programmatic use.

Specified by:
syntaxError in interface LexerFace
SyntaxException

needMore

public void needMore(String msg)
              throws NeedMoreException,
                     SyntaxException
Enabled:

Specified by:
needMore in interface LexerFace
NeedMoreException
SyntaxException

isEndOfFile

public boolean isEndOfFile()
Enabled:

Specified by:
isEndOfFile in interface LexerFace


comments?