=    Cls.     ClsRuby

         ClsRuby
 ,         
 .          
    .

== ClsRuby::Tag

 ClsRuby::Tag      .   
  , ..    tag_on_tok_nonspace
 tag_on_tok_string   ClsRuby::UnexpectedTokenEx.

,  ClsRuby::Tag       
     ,     
 ClsRuby    - .

== ClsRuby::TagAny

 ClsRuby::TagAny   ,    
,    .  ClsRuby::TagAny 
-    XML   DOM- --  
       ,  
     DOM-.

 ClsRuby::TagAny       
ClsRuby.   ,      
 .  ,    ,   ,
      ,  
,     .   
ClsRuby::TagAny  .

  ClsRuby::TagAny , ,  
     . , ClsRuby
      . -
  -   :
  {request
    {name <str> }
    {params ... }
    {extension ... }
  }
  {params}  ,    {extension}  
 .  ,     
 ,   {extension}   ClsRuby::TagAny:
  class TagRequest < ClsRuby::TagNoValue
    mandatory_child_tag :name, ClsRuby::TagStringScalar
    mandatory_child_tag :params, TagRequestParams
    child_tag :extension, ClsRuby::TagAny
  end

== ClsRuby::TagNoValue

 ClsRuby::TagNoValue      
ClsRuby.    --     .
,   :
  {project
    {name <str> }
    {location <str> }
    {files <str>* }
    {resources <str>* }
  }
  {project}     :nonspace  :string, 
   {name}, {location}, {files}  {resources}. 
  {project}     
ClsRuby::TagNoValue:
  class TagProject < ClsRuby::TagNoValue
    mandatory_child_tag :name, ClsRuby::TagStringScalar
    ...
  end

   ClsRuby::TagNoValue --  . ..   
     . :
  {project
    ...
    {use-absolute-path}
    ...
  }
 {use-absolute-path}    ,     
 ,   ,    
"  ".       :
  class TagProject < ClsRuby::TagNoValue
    ...
    child_tag :use_absolute_path, ClsRuby::TagNoValue,
        :name => 'use-absolute-path'
    ...
    def value
      r = Project.new ...
      ...
      #   'use-absolute-path' ,  
      #  .
      r.use_absolute_path = @use_absolute_path.tag_defined?
      ...
    end
  end

== ClsRuby::TagScalar

 ClsRuby::TagScalar,     ClsRuby::TagNoValue,   
    .   --   
    . .. ClsRuby::TagScalar
    :
  {name <str> }
  {location <str> }
  {min <int> }
  {max <int> }

      :format,  
 .  ClsRuby    :
* ClsRuby::SCALAR_INT ( );
* ClsRuby::SCALAR_UINT ( );
* ClsRuby::SCALAR_FLOAT ();
* ClsRuby::SCALAR_STRING (    ,  :string);
* ClsRuby::SCALAR_NONSPACE_STRING (  ,  :nonspace);
* ClsRuby::TimeXmlSchemaScalarParser (/   XML Schema).

   ,     
,   ClsRuby::ScalarFormat.

 ClsRuby::TagScalar      
.      :constraint,    
    .   
:constraint    ClsRuby::ScalarChecker
(,     Range).

,  ,    :
  [{hours <unit:1..24>}]
  [{minutes <uint:1..59>}]
  [{seconds <uint:1..59>}]
   :
  class TagTimePeriod < ClsRuby::TagNoValue
    child_tag :hours, ClsRuby::TagScalar,
        :type => ClsRuby::SCALAR_UINT,
        :constraint => 1..24

    child_tag :minutes, ClsRuby::TagScalar,
        :type => ClsRuby::SCALAR_UINT,
        :constraint => 1...60

    child_tag :seconds, ClsRuby::TagScalar,
        :type => ClsRuby::SCALAR_UINT,
        :constraint => 1...60
    ...
  end
,  ,    ClsRuby::TagUintScalar:
  class TagTimePeriod < ClsRuby::TagNoValue
    child_tag :hours, ClsRuby::TagUintScalar,
        :constraint => 1..24

    child_tag :minutes, ClsRuby::TagUintScalar,
        :constraint => 1...60

    child_tag :seconds, ClsRuby::TagUintScalar,
        :constraint => 1...60
    ...
  end

