-
Notifications
You must be signed in to change notification settings - Fork 1
MDL | Rules
cgrinker edited this page Aug 19, 2013
·
7 revisions
Descriptions are split into two parts. Declarations and variables. Declarations describe types, rules, and information about the plugin, and other plugins that depend on it. Variables describe the concrete things provided by the plugin.
Types and variables do not share namespaces.
- All names are alphanumeric with the addition of underscores '_'. But may not start with numerics or underscores.
- Variable names may not start with the sequence "MADZ_" or "madz_", which is reserved for madz compatibility functions ("madz_"), madz extensions ("MADZ_EXT_"), and other internal implementation names.
Provides basic types for describing common in memory formats. As well as composited types of both homogeneous (arrays) and heterogeneous (struct) elements.
- TypeInt(width), TypeInt8, TypeInt16, TypeInt32, TypeInt64: Signed integers of the listed bit width.
VariableDefinition("fooint",TypeInt32) - TypeUInt(width), TypeUInt8, TypeUInt16, TypeUInt32, TypeUInt64: Unsigned integers of the listed bit width.
VariableDefinition("unfooint",TypeUInt32) - TypeFloat(width), TypeFloat32, TypeFloat64: Floating point types of the listed bit width.
VariableDefinition("foofloat",TypeFloat32) - TypeChar: A renamed TypeUInt8, representing the byte type.
VariableDefinition("barchar",TypeChar) - TypePointer(type): A type representing a pointer to the inner type.
TypeDeclaration("AnObject",TypeNone.Pointer())
...
VariableDefinition("ObjectInstance", NamedType("AnObject"))
- TypeArray(type, length): A type representing a homogeneous collection of the inner type of the specified length.
- TypeStruct(elements): A type representing a heterogeneous collection of the types with name and types described by the elements dictionary.
- NamedType(typename): A wrapper for strings which represent symbols in other plugins.