[This is preliminary documentation and subject to change.]
Syntax validation checks that each event in the stream corresponds to a valid Enhancement Stream language statement. This validation can either be done as each event is added to the stream or you can validate the entire stream as a batch process.
The stream compiler objects provide several methods to assist you in validating the stream syntax. When you call the EnhEvents.Load or EnhEvents.AddText methods, the compiler objects automatically check the stream syntax and build an array of the errors it finds. EnhEvents.ErrorCount contains the number of errors in the array and EnhEvents.ErrorList enables you to view a particular error in the array.
Note that the error-checking provided by the stream compiler objects is basic, and may not catch every error caused by user input. It is recommended that you implement additional validation in your authoring tool.
Even if the production team is fluent in the stream compiler language and is authoring the stream using a text editor, a syntax validation tool may still be useful. Such a tool, for example, might search through a .str file, notify the user when there is an error, enable the user to fix the error, and re-check the syntax.
A sample syntax checker, Validator, is included with the software accompanying the Broadcast Architecture Programmer's Reference. To locate this sample application, see Broadcast Architecture Sample Applications.