This repository has been archived on 2024-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
2023-12-18 17:04:21 +00:00
|
|
|
# (*
|
|
|
|
# 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 (`/* */`).
|
|
|
|
# *)
|
|
|
|
|
2023-12-18 19:50:58 +00:00
|
|
|
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} [","]] "}" ";";
|
2023-12-18 17:04:21 +00:00
|
|
|
Identifier = CHARACTER { NUMBER | CHARACTER } ;
|
2023-12-18 19:50:58 +00:00
|
|
|
NamedType = Identifier ":" Type;
|
2023-12-18 17:04:21 +00:00
|
|
|
|
|
|
|
# (*
|
|
|
|
# vim: ft=ebnf
|
|
|
|
# *)
|