java.lang.Object
coneforest.psylla.core.PsyRegExp
The representation of
regexp.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of theregexpoperator.Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newregexpfrom the givenstring.Constructs a newregexpfrom the character sequence. -
Method Summary
Modifier and TypeMethodDescriptionReturns the pattern.static PsyRegExpparseLiteral(String image) Returns thestringobject obtained as a result of parsing the literal token image.Returns the syntactic representation of this object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
-
Field Details
-
PSY_REGEXP
Context action of theregexpoperator.
-
-
Constructor Details
-
PsyRegExp
Constructs a newregexpfrom the character sequence.- Parameters:
cs- the character sequence.- Throws:
PsyInvalidRegExpException- when a syntax error in a regular-expression pattern occured.
-
PsyRegExp
Constructs a newregexpfrom the givenstring.- Parameters:
oName- the givenstring.- Throws:
PsyInvalidRegExpException- when a syntax error in a regular-expression pattern occured.
-
-
Method Details
-
getPattern
Returns the pattern.- Returns:
- the pattern
-
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object
-
parseLiteral
public static PsyRegExp parseLiteral(String image) throws PsyInvalidRegExpException, PsySyntaxErrorException Returns thestringobject obtained as a result of parsing the literal token image.- Parameters:
image- the literal token image.- Returns:
- the
stringobject obtained as a result of parsing the literal token image - Throws:
PsySyntaxErrorException- when the literal image is syntactically incorrect.PsyInvalidRegExpException
-