Package jflex.core
Class RegExps
java.lang.Object
jflex.core.RegExps
Stores all rules of the specification for later access in the RegExp to NFA conversion.
- Version:
- JFlex 1.8.2
- Author:
- Gerwin Klein
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStates.void
checkActions.void
checkLookAheads.void
dump()
Print the list of regExps to Out.dumpgetAction
(int num) getAction.int
getLine
(int num) getLine.getLookAhead
(int num) getLookAhead.int
getLookEntry
(int num) getLookEntry.int
getNum()
getNum.getRegExp
(int num) getRegExp.getStates
(int num) Getter for the fieldstates
.int
insert
(int line, List<Integer> stateList, RegExp regExp, Action action, Boolean isBOL, RegExp lookAhead) insert.int
insert.boolean
isBOL
(int num) isBOL.boolean
isEOF
(int num) isEOF.void
makeCCLs
(CharClasses classes, boolean caseless) Make character class partitions for all classes mentioned in the spec.int
NFASize.void
Normalise all character class expressions in regexp and lookahead rules.
-
Constructor Details
-
RegExps
public RegExps()Constructor for RegExps.
-
-
Method Details
-
insert
public int insert(int line, List<Integer> stateList, RegExp regExp, Action action, Boolean isBOL, RegExp lookAhead) insert. -
insert
insert. -
addStates
addStates.- Parameters:
regNum
- a int.newStates
- aList
object.
-
getNum
public int getNum()getNum.- Returns:
- a int.
-
isBOL
public boolean isBOL(int num) isBOL.- Parameters:
num
- a int.- Returns:
- a boolean.
-
getLookAhead
getLookAhead.- Parameters:
num
- a int.- Returns:
- a
RegExp
object.
-
isEOF
public boolean isEOF(int num) isEOF.- Parameters:
num
- a int.- Returns:
- a boolean.
-
getStates
Getter for the fieldstates
.- Parameters:
num
- a int.- Returns:
- a
List
object.
-
getRegExp
getRegExp.- Parameters:
num
- a int.- Returns:
- a
RegExp
object.
-
getLine
public int getLine(int num) getLine.- Parameters:
num
- a int.- Returns:
- a int.
-
getLookEntry
public int getLookEntry(int num) getLookEntry.- Parameters:
num
- a int.- Returns:
- a int.
-
checkActions
public void checkActions()checkActions. -
getAction
getAction.- Parameters:
num
- a int.- Returns:
- a
Action
object.
-
NFASize
NFASize.- Parameters:
macros
- aMacros
object.- Returns:
- a int.
-
checkLookAheads
public void checkLookAheads()checkLookAheads. -
normalise
Normalise all character class expressions in regexp and lookahead rules. -
dump
public void dump()Print the list of regExps to Out.dump -
makeCCLs
Make character class partitions for all classes mentioned in the spec.Assumes that single characters and strings have already been handled.
Assumes normalised expressions.
-