-
Notifications
You must be signed in to change notification settings - Fork 202
Attribute description
Mikhail Yakshin edited this page Mar 1, 2016
·
10 revisions
Attribute description specifies how to read one particular attribute — typically, a single number, a string, array of bytes, etc. Attribute can also reference other complex structures by specifying user type given in type description. Each attribute is typically compiled into equivalent parsing instruction(s) in target language.
- Contents: a string that matches
/^[a-z][a-z0-9_]*$/— i.e. starts with lowercase letter and then may contain lowercase letters, numbers and underscore - Purpose: identify attribute among others
- Influences: used as variable / field name in target programming language
- Mandatory: yes
- Contents: one of primitive data types or a user-specified type name
- Purpose: define a data type for an attribute
- Influences: how much bytes would be read, data type and contents of a variable in target programming language
- Mandatory: no — if
typeis not specified, then attribute is considered a generic byte sequence