=== ClsRuby::TagFloatScalar

   ClsRuby::TagScalar   
ClsRuby::SCALAR_FLOAT. ..   :
  {min <float> }
  :
  child_tag :min, ClsRuby::TagFloatScalar

=== ClsRuby::TagIntScalar

   ClsRuby::TagScalar   
ClsRuby::SCALAR_INT. ..   :
  {min <int> }
  :
  child_tag :min, ClsRuby::TagIntScalar

=== ClsRuby::TagUintScalar

   ClsRuby::TagScalar   
ClsRuby::SCALAR_UINT. ..   :
  {min <uint> }
  :
  child_tag :min, ClsRuby::TagUintScalar

=== ClsRuby::TagStringScalar

   ClsRuby::TagScalar   
ClsRuby::SCALAR_STRING. ..   :
  {include <str> }
  :
  child_tag :include, ClsRuby::TagStringScalar

== ClsRuby::TagScalarVector

 ClsRuby::TagScalarVector   ClsRuby::TagScalar  ,
        . :
  {include-paths <str> [<str> [<str>...]] }
  {init-bytes <uint> [<uint> [<uint>...]] }

 ClsRuby::TagScalarVector      :format 
:constraint,    ClsRuby::TagScalar.

,  ,    :
  {device-init-info
    {devices <nonspace>+ }
    {init-bytes <uint:0..255>+ }
    {shutdown-bytes <uint:0..255>+ }
  }
  :
  class TagDeviceInitInfo < ClsRuby::TagNoValue
    default_tag_params  :name => 'device-init-info'

    mandatory_child_tag :devices, ClsRuby::TagScalarVector,
        :format => ClsRuby::SCALAR_NONSPACE_STRING

    mandatory_child_tag :init_bytes, ClsRuby::TagScalarVector,
        :format => ClsRuby::SCALAR_UINT,
        :constraint => 0..255,
        :name => 'init-bytes'

    mandatory_child_tag :shutdown_bytes, ClsRuby::TagScalarVector,
        :format => ClsRuby::SCALAR_UINT,
        :constraint => 0..255,
        :name => 'shutdown-bytes'
    ...
  end

== ClsRuby::TagVectorOfDifferentTags

 ClsRuby::TagVectorOfDifferentTags   ,  
        , 
      .     
 . ,      :
  {book
    {part <str>}*
    {chapter <str>}*
    {section <str>}*
    {subsection <str>}*
    {subsubsection <str>}*
    {par <TagParagraph>}*
    {include <TagIncludeFragment>}*
  }
  {part}, {chapter}, {section}  .  ,  
      .   
 :
  child_tag :book, ClsRuby::TagVectorOfDifferentTags,
      :nested_tags => [
          { :name => 'part', :type => ClsRuby::TagStringScalar },
          { :name => 'chapter', :type => ClsRuby::TagStringScalar },
          { :name => 'section', :type => ClsRuby::TagStringScalar },
          { :name => 'subsection', :type => ClsRuby::TagStringScalar },
          { :name => 'subsubsection', :type => ClsRuby::TagStringScalar },
          { :name => 'par', :type => TagParagraph },
          { :name => 'include', :type => TagIncludeFragment } ]

== ClsRuby::TagVectorOfTags

 ClsRuby::TagVectorOfTags    
TagVectorOfDifferentTags --    
     (..      
    ). :
  {message
    {name <nonspace> }
    {field {name <str> } {type <str>}}*
  }
   :
  class TagField < ClsRuby::TagNoValue
    mandatory_child_tag :name, ClsRuby::TagStringScalar
    mandatory_child_tag :type, ClsRuby::TagStringScalar
    ...
  end
  class TagMessage < ClsRuby::TagNoValue
    mandatory_child_tag :name, ClsRuby::TagScalar,
        :format => ClsRuby::SCALAR_NONSPACE_STRING

    child_tag :field, ClsRuby::TagVectorOfTags,
        :type => TagField
    ...
  end

# vim:ts=2:sts=2:sw=2:expandtab:ft=txt:tw=78

