Package gnu.kawa.lispexpr
Class ReadTable
java.lang.Object
gnu.kawa.util.RangeTable
gnu.kawa.lispexpr.ReadTable
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static int
Default value to pass to setBracketMode() unless overridden.int
protected boolean
True if "IDENTIFIER:" should be treated as a keyword.protected boolean
Control whether we should handle R6RS inline hex escape.static final int
Kinds of characters.protected boolean
True if ":IDENTIFIER" should be treated as a keyword.static final int
static final int
char
A characterX
such thatPreXWord -> ($lookup$ Pre 'Word)
, ifX > 0
.static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadTable
Create a new ReadTable and initialize it appropriately for Common Lisp.static ReadTable
getReaderCtor
(String key) Resolve a SRFI-10 constructor tags to a functions.void
initialize
(boolean sharpIsTerminating) lookup
(int ch) protected Object
makeSymbol
(String name) void
putReaderCtor
(String key, Type type) Add a mapping for a SRFI-10 constructor tag.void
putReaderCtor
(String key, Procedure proc) Add a mapping for a SRFI-10 constructor tag.void
putReaderCtorFld
(String key, String cname, String fname) Map a SRFI-10 constructor tag to Procedure-valued lazy fieldvoid
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.
-
Field Details
-
ILLEGAL
public static final int ILLEGALKinds of characters.- See Also:
-
WHITESPACE
public static final int WHITESPACE- See Also:
-
CONSTITUENT
public static final int CONSTITUENT- See Also:
-
SINGLE_ESCAPE
public static final int SINGLE_ESCAPE- See Also:
-
MULTIPLE_ESCAPE
public static final int MULTIPLE_ESCAPE- See Also:
-
TERMINATING_MACRO
public static final int TERMINATING_MACRO- See Also:
-
NON_TERMINATING_MACRO
public static final int NON_TERMINATING_MACRO- See Also:
-
defaultBracketMode
public static int defaultBracketModeDefault value to pass to setBracketMode() unless overridden. -
postfixLookupOperator
public char postfixLookupOperatorA characterX
such thatPreXWord -> ($lookup$ Pre 'Word)
, ifX > 0
. -
initialColonIsKeyword
protected boolean initialColonIsKeywordTrue if ":IDENTIFIER" should be treated as a keyword. -
finalColonIsKeyword
protected boolean finalColonIsKeywordTrue if "IDENTIFIER:" should be treated as a keyword. -
extraFlags
public int extraFlags -
hexEscapeAfterBackslash
protected boolean hexEscapeAfterBackslashControl whether we should handle R6RS inline hex escape. I.e."\x"<hexdigits>";"
.
-
-
Constructor Details
-
ReadTable
public ReadTable()
-
-
Method Details
-
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(boolean sharpIsTerminating) -
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 -2 means[a b c]
is($bracket-list$ a b c)
andf[a b]
is($bracket-apply$ f a b)
. 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'<char[]>'
-
setBracketMode
public void setBracketMode()Specify how '[' and ']' are handled. Unless overridden, uses defaultBracketMode. -
putReaderCtor
Add a mapping for a SRFI-10 constructor tag. -
putReaderCtor
Add a mapping for a SRFI-10 constructor tag. -
putReaderCtorFld
Map a SRFI-10 constructor tag to Procedure-valued lazy field -
getReaderCtor
Resolve a SRFI-10 constructor tags to a functions. -
getCurrent
-
setCurrent
-
lookup
-
makeSymbol
-