Logo Search packages:      
Sourcecode: jing-trang version File versions  Download package

com::thaiopensource::datatype::xsd::regex::java::Translator Class Reference

List of all members.

Detailed Description

Translates XML Schema regexes into java.util.regex regexes.

See also:

XML Schema Part 2

Definition at line 19 of file Translator.java.

Static Public Member Functions

static void main (String[] args) throws RegexSyntaxException
static String translate (String regexp) throws RegexSyntaxException

Static Package Attributes

static final int ALL = 1
static final Localizer localizer = new Localizer(Translator.class)
static final int NONE = -1
static final String NOT_ALLOWED_CLASS = "[\u0000&&[^\u0000]]"
static final int SOME = 0
static final String SURROGATES1_CLASS = "[\uD800-\uDBFF]"
static final String SURROGATES2_CLASS = "[\uDC00-\uDFFF]"

Private Member Functions

void advance ()
void copyCurChar ()
void expect (char c) throws RegexSyntaxException
RegexSyntaxException makeException (String key, String arg)
RegexSyntaxException makeException (String key)
CharClass parseCharClassEscOrXmlChar () throws RegexSyntaxException
CharClass parseCharClassExpr () throws RegexSyntaxException
CharClass parseEsc () throws RegexSyntaxException
CharClass parseProp () throws RegexSyntaxException
String parseQuantExact () throws RegexSyntaxException
boolean translateAtom () throws RegexSyntaxException
void translateBranch () throws RegexSyntaxException
void translateQuantifier () throws RegexSyntaxException
void translateQuantity () throws RegexSyntaxException
void translateRegExp () throws RegexSyntaxException
void translateTop () throws RegexSyntaxException
 Translator (String regExp)

Static Private Member Functions

static CharClass computeCategoryCharClass (char code)
static CharClass computeSubCategoryCharClass (String name)
static synchronized CharClass getCategoryCharClass (int ci)
static synchronized CharClass getSubCategoryCharClass (int sci)
static boolean isAsciiAlnum (char c)
static boolean isBlock (String name)
static boolean isJavaMetaChar (char c)
static CharClass makeCharClass (String members)
static CharClass makeCharClass (String categories, String includes, String excludeRanges)

Private Attributes

char curChar
boolean eos = false
final int length
int pos = 0
final String regExp
final StringBuffer result = new StringBuffer()

Static Private Attributes

static final String[] blockNames
static final String categories = "LMNPZSC"
static final String CATEGORY_Pf = "\u00BB\u2019\u201D\u203A"
static final String CATEGORY_Pi = "\u00AB\u2018\u201B\u201C\u201F\u2039"
static final CharClass[] categoryCharClasses = new CharClass[categories.length()]
static final CharClass DOT = new Complement(new Union(new CharClass[] { new SingleChar('\n'), new SingleChar('\r') }))
static final char EOS = '\0'
static final CharClass ESC_C = new Complement(ESC_c)
static final CharClass ESC_c
static final CharClass ESC_D = new Complement(ESC_d)
static final CharClass ESC_d = new Property("Nd")
static final CharClass ESC_I = new Complement(ESC_i)
static final CharClass ESC_i
static final CharClass ESC_S = new Complement(ESC_s)
static final CharClass ESC_s
static final CharClass ESC_w = new Complement(ESC_W)
static final CharClass ESC_W = new Union(new CharClass[] {new Property("P"), new Property("Z"), new Property("C")})
static final int NONBMP_MAX = 0x10FFFF
static final int NONBMP_MIN = 0x10000
static final CharClass[] specialBlockCharClasses
static final String[] specialBlockNames
static final String subCategories = "LuLlLtLmLoMnMcMeNdNlNoPcPdPsPePiPfPoZsZlZpSmScSkSoCcCfCoCn"
static final CharClass[] subCategoryCharClasses = new CharClass[subCategories.length() / 2]
static final char SURROGATE2_MAX = '\uDFFF'
static final char SURROGATE2_MIN = '\uDC00'
static final boolean surrogatesDirect = RegexFeatures.SURROGATES_DIRECT
static final char UNICODE_3_1_ADD_Ll = '\u03F5'
static final char UNICODE_3_1_ADD_Lu = '\u03F4'
static final char UNICODE_3_1_CHANGE_No_to_Nl_MAX = '\u16F0'
static final char UNICODE_3_1_CHANGE_No_to_Nl_MIN = '\u16EE'


class  CharClass
class  CharRange
class  Complement
class  Property
class  Range
class  SimpleCharClass
class  SingleChar
class  Subtraction
class  Union
class  WideSingleChar

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index