MiniC is a toy compiler that generates MIPS assembly code for a tiny subset of the C programming language. The compiler is made using Flex and Bison.
$make clean
$make do
$./a.out<Tests/fib.prog
. Other sample tests can be found at ./Tests/- To check the MIPS code generated in the file "mips.asm" assemble and run it on MARS simulator using command
java -jar ./Mars4_5.jar
- Datatype supported: int.
- Loops: while, for (nested as well)
- Conditionals: if else (nested as well)
- Booleans
- Input from user
- Function calls: parameter passing, return(except in main)
- Airthmetic Operators: +, -, /, *, %, Negation
- Relational Operators: ==, <=, >=,!=, <, >
- Logical Operators: &&, ||
- Handling comments
- Error Reporting
- Recursion
- One-dimensional Array