aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authors-over-42023-06-23 00:04:26 -0400
committers-over-42023-06-23 00:04:26 -0400
commit43405e591e6330939b84548c50bb537a87232838 (patch)
treedda5c6a25b0f677e3afb0025297ee375579b5b5c
parent3bc07458a69dc3a98370351c2c902ca6d5ff6bb9 (diff)
updated readme
-rw-r--r--README.md29
1 files changed, 25 insertions, 4 deletions
diff --git a/README.md b/README.md
index 6a06767..e9f7224 100644
--- a/README.md
+++ b/README.md
@@ -22,10 +22,31 @@ by `sudo make uninstall`.
# Usage
-Seeing as you have installed *HALK*, it only makes sense that you should attempt to make use of it.
-You are mistaken.
-Usage of *HALK* is not yet a feature of *HALK*.
-One can only hope this feature will be added in the future.
+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