https://github.com/andstor/mush-dsl

:hammer: Simple, intuitive, and powerful DSL inspired by multiple popular programming languages.

https://github.com/andstor/mush-dsl

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.9%) to scientific vocabulary

Keywords

dsl java programming-language xtend xtext
Last synced: 5 months ago · JSON representation

Repository

:hammer: Simple, intuitive, and powerful DSL inspired by multiple popular programming languages.

Basic Info
  • Host: GitHub
  • Owner: andstor
  • Language: Java
  • Default Branch: main
  • Homepage:
  • Size: 4.4 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
dsl java programming-language xtend xtext
Created over 5 years ago · Last pushed about 5 years ago
Metadata Files
Readme

README.md

Mush logo

Mush DSL

Simple, intuitive, and powerful DSL inspired by multiple popular programming languages.

Mush is a DSL / Programming Language for writing in a pseudocode like style. The language is created with Ecore and Xtext. Mush features a compiler, which compiles Mush code down to Java code. Editing support for Eclipse is also available.

Examples - Documentation - Wiki

Table of Contents

Getting Started

There are multiple ways to get started using Mush. You may install the plugin using the prebuilt jar files. See the installation instructions below. You may also manually build the project(s) and launch a new Eclipse application. See the build section.

Once you have installed Mush into Eclipse, you may create a new mush file. This is a file with the extension name mush. For example HelloWorld.mush.

The following Mush code produces a Hello, world program:

executable HelloWorld() print "Hello, world!"

This compiles down to the following runnable Java code:

```java public class HelloWorld { public static void run() { System.out.print("Hello, world!"); }

public static void main(final String[] args) {
    run();
}

} ```

Mush ships with several examples. These are found in the tdt4250.mush.examples project.

Install

You can download the latest archive build here.

This needs to be manually installed into Eclipse: 1. Go to your Eclipse's dropins directory 2. Create a subfolder (name doesn't matter) 3. Uncompress .zip file here 4. Restart Eclipse

Rationale

Most programming languages has a very crude syntax, including a lot of specific symbols and characters. These are often hard to understand for a person without much programming experience. We therefore wanted to make a language that could be expressed in a more natural style. The result of this was Mush. Mush provides a more pseudocode like syntax, without a lot of syntactical clutter.

Due to the language’s nature, it makes a great candidate for beginners to learn programming. Yet, it is powerful enough to express complex algorithms. Algorithms are often expressed in a pseudo like syntax. Mush would allow implementation of such "pseudo algorithms" in a more straight forward way. In particular, we have used the book "Introduction to Algorithms by Thomas H. Cormen et al., 3rd Edition” as inspiration for the syntax.

Xtext provides several features for easy integration with the Java ecosystem, for example Java types. It also provides a ready made grammar called Xbase. However, to get a better unnderstanding of Ecore and Xtext, we have choosen to not make use of such functionallity.

Structure

tdt4250.mush.model - Model for the Mush language.

tdt4250.mush.xtext - Mush core Xtext project based on Mush model.

tdt4250.mush.xtext.tests - Tests for Mush core Xtext project.

tdt4250.mush.xtext.ide - Mush Xtext IDE project.

tdt4250.mush.xtext.ui - Mush tests for Xtext UI project.

tdt4250.mush.xtext.ui.tests - Mush tests for Xtext UI project (TODO).

tdt4250.mush.examples - Mush example project.

Build

In order to build the project(s) you first need to import all the modules in this repository into your Eclipse workspace.

Eclipse should build class files automatically. Ensure that the Project -> Build Automatically is checked.

Right click on the GenerateMush.mwe2 in the core xtext bundle, and select Run As -> MWE2 Workflow.

In order to test the new build, a second Eclipse application should be launched with the Mush bundles installed. This is done by creating a new Eclipse run configuration.

Se the build instructions in the tdt4250.mush.xtext project and the Running Eclipse Plugin section in the tdt4250.mush.xtext.ui project for more detailed instructions.

License

Copyright © André Storhaug and Annabelle Solem Almås

Owner

  • Name: André Storhaug
  • Login: andstor
  • Kind: user
  • Location: Trondheim 🇳🇴
  • Company: NTNU

🎓 CS PhD student @ Norwegian University of Science and Technology (NTNU)

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels