Brain Aid Prolog Syntax :

BAP Online Manuals : Compiler Reference Manual : Language Description: : Brain Aid Prolog Syntax :
Previous: Clocksin & Mellish
Next: Type Checking

3.5.3. Brain Aid Prolog Syntax :

Comments may appear at any place, even within clauses. A comment is either enclosed by a pair of '/*' '*/' symbols, or, as an 'end of line' comment, following a '%' character, lasting until the end of the line.

A BAP source file has to start with a module definition. Such a module definition has to start with the ' MODULE ' keyword, followed by an atom containing the name of the module. In this version of BAP the module name has to be identical with the filename of the module without the '.BAP' extension. Only one module definition is allowed in each source file.

After the module definition any number of 'sections' can follow, each started by a keyword. Remember, a keyword must be written in uppercase letters and must not be preceded by non white space characters in the same line. The use of keywords and a description of the sections introduced by them is given in the next chapter. Before we continue this discussion, a short introduction into the various data-types and the BAP type-checking is given.


BAP Online Manuals : Compiler Reference Manual : Language Description: : Brain Aid Prolog Syntax :
Previous: Clocksin & Mellish
Next: Type Checking