Skip to content
Snippets Groups Projects
Commit 279250a9 authored by Ronald Charles Moore's avatar Ronald Charles Moore
Browse files

Updated README.md

parent 7e52b66a
No related branches found
No related tags found
No related merge requests found
......@@ -10,13 +10,16 @@ similar, please let me know, so I can give credit where credit is due --
or disavow knowledge of that source (as the case may be).
You are in the following subdirectory
** `interpret++`
This code take mathematical expressions and evaluates them,
i.e. it outputs numbers. It is the same as its sister folder `interpreter`
as far as recursive descent parsing goes, but uses more C++ features and
is set up so as to support growing up to be a larger project.
** `halfBakedCompiler`
This code take mathematical expressions and builds an abstract syntax tree,
a.k.a. an AST. It then dumps this AST as text.
The parsing is equivalent to that in `interpreter` and `interpret++`
(neighboring directories and predecessor programs).
This version builds on `interpreter++` (and also requires C++17).
See **Chapter 1 Front End Construction**, Slides 21 and 22 (and please let me know when the inevitable day comes that these slide numbers are no longer correct).
See **Chapter 1 Front End Construction**, Slides 22-24
(and please let me know when the inevitable day comes
when these slide numbers are no longer correct).
Building and Running
====================
......@@ -30,7 +33,7 @@ In case of doubt, use the voodo command `make clean` and then repeat `make`.
To test the program, run `make tests`. This also illustrates how the intepreter is used.
Alternatively, just run the program with *no* parameters (i.e. simply `./intepret++`).
Alternatively, just run the program with *no* parameters (i.e. simply `./halfbaker`).
It will tell you how it wants to be run (Hint: there are two usages).
Contents (Manifest)
......@@ -38,6 +41,9 @@ Contents (Manifest)
You should find here:
* `ast.cpp` and `ast.h`
Source code for the AST classes -- the data structures built by the parser.
* `lexer.cpp` and `lexer.h`
Source code for the lexer.
......@@ -64,5 +70,5 @@ https://fbi.h-da.de/personen/ronald-moore/
ronald.moore@h-da.de
1 May 2020
2 May 2020
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment