From b2cc17cf26e4ee5e327fcbc92fd597ecb15cb75b Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 9 Sep 2022 17:04:00 +0100 Subject: Officially calling it just micro --- CHANGELOG.md | 2 +- README.md | 10 +++++----- language.md | 4 ++-- micro.cabal | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ micro2.cabal | 61 ------------------------------------------------------------ 5 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 micro.cabal delete mode 100644 micro2.cabal diff --git a/CHANGELOG.md b/CHANGELOG.md index 5601c33..0479a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Revision history for micro2 +# Revision history for micro ## 0.1.0.0 -- YYYY-mm-dd diff --git a/README.md b/README.md index c3d961f..987a1d3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Micro2 +# Micro This is not necessarily related to [Micro](https://git.usebox.net/micro-lang/about/), but I couldn't find a better name. -Micro2 is a small statically typed toy programming language. +Micro is a small statically typed toy programming language. Objectives: @@ -28,14 +28,14 @@ Currently the compiler uses parsec (Monadic parser combinators) following this p * Backend - Generator: emit intermediate code for the target (e.g. ASM files); (maybe) Intermediate representation -For updates, please check [micro2 website](https://git.usebox.net/micro2-lang/about/). +For updates, please check [Micro website](https://git.usebox.net/micro2-lang/about/). ## How to build it Requires Haskel and Cabal: ``` -cabal run micro2 +cabal run micro ``` To run the tests use: @@ -50,7 +50,7 @@ TODO ### How does it look like? -This is an example of a micro2 program: +This is an example of a Micro program: ``` def fib(n: u16): u16 { diff --git a/language.md b/language.md index 4044ad1..2354ae5 100644 --- a/language.md +++ b/language.md @@ -39,7 +39,7 @@ TODO: entry point; `main` to be C compatible? ## Modules -A `micro2` file must start with the module name. +A Micro file must start with the module name. ``` # our main module (this is a comment) module main @@ -354,7 +354,7 @@ TODO: a zero ended array of u8 with special initializers ## Operators -Micro2 uses the same operators and almost the same operator precedence as C, from more to less priority: +Micro uses the same operators and almost the same operator precedence as C, from more to less priority: ``` ! - ~ diff --git a/micro.cabal b/micro.cabal new file mode 100644 index 0000000..b62f751 --- /dev/null +++ b/micro.cabal @@ -0,0 +1,61 @@ +cabal-version: 2.4 +name: micro +version: 0.1.0.0 + +synopsis: Micro toy programming language +homepage: https://git.usebox.net/micro2-lang/about/ + +license: GPL-3.0-or-later +author: Juan J. Martinez +maintainer: jjm@usebox.net + +copyright: (c) 2022 Juan J. Martinez +extra-source-files: + CHANGELOG.md + , README.md + , COPYING + +library + exposed-modules: + Micro + Micro.Ast + Micro.Lexer + Micro.Parser + Micro.Error + Micro.Env + Micro.Compiler + Micro.Asm.Sdcc + build-depends: + base ^>= 4.16.1.0 + , parsec ^>= 3.1.15.1 + , mtl ^>= 2.2.2 + , containers ^>= 0.6.5.1 + hs-source-dirs: src + ghc-options: -Wall -Wno-name-shadowing + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Language + build-depends: + base ^>= 4.16.1.0 + , parsec ^>= 3.1.15.1 + , mtl ^>= 2.2.2 + , containers ^>= 0.6.5.1 + , HUnit + , micro + hs-source-dirs: test + default-language: Haskell2010 + +executable micro + main-is: Main.hs + build-depends: + base ^>= 4.16.1.0 + , containers ^>= 0.6.5.1 + , mtl ^>= 2.2.2 + , micro + hs-source-dirs: app + default-language: Haskell2010 + diff --git a/micro2.cabal b/micro2.cabal deleted file mode 100644 index 01c83f3..0000000 --- a/micro2.cabal +++ /dev/null @@ -1,61 +0,0 @@ -cabal-version: 2.4 -name: micro2 -version: 0.1.0.0 - -synopsis: Micro2 toy programming language -homepage: https://git.usebox.net/micro2-lang/about/ - -license: GPL-3.0-or-later -author: Juan J. Martinez -maintainer: jjm@usebox.net - -copyright: (c) 2022 Juan J. Martinez -extra-source-files: - CHANGELOG.md - , README.md - , COPYING - -library - exposed-modules: - Micro - Micro.Ast - Micro.Lexer - Micro.Parser - Micro.Error - Micro.Env - Micro.Compiler - Micro.Asm.Sdcc - build-depends: - base ^>= 4.16.1.0 - , parsec ^>= 3.1.15.1 - , mtl ^>= 2.2.2 - , containers ^>= 0.6.5.1 - hs-source-dirs: src - ghc-options: -Wall -Wno-name-shadowing - default-language: Haskell2010 - -test-suite tests - type: exitcode-stdio-1.0 - main-is: Main.hs - other-modules: - Language - build-depends: - base ^>= 4.16.1.0 - , parsec ^>= 3.1.15.1 - , mtl ^>= 2.2.2 - , containers ^>= 0.6.5.1 - , HUnit - , micro2 - hs-source-dirs: test - default-language: Haskell2010 - -executable micro2 - main-is: Main.hs - build-depends: - base ^>= 4.16.1.0 - , containers ^>= 0.6.5.1 - , mtl ^>= 2.2.2 - , micro2 - hs-source-dirs: app - default-language: Haskell2010 - -- cgit v1.2.3