Package jflex
Class SemCheck
java.lang.Object
jflex.SemCheck
Performs simple semantic analysis on regular expressions.
- Version:
- JFlex 1.7.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidPerforms semantic analysis for all expressions.static booleanisFiniteChoice(RegExp re) Returns true iff the expression is a finite choice of fixed length expressions.static intReturns length if expression has fixed length, -1 otherwise.static booleanmaybeEmtpy(RegExp re) Checks if the expression potentially matches the empty string.
-
Field Details
-
macros
-
-
Constructor Details
-
SemCheck
public SemCheck()
-
-
Method Details
-
check
Performs semantic analysis for all expressions.Currently checks for empty expressions only.
- Parameters:
rs- the reg exps to be checkedm- the macro table (in expanded form)f- the spec file containing the rules
-
maybeEmtpy
Checks if the expression potentially matches the empty string.- Parameters:
re- aRegExpobject.- Returns:
- a boolean.
-
length
Returns length if expression has fixed length, -1 otherwise.Negation operators are treated as always variable length.
- Parameters:
re- aRegExpobject.- Returns:
- a int.
-
isFiniteChoice
Returns true iff the expression is a finite choice of fixed length expressions.Negation operators are treated as always variable length.
- Parameters:
re- aRegExpobject.- Returns:
- a boolean.
-