Package org.javacc.parser
Class RCharacterList
- java.lang.Object
-
- org.javacc.parser.Expansion
-
- org.javacc.parser.RegularExpression
-
- org.javacc.parser.RCharacterList
-
public class RCharacterList extends RegularExpression
Describes character lists.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<Expansion>descriptorsThis is the list of descriptors of the character list.private static char[]diffLowerCaseRangesprivate static char[]diffUpperCaseRangesbooleannegated_listThis is true if a tilde (~) appears before the character list.private booleantransformed-
Fields inherited from class org.javacc.parser.RegularExpression
label, lhsTokens, ordinal, private_rexp, rhsToken, tpContext, walkStatus
-
Fields inherited from class org.javacc.parser.Expansion
eol, inMinimumSize, myGeneration, parent
-
-
Constructor Summary
Constructors Constructor Description RCharacterList()RCharacterList(char c)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanCanMatchAnyChar()NfaGenerateNfa(boolean ignoreCase, LexerContext lexerContext)private static booleanInRange(char c, CharacterRange range)private static booleanOverlaps(CharacterRange r1, CharacterRange r2)(package private) voidRemoveNegation(LexerContext lexerContext)private voidSortDescriptors()private static booleanSubRange(CharacterRange r1, CharacterRange r2)private voidToCaseNeutral(Context context)-
Methods inherited from class org.javacc.parser.RegularExpression
dump
-
Methods inherited from class org.javacc.parser.Expansion
dumpPrefix, getColumn, getLine, getProductionName, hashCode, setColumn, setLine, toString
-
-
-
-
Field Detail
-
negated_list
public boolean negated_list
This is true if a tilde (~) appears before the character list. Otherwise, this is false.
-
descriptors
public java.util.List<Expansion> descriptors
This is the list of descriptors of the character list. Each list entry will narrow to either SingleCharacter or to CharacterRange.
-
diffLowerCaseRanges
private static final char[] diffLowerCaseRanges
-
diffUpperCaseRanges
private static final char[] diffUpperCaseRanges
-
transformed
private boolean transformed
-
-
Method Detail
-
ToCaseNeutral
private void ToCaseNeutral(Context context)
-
GenerateNfa
public Nfa GenerateNfa(boolean ignoreCase, LexerContext lexerContext)
- Specified by:
GenerateNfain classRegularExpression
-
Overlaps
private static boolean Overlaps(CharacterRange r1, CharacterRange r2)
-
SubRange
private static boolean SubRange(CharacterRange r1, CharacterRange r2)
-
InRange
private static boolean InRange(char c, CharacterRange range)
-
SortDescriptors
private void SortDescriptors()
-
RemoveNegation
void RemoveNegation(LexerContext lexerContext)
-
CanMatchAnyChar
public boolean CanMatchAnyChar()
- Overrides:
CanMatchAnyCharin classRegularExpression
-
-