GithubHelp home page GithubHelp logo

golemon's Introduction

Go lemon port

A port of the Lemon Parser to Go.

State

This work was done entirely in support of gopikchr. It works well enough to turn pikchr.y into pikchr.go, but there are almost certainly further bugs. Pull requests are welcome: I intend no support for this project, but if you're obscure enough to want a Go port of the Lemon Parser, then we share a strange kind of kinship, and I welcome your contributions.

Goals

  • Keep the code structure as close to the original as possible, to make tracking and applying future changes as straight-forward as possible.
  • Convert to Go idioms only where the conversion remains clear.

See also

  • nsf/golemon - 11 years out-of date ๐Ÿ˜ž. Went in the opposite direction: the parser generator is still written in C, but generates Go code

Changes

  • You must define func testcase(bool) in your code.
  • The various #defines have been turned into constants.

TODOs

  • Use the embed package to embed the template in the binary.
  • Create a github action that follows the rss feed for changes to lemon.c and lempar.c and creates issues. - [ ] Figure out a better way to do constants: either put them in a separate file that is only (re)generated optionally, or make them settable with flags, or something.
  • Possibly, go back and incorporate the lessons learned from porting pikchr.y to Go: use a []byte to represent the main char * pointers and pointer arithmetic, instead of converting to []rune.

Contributors

golemon's People

Contributors

x-leaf7 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.