Coder Social home page Coder Social logo

brilacasck / java-language-parser Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 0.0 368 KB

A simple compiler for parsing java codes and get syntax errors with CYK algorithm for context free grammars (CFG)

License: MIT License

Java 100.00%
java parser java-language javafx compiler light-parser easy-parser cyk cfg cnf

java-language-parser's Introduction

java-language-parser

A simple compiler for parsing java codes and get syntax errors with CYK algorithm for context free grammars (CFG)

Documentations

This project were created for a course project. course of Theory of Language and Automaton.

This is a very simple parser for Java Language resolves by CYK Algorithm for CFGs (Context-Free-Grammars) or better to say, CNFs

This consists of two parsing sections:

  1. Syntax validation : Success or Wrong
  2. Opening and Closing parenthesis - curly braces - brackets

And no more stuffs.

But it's good to say that it says the location of error, I mean in which line

For more information about the codes, revert to the codes and read the comments!

This project has been built with net beans IDE.

So if you want, you can easily clone this repository and import it on net beans.

Note that The main file is under src directory, named: JavaParser.java


grammar 1

grammar 2

image 1 - java code

image 2 - results


Authors

Org.

Team

  • ASCK TEAM

License

This project is licensed under the MIT License - see the LICENSE file for details

java-language-parser's People

Contributors

alirezakay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.