From 32a1f21463c33b8a5a620406ae24e2d7a2a9fc05 Mon Sep 17 00:00:00 2001 From: Michael Schimmel Date: Fri, 6 Mar 2026 11:35:18 +0100 Subject: [PATCH] Add language specification document This commit introduces the BNF for the Myc language, along with its core semantics, data types, and evaluation logic. It also details the macro system and provides an overview of the standard library. This document serves as a foundational context for LLMs to understand and generate Myc code. --- docs/BNF.md | 161 ++++++++++++++++++++++++++++++++++++++++++++ examples/err.myc | 14 ++++ examples/sma.myc | 24 +++++++ gemini.md | 8 ++- lib/advanced.myc | 19 ------ lib/indicators.myc | 30 --------- src/ast/rtl/core.rs | 15 +++++ 7 files changed, 221 insertions(+), 50 deletions(-) create mode 100644 docs/BNF.md create mode 100644 examples/err.myc create mode 100644 examples/sma.myc delete mode 100644 lib/advanced.myc delete mode 100644 lib/indicators.myc diff --git a/docs/BNF.md b/docs/BNF.md new file mode 100644 index 0000000..e6ecc1a --- /dev/null +++ b/docs/BNF.md @@ -0,0 +1,161 @@ +# Myc Language Specification & LLM Prompt Guide + +This document defines the syntax (BNF) and semantics of the Myc language, a Lisp-like language designed for financial analysis with first-class abstract syntax trees (ASTs), closures, and a pipeline evaluation model. It serves as a foundational context for Large Language Models (LLMs) to understand and write idiomatic Myc code. + +## 1. Syntax (BNF) + +```ebnf + ::= * + + ::= + | + | + | + |