# (* # Trixy is fully whitespace independent, this means that you can # interleave whitespace in the definitions. # The same applies to comments: # - Line comments (`// \n`) and # - Block comments (`/* */`). # *) CommandSpec = { Function | Namespace | Enumeration | Structure } ; Function = "fn" Identifier "(" [NamedType {"," NamedType }] ")" [ "->" Type ] ";" ; Namespace = "nasp" Identifier "{" {Function | Namespace | Enumeration | Structure} "}" ; Structure = "struct" Identifier "{" [NamedType {"," NamedType } [","]] "}" ";"; Enumeration = "enum" Identifier "{" [Identifier {"," Identifier} [","]] "}" ";"; Identifier = CHARACTER { NUMBER | CHARACTER } ; NamedType = Identifier ":" Type; # (* # vim: ft=ebnf # *)