public class RegExps
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<Action> |
actions
the action of a regexp
|
(package private) java.util.List<java.lang.Boolean> |
BOL
flag if it is a BOL regexp
|
(package private) int |
gen_look_count
Count of many general lookahead expressions there are.
|
(package private) java.util.List<java.lang.Integer> |
lines
the spec line in which a regexp is used
|
(package private) java.util.List<RegExp> |
look
the lookahead expression
|
(package private) java.util.List<java.lang.Integer> |
look_entry
the forward DFA entry point of the lookahead expression
|
(package private) java.util.List<RegExp> |
regExps
the regexp
|
(package private) java.util.List<java.util.List<java.lang.Integer>> |
states
the lexical states in wich the regexp is used
|
Constructor and Description |
---|
RegExps()
Constructor for RegExps.
|
Modifier and Type | Method and Description |
---|---|
void |
addStates(int regNum,
java.util.List<java.lang.Integer> newStates)
addStates.
|
void |
checkActions()
checkActions.
|
void |
checkLookAheads()
checkLookAheads.
|
Action |
getAction(int num)
getAction.
|
int |
getLine(int num)
getLine.
|
RegExp |
getLookAhead(int num)
getLookAhead.
|
int |
getLookEntry(int num)
getLookEntry.
|
int |
getNum()
getNum.
|
RegExp |
getRegExp(int num)
getRegExp.
|
java.util.List<java.lang.Integer> |
getStates(int num)
Getter for the field
states . |
int |
insert(int line,
java.util.List<java.lang.Integer> stateList,
RegExp regExp,
Action action,
java.lang.Boolean isBOL,
RegExp lookAhead)
insert.
|
int |
insert(java.util.List<java.lang.Integer> stateList,
Action action)
insert.
|
boolean |
isBOL(int num)
isBOL.
|
boolean |
isEOF(int num)
isEOF.
|
private void |
lookAheadCase(int regExpNum)
Determine which case of lookahead expression regExpNum points to (if any).
|
int |
NFASize(Macros macros)
NFASize.
|
java.util.List<java.lang.Integer> lines
java.util.List<java.util.List<java.lang.Integer>> states
java.util.List<RegExp> regExps
java.util.List<Action> actions
java.util.List<java.lang.Boolean> BOL
java.util.List<RegExp> look
java.util.List<java.lang.Integer> look_entry
int gen_look_count
public int insert(int line, java.util.List<java.lang.Integer> stateList, RegExp regExp, Action action, java.lang.Boolean isBOL, RegExp lookAhead)
public int insert(java.util.List<java.lang.Integer> stateList, Action action)
stateList
- a List
object.action
- a Action
object.public void addStates(int regNum, java.util.List<java.lang.Integer> newStates)
regNum
- a int.newStates
- a List
object.public int getNum()
public boolean isBOL(int num)
num
- a int.public RegExp getLookAhead(int num)
num
- a int.RegExp
object.public boolean isEOF(int num)
num
- a int.public java.util.List<java.lang.Integer> getStates(int num)
states
.num
- a int.List
object.public RegExp getRegExp(int num)
num
- a int.RegExp
object.public int getLine(int num)
num
- a int.public int getLookEntry(int num)
num
- a int.public void checkActions()
public Action getAction(int num)
num
- a int.Action
object.public int NFASize(Macros macros)
macros
- a Macros
object.public void checkLookAheads()
private void lookAheadCase(int regExpNum)
Needs to be run before adding any regexps/rules to be able to reserve the correct amount of space of lookahead DFA entry points.
regExpNum
- the number of the regexp in RegExps.