Java Doc for Lexer.java in  » Apache-Harmony-Java-SE » java-package » java » util » regex » 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 » Apache Harmony Java SE » java package » java.util.regex 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.regex.Lexer

Lexer
class Lexer (Code)
The purpose of this class is to break given pattern into RE tokens;
author:
   Nikolay A. Kuznetsov
version:
   $Revision: 1.21.2.2 $


Field Summary
final public static  intCHAR_AMPERSAND
    
final public static  intCHAR_ATOMIC_GROUP
    
final public static  intCHAR_CARET
    
final public static  intCHAR_DOLLAR
    
final public static  intCHAR_DOT
    
final public static  intCHAR_END_OF_INPUT
    
final public static  intCHAR_END_OF_LINE
    
final public static  intCHAR_FLAGS
    
final public static  intCHAR_HYPHEN
    
final public static  intCHAR_LEFT_PARENTHESIS
    
final public static  intCHAR_LEFT_SQUARE_BRACKET
    
final public static  intCHAR_NEG_LOOKAHEAD
    
final public static  intCHAR_NEG_LOOKBEHIND
    
final public static  intCHAR_NONCAP_GROUP
    
final public static  intCHAR_NONWORD_BOUND
    
final public static  intCHAR_POS_LOOKAHEAD
    
final public static  intCHAR_POS_LOOKBEHIND
    
final public static  intCHAR_PREVIOUS_MATCH
    
final public static  intCHAR_RIGHT_PARENTHESIS
    
final public static  intCHAR_RIGHT_SQUARE_BRACKET
    
final public static  intCHAR_START_OF_INPUT
    
final public static  intCHAR_VERTICAL_BAR
    
final public static  intCHAR_WORD_BOUND
    
final static  intLBase
    
final static  intLCount
    
final static  intMAX_DECOMPOSITION_LENGTH
    
final static  intMAX_HANGUL_DECOMPOSITION_LENGTH
    
final public static  intMODE_ESCAPE
    
final public static  intMODE_PATTERN
    
final public static  intMODE_RANGE
    
final static  intNCount
    
final public static  intQMOD_GREEDY
    
final public static  intQMOD_POSSESSIVE
    
final public static  intQMOD_RELUCTANT
    
final public static  intQUANT_ALT
    
final public static  intQUANT_ALT_P
    
final public static  intQUANT_ALT_R
    
final public static  intQUANT_COMP
    
final public static  intQUANT_COMP_P
    
final public static  intQUANT_COMP_R
    
final public static  intQUANT_PLUS
    
final public static  intQUANT_PLUS_P
    
final public static  intQUANT_PLUS_R
    
final public static  intQUANT_STAR
    
final public static  intQUANT_STAR_P
    
final public static  intQUANT_STAR_R
    
final static  intSBase
    
final static  intSCount
    
final static  intTBase
    
final static  intTCount
    
final static  intVBase
    
final static  intVCount
    

Constructor Summary
public  Lexer(String pattern, int flags)
    

Method Summary
public  intback()
     Returns previous character.
static  intgetCanonicalClass(int ch)
     Gets canonical class for given codepoint from decomposition mappings table.
static  int[]getCanonicalOrder(int[] inputInts, int length)
     Rearrange codepoints according to canonical order.
static  int[]getDecomposition(int ch)
     Gets decomposition for given codepoint from decomposition mappings table.
static  int[]getHangulDecomposition(int ch)
     Gets decomposition for given Hangul syllable.
public  intgetIndex()
     Returns the curr.
static  booleanhasDecompositionNonNullCanClass(int ch)
     Tests if given codepoint has canonical decomposition and given codepoint's canonical class is not 0.
static  booleanhasSingleCodepointDecomposition(int ch)
     Tests if given codepoint is a canonical decomposition of another codepoint.
static  booleanisDecomposedCharBoundary(int ch)
     Tests Unicode codepoint if it is a boundary of decomposed Unicode codepoint.
public  booleanisEmpty()
     Checks if there are any characters in the pattern.
public  booleanisHighSurrogate()
    
public static  booleanisHighSurrogate(int ch)
    
public static  booleanisLetter(int ch)
     Returns true if current character is plain token.
public  booleanisLetter()
     Return true if current character is letter, false otherwise; This is shortcut to static method isLetter to check the current character.
public  booleanisLowSurrogate()
    
public static  booleanisLowSurrogate(int ch)
    
public  booleanisNextSpecial()
    
