Skip to content

miaojiuchen/Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-like Language Compiler

Finished:

Lexer & Parser
a = 1;
c = a;
b = a + c;

//this is a comment

if(a >b + (7 * 32 + 8) * 3)
{
	if(a < 0)
		a = a + 1;
		else
		{
			c = 80;//this is another comment
		}
}
else
	b = 
	a -c;

for(i =0;i < 80;i = i+ 1)
{
	for(j = 0;j < 80 ; j = j+1)   //this is comment too
		a = a+1;

		a 
		= 
		c 
		+ 
		1;
}

write a*(b + c) -c/d;

Todo:

convert Syntax Tree to assembly language

About

C-like Language Compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published