This repository contains a simple boolean expression interpreter written in Rust.
It is a solution to this LeetCode problem.
But really, it is just an excuse for me to learn about lexers, parsers, ASTs, and how interpreters work.
<boolean_constant> ::= "t" | "f"
<not_expression> ::= "!" "(" <expression> ")"
<and_expression> ::= "&" "(" <expression> {"," <expression> }* ")"
<or_expression> ::= "|" "(" <expression> {"," <expression> }* ")"
<expression> ::= <boolean_constant> | <not_expression> | <and_expression> | <or_expression>