32 lines
612 B
EBNF
32 lines
612 B
EBNF
(* ---------- Program ---------- *)
|
|
|
|
program
|
|
= { using-directive }
|
|
namespace-declaration
|
|
{ type-declaration } ;
|
|
|
|
using-directive
|
|
= "using" identifier ["as" identifier] ";" ;
|
|
|
|
namespace-declaration
|
|
= "namespace" identifier ";" ;
|
|
|
|
type-declaration
|
|
= struct-declaration
|
|
| class-declaration ;
|
|
|
|
(* ---------- Structs & Classes ---------- *)
|
|
|
|
parameter-list
|
|
= parameter { "," parameter } ;
|
|
|
|
parameter
|
|
= identifier identifier ;
|
|
|
|
function-declaration
|
|
= identifier identifier "(" [ parameter-list ] ")" block ;
|
|
|
|
(* ---------- Atomics ---------- *)
|
|
|
|
atomic-declaration
|
|
= "At |