Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLFE Build Status Coverage Status

SLFE stands for Shitty LFE (LISP-flavoured Erlang).

It's a new programming language based on Elixir which aims to support all of the Enum functionality.

Overview

The big picture

The slfec compiler is a program that takes a foo.sl source file and produces a foo executable binary.

The isl REPL is an executable interactive program/environment (like Ruby's irb and Elixir's iex) for .sl programs.

These tools do not exist yet, but that's how you would ideally use SLFE.

To-do list

  • Booleans
  • UTF-8 Strings
  • Integers
  • Floats
  • Multiple statements
  • if expressions
  • Equality checks with == and /=
  • Functions
  • Math operators (+, -, *, /)
  • Linked lists

Code walk-through

This project is currently composed of 4 files:

Erlang

  • src/lisp_lexer.xrl - Lexical analyzer generator
  • src/lisp_parser.yrl - LALR-1 Parser Generator

Elixir

  • lib/lisp_parser.ex - Layer on top of :lisp_lexer and :lisp_parser
  • lib/lisp_evaluator.ex - Evaluates s-expressions and writes to stdio. Ideally the two things should be decoupled.

Running the test suite

You can do so by running mix test from the command line.

$ mix test
............................

Finished in 0.07 seconds
28 tests, 0 failures

FAQ

Should I use this?

Probably not. This is actually just an experiment, so I wouldn't recommend people using it to build actual programs. But feel free to use it anyway if you want.

Why Erlang/Elixir?

leex and yecc are the powerful Erlang alternatives to lex and yacc. I like Erlang, and Elixir is pretty rad too. So why not?

Is SLFE a Turing-complete language?

Yeah, I guess.


SLFE was inspired by this blog post (thanks Andrea!).

Kudos to lpil for the name suggestion and for being awesome.

About

🍭 Sh***y Lisp Flavoured Erlang (LFE)

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages