---
# System prepended metadata

title: Alucard BNF
tags: [Alucard]

---

###### tags: `Alucard`

# Alucard BNF

This document outlines the BNF for the Alucard syntax specificaiton
```bnf=
;; Top Level

defcircuit ::= (defcircuit <symbol> (<field>* <return>?) <expression>*)

deftype ::= (deftype <symbol> () <type-field>*)

field ::= (<privacy> <symbol> <type>)

type-field ::= (<symbol> <type>)

return ::= (return <type>)

privacy ::= public | private

;; Expression

expression ::= <def> 
             | <check> 
             | <application> 
             | <coerce> 
             | <arr-get>
             | <any-valid-lisp>

def ::= (def (<bind>*) <expressoin>*)

check ::= (check <expression> <type>)

coerce ::= (coerce <expression> <type>)

application ::= (<expression> <expression>*)

arr-get ::= (get <expression> <expression>)

bind ::= (<symbol> <expression>)

expression ::= <valid-lisp>

type ::= <symbol> | (<symbol> <type>*)

symbol ::= <utf8>
```