public  booleanisQuantifier()
    
public  booleanisSpecial()
     Returns true, if current token is special, i.e.
public  intlookAhead()
     Returns nest symbol read.
public  intnext()
    
public  SpecialTokennextSpecial()
    
static  Stringnormalize(String input)
     Normalize given expression.
public  intpeek()
    
public  SpecialTokenpeekSpecial()
    
public  voidrestoreFlags(int flags)
    
public  voidsetMode(int mode)
     Set the Lexer to PATTERN or RANGE mode; Lexer interpret character two different ways in parser or range modes.
public  StringtoString()
    

Field Detail
CHAR_AMPERSAND
final public static int CHAR_AMPERSAND(Code)



CHAR_ATOMIC_GROUP
final public static int CHAR_ATOMIC_GROUP(Code)



CHAR_CARET
final public static int CHAR_CARET(Code)



CHAR_DOLLAR
final public static int CHAR_DOLLAR(Code)



CHAR_DOT
final public static int CHAR_DOT(Code)



CHAR_END_OF_INPUT
final public static int CHAR_END_OF_INPUT(Code)



CHAR_END_OF_LINE
final public static int CHAR_END_OF_LINE(Code)



CHAR_FLAGS
final public static int CHAR_FLAGS(Code)



CHAR_HYPHEN
final public static int CHAR_HYPHEN(Code)



CHAR_LEFT_PARENTHESIS
final public static int CHAR_LEFT_PARENTHESIS(Code)



CHAR_LEFT_SQUARE_BRACKET
final public static int CHAR_LEFT_SQUARE_BRACKET(Code)



CHAR_NEG_LOOKAHEAD
final public static int CHAR_NEG_LOOKAHEAD(Code)



CHAR_NEG_LOOKBEHIND
final public static int CHAR_NEG_LOOKBEHIND(Code)



CHAR_NONCAP_GROUP
final public static int CHAR_NONCAP_GROUP(Code)



CHAR_NONWORD_BOUND
final public static int CHAR_NONWORD_BOUND(Code)



CHAR_POS_LOOKAHEAD
final public static int CHAR_POS_LOOKAHEAD(Code)



CHAR_POS_LOOKBEHIND
final public static int CHAR_POS_LOOKBEHIND(Code)



CHAR_PREVIOUS_MATCH
final public static int CHAR_PREVIOUS_MATCH(Code)



CHAR_RIGHT_PARENTHESIS
final public static int CHAR_RIGHT_PARENTHESIS(Code)



CHAR_RIGHT_SQUARE_BRACKET
final public static int CHAR_RIGHT_SQUARE_BRACKET(Code)



CHAR_START_OF_INPUT
final public static int CHAR_START_OF_INPUT(Code)



CHAR_VERTICAL_BAR
final public static int CHAR_VERTICAL_BAR(Code)



CHAR_WORD_BOUND
final public static int CHAR_WORD_BOUND(Code)



LBase
final static int LBase(Code)



LCount
final static int LCount(Code)



MAX_DECOMPOSITION_LENGTH
final static int MAX_DECOMPOSITION_LENGTH(Code)



MAX_HANGUL_DECOMPOSITION_LENGTH
final static int MAX_HANGUL_DECOMPOSITION_LENGTH(Code)



MODE_ESCAPE
final public static int MODE_ESCAPE(Code)



MODE_PATTERN
final public static int MODE_PATTERN(Code)



MODE_RANGE
final public static int MODE_RANGE(Code)



NCount
final static int NCount(Code)



QMOD_GREEDY
final public static int QMOD_GREEDY(Code)



QMOD_POSSESSIVE
final public static int QMOD_POSSESSIVE(Code)



QMOD_RELUCTANT
final public static int QMOD_RELUCTANT(Code)



QUANT_ALT
final public static int QUANT_ALT(Code)



QUANT_ALT_P
final public static int QUANT_ALT_P(Code)



QUANT_ALT_R
final public static int QUANT_ALT_R(Code)



QUANT_COMP
final public static int QUANT_COMP(Code)



QUANT_COMP_P
final public static int QUANT_COMP_P(Code)



QUANT_COMP_R
final public static int QUANT_COMP_R(Code)



QUANT_PLUS
final public static int QUANT_PLUS(Code)



QUANT_PLUS_P
final public static int QUANT_PLUS_P(Code)



QUANT_PLUS_R
final public static int QUANT_PLUS_R(Code)



