forked from trinitrix/core
1
0
Fork 0
core/trixy/trixy-lang_parser/docs/grammar.ebnf

18 lines
556 B
EBNF

# (*
# 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 } ;
Function = "fn" Identifier "(" {Identifier ":" Type} ")" [ "->" Type ] ";" ;
Namespace = "nasp" Identifier "{" {Function | Namespace} "}" ;
Type = "String" | "Integer" ; # (* This corresponds to the CommandTransferValue *)
Identifier = CHARACTER { NUMBER | CHARACTER } ;
# (*
# vim: ft=ebnf
# *)