: meaning "is define as"
| meaning "or"
[ ] square brackets surround optional item
{ } curly brackets surround repetetive items (zero or more times)
( ) round brackets surround alternatives
' ' quotes surround one character non-alpha-numeric terminals
program : {statement}
statement : command | control_structure | definition
command : procedure_call | directive
control_structure : while exp {command | exit} ';'
| loop exp {command | exit} ';'
| for user_name exp exp {command | exit} ';'
| step user_name exp exp exp {command | exit} ';'
| if exp {command} {elsif exp {command}} [else {command}] ';'
| using user_name {command} ';'
definition : procedure_definition | function_definition
procedure_call : name {exp}
directive : name {exp}
exp : variable_call | function_call | literal
name : built_in_name | user_name
user_name : first_letter {letter | digit |_|.|!|? }
variable_call : name | (user_name'['exp']')
function_call : name {exp}
literal : number | list | string
built_in_name : name{name}
directive : name {exp}
procedure_definition : command user_name {par} ':' block ';'
function_definition : function user_name {par}':' block return exp
{block return exp} ';'
block : {statement}
exp : number | literal | list_construct | table_construct | var | function_call
var : [namespace'.']user_name[':'key]{'[' exp ']'}
number : ['+'|'-']digit{digit}['.'digit{digit}[['+'|'-']'e'|'E'digit{digit}]]
| '$'hex_digit{hex_digit}
digit : '0'...'9'
hex_digit : digit | 'a'...'f'
name : alpha | sym {alpha | sym | digit}
sym : '_'|'+'|'-'|'*'|'/'|'='|'<'|'>'|'?'|'!'|'~'|'%'|'$'|'@'|';'|':'|'`'
Created on September 3, 2001