| | 81 | ===Statements=== |
| | 82 | |
| | 83 | {{{ |
| | 84 | simple-statement: |
| | 85 | ';' /* noop */ |
| | 86 | | lvalue '=' expr ';' /* assignment */ |
| | 87 | | expr '(' arg-list? ')' ';' /* function call */ |
| | 88 | | (lvalue '=')? '$spawn' expr '(' arg-list? ')' ';' /* process creation */ |
| | 89 | | 'return' expr? ';' /* return from function call */ |
| | 90 | | '$parspawn' expr ',' expr ',' expr ';' |
| | 91 | | (lvalue '=')? '$malloc' '(' expr ',' expr ',' type-name ')' ';' |
| | 92 | |
| | 93 | }}} |
| | 94 | |
| | 95 | Built-in functions: |
| | 96 | {{{ |
| | 97 | void $assert( $bool asserted_expr, ... ); /* assertion with optional error message */ |
| | 98 | void $assume( $bool expr ); /* assumption */ |
| | 99 | void $wait( $proc p ); /* wait until p terminates */ |
| | 100 | void $waitall( $int nprocs, $proc * procs ); /* wait for all procs in list to terminate */ |
| | 101 | void $free( void * ptr ); /* frees something that was $malloc-ed */ |
| | 102 | }}} |
| | 103 | |