Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 576 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 576 Bytes

Recordscript

a fun language

Boolean expression language Grammar

Bool := true | false
Expression := Bool | if <Expression> then <Expression> else <Expression>

RecordScript Grammar

Parentheses () are literal, triangle brackets <> are not.

number := Int
var : starts with a letter, contains only letters and digits
bool := true | false
value := number | var | bool
op := + -
bracketedExpr := (expression)
letExpr := let <var e> ..1 e
binopExpr := <bracketedExpr | simpleValue> op expression | (expression)
expression := value | letExpr | binopExpr