Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
28281d8
Relax checks
aarne Mar 16, 2026
4454e77
Phase 1: Preparation — Disable Coupled Tests
aarne Mar 16, 2026
18402bf
Phase 2: Define New IR Data Structures
aarne Mar 16, 2026
5b4c4ea
Phase 2: Refine types
aarne Mar 16, 2026
df1d71f
Phase 3: Update Parser Visitor to Produce Nested IR
aarne Mar 16, 2026
97920c9
Phase 4: Update Execution Engine - prep
aarne Mar 16, 2026
a79c892
Phase 4: Update Execution Engine - part 1
aarne Mar 16, 2026
b733086
A new start
aarne Mar 16, 2026
1fb7708
Fallback chains
aarne Mar 16, 2026
a757b1b
V3-Phase 2: Binary + Unary + Concat Expressions
aarne Mar 16, 2026
4376eb1
Features ++
aarne Mar 16, 2026
c99f193
specify v1
aarne Mar 16, 2026
ca515c2
Phase 4: Control Flow
aarne Mar 16, 2026
8673b50
Fix tests
aarne Mar 16, 2026
6296b6f
V3-Phase 8 — AbortSignal + Error Wrapping + Traces
aarne Mar 16, 2026
6a1e99f
Control flow
aarne Mar 16, 2026
462deb7
Enabling tests again
aarne Mar 16, 2026
9a64348
Finish v3 migration
aarne Mar 16, 2026
405c5ae
ExecutionTraceId
aarne Mar 17, 2026
239ba26
V3 is main now
aarne Mar 17, 2026
5ee1c40
Park
aarne Mar 17, 2026
9168d36
Bugfixes
aarne Mar 17, 2026
f213523
Fix e2e tests
aarne Mar 17, 2026
59d7fc7
Recursive printer ... kinda
aarne Mar 17, 2026
1718bab
Delete v1 code ... most of it
aarne Mar 17, 2026
165d366
Move files back
aarne Mar 17, 2026
e47a6db
Fix playground
aarne Mar 17, 2026
9d17b98
Fix api
aarne Mar 17, 2026
625ebf4
Error locations
aarne Mar 17, 2026
1f77980
compiler some work
aarne Mar 18, 2026
2df5bd1
Add findTool method and improve code formatting in codegen.ts
aarne Mar 18, 2026
891fc67
Cleanup imports
aarne Mar 18, 2026
343c185
Perf1
aarne Mar 18, 2026
8484b7d
Perf 2
aarne Mar 18, 2026
82d06c4
Perf 3
aarne Mar 18, 2026
47c6a7f
Perf 4
aarne Mar 18, 2026
7e3d5c5
Compiler features 2
aarne Mar 18, 2026
623bf0e
Features 3
aarne Mar 18, 2026
76e894e
Features 4
aarne Mar 18, 2026
cb34615
compiled all completed - no optimisations
aarne Mar 19, 2026
9e13ed6
Lint
aarne Mar 19, 2026
70b2a0c
Disable compoiled view in CF
aarne Mar 19, 2026
828f2b4
compiler perf 1
aarne Mar 19, 2026
8903821
compiler perf 2
aarne Mar 19, 2026
068e703
compiler perf 3
aarne Mar 19, 2026
84fd223
compiler perf 4
aarne Mar 19, 2026
c32d1f7
Fix astro bundle size
aarne Mar 19, 2026
1aa863f
Remove Cloudflare Worker entrypoint for the docs site
aarne Mar 19, 2026
3f1874e
Object spread scopes
aarne Mar 19, 2026
5f34871
compiler perf 5
aarne Mar 19, 2026
cee9e0d
Cleanup
aarne Mar 19, 2026
c4fde2b
Bugfix
aarne Mar 19, 2026
01bbbd0
compiler perf 6
aarne Mar 19, 2026
23fe258
Docs
aarne Mar 19, 2026
7502d4a
playground highlights
aarne Mar 19, 2026
00f7991
Fixing bugs
aarne Mar 19, 2026
1eced14
NaN fix
aarne Mar 19, 2026
f9de00b
Crypto example
aarne Mar 19, 2026
0f2ad1a
Fuller expression syntax
aarne Mar 19, 2026
f5d4d5c
Add multi-symbol crypto price query example
aarne Mar 19, 2026
89a86fa
Better examples
aarne Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 184 additions & 0 deletions docs/language.ebnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
(* ================================================================= *)
(* BRIDGE LANGUAGE V1.5 (ISO/IEC 14977 COMPLIANT) *)
(* ================================================================= *)
(* --- 1. TOP LEVEL BLOCKS --- *)
program
= "version 1.5", { const
| bridge
| define
| tool };

