Giter Site home page Giter Site logo

sotostzam / ll1_compiler Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 8.0 1022 KB

This is a compiler for LL(1) types of grammar.

Home Page: http://tzamaras.com/compiler.php

License: GNU General Public License v3.0

Java 100.00%
ll1-grammar ll1-parser compilers java javafx

ll1_compiler's Introduction

This is a LL(1) Parser which includes an integrated graphical user interface. Being still a work in progress, in the future it would be a full LL(1) Compiler. This application is intended for computer science students and autodidacts studying compilers or parsers.

Demo

Demo

Table of contents

Features

  • Create custom LL(1) grammar rules
  • Import and export of grammar rules
  • Generate of first sets, follow sets and the parsing table
  • Each step is accompanied by visual feedback and explanatory text
  • Seamlessly checks if a string is recognized with error reporting

Getting Started

Prerequisites

  • You will need any OS able to run Java like Windows or Linux
  • You must have Java JDK 8 installed, which already includes JavaFX
  • You will also need an editor or an IDE like Eclipse IDE
  • You can use e(fx)clipse 3.0 or newer for eclipse

Installing

  1. Fork this repository on your Github account
  2. Open your favorite IDE/Editor create a new javafx project
  3. Change location to that folder with git bash
  4. Clone your forked repository to that folder using git clone https://github.com/YOURUSERNAME/LL1_Compiler.git
  5. A refresh may be required from your IDE/Editor
  6. Build and run the application

Deployment

In order to deploy a runnable .jar file follow these steps:

  • Go to file -> Export
  • From the Java menu select Runnable JAR file
  • Select launch configuration
  • Select Export destination
  • Double click to run the generated file

Usage

  1. Launch the application
  2. Click on the Import Rules tab
    • From here you can add your own rules
    • Or select some of the pre-loaded ones
    • Click the Save rules button
  3. Run the first, follow and parsing table algorithms by pressing the corresponding tabs. You are also able to analytically see how each step is generated
  4. Now you can analyze an input string whether it matches your grammar rules

Author

Sotirios Tzamaras · Development Lead

Personal LinkedIn Facebook Instagram X

Contributing

As an open source software, we would be grateful if you wish to contribute bugfixes and improvements. Read our CONTRIBUTING to learn about how to report issues and how to propose bugfixes and improvements.

A special thanks to all of our contributors and testers so far:

Acknowledgments

The idea of this application was founded within the framework of the course named "Principles of Languages and Translators", taught by assistant professor Stavros Adam at the university of Ioannina (Former Technological Educational Institute of Epirus).

License

This project is licensed under the GNU General Public Version 3 License - see the LICENSE file for details

ll1_compiler's People

Contributors

sotostzam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ll1_compiler's Issues

Create JUnit testing infrastructure

Currently there is not testing infrastructure. We need to create one and this means we have to modify classes so they return only results and not update the GUI at the same time.

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.