Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.07 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.07 KB

Development moved

Project moved to gitlab under the name 'openbirch': https://gitlab.com/Sveske-Juice/openbirch

Build

make to build main carl executable

make tests for unit tests

make docs for Doxygen documentation

BNF of language

<program>               ::= <command>* EOF

<command>               ::= <showStatement> | <applyStatement> | <defineStatement> | <statement>
<showStatement>         ::= "show" <expression> ";"
<applyStatement>        ::= "apply" IDENTIFIER ":" <expression> ";"
<defineStatement>       ::= "define" IDENTIFIER "->" <expression> "=" <expression> ";"

<statement>             ::= <expressionStatement> ";"
<expressionStatement>   ::= <expression>

<expression>            ::= <equality>
<equality>              ::= <comparison> ( ("!=" | "==") <comparison> )*
<comparison>            ::= <term> ( ( ">" | ">=" | "<" | "<=" ) <term> )*
<term>                  ::= <factor> ( ( "+" | "-" ) <factor> )*
<factor>                ::= ( "!" | "-" ) <unary> | <primary>
<primary>               ::= NUMBER | STRING | IDENTIFIER | false | true