Module: Stupidedi::Builder::Tokenization

Included in:
BuilderDsl, StateMachine
Defined in:
lib/stupidedi/builder/tokenization.rb

Element Constructors collapse

Element Placeholders collapse

Instance Method Details

#blankvoid

This method returns an undefined value.

Generates a blank element



29
30
31
# File 'lib/stupidedi/builder/tokenization.rb', line 29

def blank
  [:blank, nil, Reader::Position.caller(2)]
end

#composite(*components) ⇒ void

This method returns an undefined value.

Generates a composite element



19
20
21
# File 'lib/stupidedi/builder/tokenization.rb', line 19

def composite(*components)
  [:composite, components, Reader::Position.caller(2)]
end

#defaultvoid

This method returns an undefined value.

Generates the only possible value an element may have, which may be blank. An exception is thrown if the element’s usage requirement is optional, or if there are more than one allowed non-blank values.



51
52
53
# File 'lib/stupidedi/builder/tokenization.rb', line 51

def default
  [:default, nil, Reader::Position.caller(2)]
end

#not_usedvoid

This method returns an undefined value.

Generates a blank element and asserts that the element’s usage requirement is ‘NOT USED`



39
40
41
# File 'lib/stupidedi/builder/tokenization.rb', line 39

def not_used
  [:not_used, nil, Reader::Position.caller(2)]
end

#repeated(*elements) ⇒ void

This method returns an undefined value.

Generates a repeated element (simple or composite)



12
13
14
# File 'lib/stupidedi/builder/tokenization.rb', line 12

def repeated(*elements)
  [:repeated, elements, Reader::Position.caller(2)]
end