Go to the previous, next section.

Type Grammar

The following is a brief outline of the grammar used in parsing the type strings.

<type name>:

<type extend>:
`const'
`volatile'

<type extend list>:
<type extend>
<type extend list> <type extend>

<type spec>:
`void'
`char'
`short'
`int'
`int16'
`int32'
`int64'
`long'
`unsigned'
`unsigned16'
`unsigned32'
`unsigned64'
`float'
`float64'
`double'
<type spec>
<struct/union spec>

<full type spec>:
`%%' next in the arg list
`%'<number>type with id <number>
<type spec>
<type extend list> <type spec>
<type spec> <array disc.>
<type extend list> <type spec> <array disc.>

<named full type spec>:
<type name>
<type spec> <type name>
<type extend list> <type spec> <type name>
<type spec> <type name> <array disc.>
<type extend list> <type spec> <type name> <array disc.>
<func call>

<func call>:
<named full type spec> `(' `)'
<named full type spec> `(' <expr list> `)'
<struct/union spec>:
<type name>
struct `{' <decl. list> `}'
union `{' <decl. list> `}'

<decl. list>:
<named full type spec>
<decl. list>`;' <named full type spec>

<array disc.>:
`[' <number> `]'
<array disc.> `[' <number> `]'

<expr list>:
<full type spec>
<named full type spec>
<expr list> `,' <full type spec>
<expr list> `,' <named full type spec>

Go to the previous, next section.