From 4fe495620bb4e6b86e2bbd4707acd3d17dfcead6 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Mon, 18 May 2026 09:51:17 +0200 Subject: [PATCH] feat: add annotations EBNF --- syntax/annotations.ebnf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 syntax/annotations.ebnf diff --git a/syntax/annotations.ebnf b/syntax/annotations.ebnf new file mode 100644 index 0000000..73caf4f --- /dev/null +++ b/syntax/annotations.ebnf @@ -0,0 +1,20 @@ +identifier ::= '[a-zA-Z][a-zA-Z_]*' + +integer ::= '\d+' +number ::= integer ["." integer] +boolean ::= "False" | "True" +none ::= "None" + +value ::= number | boolean | none +lambda-value ::= "_" | value +lambda-operator ::= ">" | "<" | ">=" | "<=" | "==" | "!=" +lambda ::= lambda-value lambda-operator lambda-value + +constraint ::= identifier | "(" lambda ")" +base-type ::= identifier +type ::= base-type { "+" constraint } + +column-type ::= type | "_" +column-def ::= [ identifier ":" ] column-type + +frame-def ::= column-def { "," column-def }