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.9.1
- Author:
- Gerwin Klein
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStates.voidcheckActions.voidcheckLookAheads.voiddump()Print the list of regExps to Out.dumpvoidexpandPreClasses(Map<Integer, IntCharSet> preclassCache, CharClasses charClasses, boolean caseless) Replace all predefined character classes with primitive IntCharSet classes.getAction(int num) getAction.intgetLine(int num) getLine.getLookAhead(int num) getLookAhead.intgetLookEntry(int num) getLookEntry.intgetNum()getNum.getRegExp(int num) getRegExp.getStates(int num) Getter for the fieldstates.intinsert(int line, List<Integer> stateList, RegExp regExp, Action action, Boolean isBOL, RegExp lookAhead) insert.intinsert.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.voidNormalise all character class expressions in regexp and lookahead rules.voidExpand all macro calls in regexp and lookahead rules.
-
Constructor Details
-
RegExps
public RegExps()Constructor for RegExps.
-
-
Method Details
-
insert
-
insert
-
addStates
-
getNum
public int getNum()getNum.- Returns:
- a int.
-
isBOL
public boolean isBOL(int num) isBOL.- Parameters:
num- a int.- Returns:
- a boolean.
-
getLookAhead
-
isEOF
public boolean isEOF(int num) isEOF.- Parameters:
num- a int.- Returns:
- a boolean.
-
getStates
-
getRegExp
-
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
-
NFASize
-
checkLookAheads
public void checkLookAheads()checkLookAheads. -
normaliseMacros
Expand all macro calls in regexp and lookahead rules. -
normaliseCCLs
Normalise all character class expressions in regexp and lookahead rules.- Parameters:
f- the spec file for error reporting
-
expandPreClasses
public void expandPreClasses(Map<Integer, IntCharSet> preclassCache, CharClasses charClasses, boolean caseless) Replace all predefined character classes with primitive IntCharSet classes.Assumes normalised expressions.
-
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 normalised expressions.
-