| << Prev | - Up - | Next >> |
In this section, we give a context-free grammar for Core Oz programs.
Statements
<statement> ::= <statement> <statement> | local{ <variable> }+in<statement>end| proc{ <atom> } "{" <variable> { <variable> } "}"<statement> end| " {" <variable> { <variable> } "}"| lock<variable>then<statement>end| thread<statement>end| try<statement>catch<variable>then<statement>end| <variable> " =" <expression>| skip
Expressions
<expression> ::= <variable> | <atom> | <int> | <float> | <label> " (" { <feature> ":" <expression> } [ "..." ] ")"
<label> ::= <variable label> | <atom label>
<feature> ::= <variable> | <atom> | <int>
<statement> += class<variable>[ from{ <variable> }+ ][ prop{ <variable> }+ ][ attr{ "!" <variable> [ ":" <variable> ] }+ ][ feat{ "!" <variable> [ ":" <variable> ] }+ ]{ <method> } end| lock<statement>end| <variable> " <-" <variable>| <variable> " =" <variable> "<-" <variable>| <variable> " =" "@" <variable>| <variable> " ," <variable>| <variable> " ="self
Methods
<method> ::= meth"!" <variable> "(" "..." ")" "=" <variable><statement> end
| << Prev | - Up - | Next >> |