GithubHelp home page GithubHelp logo

mads256h / flowg Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 297 KB

Compiler that compiles our language flowg to g-code (4th semester project)

License: GNU Affero General Public License v3.0

Java 96.74% Lex 3.26%
cup java jflex gcode

flowg's Introduction

flowg

FlowG is a language that greatly simplifies manual g-code programming. It is a high-level language that supports functions, for loops, if statements etc.

Prerequisites

Windows

Download and install both "Java JDK 17" and "Maven version 3.8.5."

Ubuntu

sudo apt-get install openjdk-17-jdk
wget https://dlcdn.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.tar.gz -P /tmp
sudo tar xzvf /tmp/apache-maven-3.8.5-bin.tar.gz -C /opt/
sudo ln -s /opt/apache-maven-3.8.5/ /opt/maven
sudo bash -c 'echo "export M2_HOME=/opt/maven" > /etc/profile.d/maven.sh'
sudo bash -c 'echo "export MAVEN_HOME=/opt/maven" >> /etc/profile.d/maven.sh'
sudo bash -c 'echo "export PATH=\${M2_HOME}/bin:\${PATH}" >> /etc/profile.d/maven.sh'
sudo chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh

Arch Linux

sudo pacman -Suy maven

Building

We use Maven to build this project. To build this project run

mvn package

This creates an executable jar file named flowg-1.0-SNAPSHOT-jar-with-dependencies.jar in the target/ directory.

Usage

To run the compiler use the following commandline:

java -jar target/flowg-1.0-SNAPSHOT-jar-with-dependencies.jar <input file> <output file>

The input file should contain the flowg source code you want to compile. The output file will contain the gcode, which the flowg source compiles to, if no errors occured.

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.