https://github.com/trilliwon/cminus-compiler
C- Compiler for Programming Assignment
https://github.com/trilliwon/cminus-compiler
cminus cminus-compiler compiler
Last synced: 3 months ago
JSON representation
C- Compiler for Programming Assignment
- Host: GitHub
- URL: https://github.com/trilliwon/cminus-compiler
- Owner: trilliwon
- Created: 2017-11-30T07:14:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T14:15:45.000Z (over 7 years ago)
- Last Synced: 2025-03-18T22:57:22.533Z (3 months ago)
- Topics: cminus, cminus-compiler, compiler
- Language: C
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cminus-compiler
1. Scanner
- Implementation Of Lexer
- Using [flex](https://en.wikipedia.org/wiki/Flex_(lexical_analyser_generator))
2. Parser
- just using yacc
3. Semantic analyzer
- Implementation of Symbol Table
- Implementation of Type Checker# Semantic Analysis
- main.c
- [x] Modify NO_ANALYZE, TraceParse, and TraceAnalyze to suit your assignment
- `symtab.h` `symtab.c`
- [x] Add scope and type to symbol table
- [x] Implement hash table
- analyze.c
- [x] Insert built-in function
- Input(), output()
- [x] Modify symbol table generation
- [ ] Modify the checkNode() function to check the semantics of C-Minus### [Original Code](http://www.cs.sjsu.edu/~louden/cmptext/)
# Execution
```
$ make
$ ./compiler gcd.cm
```