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
This directory contains the legacy TypeScript implementation of `notcc`. It's left here for my reference and posterity. All new development is done in Rust in the main [src](../src) folder.
4
+
5
+
## Installing and using this repo
6
+
7
+
Download the repo and
8
+
9
+
```bash
10
+
cd learning-compilers
11
+
npm install
12
+
npm run build
13
+
npm run test
14
+
```
15
+
16
+
to configure, build, and run the tests.
17
+
18
+
Then you can run the compiler by executing `./dist/main.js`. See the help for up to date info:
19
+
20
+
```bash
21
+
$./dist/main.js -h
22
+
23
+
Usage: notcc [flags] /path/to/input-file.c
24
+
25
+
Compiles input-file.c creating an executable /path/to/input-file using the system gcc
26
+
27
+
Options:
28
+
29
+
--lex Run the lexer but stop before parsing
30
+
--print-tokens Print out the tokens found by the lexer
31
+
--parse Run the lexer and parser but stop before codegen
32
+
--pretty-print Pretty print the output of the parser
33
+
--tacky Run the lexer, parser, and TACKY IR generation stopping before assembly generation
34
+
--pretty-print-tacky Pretty print TACKY IR after generation
35
+
--codegen Run the lexer, parser, codegen but stop before assembly generation
36
+
-S, --asm-only Emit assembly in input-file.s rather than linking an executable
37
+
-h, --help Show the help
38
+
```
39
+
40
+
Running `npm link` will let you refer to this with its name `notcc`.
0 commit comments