From c7c2e0dc65b0ea01d297de21983acbd1019df025 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Mon, 9 Jun 2025 21:55:19 -0400 Subject: Add documentation on compiler internals to README Signed-off-by: Quinn Stephens --- README | 1 - README.md | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index 9e0f72f..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -OSMORA C Compiler diff --git a/README.md b/README.md new file mode 100644 index 0000000..3d6f488 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# OSMORA C Compiler +## Optimizations +The OSMORA C Compiler uses several optimizations to speed up the compilation process. Firstly, the lexer only scans one token at a time, because creating a list of tokens would waste memory and take more time, even though the parser will usually only need to access one token at any given time. Additionally, the lexer uses a hashmap to locate a keyword structure from its string form. Likewise, the parser also uses a hashmap to store all the symbols whose declarations it has parsed. -- cgit v1.2.3