const
= "const", identifier, "=", json;

bridge
= "bridge", identifier, "{", { statement }, "}";

define
= "define", identifier, "{", { statement }, "}";

tool
= "tool", identifier, "from", identifier, "{", { statement }, [ "on error", "=", json ], "}";

(* --- 2. STATEMENTS & SCOPE --- *)
statement
= with
| wire
| wire_alias
| scope
| spread
| force;

with
= "with", identifier, [ "as", identifier ];

scope
= target, "{", { statement }, "}";

(* Standard assignment *)
wire
= target, ( routing
| "=", json );

(* Local memory assignment *)
wire_alias
= "alias", identifier, routing;

(* Merge into current scope object *)
spread
= "...", routing;

(* Eager side-effect evaluation *)
force
= "force", identifier, [ "catch", "null" ];

(* --- 3. SHARED PATHS & ROUTING --- *)
target
= [ "." ], identifier, { ".", identifier };

(* The Right-Hand Side Evaluation Chain *)
routing
= "<-", expression, { ( "||"
| "??" ), expression }, [ "catch", expression ];

(* --- 4. EXPRESSIONS & REFERENCES --- *)
ref
= identifier, [ [ "?" ], ".", identifier ], { [ "?" ], ".", identifier };

(* An expression is a piped value, optionally followed by a ternary gate *)
expression
= pipe_chain, [ "?", expression, ":", expression ];

(* A pipe chain allows infinite routing: handle:handle:source *)
pipe_chain
= { identifier, [ ".", identifier ], ":" }, base_expression;

base_expression
= json
| ref, "[]", "as", identifier, "{", { statement }, "}"
| ref
| ( "throw"
| "panic" ), [ string ]
| ( "continue"
| "break" ), [ integer ];

(* --- 5. EMBEDDED JSON (RFC 8259) --- *)
json
= object
| array
| string
| number
| "true"
| "false"
| "null";

object
= "{", [ string, ":", json, { ",", string, ":", json } ], "}";

array
= "[", [ json, { ",", json } ], "]";

(* --- 6. LEXICAL RULES (TOKENS) --- *)
identifier
= letter, { letter
| digit
| "_" };

string
= '"', { character - '"' }, '"'
| "'", { character - "'" }, "'";

number
= [ "-" ], integer, [ ".", integer ];

integer
= digit, { digit };

letter
= "a"
| "b"
| "c"
| "d"
| "e"
| "f"
| "g"
| "h"
| "i"
| "j"
| "k"
| "l"
| "m"
| "n"
| "o"
| "p"
| "q"
| "r"
| "s"
| "t"
| "u"
| "v"
| "w"
| "x"
| "y"
| "z"
| "A"
| "B"
| "C"
| "D"
| "E"
| "F"
| "G"
| "H"
| "I"
| "J"
| "K"
| "L"
| "M"
| "N"
| "O"
| "P"
| "Q"
| "R"
| "S"
| "T"
| "U"
| "V"
| "W"
| "X"
| "Y"
| "Z";

digit
= "0"
| "1"
| "2"
| "3"
| "4"
| "5"
| "6"
| "7"
| "8"
| "9";

character
= ? any valid unicode character ?;
Loading
Loading