Module: Stupidedi::Parser::Tokenization

Included in:
BuilderDsl, StateMachine, TransactionSets::Validation::Ambiguity
Defined in:
lib/stupidedi/parser/tokenization.rb

Element Constructors collapse

Element Placeholders collapse

Instance Method Details

#blank

This method returns an undefined value.

Generates a blank element


30
31
32
# File 'lib/stupidedi/parser/tokenization.rb', line 30

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

#composite(*components)

This method returns an undefined value.

Generates a composite element


20
21
22
# File 'lib/stupidedi/parser/tokenization.rb', line 20

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

#default

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.


52
53
54
# File 'lib/stupidedi/parser/tokenization.rb', line 52

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

#not_used

This method returns an undefined value.

Generates a blank element and asserts that the element's usage requirement is NOT USED


40
41
42
# File 'lib/stupidedi/parser/tokenization.rb', line 40

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

#repeated(*elements)

This method returns an undefined value.

Generates a repeated element (simple or composite)


13
14
15
# File 'lib/stupidedi/parser/tokenization.rb', line 13

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