make
g++
flex
bison
Enter the main project directory and run the make
command.
To start generating C++ programs, you will have to use the binaries generated by make
. The binaries are called spider
and web
.
- The Lexer, Parser, and AST tool.
cat
files orecho
text, pipe (|
) it intospider
, and redirect (>
) the output to a file.
spider
The tool for interfacing with thespider
binary.- Arguments
-c
Clean files after compiling a binary.-g
Specify a non-default C++ generated file (sp.out.cpp
by default)-o
Specify a non-default binary to generate from the C++ file (a.out
by default)-r
Run the generated binary after compiling.
spider <file>.sp
- Generates a C++ file with a default name.
spider <file>.sp -g Example.cpp
- Generates a C++ file called
Example.cpp
.
- Generates a C++ file called
spider <file>.sp -c -o Example
- Generates a binary called
Example
and cleans the intermediate files.
- Generates a binary called
spider <file>.sp -o Example -r
- Generates a binary called
Example
and runs it.
- Generates a binary called