Package jflex.core
Class RegExps
- java.lang.Object
-
- jflex.core.RegExps
-
public class RegExps extends Object
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 Constructor Description RegExps()Constructor for RegExps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStates(int regNum, List<Integer> newStates)addStates.voidcheckActions()checkActions.voidcheckLookAheads()checkLookAheads.voiddump()Print the list of regExps to Out.dumpActiongetAction(int num)getAction.intgetLine(int num)getLine.RegExpgetLookAhead(int num)getLookAhead.intgetLookEntry(int num)getLookEntry.intgetNum()getNum.RegExpgetRegExp(int num)getRegExp.List<Integer>getStates(int num)Getter for the fieldstates.intinsert(int line, List<Integer> stateList, RegExp regExp, Action action, Boolean isBOL, RegExp lookAhead)insert.intinsert(List<Integer> stateList, Action action)insert.booleanisBOL(int num)isBOL.booleanisEOF(int num)isEOF.voidmakeCCLs(CharClasses classes, boolean caseless)Make character class partitions for all classes mentioned in the spec.intNFASize(Macros macros)NFASize.voidnormalise(Macros m)Normalise all character class expressions in regexp and lookahead rules.
-
-
-
Method Detail
-
insert
public int insert(int line, List<Integer> stateList, RegExp regExp, Action action, Boolean isBOL, RegExp lookAhead)insert.
-
addStates
public void addStates(int regNum, List<Integer> newStates)addStates.- Parameters:
regNum- a int.newStates- aListobject.
-
getNum
public int getNum()
getNum.- Returns:
- a int.
-
isBOL
public boolean isBOL(int num)
isBOL.- Parameters:
num- a int.- Returns:
- a boolean.
-
getLookAhead
public RegExp getLookAhead(int num)
getLookAhead.- Parameters:
num- a int.- Returns:
- a
RegExpobject.
-
isEOF
public boolean isEOF(int num)
isEOF.- Parameters:
num- a int.- Returns:
- a boolean.
-
getStates
public List<Integer> getStates(int num)
Getter for the fieldstates.- Parameters:
num- a int.- Returns:
- a
Listobject.
-
getRegExp
public RegExp getRegExp(int num)
getRegExp.- Parameters:
num- a int.- Returns:
- a
RegExpobject.
-
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
public Action getAction(int num)
getAction.- Parameters:
num- a int.- Returns:
- a
Actionobject.
-
NFASize
public int NFASize(Macros macros)
NFASize.- Parameters:
macros- aMacrosobject.- Returns:
- a int.
-
checkLookAheads
public void checkLookAheads()
checkLookAheads.
-
normalise
public void normalise(Macros m)
Normalise all character class expressions in regexp and lookahead rules.
-
dump
public void dump()
Print the list of regExps to Out.dump
-
makeCCLs
public void makeCCLs(CharClasses classes, boolean caseless)
Make character class partitions for all classes mentioned in the spec.Assumes that single characters and strings have already been handled.
Assumes normalised expressions.
-
-