You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,14 @@ A Lox interpreter from Part II of the book "Crafting Interpreters" by Bob Nystro
4
4
5
5
## Usage
6
6
7
-
Under Windows run: `loxcpp [-i|-b] [a] [filename]`, under Linux run `./loxcpp [-i|-b] [a] [filename]`. The flags are:
7
+
Under Windows run: `loxcpp [/?|/h|/v] [/i [/a]|/b] [filename]`, under Linux run `./loxcpp [-?|-h|-v] [-i [-a]|-b] [filename]`. The flags are:
8
8
9
-
*`-i` run an interactive interpreter, executing each statement when entered
10
-
*`-b` run in batch mode, use Ctrl-Z (Windows) or Ctrl-D (Linux) to end input
11
-
*`-a` print the AST for expressions entered in interactive mode
9
+
*`/b`, `-b` run in batch mode (this is the default), use Ctrl-Z (Windows) or Ctrl-D (Linux) to end input
10
+
*`/i`, `-i` run an interactive interpreter, executing each statement when entered
11
+
*`/a`, `-a` print the AST for expressions entered in interactive mode
12
12
*`[filename]` read from file instead of standard input
13
+
*`/v`, `-v` print version string and exit
14
+
*`/?`, `/h`, `-?`, `-h` print usage info and exit
13
15
14
16
Error handling and reporting is very basic, the parser only outputs "syntax error" and the interpreter can throw exceptions.
15
17
@@ -54,8 +56,10 @@ Heavy use of `std::make_shared` and `std::dynamic_pointer_cast` is made, particu
54
56
55
57
## Future work and status
56
58
57
-
Don't be fooled by the 1.00+ version number—this is alpha-development quality software, in particular `this` and `super` do not work and fixing these is a priority. The project does contain a large chunk of working code which may be of interest to others wanting to use `flexc++` and `bisonc++` to create an interpreter, or who have worked through the book and want to gain greater knowledge of Modern C++. It is assumed that a lot of the existing code and be reused/adapted to create a JIT version in the style of `clox`.
59
+
Don't be fooled by the 1.00+ version number—this is alpha-development quality software. The project does contain a large chunk of working code which may be of interest to others wanting to use `flexc++` and `bisonc++` to create an interpreter, or who have worked through the book and want to gain greater knowledge of Modern C++. It is assumed that much of the existing code can be reused/adapted to create a JIT version, in the style of `clox`, as a future improvement.
58
60
59
61
## Releases
60
62
61
63
**2023/08/27*: **1.00** First upload to GitHub with Windows executable. Many bugs, features and defects: please raise issues and submit pull requests.
64
+
65
+
**2023/08/30*: **1.01** Second upload to GitHub with Windows executable. Believed to be complete and correct coverage of all of the material in Part II.
0 commit comments