Java Doc for LispReader.java in  » Scripting » Kawa » gnu » kawa » lispexpr » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Kawa » gnu.kawa.lispexpr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


gnu.text.Lexer
   gnu.kawa.lispexpr.LispReader

All known Subclasses:   gnu.kawa.brl.BRLRead,  gnu.q2.lang.Q2Read,
LispReader
public class LispReader extends Lexer (Code)
A Lexer for reading S-expressions in generic Lisp-like syntax. This class may have outlived its usefulness: It's mostly just a wrapper around a LineBufferedReader plus a helper token-buffer. The functionality should be moved to ReadTable, though it is unclear what to do about the tokenBuffer.


Field Summary
final static  intSCM_COMPLEX
    
final public static  intSCM_NUMBERS
    
final public static  charTOKEN_ESCAPE_CHAR
    
protected  booleanfinalColonIsKeyword
     True if "IDENTIFIER:" should be treated as a keyword.
protected  booleaninitialColonIsKeyword
     True if ":IDENTIFIER" should be treated as a keyword.
protected  booleanseenEscapes
     If true, then tokenbuffer contains escaped characters.

Constructor Summary
public  LispReader(LineBufferedReader port)
    
public  LispReader(LineBufferedReader port, SourceMessages messages)
    

Method Summary
static  chargetReadCase()
     Get specification of how symbols should be case-folded.
 ObjecthandlePostfix(Object value, ReadTable rtable, int line, int column)
    
public  ObjecthandleToken(int startPos, int endPos, ReadTable rtable)
     Classify and return a token in tokenBuffer from startPos to endPos.
public static  ObjectlookupUnit(String name)
     Resolve a unit name, if possible. Returns null if the unit name is unknown.
protected  ObjectmakeNil()
    
protected  ObjectmakePair(Object car, int line, int column)
    
public  ObjectmakePair(Object car, Object cdr)
    
public static  ObjectparseNumber(char[] buffer, int start, int count, char exactness, int radix, int flags)
     Parse a number.
public static  ObjectreadCharacter(LispReader reader)
    
public  ObjectreadCommand()
     Read a "command" - a top-level expression or declaration. Return Sequence.eofValue of end of file.
public  intreadEscape()
     Reads a C-style String escape sequence. Assume '\\' has already been read. Return the converted character, or -1 on EOF, or -2 to ignore.
final public  intreadEscape(int c)
    
final public  voidreadNestedComment(char c1, char c2)
     Read a #|...|#-style comment (which may contain other nested comments).
public static  ObjectreadNumberWithRadix(int previous, LispReader reader, int radix)
    
public  ObjectreadObject()
    
final public  ObjectreadObject(int c)
    
public static  SimpleVectorreadSimpleVector(LispReader reader, char kind)
    
public static  ObjectreadSpecial(LispReader reader)
    
 voidreadToken(int ch, char readCase, ReadTable rtable)
    
public  ObjectreadValues(int ch, ReadTable rtable)
    
public  ObjectreadValues(int ch, ReadTableEntry entry, ReadTable rtable)
     May return zero or multiple values.
protected  ObjectreturnSymbol(int startPos, int endPos, ReadTable rtable)
    
protected  voidsetCdr(Object pair, Object cdr)
    
protected  booleanvalidPostfixLookupStart(ReadTable rtable)
    

Field Detail
SCM_COMPLEX
final static int SCM_COMPLEX(Code)



SCM_NUMBERS
final public static int SCM_NUMBERS(Code)



TOKEN_ESCAPE_CHAR
final public static char TOKEN_ESCAPE_CHAR(Code)



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



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



seenEscapes
protected boolean seenEscapes(Code)
If true, then tokenbuffer contains escaped characters. These are prefixed (in the buffer) by TOKEN_ESCAPE_CHAR.




Constructor Detail
LispReader
public LispReader(LineBufferedReader port)(Code)



LispReader
public LispReader(LineBufferedReader port, SourceMessages messages)(Code)




