Class: RLSM::RE::Union
Overview
Instance Attribute Summary
Attributes inherited from SyntaxNode
#content
Instance Method Summary
collapse
Methods inherited from SyntaxNode
#<=>, [], #initialize, #inspect
Instance Method Details
#first ⇒ Object
377
378
379
|
# File 'lib/rlsm/regexp_parser.rb', line 377
def first
@content.map { |subexpr| subexpr.first }.flatten.sort
end
|
#follow ⇒ Object
385
386
387
|
# File 'lib/rlsm/regexp_parser.rb', line 385
def follow
@content.inject([]) { |result, subexpr| result | subexpr.follow }.sort
end
|
#last ⇒ Object
381
382
383
|
# File 'lib/rlsm/regexp_parser.rb', line 381
def last
@content.map { |subexpr| subexpr.last }.flatten.sort
end
|
#null? ⇒ Boolean
373
374
375
|
# File 'lib/rlsm/regexp_parser.rb', line 373
def null?
@content.any? { |subexpr| subexpr.null? }
end
|
#to_s ⇒ Object
389
390
391
|
# File 'lib/rlsm/regexp_parser.rb', line 389
def to_s
@content.map { |subexpr| subexpr.to_s }.join('|')
end
|