fr.umlv.tatoo.cc.lexer.regex
Class RegexFactory
java.lang.Object
fr.umlv.tatoo.cc.lexer.regex.RegexFactory
public class RegexFactory
- extends Object
- Author:
- Julien
Method Summary |
static Regex |
atLeast(int num,
Regex child)
|
static Regex |
cat(Regex left,
Regex right)
|
static Regex |
characterSequence(CharSequence s,
boolean ignoreCase,
Encoding encoding)
|
static Regex |
clone(Regex root)
|
static RegexIntervalTable |
createDollarRegexTable(Encoding encoding)
Build the table which tests wether end of line follows. |
static Regex |
createSet(boolean negate,
List<CharacterInterval> intervals,
Encoding encoding)
|
static Regex |
interval(char from,
char to,
Encoding encoding)
|
static Regex |
leaf(List<CharacterInterval> intervalList,
boolean negate,
Encoding encoding)
|
static Regex |
letter(char c,
Encoding encoding)
|
static Regex |
letterIgnoreCase(char letter,
Encoding encoding)
|
static RegexIntervalTable |
makeTable(Set<Leaf> first,
MultiMap<Leaf,Leaf> transitions,
Leaf acceptPosition,
Encoding encoding)
|
static Regex |
optional(Regex child)
|
static Regex |
or(Regex left,
Regex right)
|
static Regex |
plus(Regex child)
|
static Regex |
range(int from,
int to,
Regex child)
|
static Regex |
star(Regex child)
|
static RegexIntervalTable |
table(Regex rootNode,
Encoding encoding)
|
static Regex |
times(int num,
Regex child)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexFactory
public RegexFactory()
createSet
public static Regex createSet(boolean negate,
List<CharacterInterval> intervals,
Encoding encoding)
star
public static Regex star(Regex child)
plus
public static Regex plus(Regex child)
optional
public static Regex optional(Regex child)
range
public static Regex range(int from,
int to,
Regex child)
times
public static Regex times(int num,
Regex child)
atLeast
public static Regex atLeast(int num,
Regex child)
cat
public static Regex cat(Regex left,
Regex right)
or
public static Regex or(Regex left,
Regex right)
leaf
public static Regex leaf(List<CharacterInterval> intervalList,
boolean negate,
Encoding encoding)
letter
public static Regex letter(char c,
Encoding encoding)
letterIgnoreCase
public static Regex letterIgnoreCase(char letter,
Encoding encoding)
characterSequence
public static Regex characterSequence(CharSequence s,
boolean ignoreCase,
Encoding encoding)
table
public static RegexIntervalTable table(Regex rootNode,
Encoding encoding)
clone
public static Regex clone(Regex root)
makeTable
public static RegexIntervalTable makeTable(Set<Leaf> first,
MultiMap<Leaf,Leaf> transitions,
Leaf acceptPosition,
Encoding encoding)
createDollarRegexTable
public static RegexIntervalTable createDollarRegexTable(Encoding encoding)
- Build the table which tests wether end of line follows. It does not
recognize the whole end of line but only the beginning
- Returns:
- the table which tests wether end of line follows
interval
public static Regex interval(char from,
char to,
Encoding encoding)