# -*- coding: utf-8 -*- # For emacs: (setq mac-option-modifier nil) terminals C P L cdecl := "class" C@{P} "extends" t "{" {fdecl} {mdecl} "}" fdecl := @w t x mdecl := @{P} !{f} {c} t m({t x}) "{" mbody "}" mbody := "new" @{P}; {t x}; {b} c := "pre" {-f} | "par" {-f} b := L: {s} "goto" {L}; # Note: the \\\\ after return e indicate a line break in # generated text s := x = e ; | x.x = e ; | "return" e ; \\\\ | "forkjoin" "{" {s} "}" | "atomic" "{" {s} "}" # Note: any text after the \\\\ becomes a label e := x \\\\ variable reference | x.x \\\\ field | x.m@{w} (x) \\\\ member call | "new" C@{w} \\\\ new statement | (t) x \\\\ cast t := C@{q} f := F({w}) q := ? | ? ⊆ w | w w := P | ∅ | w ∪ w | w ∩ w