From 43405e591e6330939b84548c50bb537a87232838 Mon Sep 17 00:00:00 2001 From: s-over-4 Date: Fri, 23 Jun 2023 00:04:26 -0400 Subject: updated readme --- README.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'README.md') 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 -- cgit v1.2.3