Dead end with macros

This commit is contained in:
2023-03-05 19:55:38 +00:00
parent ca23edabe4
commit b9d47c3181
30 changed files with 1518 additions and 332 deletions

15
examples/lite/main.orc Normal file
View File

@@ -0,0 +1,15 @@
TRUE := \t.\f.t
FALSE := \t.\f.f
NOT := \x.x FALSE TRUE
AND := \x.\y.x y FALSE
OR := \x.\y. x TRUE y
Y := \f.(\x.f (x x))(\x.f (x x))
(! ...$expr) =10=> (NOT ...$expr)
(...$lhs & ...$rhs) =10=> (AND (...$lhs) (...$rhs))
(...$lhs | ...$rhs) =20=> (OR (...$lhs) (...$rhs))
main := (TRUE & TRUE | FALSE & FALSE)
(start_token ...$rest) ==> (carriage(()) ...$rest)
(..$prefix carriage($state) $next ..$rest) ==> (..$prefix $out carriage(??) ..$rest)