Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaustubhhiware/compiler
Compiler for restricted grammar C.
https://github.com/kaustubhhiware/compiler
c compiler compiler-design
Last synced: about 1 month ago
JSON representation
Compiler for restricted grammar C.
- Host: GitHub
- URL: https://github.com/kaustubhhiware/compiler
- Owner: kaustubhhiware
- License: other
- Created: 2016-12-31T13:08:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-31T18:02:08.000Z (about 8 years ago)
- Last Synced: 2024-10-22T16:55:17.914Z (3 months ago)
- Topics: c, compiler, compiler-design
- Language: C
- Homepage:
- Size: 474 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cOMPILER
A tiny-c compiler made using *flex*, *yacc*, and *gnu assembler*.
tiny-c has instructions are a subset of instructions from C.
Targetted for x86_64 architecture.Written for Compilers Course (CS39003). To know more about tiny-c, go through the [docs](docs/) folder.
## Testing
The test files can be found in the `tests` folder. Run them with - `make testi` , i = 1 to 5
Test your own tiny-c file with :
make
./a.out < testfile.c test_s_file_name
gcc -c test_s_file_name.s -o test_o_file_name.o
gcc test_o_file_name.o -L. -g -lmylib -o test.out
./test.out
P.S : The compiler assumes your tiny c file is correct, so if a segmentation fault is faced, make sure your test file is tiny-c compatible.The quads generated for this program can be found in the test folder.