Skip to content

An experimental programming language which compiles to x86_64 assembly code. The syntax is inspired from LISP S-Expression.

License

Notifications You must be signed in to change notification settings

hemantmehra/Bolt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bolt

A x86_64 assembly compiler for an experimental programming language. The syntax is inspired from LISP S-Expression.

  1. Simple Expression
(add 3 4)
  1. Expression with block
(while a)
{
    (dec a)
}

Build and Run

Build

cmake -S . -Bbuild -GNinja
ninja -C build/

Compile a bolt program

./build/bolt ./examples/07_func2.bolt

Example

Code

example.bolt

(defun main)
{
    (let a 42)
    (inc a)
    (print a)
}

Compile to assembly

$ ./build/bolt example.bolt

Build and Run

$ ./make.sh
43
$ echo $?
0

About

An experimental programming language which compiles to x86_64 assembly code. The syntax is inspired from LISP S-Expression.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages