moonscript - :crescent_moon: A language that compiles to Lua

  •        156

MoonScript is a programmer friendly language that compiles into Lua. It gives you the power of the fastest scripting language combined with a rich set of features. It runs on Lua 5.1 and above, including alternative runtimes like LuaJIT. See http://moonscript.org.

http://moonscript.org
https://github.com/leafo/moonscript

Tags
Implementation
License
Platform

   




Related Projects

moonscript - MoonScript, a language that compiles to Lua

  •    Lua

MoonScript, a language that compiles to Lua

Pegged - A Parsing Expression Grammar (PEG) module, using the D programming language.

  •    D

Pegged is a parsing expression grammar (PEG) generator implemented in the D programming language. The idea is to give the generator a PEG, with the syntax presented in the reference article . From this grammar definition a set of related parsers will be created, to be used at runtime or compile time.

treetop - A Ruby-based parsing DSL based on parsing expression grammars.

  •    Ruby

Languages can be split into two components, their syntax and their semantics. It's your understanding of English syntax that tells you the stream of words "Sleep furiously green ideas colorless" is not a valid sentence. Semantics is deeper. Even if we rearrange the above sentence to be "Colorless green ideas sleep furiously", which is syntactically correct, it remains nonsensical on a semantic level. With Treetop, you'll be dealing with languages that are much simpler than English, but these basic concepts apply. Your programs will need to address both the syntax and the semantics of the languages they interpret. Treetop equips you with powerful tools for each of these two aspects of interpreter writing. You'll describe the syntax of your language with a parsing expression grammar. From this description, Treetop will generate a Ruby parser that transforms streams of characters written into your language into abstract syntax trees representing their structure. You'll then describe the semantics of your language in Ruby by defining methods on the syntax trees the parser generates.

rust-peg - Parsing Expression Grammar (PEG) parser generator for Rust

  •    Rust

This is a simple parser generator based on Parsing Expression Grammars. Please see the release notes for updates.

pigeon - Command pigeon generates parsers in Go from a PEG grammar.

  •    Go

The pigeon command generates parsers based on a parsing expression grammar (PEG). Its grammar and syntax is inspired by the PEG.js project, while the implementation is loosely based on the parsing expression grammar for C# 3.0 article. It parses Unicode text encoded in UTF-8. See the godoc page for detailed usage. Also have a look at the Pigeon Wiki for additional information about Pigeon and PEG in general.


peg - Peg, Parsing Expression Grammar, is an implementation of a Packrat parser generator.

  •    Go

Peg, Parsing Expression Grammar, is an implementation of a Packrat parser generator. A Packrat parser is a descent recursive parser capable of backtracking. The generated parser searches for the correct parsing of the input.

lapis - a web framework written in MoonScript

  •    Lua

a web framework written in MoonScript

howl - The Howl Editor

  •    MoonScript

Howl is a general purpose editor that aims to be both lightweight and fully customizable. It's built on top of the very fast LuaJIT runtime, uses Gtk for its interface, and can be extended in either Lua or Moonscript. It's known to work on Linux, but should work on at least the *BSD's as well. It is released as free software under the MIT license, with the source being available on Github.

pegkit - 'Parsing Expression Grammar' toolkit for Cocoa/Objective-C

  •    Objective-C

PEGKit is a 'Parsing Expression Grammar' toolkit for iOS and OS X written by Todd Ditchendorf in Objective-C and released under the MIT Open Source License. Always use the Xcode Workspace PEGKit.xcworkspace, NOT the Xcode Project.

language - A fast PEG parser written in JavaScript with first class errors

  •    Objective-J

Language.js is an experimental new parser based on PEG (Parsing Expression Grammar), with the special addition of the "naughty OR" operator to handle errors in a unique new way. It makes use of memoization to achieve linear time parsing speed, and support for automatic cut placement is coming to maintain mostly constant space as well (for a discussion of cut operators see: www.ialab.cs.tsukuba.ac.jp/~mizusima/publications/paste513-mizushima.pdf). The most unique addition Language.js makes to PEG is how it handles errors. No parse ever fails in Language.js, instead SyntaxErrorNodes are placed into the resultant tree. This makes it trivial to do things like write syntax highlighters that have live error reporting. This also means that Language.js is very competent at handling multiple errors (as opposed to aborting on the first one that is reached).

canopy - A parser compiler for Java, JavaScript, Python, Ruby

  •    Javascript

Canopy is a parser compiler targeting Java, JavaScript, Python and Ruby. It takes a file describing a parsing expression grammar and compiles it into a parser module in the target language. The generated parsers have no runtime dependency on Canopy itself. For usage documentation see canopy.jcoglan.com.

