Syntax

BNF:

<typedef>        --> typedef <typename>
                             ( <type> )

<declaration>    --> <name> ( <type> |
                              <typename> )

<type>           --> <primitive type> |
                     array ( <type> ) <dimension> |
                     struct [( <declaration> )]+  |
                     addr ( <type> )

<primitive type> --> int | char |
                     float ... etc.

<typename>       --> "a name introduced by a typedef"

<name>           --> <letter>+ ; <letter> --> 'a'...'z'

<dimension>      --> "a positive integer"

According to this grammar, one can translate types from programming languages like C. An example:

struct mystruct {
   int   i;
   char *string;   // allocated to 10
};
is translated into:
typedef (mystruct
          (struct
	     (i (int))
	     (string
	        (addr (array (char) 10)))))

s (addr (mystruct))


Send data:

<send-function>  --> send <var name> <type> <addr desc>

<addr desc>      --> ( <address> <protocol> )

<protocol>       --> ( file | tcp )

<address>        --> ( <filename> | <ip addr> )

<ip addr>        --> ( <ip> : <portno> )