gnu.kawa.lispexpr
Class ReadTable

java.lang.Object
  extended by gnu.kawa.util.RangeTable
      extended by gnu.kawa.lispexpr.ReadTable
All Implemented Interfaces:
java.lang.Cloneable

public class ReadTable
extends RangeTable


Field Summary
static int CONSTITUENT
           
static int defaultBracketMode
          Default value to pass to setBracketMode() unless overridden.
protected  boolean finalColonIsKeyword
          True if "IDENTIFIER:" should be treated as a keyword.
protected  boolean hexEscapeAfterBackslash
          Control whether we should handle R6RS inline hex escape.
static int ILLEGAL
          Kinds of characters.
protected  boolean initialColonIsKeyword
          True if ":IDENTIFIER" should be treated as a keyword.
static int MULTIPLE_ESCAPE
           
static int NON_TERMINATING_MACRO
           
 char postfixLookupOperator
          A character such that PreOpWord -> ($lookup$ Pre 'Word), if > 0.
static int SINGLE_ESCAPE
           
static int TERMINATING_MACRO
           
static int WHITESPACE
           
 
Constructor Summary
ReadTable()
           
 
Method Summary
static ReadTable createInitial()
          Create a new ReadTable and initialize it appropriately for Common Lisp.
static ReadTable getCurrent()
           
 java.lang.Object getReaderCtor(java.lang.String key)
          Resolve a SRFI-10 constructor tags to a functions.
 void initialize()
           
 ReadTableEntry lookup(int ch)
           
protected  java.lang.Object makeSymbol(java.lang.String name)
           
 void putReaderCtor(java.lang.String key, Procedure proc)
          Add a mapping for a SRFI-10 constructor tag.
 void putReaderCtor(java.lang.String key, Type type)
          Add a mapping for a SRFI-10 constructor tag.
 void putReaderCtorFld(java.lang.String key, java.lang.String cname, java.lang.String fname)
          Map a SRFI-10 constructor tag to Procedure-valued lazy field
 void setBracketMode()
          Specify how '[' and ']' are handled.
 void setBracketMode(int mode)
          Specify how '[' and ']' (and '<') are handled.
static void setCurrent(ReadTable rt)
           
 void setFinalColonIsKeyword(boolean whenFinal)
          Set whether "IDENTIFIER:" should be treated as a keyword.
 void setInitialColonIsKeyword(boolean whenInitial)
          Set whether ":IDENTIFIER" should be treated as a keyword.
 
Methods inherited from class gnu.kawa.util.RangeTable
clone, copy, lookup, remove, remove, set, set
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ILLEGAL

public static final int ILLEGAL
Kinds of characters.

See Also:
Constant Field Values

WHITESPACE

public static final int WHITESPACE
See Also:
Constant Field Values

CONSTITUENT

public static final int CONSTITUENT
See Also:
Constant Field Values

SINGLE_ESCAPE

public static final int SINGLE_ESCAPE
See Also:
Constant Field Values

MULTIPLE_ESCAPE

public static final int MULTIPLE_ESCAPE
See Also:
Constant Field Values

TERMINATING_MACRO

public static final int TERMINATING_MACRO
See Also:
Constant Field Values

NON_TERMINATING_MACRO

public static final int NON_TERMINATING_MACRO
See Also:
Constant Field Values

defaultBracketMode

public static int defaultBracketMode
Default value to pass to setBracketMode() unless overridden.


postfixLookupOperator

public char postfixLookupOperator
A character such that PreOpWord -> ($lookup$ Pre 'Word), if > 0.


initialColonIsKeyword

protected boolean initialColonIsKeyword
True if ":IDENTIFIER" should be treated as a keyword.


finalColonIsKeyword

protected boolean finalColonIsKeyword
True if "IDENTIFIER:" should be treated as a keyword.


hexEscapeAfterBackslash

protected boolean hexEscapeAfterBackslash
Control whether we should handle R6RS inline hex escape. I.e. "\x"";".

Constructor Detail

ReadTable

public ReadTable()
Method Detail

setInitialColonIsKeyword

public void setInitialColonIsKeyword(boolean whenInitial)
Set whether ":IDENTIFIER" should be treated as a keyword.


setFinalColonIsKeyword

public void setFinalColonIsKeyword(boolean whenFinal)
Set whether "IDENTIFIER:" should be treated as a keyword.


initialize

public void initialize()

createInitial

public static ReadTable createInitial()
Create a new ReadTable and initialize it appropriately for Common Lisp.


setBracketMode

public void setBracketMode(int mode)
Specify how '[' and ']' (and '<') are handled. The value -1 means that '[' and ']' are plain token constituents. The value 0 means that '[' and ']' are equivalent to '(' and ')'. The value 1 means that '[' and ']' are equivalent to '(' and ')', except within a token starting with '<', in which case they are constituents. This is so '[' is non-terminating when reading say ''


setBracketMode

public void setBracketMode()
Specify how '[' and ']' are handled. Overless overridden, uses defaultBracketMode.


putReaderCtor

public void putReaderCtor(java.lang.String key,
                          Procedure proc)
Add a mapping for a SRFI-10 constructor tag.


putReaderCtor

public void putReaderCtor(java.lang.String key,
                          Type type)
Add a mapping for a SRFI-10 constructor tag.


putReaderCtorFld

public void putReaderCtorFld(java.lang.String key,
                             java.lang.String cname,
                             java.lang.String fname)
Map a SRFI-10 constructor tag to Procedure-valued lazy field


getReaderCtor

public java.lang.Object getReaderCtor(java.lang.String key)
Resolve a SRFI-10 constructor tags to a functions.


getCurrent

public static ReadTable getCurrent()

setCurrent

public static void setCurrent(ReadTable rt)

lookup

public ReadTableEntry lookup(int ch)

makeSymbol

protected java.lang.Object makeSymbol(java.lang.String name)