* [PATCH v2] refactor: rename zero programming language to olang
@ 2024-03-13 11:51 Maria Ruy
2024-03-13 13:05 ` Johnny Richard
2024-03-13 20:22 ` Johnny Richard
0 siblings, 2 replies; 3+ messages in thread
From: Maria Ruy @ 2024-03-13 11:51 UTC (permalink / raw)
To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard, Maria Ruy
From: Johnny Richard <johnny@johnnyrichard.com>
After a long discussion we've decided to rename the project to olang.
This patch removes anything related to zero programming language and
also renames the compiler and extension.
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
Co-authored-by: Maria Ruy <maria.dev456@gmail.com>
---
v2: changed oc to olang
.gitignore | 2 +-
Makefile | 4 ++--
docs/Makefile | 2 +-
docs/index.md | 2 +-
docs/manpages/{0c.md => olang.md} | 8 +++----
docs/pages/hacking.md | 2 +-
docs/template.html | 2 +-
examples/{main_exit.0 => main_exit.ol} | 0
tests/integration/cli_runner.c | 6 ++---
tests/integration/cli_test.c | 32 +++++++++++++-------------
10 files changed, 30 insertions(+), 30 deletions(-)
rename docs/manpages/{0c.md => olang.md} (74%)
rename examples/{main_exit.0 => main_exit.ol} (100%)
diff --git a/.gitignore b/.gitignore
index fc7d161..a565aae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-0c
+olang
build
*.o
docs/site.tar.gz
diff --git a/Makefile b/Makefile
index 662d039..cdfc8e1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-TARGET := 0c
+TARGET := olang
SRC_DIR := src
BUILD_DIR := build
CFLAGS := -Werror -Wall -Wextra -Wmissing-declarations -pedantic -std=c11 -ggdb
@@ -42,7 +42,7 @@ unit-test:
clean:
$(MAKE) -C tests/integration/ clean
$(MAKE) -C tests/unit/ clean
- @rm -rf build/ 0c
+ @rm -rf build/ $(TARGET)
.PHONY: check
check:
diff --git a/docs/Makefile b/docs/Makefile
index 54561a1..d34f9f5 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -21,7 +21,7 @@ clean:
dist: $(DIST_FILE)
.PHONY: manpages
-manpages: $(BUILD_DIR) $(MANPAGES)/0c.1
+manpages: $(BUILD_DIR) $(MANPAGES)/oc.1
$(MANPAGES)/%.1: manpages/%.md
$(PANDOC) -s -t man $< > $@
diff --git a/docs/index.md b/docs/index.md
index b6d5c1a..1a28069 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,6 @@
% Welcome to olang documentation
-The zero programming language.
+The O Programming Language.
## olang manifest
diff --git a/docs/manpages/0c.md b/docs/manpages/olang.md
similarity index 74%
rename from docs/manpages/0c.md
rename to docs/manpages/olang.md
index e3d3cfc..c54c597 100644
--- a/docs/manpages/0c.md
+++ b/docs/manpages/olang.md
@@ -1,21 +1,21 @@
-% 0C(1)
+% OLANG(1)
% olang mantainers
% Feb 2024
# NAME
-0c - zero language compiler
+olang - O Programming Language compiler
# SYNOPSIS
-**0c**
+**olang**
source_file
[**----dump-tokens**]
[**--o** output_file [**----save-temps**]]
# DESCRIPTION
-**0c** is the offical compiler for zero language, it is also a tool that
+**olang** is the offical O programming language compiler, it is also a tool that
contains utilities to help the language development.
# GENERAL OPTIONS
diff --git a/docs/pages/hacking.md b/docs/pages/hacking.md
index ef88791..86db9d6 100644
--- a/docs/pages/hacking.md
+++ b/docs/pages/hacking.md
@@ -53,7 +53,7 @@ Testing
-------
There are two layers of tests **integration** and **unit**. The
-integration test is going to execute the **0c** compiler and check if
+integration test is going to execute the **oc** compiler and check if
the generated binary acts as expected. Unit tests will test C functions.
For both unit and integration we use **munit** framework:
diff --git a/docs/template.html b/docs/template.html
index ecc92a2..4e066d1 100644
--- a/docs/template.html
+++ b/docs/template.html
@@ -52,7 +52,7 @@
</head>
<body>
<header>
- <h1>∅lang | The zero programming language</h1>
+ <h1>olang | The O Programming Language</h1>
<nav>
<a href="/">Index</a> |
<a href="/pages/getting-started.html">Getting started (WIP)</a> |
diff --git a/examples/main_exit.0 b/examples/main_exit.ol
similarity index 100%
rename from examples/main_exit.0
rename to examples/main_exit.ol
diff --git a/tests/integration/cli_runner.c b/tests/integration/cli_runner.c
index fed12ab..636abfc 100644
--- a/tests/integration/cli_runner.c
+++ b/tests/integration/cli_runner.c
@@ -24,7 +24,7 @@
#include <sys/wait.h>
#include <unistd.h>
-#define OLANG_COMPILER_PATH "../../0c"
+#define OLANG_COMPILER_PATH "../../olang"
static int compiler_exists_already_checked = 0;
@@ -83,7 +83,7 @@ cli_runner_compiler_dump_tokens(char *src)
{
cli_result_t result = { 0 };
- char *program_args[] = { "0c", "--dump-tokens", src, NULL };
+ char *program_args[] = { "olang", "--dump-tokens", src, NULL };
cli_runner_compiler(&result, program_args);
return result;
}
@@ -94,7 +94,7 @@ cli_runner_compiler_compile(char *src)
cli_result_t result = { 0 };
create_tmp_file_name(result.binary_path);
- char *program_args[] = { "0c", src, "-o", result.binary_path, NULL };
+ char *program_args[] = { "olang", src, "-o", result.binary_path, NULL };
cli_runner_compiler(&result, program_args);
return result;
}
diff --git a/tests/integration/cli_test.c b/tests/integration/cli_test.c
index c5896df..8cc22f9 100644
--- a/tests/integration/cli_test.c
+++ b/tests/integration/cli_test.c
@@ -22,30 +22,30 @@
static MunitResult
test_cli_dump_tokens(const MunitParameter params[], void *user_data_or_fixture)
{
- cli_result_t compilation_result = cli_runner_compiler_dump_tokens("../../examples/main_exit.0");
+ cli_result_t compilation_result = cli_runner_compiler_dump_tokens("../../examples/main_exit.ol");
munit_assert_int(compilation_result.exec.exit_code, ==, 0);
munit_assert_string_equal(compilation_result.exec.stdout_buf,
- "../../examples/main_exit.0:1:1: <fn>\n"
- "../../examples/main_exit.0:1:4: <identifier>\n"
- "../../examples/main_exit.0:1:8: <(>\n"
- "../../examples/main_exit.0:1:9: <)>\n"
- "../../examples/main_exit.0:1:10: <:>\n"
- "../../examples/main_exit.0:1:12: <identifier>\n"
- "../../examples/main_exit.0:1:16: <{>\n"
- "../../examples/main_exit.0:1:17: <line_feed>\n"
- "../../examples/main_exit.0:2:3: <return>\n"
- "../../examples/main_exit.0:2:10: <number>\n"
- "../../examples/main_exit.0:2:11: <line_feed>\n"
- "../../examples/main_exit.0:3:1: <}>\n"
- "../../examples/main_exit.0:3:2: <line_feed>\n"
- "../../examples/main_exit.0:4:1: <EOF>\n");
+ "../../examples/main_exit.ol:1:1: <fn>\n"
+ "../../examples/main_exit.ol:1:4: <identifier>\n"
+ "../../examples/main_exit.ol:1:8: <(>\n"
+ "../../examples/main_exit.ol:1:9: <)>\n"
+ "../../examples/main_exit.ol:1:10: <:>\n"
+ "../../examples/main_exit.ol:1:12: <identifier>\n"
+ "../../examples/main_exit.ol:1:16: <{>\n"
+ "../../examples/main_exit.ol:1:17: <line_feed>\n"
+ "../../examples/main_exit.ol:2:3: <return>\n"
+ "../../examples/main_exit.ol:2:10: <number>\n"
+ "../../examples/main_exit.ol:2:11: <line_feed>\n"
+ "../../examples/main_exit.ol:3:1: <}>\n"
+ "../../examples/main_exit.ol:3:2: <line_feed>\n"
+ "../../examples/main_exit.ol:4:1: <EOF>\n");
return MUNIT_OK;
}
static MunitResult
test_cli_compile_minimal_program(const MunitParameter params[], void *user_data_or_fixture)
{
- cli_result_t compilation_result = cli_runner_compiler_compile("../../examples/main_exit.0");
+ cli_result_t compilation_result = cli_runner_compiler_compile("../../examples/main_exit.ol");
munit_assert_int(compilation_result.exec.exit_code, ==, 0);
char *command_args[] = { compilation_result.binary_path, NULL };
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-13 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 11:51 [PATCH v2] refactor: rename zero programming language to olang Maria Ruy
2024-03-13 13:05 ` Johnny Richard
2024-03-13 20:22 ` Johnny Richard
Code repositories for project(s) associated with this public inbox
https://git.johnnyrichard.com/olang.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox