From bb521e7460024a2eb9ae0e9071fea0543a9cabea Mon Sep 17 00:00:00 2001 From: zazed Date: Mon, 23 Oct 2023 15:02:45 +0100 Subject: [PATCH] syntax bnf --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb9af0a..26f5296 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,35 @@ A type inferred, statically-typed functional programming language inspired by OC ## Documentation -- TODO +### Syntax +```bnf + ::= words + + ::= + | + | "let" (*)? "=" + | "let" "=" "in" + | "if" "then" "else" + | "fun" + "->" + | ()+ + + ::= "+" | "++" | "-" | "*" | "/" | "%" | "@" | "::" | "==" | "!=" | "<" | "<=" | ">" | ">=" + + ::= + | + | "[" ? "]" + | int ".." int + | "(" ")" + + ::= (";" )? + + ::= int + | char + | str + | unit + | true + | false +``` ## Running