Sha256: 741dc39d4c6fd1474816dfd9ede9d2a7109e825cec676ffa7a3630b608f4166d

Contents?: true

Size: 648 Bytes

Versions: 7

Compression:

Stored size: 648 Bytes

Contents

# File: monadic_expression.rb

require_relative "compound_expression"	# Access the superclass

module Regex # This module is used as a namespace

# Abstract class. An element that is part of a regular expression &  
# that can have up to one child sub-expression.
class MonadicExpression < CompoundExpression
	# The (optional) child sub-expression
	attr_reader(:child)
	
	# Constructor.
	def initialize(theChild)
		super()	
		@child = theChild
	end
	
protected
	# Return the text representation of the child (if any)
	def all_child_text()
		result = child.nil? ? '' : child.to_str()
		
		return result
	end

end # class

end # module

# End of file

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rley-0.6.00 examples/general/SRL/lib/regex/monadic_expression.rb
rley-0.5.14 examples/general/SRL/lib/regex/monadic_expression.rb
rley-0.5.13 examples/general/SRL/lib/regex/monadic_expression.rb
rley-0.5.12 examples/general/SRL/lib/regex/monadic_expression.rb
rley-0.5.11 examples/general/SRL/lib/regex/monadic_expression.rb
rley-0.5.10 examples/general/SRL/lib/regex/monadic_expression.rb
rley-0.5.09 examples/general/SRL/lib/regex/monadic_expression.rb