Sha256: e1e9e9903afdfbad3be4122fcfba575275ed1fbdc67c4e7443f3696541833a23
Contents?: true
Size: 779 Bytes
Versions: 3
Compression:
Stored size: 779 Bytes
Contents
# File: repetition.rb require_relative "monadic_expression" # Access the superclass module Regex # This module is used as a namespace # Abstract class. An unary matching operator. # It succeeds when the specified reptition of the child expression succeeds to match # the subject text in the same serial arrangement class Repetition < MonadicExpression attr_reader(:multiplicity) # Constructor. def initialize(childExpressionToRepeat, aMultiplicity) super(childExpressionToRepeat) @multiplicity = aMultiplicity end public # Conversion method re-definition. # Purpose: Return the String representation of the concatented expressions. def to_str() result = all_child_text() + multiplicity.to_str() return result end end # class end # module # End of file
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rley-0.5.11 | examples/general/SRL/lib/regex/repetition.rb |
rley-0.5.10 | examples/general/SRL/lib/regex/repetition.rb |
rley-0.5.09 | examples/general/SRL/lib/regex/repetition.rb |