Jade Language Syntax
The syntax definition for Jade methods and schema files uses the Extended Backus Naur Formalism (EBNF). An EBNF specification is a sequence of syntax rules.
EBNF symbols are used to precisely and concisely specify the syntax. The symbols used in EBNF are:
- 
                    Parentheses (that is, the ( and ) symbols) group alternative terms 
- 
                    The vertical bar (|) separates alternative terms 
- 
                    Brackets ([ ]) identify optional expressions 
- 
                    Braces ({ }) identify expressions that can occur zero or more times 
- 
                    Character sequences enclosed in double quotes ("") identify terminal symbols, or keywords, of the Jade language 
- 
                    An identifier is a sequence of letters and digits, beginning with a letter 
The following example shows meals that are defined with a sequence of EBNF symbols.
appetizer = "artichoke" | "oysters"
dessert = "ice cream" | "fruit"
fruit = "apple" | "orange" | "pear"
meat = "beef" | "lamb" | "fish"
vegetable = "broccoli" | "carrots" | "peas"
meal = [appetiser] meat ("potatoes" | "rice") {vegetable} [dessert]
            Examples of meals defined by these rules are:
beef potatoes artichoke fish rice peas broccoli ice cream lamb rice carrots carrots carrots peas broccoli pear oysters beef rice orange
A Jade method has the following syntax.
method-name ([parameters]) [: return-type] [method-options];
[constants
    constant-declarations]
[vars
    variable-declarations]
begin
    Jade-instructions
[epilog
    epilog-instructions]
end;
         
            