summaryrefslogtreecommitdiff
path: root/spec/compiler
diff options
context:
space:
mode:
authorCCGKyle <corechg@gmail.com>2021-01-20 10:33:41 -0500
committerCCGKyle <corechg@gmail.com>2021-01-20 10:33:41 -0500
commit60f7c4f7272079e635010e464d8ce3a3a427f97f (patch)
treef76d5b73f1d01a3d0dd0149ddb8f470b0b092749 /spec/compiler
parent4bcbc40328a16aa8f53f69bb304784d9b5d5729b (diff)
Add specification to the repo. To be updated as the language evolves.
Diffstat (limited to 'spec/compiler')
-rw-r--r--spec/compiler/compiler.txt18
-rw-r--r--spec/compiler/pre-processor.txt5
-rw-r--r--spec/compiler/tokenizer.txt0
3 files changed, 23 insertions, 0 deletions
diff --git a/spec/compiler/compiler.txt b/spec/compiler/compiler.txt
new file mode 100644
index 0000000..dbc64c0
--- /dev/null
+++ b/spec/compiler/compiler.txt
@@ -0,0 +1,18 @@
+The "compiler" of the TNSL language is formed of several parts, each discussed
+in their own file.
+
+ 1) Parsing
+
+ 1a) The tokenizer - chews up .tnsl files and spits out tokens
+ 1b) The file resolver - interperets import commands and creates a tree of files to compile
+ 1c) The definer -
+ 1d) The AST generator - indexes tokens and provides some rudimentary syntax checking
+
+ 2) Validation
+
+ 2a) The expander - expands pre-processor commands and macrosoperations
+ 2b) The validator - checks all requirements for all functions and expressions are valid
+
+ 3) Translation
+
+ 3a) ??? \ No newline at end of file
diff --git a/spec/compiler/pre-processor.txt b/spec/compiler/pre-processor.txt
new file mode 100644
index 0000000..3203ff8
--- /dev/null
+++ b/spec/compiler/pre-processor.txt
@@ -0,0 +1,5 @@
+A set of components in the compiler (all before the translator) which expand,
+resolve, and validate pre-processor directives into code which can be compiled
+
+Consists of the resolver in the parsor.
+The expander and part of the indexer in the validator. \ No newline at end of file
diff --git a/spec/compiler/tokenizer.txt b/spec/compiler/tokenizer.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/spec/compiler/tokenizer.txt