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

18 lines
556 B
EBNF
Raw Normal View History

# (*
# 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
# *)