QUANT_STAR
final public static int QUANT_STAR(Code)



QUANT_STAR_P
final public static int QUANT_STAR_P(Code)



QUANT_STAR_R
final public static int QUANT_STAR_R(Code)



SBase
final static int SBase(Code)



SCount
final static int SCount(Code)



TBase
final static int TBase(Code)



TCount
final static int TCount(Code)



VBase
final static int VBase(Code)



VCount
final static int VCount(Code)




Constructor Detail
Lexer
public Lexer(String pattern, int flags)(Code)




Method Detail
back
public int back()(Code)
Returns previous character.



getCanonicalClass
static int getCanonicalClass(int ch)(Code)
Gets canonical class for given codepoint from decomposition mappings table. - ch Unicode codepoint canonical class for given Unicode codepointthat is represented by ch.



getCanonicalOrder
static int[] getCanonicalOrder(int[] inputInts, int length)(Code)
Rearrange codepoints according to canonical order.
Parameters:
  inputInts - - array that contains Unicode codepoints
Parameters:
  length - - index of last Unicode codepoint plus 1 array that contains rearranged codepoints.



getDecomposition
static int[] getDecomposition(int ch)(Code)
Gets decomposition for given codepoint from decomposition mappings table.
Parameters:
  ch - - Unicode codepoint array of codepoints that is a canonicaldecomposition of ch.



getHangulDecomposition
static int[] getHangulDecomposition(int ch)(Code)
Gets decomposition for given Hangul syllable. This is an implementation of Hangul decomposition algorithm according to http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf "3.12 Conjoining Jamo Behavior".
Parameters:
  ch - - given Hangul syllable canonical decomposition of ch.



getIndex
public int getIndex()(Code)
Returns the curr. character index.



hasDecompositionNonNullCanClass
static boolean hasDecompositionNonNullCanClass(int ch)(Code)
Tests if given codepoint has canonical decomposition and given codepoint's canonical class is not 0.
Parameters:
  ch - - codepoint to test true if canonical class is not 0 and ch has a decomposition.



hasSingleCodepointDecomposition
static boolean hasSingleCodepointDecomposition(int ch)(Code)
Tests if given codepoint is a canonical decomposition of another codepoint.
Parameters:
  ch - - codepoint to test true if ch is a decomposition.



isDecomposedCharBoundary
static boolean isDecomposedCharBoundary(int ch)(Code)
Tests Unicode codepoint if it is a boundary of decomposed Unicode codepoint.
Parameters:
  ch - - Unicode codepoint to test true if given codepoint is a boundary.



isEmpty
public boolean isEmpty()(Code)
Checks if there are any characters in the pattern. true if there are no more characters in the pattern.



isHighSurrogate
public boolean isHighSurrogate()(Code)



isHighSurrogate
public static boolean isHighSurrogate(int ch)(Code)



isLetter
public static boolean isLetter(int ch)(Code)
Returns true if current character is plain token.



isLetter
public boolean isLetter()(Code)
Return true if current character is letter, false otherwise; This is shortcut to static method isLetter to check the current character. true if current character is letter, false otherwise



isLowSurrogate
public boolean isLowSurrogate()(Code)



isLowSurrogate
public static boolean isLowSurrogate(int ch)(Code)



isNextSpecial
public boolean isNextSpecial()(Code)



isQuantifier
public boolean isQuantifier()(Code)



isSpecial
public boolean isSpecial()(Code)
Returns true, if current token is special, i.e. quantifier, or other compound token. - true if current token is special, false otherwise.



lookAhead
public int lookAhead()(Code)
Returns nest symbol read.



next
public int next()(Code)
Returns current character and moves string index to the next one;



nextSpecial
public SpecialToken nextSpecial()(Code)
Returns current special token and moves string index to the next one;



normalize
static String normalize(String input)(Code)
Normalize given expression.
Parameters:
  input - - expression to normalize normalized expression.



peek
public int peek()(Code)
Returns current character w/o reading next one; if there are no more characters returns 0; current character;



peekSpecial
public SpecialToken peekSpecial()(Code)



restoreFlags
public void restoreFlags(int flags)(Code)
Restores flags for Lexer
Parameters:
  flags -



setMode
public void setMode(int mode)(Code)
Set the Lexer to PATTERN or RANGE mode; Lexer interpret character two different ways in parser or range modes.
Parameters:
  mode - Lexer.PATTERN or Lexer.RANGE



toString
public String toString()(Code)



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