Module: Musa::GenerativeGrammar

Extended by:
GenerativeGrammar
Included in:
GenerativeGrammar
Defined in:
lib/musa-dsl/generative/generative-grammar.rb

Defined Under Namespace

Classes: OptionElement

Instance Method Summary collapse

Instance Method Details

#N(content = nil, **attributes, &block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/musa-dsl/generative/generative-grammar.rb', line 7

def N(content = nil, **attributes, &block)
  if block_given? && content.nil?
    Implementation::BlockNode.new(attributes, &block)
  else
    Implementation::FinalNode.new(content, attributes)
  end
end

#PNObject



15
16
17
# File 'lib/musa-dsl/generative/generative-grammar.rb', line 15

def PN
  Implementation::ProxyNode.new
end