peg-markdown - An implementation of markdown in C, using a PEG grammar

  •    C

This is an implementation of John Gruber's markdown in C. It uses a parsing expression grammar (PEG) to define the syntax. This should allow easy modification and extension. It currently supports output in HTML, LaTeX, ODF, or groff_mm formats, and adding new formats is relatively easy. Both a library and a standalone program are provided.

eu.h8me.Parsing - (G)LR parsing/lexing library for .NET

  •    

Library implementing a regular expression based lexer and LR(1) based parser generator, using inline code to define lexer and grammar rules. The generated parser uses a GLR parsing engine to allow for ambiguous grammars.

parboiled2 - A macro-based PEG parser generator for Scala 2.10+

  •    Scala

parboiled2 is a Scala 2.11+ library enabling lightweight and easy-to-use, yet powerful, fast and elegant parsing of arbitrary input text. It implements a macro-based parser generator for Parsing Expression Grammars (PEGs), which runs at compile time and translates a grammar rule definition (written in an internal Scala DSL) into corresponding JVM bytecode.PEGs are an alternative to Context-Free Grammars (CFGs) for formally specifying syntax, they make a good replacement for regular expressions and have some advantages over the "traditional" way of building parsers via CFGs (like not needing a separate lexer/scanner phase).

language-babel - ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM

  •    CoffeeScript

Language grammar for all versions of JavaScript including ES2016 and ESNext, JSX syntax as used by Facebook React, Atom's etch and others, as well as optional typed JavaScript using Facebook flow. This package also supports highlighting of GraphQL language constructs when inside certain JavaScript template strings. For .graphql and .gql file support please see language-graphql . The colour of syntax is determined by the theme in use. By default the language-babel package will detect file types .js,.babel,.jsx, .es, .es6, .mjs and .flow. Use the standard ATOM interface to enable it for other file types. This provides a grammar that scopes the file in order to colour the text in a meaningful way. If other JavaScript grammars are enabled these may take precedence over language-babel. Look at the bottom right status bar indicator to determine the language grammar of a file being edited. language-babel will be shown as either Babel or Babel ES6 JavaScript. Clicking the name will allow the grammar for a file to be changed.

slang - 🎤 a simple audio programming language implemented in JS

  •    Javascript

Slang was created to explore implementing a programming language entirely in the browser. Parsing is handled by Ohm.js using a custom grammar, the editor uses CodeMirror with a simple syntax definition, and the runtime itself is written in JS using the Web Audio API. I've always wanted to write a programming language from scratch, but as someone who didn't study computer science I find it incredibly intimidating. Discovering Ohm.js changed my mind; its incredible editor and approachable JS API make it possible to experiment quickly with a lot of feedback. This project is my first pass at building a language and runtime environment from start to finish.

ANTLR - ANother Tool for Language Recognition

  •    Java

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees. Twitter search uses ANTLR for query parsing, with over 2 billion queries a day.

ZeroBraneStudio - Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5

  •    Lua

ZeroBrane Studio is a lightweight cross-platform Lua IDE with code completion, syntax highlighting, remote debugger, code analyzer, live coding, and debugging support for various Lua engines (Lua 5.1, Lua 5.2, Lua 5.3, LuaJIT, LÖVE, Moai, Gideros, Corona, Marmalade Quick, Cocos2d-x, OpenResty/Nginx, Torch7, Redis, GSL-shell, Adobe Lightroom, Lapis, Moonscript, and others). No compilation is needed for any of the installation options, although the scripts to compile required libraries for all supported platforms are available in the build/ directory.

intellij-haskell - IntelliJ plugin for Haskell

  •    Scala

When I was learning Haskell, I missed the nice features of IntelliJ IDEA. My first approach was to use default way of creating an IntelliJ plugin by defining a grammar and a lexer according to Haskell report. That didn't work out because I could not define all the recursion. Then I decided to use grammar and lexer definitions only for tokenizing and parsing Haskell code, and not for syntax checking the code. This is needed for syntax highlighting, all kinds of navigation and so on. Further Haskell language support is provided with the help of external tools. This plugin depends mainly on Stack and Intero. It can create new Stack projects (by using template hspec) and import existing Stack projects.

onelang

  •    TypeScript

OneLang has a hard time defining itself. Some may call it a transpiler, a special compiler which can compile source code from an input language to another. Those will have a hard time using it, as OneLang has its own rules and does not respect those of the input language, sometimes not even its syntax.