Giter Site home page Giter Site logo

heyimblake / byaccj Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sverlan/byaccj

0.0 1.0 0.0 60 KB

A fork of byacc-based C/C++ and Java parser generator BYACC/J. ---- This fork compiles with Apple clang version 13.1.6 (clang-1316.0.21.2) on modern Macs.

Shell 0.20% Makefile 1.00% C 78.65% Yacc 11.35% Roff 0.99% Java 7.81%

byaccj's Introduction

About this repository

BYACC/J is project that is an extension of the Berkeley v 1.8 YACC-compatible parser generator to produce C/C++ and Java parsers.

It was developed by Tomas Hurka, see more details on his web site.

Why ressuscite an old project?

There is an annoying bug in its actual version (1.15), so I would like to provide a fix for it (as the original project does not seem to be active anymore).

The main problem of 1.15 byaccj version is that the code is corrupting the stack, so the parser is not correctly working. This bug is corrected in the present version. However, the performed modification requires to additionally implement clone method in the semantic class ParserVal. It can be done as follows:

   @Override
   public ParserVal clone(){
        try {
            return (ParserVal) super.clone();
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return null;
   }

Why still use byacc/j?

There are several reasons to do it:

  • It still can be interesting to have a single executable for a Java parser generator (no templates directory, no additional configuration).
  • There is a single generated file for the parser. This may look old-style, but it simplifies the life sometimes.

Putting altogether, this parser generator can be used for educational projects or for self-contained projects (shipping the byaccj binary).

byaccj's People

Contributors

heyimblake avatar sverlan avatar

Watchers

 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.