From ad0df667aabf58a289878f2a68e26a877c0be6fd Mon Sep 17 00:00:00 2001 From: James Eversole Date: Wed, 18 Dec 2024 19:15:56 -0600 Subject: [PATCH] Add README and LICENSE files --- LICENSE | 7 +++++++ README.md | 18 ++++++++++++++++++ src/Parser.hs | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6a7b34a --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +ISC LICENSE + +Copyright James Eversole (james@eversole.co) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1e51b3f --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# sapling + +sapling is a "micro-language" that I'm working on to investigate [Tree Calculus](https://treecalcul.us/specification) . + +It offers a minimal amount of syntax sugar: + +- `t` operator behaving by the rules of Tree Calculus +- Variable definitions +- Lambda abstractions +- List, Integer, and String literals + +This is an active experimentation project by someone who has no idea what they're doing. + +## Acknowledgements + +Tree Calculus was discovered by [Barry Jay](https://github.com/barry-jay-personal/blog). + +[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus. If sapling sounds interesting but you don't want to figure out how to compile Haskell, check his site out. diff --git a/src/Parser.hs b/src/Parser.hs index ce36e13..c711784 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -114,10 +114,10 @@ parseStrLiteral = do LStringLiteral value <- satisfy isStringLiteral return (SStr value) -isKeywordT (LKeywordT) = True +isKeywordT (LKeywordT) = True isKeywordT _ = False -isIdentifier (LIdentifier _) = True +isIdentifier (LIdentifier _) = True isIdentifier _ = False isIntegerLiteral (LIntegerLiteral _) = True