Method Detail
getReadCase
static char getReadCase()(Code)
Get specification of how symbols should be case-folded. Either 'P' (means preserve case), 'U' (upcase),'D' (downcase, or 'I' (invert case).



handlePostfix
Object handlePostfix(Object value, ReadTable rtable, int line, int column) throws java.io.IOException, SyntaxException(Code)



handleToken
public Object handleToken(int startPos, int endPos, ReadTable rtable)(Code)
Classify and return a token in tokenBuffer from startPos to endPos.



lookupUnit
public static Object lookupUnit(String name)(Code)
Resolve a unit name, if possible. Returns null if the unit name is unknown.



makeNil
protected Object makeNil()(Code)



makePair
protected Object makePair(Object car, int line, int column)(Code)



makePair
public Object makePair(Object car, Object cdr)(Code)



parseNumber
public static Object parseNumber(char[] buffer, int start, int count, char exactness, int radix, int flags)(Code)
Parse a number.
Parameters:
  buffer - contains the characters of the number
Parameters:
  start - startinging index of the number in the buffer
Parameters:
  count - number of characters in buffer to use
Parameters:
  exactness - either 'i' or 'I' force an inexact result,either 'e' or 'E' force an exact result,'\0' yields an inact or inexact depending on the form of the literal,while ' ' is like '\0' but does not allow more exactness specifiers.
Parameters:
  radix - the number base to use or 0 if unspecified the number if a valid number; null or a String-valued errormessage if if there was some error parsing the number.



readCharacter
public static Object readCharacter(LispReader reader) throws java.io.IOException, SyntaxException(Code)



readCommand
public Object readCommand() throws java.io.IOException, SyntaxException(Code)
Read a "command" - a top-level expression or declaration. Return Sequence.eofValue of end of file.



readEscape
public int readEscape() throws java.io.IOException, SyntaxException(Code)
Reads a C-style String escape sequence. Assume '\\' has already been read. Return the converted character, or -1 on EOF, or -2 to ignore.



readEscape
final public int readEscape(int c) throws java.io.IOException, SyntaxException(Code)



readNestedComment
final public void readNestedComment(char c1, char c2) throws java.io.IOException, SyntaxException(Code)
Read a #|...|#-style comment (which may contain other nested comments). Assumes the initial "#|" has already been read.



readNumberWithRadix
public static Object readNumberWithRadix(int previous, LispReader reader, int radix) throws java.io.IOException, SyntaxException(Code)
Read a number from a LispReader
Parameters:
  previous - number of characters already pushed on tokenBuffer
Parameters:
  reader - LispReader to read from
Parameters:
  radix - base to use or -1 if unspecified



readObject
public Object readObject() throws java.io.IOException, SyntaxException(Code)



readObject
final public Object readObject(int c) throws java.io.IOException, SyntaxException(Code)



readSimpleVector
public static SimpleVector readSimpleVector(LispReader reader, char kind) throws java.io.IOException, SyntaxException(Code)



readSpecial
public static Object readSpecial(LispReader reader) throws java.io.IOException, SyntaxException(Code)



readToken
void readToken(int ch, char readCase, ReadTable rtable) throws java.io.IOException, SyntaxException(Code)



readValues
public Object readValues(int ch, ReadTable rtable) throws java.io.IOException, SyntaxException(Code)



readValues
public Object readValues(int ch, ReadTableEntry entry, ReadTable rtable) throws java.io.IOException, SyntaxException(Code)
May return zero or multiple values.



returnSymbol
protected Object returnSymbol(int startPos, int endPos, ReadTable rtable)(Code)



setCdr
protected void setCdr(Object pair, Object cdr)(Code)



validPostfixLookupStart
protected boolean validPostfixLookupStart(ReadTable rtable) throws java.io.IOException(Code)



Fields inherited from gnu.text.Lexer
protected boolean interactive(Code)(Java Doc)
protected int nesting(Code)(Java Doc)
protected LineBufferedReader port(Code)(Java Doc)
public char[] tokenBuffer(Code)(Java Doc)
public int tokenBufferLength(Code)(Java Doc)

Methods inherited from gnu.text.Lexer
public boolean checkErrors(PrintWriter out, int max)(Code)(Java Doc)
public boolean checkNext(char ch) throws java.io.IOException(Code)(Java Doc)
public void clearErrors()(Code)(Java Doc)
public void close() throws java.io.IOException(Code)(Java Doc)
public void eofError(String msg) throws SyntaxException(Code)(Java Doc)
public void eofError(String message, int startLine, int startColumn) throws SyntaxException(Code)(Java Doc)
public void error(char severity, String filename, int line, int column, String message)(Code)(Java Doc)
public void error(char severity, String message)(Code)(Java Doc)
public void error(String message)(Code)(Java Doc)
public void fatal(String message) throws SyntaxException(Code)(Java Doc)
public int getColumnNumber()(Code)(Java Doc)
public SourceError getErrors()(Code)(Java Doc)
public int getLineNumber()(Code)(Java Doc)
public SourceMessages getMessages()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
final public LineBufferedReader getPort()(Code)(Java Doc)
public boolean isInteractive()(Code)(Java Doc)
public void mark() throws java.io.IOException(Code)(Java Doc)
public int peek() throws java.io.IOException(Code)(Java Doc)
public void popNesting(char save)(Code)(Java Doc)
public char pushNesting(char promptChar)(Code)(Java Doc)
public int read() throws java.io.IOException(Code)(Java Doc)
public int read(char[] buf, int offset, int length) throws java.io.IOException(Code)(Java Doc)
public static long readDigitsInBuffer(LineBufferedReader port, int radix)(Code)(Java Doc)
public int readOptionalExponent() throws java.io.IOException(Code)(Java Doc)
public void reset() throws java.io.IOException(Code)(Java Doc)
public boolean seenErrors()(Code)(Java Doc)
public void setInteractive(boolean v)(Code)(Java Doc)
public void setMessages(SourceMessages messages)(Code)(Java Doc)
public void skip() throws java.io.IOException(Code)(Java Doc)
protected void skip_quick() throws java.io.IOException(Code)(Java Doc)
public void tokenBufferAppend(int ch)(Code)(Java Doc)
public void unread(int ch) throws java.io.IOException(Code)(Java Doc)
protected void unread() throws java.io.IOException(Code)(Java Doc)
protected void unread_quick() throws java.io.IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.