51 |
%token NOTE "keyword 'note'" |
%token NOTE "keyword 'note'" |
52 |
%token RELEASE "keyword 'release'" |
%token RELEASE "keyword 'release'" |
53 |
%token CONTROLLER "keyword 'controller'" |
%token CONTROLLER "keyword 'controller'" |
54 |
|
%token RPN "keyword 'rpn'" |
55 |
|
%token NRPN "keyword 'nrpn'" |
56 |
%token DECLARE "keyword 'declare'" |
%token DECLARE "keyword 'declare'" |
57 |
%token ASSIGNMENT "operator ':='" |
%token ASSIGNMENT "operator ':='" |
58 |
%token CONST_ "keyword 'const'" |
%token CONST_ "keyword 'const'" |
140 |
context->onController = new OnController($3); |
context->onController = new OnController($3); |
141 |
$$ = context->onController; |
$$ = context->onController; |
142 |
} |
} |
143 |
|
| ON RPN opt_statements END ON { |
144 |
|
if (context->onRpn) |
145 |
|
PARSE_ERR(@2, "Redeclaration of 'rpn' event handler."); |
146 |
|
context->onRpn = new OnRpn($3); |
147 |
|
$$ = context->onRpn; |
148 |
|
} |
149 |
|
| ON NRPN opt_statements END ON { |
150 |
|
if (context->onNrpn) |
151 |
|
PARSE_ERR(@2, "Redeclaration of 'nrpn' event handler."); |
152 |
|
context->onNrpn = new OnNrpn($3); |
153 |
|
$$ = context->onNrpn; |
154 |
|
} |
155 |
|
|
156 |
function_declaration: |
function_declaration: |
157 |
FUNCTION IDENTIFIER opt_statements END FUNCTION { |
FUNCTION IDENTIFIER opt_statements END FUNCTION { |