Giter VIP home page Giter VIP logo

brickcontroller2's Introduction


๐Ÿ—๏ธ Current Pet Project

Pudl is a simple, lightweight, and easily customizable programming language. Go check it out!

About Pudl

Pudl is written using LLVM, the amazing compiler project. I've built this project off of the great work done by Max Balushkin. His approach to building a language without relying on a third party parser/lexer combo - such as Bison/Flex, ANTLR, etc. - intrigued me. Although, I'm changing a lot of the code to fit my needs, Balushkin's work still gave Pudl a huge jump start.

Expect more changes to Pudl in the future. This project is entirely for fun, so progress may be slow.

Example

Pudl source code
func inc( int a ) : int return a + 1

func mast : int {
  print inc( 5 )
  return 0
}
LLVM IR output (after optimization passes)
; ModuleID = 'pudl compiler'
source_filename = "pudl compiler"

@.formati = private constant [4 x i8] c"%d\0A\00"
@.formatf = private constant [4 x i8] c"%f\0A\00"

declare i32 @printf(i8* %0, ...)

define i32 @inc(i32 %a) {
entry:
  %0 = add i32 %a, 1
  ret i32 %0
}

define i32 @mast() {
entry:
  %0 = call i32 @inc(i32 5)
  %1 = call i32 (i8*, ...) @printf(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.formati, i64 0, i64 0), i32 %0)
  ret i32 0
}

Go check Pudl out!


๐Ÿ”ฅ My Activity

GitHub Streak

Top Langs

brickcontroller2's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.