Compare commits
3 Commits
6545bd1302
...
b391fe9a74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b391fe9a74 | ||
|
|
12e82e64d0 | ||
|
|
9b55b9ec32 |
15
arl.org
15
arl.org
@@ -1,5 +1,6 @@
|
||||
#+title: ARL - Issue tracker
|
||||
#+date: 2026-01-23
|
||||
#+filetags: arl
|
||||
|
||||
* TODO Write a minimum working transpiler
|
||||
We need to be able to compile the following file:
|
||||
@@ -23,13 +24,13 @@ It's a Eulerian Path from the source code to the native executable.
|
||||
[[file:src/parser/]]
|
||||
[[file:include/arl/parser/]]
|
||||
|
||||
We need to generate some form of AST from the token stream. We want
|
||||
something a stage above the tokeniser so it should distinguish the
|
||||
following cases:
|
||||
- Literal value
|
||||
- Primitive call
|
||||
*** TODO AST design
|
||||
*** TODO Token Stream to AST implementation
|
||||
We need to generate some form of AST from the token stream. This
|
||||
should be a little more advanced than our initial stream,
|
||||
distinguishing between
|
||||
- Literal values
|
||||
- Primitive calls
|
||||
- References to otherwise undefined words (may be defined through
|
||||
import or later on)
|
||||
** TODO Stack effect/type analysis
|
||||
[[file:src/analysis/]]
|
||||
[[file:include/arl/analysis/]]
|
||||
|
||||
@@ -1 +1 @@
|
||||
"Hello, world!\n" putstr
|
||||
"Hello, world!\n" puts
|
||||
@@ -25,7 +25,7 @@ typedef enum
|
||||
/// Known symbols which later stages would benefit from.
|
||||
typedef enum
|
||||
{
|
||||
TOKEN_KNOWN_PUTSTR,
|
||||
TOKEN_KNOWN_PUTS,
|
||||
NUM_TOKEN_KNOWNS,
|
||||
} token_known_t;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ const char *token_known_to_cstr(token_known_t known)
|
||||
{
|
||||
switch (known)
|
||||
{
|
||||
case TOKEN_KNOWN_PUTSTR:
|
||||
return "putstr";
|
||||
case TOKEN_KNOWN_PUTS:
|
||||
return "puts";
|
||||
default:
|
||||
FAIL("Unexpected TOKEN_KNOWN value: %d\n", known);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user