aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: e9f722468f9d5e4e3e2c36cca8e4c57743973d7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# HALK

<img src="./resources/HALK_FINAL.svg" width="350" align="right">

*HALK* seeks to be a language.

I seek to fulfill its wishes.

As of yet, *HALK* is nothing.

As of yet, we are safe.

# Installation

As you have read these words, you are to install *HALK*.

1. Clone *HALK* to a computer.
2. `sudo make install`.

If you wish to remove all *HALK*-related items from your life, you can try `make clean`, followed 
by `sudo make uninstall`.

# Usage

The *HALK* binary is placed in `/usr/local/bin`. Assuming that is in your PATH, one must simply

```shell
$ halk examples/simple.halk
```

while in this directory, or change the argument to any valid file path. Simply running *HALK* with no arguments allows one
to lex arbitrary text from the command line. An example session is displayed below:

```shell
$ halk
> :str:var = 'Hello, World.';
> ^D
[==] lexer created
[==] BEGIN INPUT
:str:var = 'Hello, World.';
[==] END INPUT
[==] token type: [TOKEN_DEF_TAG]    token value: [str]
[==] token type: [TOKEN_DEF_TAG]    token value: [var]
[==] token type: [TOKEN_DEF_SET]    token value: [=]
[==] token type: [TOKEN_PRIM_STR]      token value: [Hello, World.]
[==] token type: [TOKEN_EXPR_END]      token value: [;]
[==] token type: [TOKEN_EOF]     token value: []
[==] source file closed
```

# Syntax

*HALK* is a **dubiously-typed**, **vaguely-functional**, **interpreted**  programming language, with syntax designed to be as
**minimal** and **consistent** as possible.
Note that all syntax described is liable to sudden and violent change.

Example programs can be found [here](examples/).

***HALK*** **progress:** 20%

- [x] Lexer
- [ ] Abstract Syntax Tree
- [ ] Parser
- [ ] Doer
- [ ] ?? profit ??