Skip to content

Term Rewriting System (TRS) to transform expression trees based on user-defined rewrite rules

License

Notifications You must be signed in to change notification settings

Sveske-Juice/carl

Repository files navigation

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

About

Term Rewriting System (TRS) to transform expression trees based on user-defined rewrite rules

Resources

License

Stars

Watchers

Forks

Languages