Package org.javacc.parser
Class RegularExpression
- java.lang.Object
-
- org.javacc.parser.Expansion
-
- org.javacc.parser.RegularExpression
-
- Direct Known Subclasses:
RCharacterList,RChoice,REndOfFile,RJustName,ROneOrMore,RRepetitionRange,RSequence,RStringLiteral,RZeroOrMore,RZeroOrOne
public abstract class RegularExpression extends Expansion
Describes regular expressions.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringlabelThe label of the regular expression (if any).java.util.List<Token>lhsTokensThe LHS to which the token value of the regular expression is assigned.intordinalThe ordinal value assigned to the regular expression.booleanprivate_rexpThis flag is set if the regular expression has a label prefixed with the # symbol - this indicates that the purpose of the regular expression is solely for defining other regular expressions.TokenrhsTokenWe now allow qualified access to token members.TokenProductiontpContextIf this is a top-level regular expression (nested directly within a TokenProduction), then this field point to that TokenProduction object.(package private) intwalkStatusThe following variable is used to maintain state information for the loop determination algorithm: It is initialized to 0, and set to -1 if this node has been visited in a pre-order walk, and then it is set to 1 if the pre-order walk of the whole graph from this node has been traversed.-
Fields inherited from class org.javacc.parser.Expansion
eol, inMinimumSize, myGeneration, parent
-
-
Constructor Summary
Constructors Constructor Description RegularExpression()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanCanMatchAnyChar()java.lang.StringBufferdump(int indent, java.util.Set<Expansion> alreadyDumped)abstract NfaGenerateNfa(boolean ignoreCase, LexerContext lexerContext)-
Methods inherited from class org.javacc.parser.Expansion
dumpPrefix, getColumn, getLine, getProductionName, hashCode, setColumn, setLine, toString
-
-
-
-
Field Detail
-
label
public java.lang.String label
The label of the regular expression (if any). If no label is present, this is set to "".
-
ordinal
public int ordinal
The ordinal value assigned to the regular expression. It is used for internal processing and passing information between the parser and the lexical analyzer.
-
lhsTokens
public java.util.List<Token> lhsTokens
The LHS to which the token value of the regular expression is assigned. In case there is no LHS, then the list remains empty.
-
rhsToken
public Token rhsToken
We now allow qualified access to token members. Store it here.
-
private_rexp
public boolean private_rexp
This flag is set if the regular expression has a label prefixed with the # symbol - this indicates that the purpose of the regular expression is solely for defining other regular expressions.
-
tpContext
public TokenProduction tpContext
If this is a top-level regular expression (nested directly within a TokenProduction), then this field point to that TokenProduction object.
-
walkStatus
int walkStatus
The following variable is used to maintain state information for the loop determination algorithm: It is initialized to 0, and set to -1 if this node has been visited in a pre-order walk, and then it is set to 1 if the pre-order walk of the whole graph from this node has been traversed. i.e., -1 indicates partially processed, and 1 indicates fully processed.
-
-
Method Detail
-
GenerateNfa
public abstract Nfa GenerateNfa(boolean ignoreCase, LexerContext lexerContext)
-
CanMatchAnyChar
public boolean CanMatchAnyChar()
-
-