Package EDU.purdue.jtb.parser
Class RegularExpression_
- java.lang.Object
-
- EDU.purdue.jtb.parser.Expansion_
-
- EDU.purdue.jtb.parser.RegularExpression_
-
- Direct Known Subclasses:
RCharacterList
,RChoice
,REndOfFile
,RJustName
,ROneOrMore
,RRepetitionRange
,RSequence
,RStringLiteral
,RZeroOrMore
,RZeroOrOne
public abstract class RegularExpression_ extends Expansion_
Describes regular expressions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class EDU.purdue.jtb.parser.Expansion_
Expansion_.EXP_TYPE
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
label
The label of the regular expression (if any).java.util.List<Token>
lhsTokens
The LHS to which the token value of the regular expression is assigned.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.Token
rhsToken
We now allow qualified access to token members.TokenProduction
tpContext
If this is a top-level regular expression (nested directly within a TokenProduction), then this field point to that TokenProduction object.-
Fields inherited from class EDU.purdue.jtb.parser.Expansion_
EOL, inMinimumSize, myGeneration, nextGenerationIndex, parent
-
-
Constructor Summary
Constructors Constructor Description RegularExpression_()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
CanMatchAnyChar()
java.lang.StringBuilder
dump(int indent, java.util.Set<java.lang.Object> alreadyDumped)
-
Methods inherited from class EDU.purdue.jtb.parser.Expansion_
dumpPrefix, 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 "".
-
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.
-
-
Method Detail
-
CanMatchAnyChar
public boolean CanMatchAnyChar()
- Returns:
- always false
-
dump
public java.lang.StringBuilder dump(int indent, java.util.Set<java.lang.Object> alreadyDumped)
- Overrides:
dump
in classExpansion_
- Parameters:
indent
- - the number of spaces for indentingalreadyDumped
- - a Set of objects already dumped (unused)- Returns:
- the formatted string dumping the class
-
-