Skip to content

BaseMax/one_lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

One Language

A version of ONE compiler written in C that generates C code as byte-code to build executable output. (lexer, parser, generator, prat parser, AST Tree, typechecker, AST walk)

https://github.com/One-Language/

Features

  • Lexer
  • Parser
  • Prat expression parser
  • AST Tree
  • XML Tree generator (AST Walk)
  • Typechecker for expressions and operators
  • Generate C code

Examples

// Hello, Welcome to One Programming language
import math

test{
	print 3
}

test2{}

main i32 i32 i32 i32{
	print 1, 2, 110
	// print "Hello "+"World"
	print "Hi ", "Max"
	print 4 + 6
	print 3 * 5
	print (10)+5
	print (999)
	print (998) * 1 + 5 - 4
	
	print (i32) 4 + (10)
	return (2 ** 3 ** 2 != 512) ? 10 : (20 * 2 == 4 * 10) ? 4 * 4 : 3, 50, -5, 110
}

Credit

Thank you so much for Mikey, he showed something special and perfect to me. It's why I said I dont know nothing and I'm learning new things everyday.

About

A version of ONE compiler written in C that generates C code as byte-code to build executable output. (lexer, parser, generator, prat parser, AST Tree, type-checker, AST walk)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages