Java Doc for Lexer.java in  » Scripting » Kawa » gnu » text » 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.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.io.Reader
      gnu.text.Lexer

All known Subclasses:   gnu.kawa.xslt.XslTranslator,  gnu.xquery.lang.XQParser,  gnu.kawa.lispexpr.LispReader,  gnu.ecmascript.Lexer,
Lexer
public class Lexer extends Reader (Code)
Framework for implementing lexical scanners and parsers.
author:
   Per Bothner


Field Summary
protected  booleaninteractive
    
 SourceMessagesmessages
    
protected  intnesting
    
protected  LineBufferedReaderport
    
public  char[]tokenBuffer
     For building tokens of various kinds.
public  inttokenBufferLength
     The number of chars of tokenBuffer that are used.

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

Method Summary
public  booleancheckErrors(PrintWriter out, int max)
     Returns true if any error were seen.
public  booleancheckNext(char ch)
     Check if the next character matches a given character.
Parameters:
  ch - The character to match against.
public  voidclearErrors()
    
public  voidclose()
    
public  voideofError(String msg)
    
public  voideofError(String message, int startLine, int startColumn)
    
public  voiderror(char severity, String filename, int line, int column, String message)
    
public  voiderror(char severity, String message)
    
public  voiderror(String message)
    
public  voidfatal(String message)
    
public  intgetColumnNumber()
    
public  SourceErrorgetErrors()
    
public  intgetLineNumber()
    
public  SourceMessagesgetMessages()
    
public  StringgetName()
    
final public  LineBufferedReadergetPort()
    
public  booleanisInteractive()
    
public  voidmark()
     Start tentative parsing.
public  intpeek()
    
public  voidpopNesting(char save)
    
public  charpushNesting(char promptChar)
     Enter a nested expression. This is used in interactive mode to control whether to continue past end of line, depending on whether the expression is incomplete.
Parameters:
  promptChar - Used in prompt string to indicate type of nesting.
public  intread()
    
public  intread(char[] buf, int offset, int length)
    
public static  longreadDigitsInBuffer(LineBufferedReader port, int radix)
    
public  intreadOptionalExponent()
     Read an optional signed integer.
public  voidreset()
     Stop tentative parsing.
public  booleanseenErrors()
    
public  voidsetInteractive(boolean v)
    
public  voidsetMessages(SourceMessages messages)
    
public  voidskip()
    
protected  voidskip_quick()
    
public  voidtokenBufferAppend(int ch)
     Append one character to tokenBuffer, resizing it if need be.
public  voidunread(int ch)
    
protected  voidunread()
    
protected  voidunread_quick()
    

Field Detail
interactive
protected boolean interactive(Code)



messages
SourceMessages messages(Code)



nesting
protected int nesting(Code)



port
protected LineBufferedReader port(Code)



tokenBuffer
public char[] tokenBuffer(Code)
For building tokens of various kinds.



tokenBufferLength
public int tokenBufferLength(Code)
The number of chars of tokenBuffer that are used.




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



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




Method Detail
checkErrors
public boolean checkErrors(PrintWriter out, int max)(Code)
Returns true if any error were seen. Prints and clears the errors.
Parameters:
  out - where to write the error message to
Parameters:
  max - maximum number of messages to print (can be 0)



checkNext
public boolean checkNext(char ch) throws java.io.IOException(Code)
Check if the next character matches a given character.
Parameters:
  ch - The character to match against. if the character read matchesOn a match, the position is advanced following that character.



clearErrors
public void clearErrors()(Code)



close
public void close() throws java.io.IOException(Code)



eofError
public void eofError(String msg) throws SyntaxException(Code)



eofError
public void eofError(String message, int startLine, int startColumn) throws SyntaxException(Code)



error
public void error(char severity, String filename, int line, int column, String message)(Code)



error
public void error(char severity, String message)(Code)



error
public void error(String message)(Code)



fatal
public void fatal(String message) throws SyntaxException(Code)



getColumnNumber
public int getColumnNumber()(Code)



getErrors
public SourceError getErrors()(Code)



getLineNumber
public int getLineNumber()(Code)



getMessages
public SourceMessages getMessages()(Code)



getName
public String getName()(Code)



getPort
final public LineBufferedReader getPort()(Code)



isInteractive
public boolean isInteractive()(Code)



mark
public void mark() throws java.io.IOException(Code)
Start tentative parsing. Must be followed by a reset.



peek
public int peek() throws java.io.IOException(Code)



popNesting
public void popNesting(char save)(Code)
Exit a nested expression, reversing pushNesting
Parameters:
  save - Saved values return by prior pushNesting



pushNesting
public char pushNesting(char promptChar)(Code)
Enter a nested expression. This is used in interactive mode to control whether to continue past end of line, depending on whether the expression is incomplete.
Parameters:
  promptChar - Used in prompt string to indicate type of nesting. The previous value of promptChar, to be passed to popNesting.



read
public int read() throws java.io.IOException(Code)



read
public int read(char[] buf, int offset, int length) throws java.io.IOException(Code)



readDigitsInBuffer
public static long readDigitsInBuffer(LineBufferedReader port, int radix)(Code)
Read digits, up to the first non-digit or the buffer limit the digits seen as a non-negative long, or -1 on overflow



readOptionalExponent
public int readOptionalExponent() throws java.io.IOException(Code)
Read an optional signed integer. If there is no integer in the input stream, return 1. For excessively large exponents, return Integer.MIN_VALUE or Integer.MAX_VALUE.



reset
public void reset() throws java.io.IOException(Code)
Stop tentative parsing. Return to position where we called mark.



seenErrors
public boolean seenErrors()(Code)



setInteractive
public void setInteractive(boolean v)(Code)



setMessages
public void setMessages(SourceMessages messages)(Code)



skip
public void skip() throws java.io.IOException(Code)



skip_quick
protected void skip_quick() throws java.io.IOException(Code)



tokenBufferAppend
public void tokenBufferAppend(int ch)(Code)
Append one character to tokenBuffer, resizing it if need be.



unread
public void unread(int ch) throws java.io.IOException(Code)



unread
protected void unread() throws java.io.IOException(Code)



unread_quick
protected void unread_quick() throws java.io.IOException(Code)



Fields inherited from java.io.Reader
protected Object lock(Code)(Java Doc)

Methods inherited from java.io.Reader
abstract public void close() throws IOException(Code)(Java Doc)
public void mark(int readAheadLimit) throws IOException(Code)(Java Doc)
public boolean markSupported()(Code)(Java Doc)
public int read(java.nio.CharBuffer target) throws IOException(Code)(Java Doc)
public int read() throws IOException(Code)(Java Doc)
public int read(char cbuf) throws IOException(Code)(Java Doc)
abstract public int read(char cbuf, int off, int len) throws IOException(Code)(Java Doc)
public boolean ready() throws IOException(Code)(Java Doc)
public void reset() throws IOException(Code)(Java Doc)
public long skip(long n) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.