Java Doc for Lex.java in  » Internationalization-Localization » icu4j » com » ibm » icu » dev » tool » localeconverter » 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 » Internationalization Localization » icu4j » com.ibm.icu.dev.tool.localeconverter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.dev.tool.localeconverter.Lex

All known Subclasses:   com.ibm.icu.dev.tool.localeconverter.ComplexTransition,
Lex
final public class Lex (Code)
A Lex is a state machine. Transitions can be activated arbitrarily and can consume arbitrary amounts of text. A transition simply says it can consume the next character and returns the state that the machine should transition into. States that are > 0 are final states and cause the nextToken routine to return a value.

Inner Class :public interface Transition
Inner Class :abstract public static class BaseTransition implements Transition
Inner Class :final public static class EOFTransition extends BaseTransition
Inner Class :final public static class DefaultTransition extends BaseTransition
Inner Class :final public static class StringTransition extends BaseTransition
Inner Class :final public static class CharTransition extends BaseTransition
Inner Class :final public static class ExceptionTransition extends BaseTransition
Inner Class :final public static class ParseException extends IOException
Inner Class :final public static class ParseExceptionTransition implements Transition

Field Summary
final public static  byteACCUMULATE
    
final public static  byteACCUMULATE_CONSUMEIGNORE_CONSUMEACCUMULATE_PUTBACKIGNORE_PUTBACK
    
final public static  byteCONSUME
    
final public static  intEND_OF_FILE
    
final public static  byteIGNORE
    
final public static  bytePUTBACK
    

Constructor Summary
public  Lex(Transition[][] states)
     Construct a new machine.
public  Lex(Transition[][] statesIn, PushbackReader inputIn)
     Construct a new machine.

Method Summary
public  voidaccept(int neededState)
     Get the next token and throw an acception if the state machine is not in the specified state.
public  voidaccept(int neededState, String neededValue)
     Get the next token and throw an exception if the state machine is not in the specified state and the value returned by getData() does not match the specified value.
public  voidappendDataTo(StringBuffer buffer)
     Append the data returned from getData() to the specified StringBuffer.
public  intdataAsNumber(int radix)
    
public  booleandataEquals(String other)
     Return true if the specified string equals the string returned by getData().
public  booleandataStartsWith(String s)
     Return true if the data returned by getData() starts with the specified string.
public  voiddebug(boolean debugMessagesOn)
    
public  voiddebug(boolean debugMessagesOn, String tag)
    
public  StringgetData()
    
public  PushbackReadergetInput()
    
public  intgetState()
    
public  Transition[][]getStates()
    
public  intnextToken()
     Get the next token from the input stream.
public  voidsetInput(PushbackReader input)
    
public  voidsetStates(Transition[][] states)
    

Field Detail
ACCUMULATE
final public static byte ACCUMULATE(Code)
Append the current character to the output



ACCUMULATE_CONSUMEIGNORE_CONSUMEACCUMULATE_PUTBACKIGNORE_PUTBACK
final public static byte ACCUMULATE_CONSUMEIGNORE_CONSUMEACCUMULATE_PUTBACKIGNORE_PUTBACK(Code)



CONSUME
final public static byte CONSUME(Code)
Remove the current character from the input stream



END_OF_FILE
final public static int END_OF_FILE(Code)



IGNORE
final public static byte IGNORE(Code)
Don't copy the current character to the output



PUTBACK
final public static byte PUTBACK(Code)
Return the current character to the input stream




Constructor Detail
Lex
public Lex(Transition[][] states)(Code)
Construct a new machine. NOTE: setInput must be called before nextToken is called



Lex
public Lex(Transition[][] statesIn, PushbackReader inputIn)(Code)
Construct a new machine.




Method Detail
accept
public void accept(int neededState) throws IOException(Code)
Get the next token and throw an acception if the state machine is not in the specified state.



accept
public void accept(int neededState, String neededValue) throws IOException(Code)
Get the next token and throw an exception if the state machine is not in the specified state and the value returned by getData() does not match the specified value.



appendDataTo
public void appendDataTo(StringBuffer buffer)(Code)
Append the data returned from getData() to the specified StringBuffer. This routine avoids the creation of a String on the heap.



dataAsNumber
public int dataAsNumber(int radix)(Code)
Convert the contents of the data buffer to an integer of the specified radix



dataEquals
public boolean dataEquals(String other)(Code)
Return true if the specified string equals the string returned by getData(). This routine may be faster than calling getData because it does not create a string on the heap.



dataStartsWith
public boolean dataStartsWith(String s)(Code)
Return true if the data returned by getData() starts with the specified string. This routine avoids the creation of a String on the heap.



debug
public void debug(boolean debugMessagesOn)(Code)



debug
public void debug(boolean debugMessagesOn, String tag)(Code)



getData
public String getData()(Code)
Return the data resulting from the last call to nextToken



getInput
public PushbackReader getInput()(Code)
Return the input reader used by this machine



getState
public int getState()(Code)
Return the current state



getStates
public Transition[][] getStates()(Code)
Return the states used by this machine



nextToken
public int nextToken() throws IOException(Code)
Get the next token from the input stream. The dataBuffer is cleared and the state is set to zero before parsing begins. Parsing continues until a state greater of equal to 0 s reached or an exception is thrown. After each non-terminal transition, the state machine walks through all the transitions, in order, for the current state until it finds one that will accept the current input character and then calls doAction on that transition.



setInput
public void setInput(PushbackReader input)(Code)
set the input reader used by this machine



setStates
public void setStates(Transition[][] states)(Code)



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.