Command: cvt_a

NEST HelpDesk Command Index NEST Quick Reference

Name:
 cvt_a - Converts an array to the equivalent type trie.

Synopsis:
  /name array cvt_a -> trie

Description:
   cvt_a tries to construct a type-trie object from a given array.
   The supplied literal is used as name for the trie-object.

   WARNING:
   Be very careful when using this function. If the supplied 
   array is not well formed, the interpreter will abort
   ungracefully! 

   Tries should not be constructed fron scratch using cvt_a.
   Use the operators trie and addtotrie for this purpose.
   Rather, cvt_a is provided to correct minor errors in tries
   with the help of cva_t.
 
Parameters:

   The supplied array is the root trie node.
   The layout of each trie node must conform to the following
   pattern:
   [/type [next] [alt]] for non-leaf nodes and
   [object]            for leaf nodes.

   /type is  a literal, representing the expected type.
   object is any type of token. It is returned when this leaf of
          the trie is reached. 
   [next] is an array, representig the next parameter levels.
   [alt] is an array, representig parameter alternatives
         at the current level.

   This pattern recursively defines a type-trie. Note, however,
   that violations of this definition are handled ungracefully.

Examples:
   /pop [/anytype [-pop-]]  cvt_a -> trie 

Diagnostics:
   This operation is low level and does not raise
   errors. If the array is ill-formed, the interpreter will
   abort! 

Bugs:
   Errors should be handled gracefully.
   
Author:
   Marc-Oliver Gewaltig

FirstVersion:
   May 20 1999

Remarks:
   cvt_a is the inverse function to cva_t. 
   If cvt_a is applied to the result of cva_t, it yields
   the original argument:
   /name [array] cvt_a cva_t -> /name [array]
   
SeeAlso:cva_t trie addtotrie type cst cva cv1d cv2d cvd cvi cvlit cvn cvs
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/sli/slitypecheck.cc

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative