GithubHelp home page GithubHelp logo

fml's Introduction

Friendly Multi-paradigm Language

It is highly inspired by Bob Nystroms crafting interpreters and Thorsten Balls Writing an interpreter in go

You can start the program without any arguments to get a really simple repl. Or you can add a filepath as an argument to run a file of code.

Building

Set GOPATH properly to the starting directory. Then run make in the code directory (src/language).

On linux, run export GOPATH=$(pwd), then go to the code directory cd src/language and run the makefile make.
To run the interpreters REPL: ./interpreter, to run a file, run ./interpreter filepath. For example: ./interpreter examples/project_euler_001.fml.

Examples

src/language/examples

Core library

Set environment variable FMLPATH to the absolute path of src/language/corelibrary.

Coming soon

  • plugins (for own code wrappers and stuff)
  • more tests
  • lots of refactoring

fml's People

Contributors

sschellhoff avatar drtobe avatar

Stargazers

Gustavo Pezzi avatar

Watchers

James Cloos avatar  avatar Gustavo Pezzi avatar

Forkers

drtobe

fml's Issues

Relative import paths behave wrong

Import paths are resolves from the starting point of the program. So by running the interpreter on some *.fml file, this file is treated as the starting point for all imports. Even for imports from other files on other paths.
Relative import paths should start from the file which containts the import.
Example:

/main.fml
/submodules/module1.fml
/submodules/module2.fml

in main.fml, you should use submodules/module2.fml to import module 2, but in submodules/module1.fml you should just use module2.fml to import module 2.

Remove the need for semicolons

Semicolons should be optional. In most cases a semicolon is not important to express code. But in some cases, it can be useful. So optional semicolons are great.

Multiline comment problem

**/ does not end a multiline comment.

Example:
/*
some
comment
**/

results in an unexpected end of file.

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.