| 29 | | function: type ID '(' formallist? ')' '{' (typedvar ';')* labelnode* '}' |
| 30 | | labelnode: (ID ':')? node |
| 31 | | node: transition ('or' transition)* // multiple transitions may depart a node |
| 32 | | transition: ((expr | 'else') '->')? action ('goto' ID ';')? |
| 33 | | // if guard is missing, guard is 1 (true) |
| 34 | | // else guard holds when all other guards are false |
| 35 | | // if goto is missing, goto the next location |
| 36 | | action: assignment call spawn noop return wait begin_atomic end_atomic assertion print |
| 37 | | assignment: lval '=' expr ';' |
| | 29 | function: type ID '(' formallist? ')' '{' (typedvar ';')* labelnode* label? '}' |
| | 30 | label: ID ':' |
| | 31 | labelnode: label? node |
| | 32 | node: transition | block |
| | 33 | transition: action ('goto' ID)? ';' |
| | 34 | block: 'choose' '{' guardedaction+ '}' |
| | 35 | guardedaction: (expr | 'else') '->' transition |
| | 36 | action: 'noop' assign call spawn return wait begin_atomic end_atomic assert print |
| | 37 | assign: lval '=' expr |
| 39 | | call: (lval '=')? 'call' invocation ';' |
| 40 | | spawn: (lval '=')? 'spawn' invocation ';' |
| 41 | | noop: ';' |
| 42 | | return: 'return' expr? ';' |
| 43 | | wait : 'wait' expr ';' |
| 44 | | begin_atomic: 'begin_atomic' ';' |
| 45 | | end_atomic: 'end_atomic' ';' |
| 46 | | assertion: 'assert' expr ';' |
| 47 | | print: 'print' exprstrlst ';' |
| | 39 | call: (lval '=')? 'call' invocation |
| | 40 | spawn: (lval '=')? 'spawn' invocation |
| | 41 | return: 'return' expr? |
| | 42 | wait : 'wait' expr |
| | 43 | begin_atomic: 'begin_atomic' |
| | 44 | end_atomic: 'end_atomic' |
| | 45 | assert: 'assert' expr |
| | 46 | print: 'print' exprstrlst |