Flavor was designed to be an intuitive and natural extension of the typing system of object-oriented languages like C++ and Java. This means that the bitstream representation information is placed together with the data declarations in a single place. In C++ and Java, this place is where a class is defined.
Flavor has been explicitly designed to follow a declarative approach to bitstream syntax specification. In other words, the designer is specifying how the data is laid out on the bitstream, and does not detail a step-by-step procedure that parses it. This latter procedural approach would severely limit both the expressive power as well as the capability for automated processing and optimization, as it would eliminate the necessary level of abstraction. As a result of this declarative approach, Flavor does not have functions or methods.
An additional feature of combining type declaration and bitstream representation is that the underlying object hierarchy of the base programming language (C++ or Java), becomes quite naturally the object hierarchy for bitstream representation purposes as well. This is an important benefit for ease of application development, and it also allows Flavor to have a very rich typing system itself.
In general, Flavor follows the syntax rules of C++ and Java. You can safely assume that all C++ and Java features are at your disposal. When C++ and Java differ, the most restrictive rule between the two languages applies.
However, the following should be kept in mind. Flavor does not have functions or class
methods. Its purpose is to declare parsable variables in the right order and with the
right parse size, as this is what defines the bitstream syntax. As a result, regular
statements (if, for, while, etc.) appear together
with variable declarations. Also, Flavor does not support structures, enumerations,
pointers, references, casts, the sizeof() operator, and does not use the C++
preprocessor.
The specification has the following sections. When applicable, at the top of a section we include a table with the syntax summary.
Should you find any problems with this document, we would appreciate your feedback.
Copyright © 1997 Alexandros Eleftheriadis
All Rights Reserved