<commit_before># Tiger-Compiler (Undergrad Project)

Compiler for the <a href="http://www.cs.columbia.edu/~sedwards/classes/2002/w4115/tiger.pdf"> Tiger language</a>  defined in Andrew Appel’s book <a href="https://www.cs.princeton.edu/~appel/modern/c/"> Modern Compiler Implementation in C</a> . Code generator generates code for a A Simple Target Machine <a href="http://www.cs.sjsu.edu/~louden/cmptext/contents.htm"> TM </a> 
defined in <a href="http://www.cs.sjsu.edu/~louden/cmptext/"> <NAME>. Louden's compiler construction textbook</a> .

 



  Authors: 
 
  (1)<NAME> 
  
  (2)<NAME>



A given Tiger program is compiled to generate Three-Address-Code(TAC) which is then run on the simulator to get the desired output.
The compiler's code is in the folder named src.
The simulator's code is in tm.c file.

The output, TAC is generated in a file named TCODE.tm

To run in Windows platform, the code can be compiled in Turbo C to get executable file of ".exe" extension.
The executable file "tm" can be run with this TAC file as the arguement.
The "tm" has the following commands,


1.step <n>             		: Execute n (default 1) TM instructions

2.go                      	: Execute TM instructions until HALT

3.regs                    	: Print the contents of the registers.

4.iMem <b><n>    		: Print n iMem locations starting at b

5.dMem <b><n>  	        	: Print n dMem locations starting at b

6.trace				: Toggle instructions trace.

7.print				: Toggle print of total instructions executed.

8.clear				: Reset simulator for new execution of program.

9.help 				: Cause this list of commands to be printed.

10.quit				: Terminate the simulation.




<commit_msg> README update<commit_after># Tiger-Compiler (Undergrad Project)

Compiler for the <a href="http://www.cs.columbia.edu/~sedwards/classes/2002/w4115/tiger.pdf"> Tiger language</a>  defined in <a href="https://www.cs.princeton.edu/~appel/"> <NAME></a>’s book <a href="https://www.cs.princeton.edu/~appel/modern/c/"> Modern Compiler Implementation in C</a> . Code generator generates code for a A Simple Target Machine <a href="http://www.cs.sjsu.edu/~louden/cmptext/contents.htm"> TM </a> 
defined in  <a href="http://www.cs.sjsu.edu/~louden/index.html"> <NAME></a>'s <a href="http://www.cs.sjsu.edu/~louden/cmptext/"> Compiler Construction </a> textbook.

 



  Authors: 
 
  (1)<NAME> 
  
  (2)<NAME>



A given Tiger program is compiled to generate Three-Address-Code(TAC) which is then run on the simulator to get the desired output.
The compiler's code is in the folder named src.
The simulator's code is in tm.c file.

The output, TAC is generated in a file named TCODE.tm

To run in Windows platform, the code can be compiled in Turbo C to get executable file of ".exe" extension.
The executable file "tm" can be run with this TAC file as the arguement.
The "tm" has the following commands,


1.step <n>             		: Execute n (default 1) TM instructions

2.go                      	: Execute TM instructions until HALT

3.regs                    	: Print the contents of the registers.

4.iMem <b><n>    		: Print n iMem locations starting at b

5.dMem <b><n>  	        	: Print n dMem locations starting at b

6.trace				: Toggle instructions trace.

7.print				: Toggle print of total instructions executed.

8.clear				: Reset simulator for new execution of program.

9.help 				: Cause this list of commands to be printed.

10.quit				: Terminate the simulation.





{'fraction_non_alphanumeric': 0.10331890331890332, 'fraction_numerical': 0.012698412698412698, 'mean_word_length': 3.0208816705336425, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 3, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2158664', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1066, 'n_words': 419}