From the golang-nuts mailing list (with few modifications): --== intro ==-- Hi. I just want to announce a simple port of the lemon parser generator to the Go programming language. Shortly: Lemon is a LALR(1) parser generator, similar to yacc, but is much simpler. Also it has few neat features, like: - It is thread-safe and re-entrant - Tokenizer calls the parser, instead of parser calls tokenizer (the opposite of yacc/bison) - Uses no global variables, allows to run multiple parsers simultaneously - Auto-generation of token symbol constants (yacc/bison requires a list) - No need to count grammar symbols, they can be named (nice names instead of $1 $2 $3) - etc.. The Lemon is developed as a part of the sqlite project. The generator code is quite horrible, but it works and I believe it is very solid. Of course it has few drawbacks, but.. :) Lemon homepage: http://www.hwaci.com/sw/lemon --== golemon specific info ==-- I don't know whether I will support the golemon or not, but at least if someone likes lemon (like me), he/she has a decent (I hope so) base for his/her experiments now. I've successfully compiled and executed the very beginning of this tutorial: http://freshmeat.net/articles/lemon-parser-generator-tutorial See also 'examples' directory. Hopefully, I will have enough enthusiasm to fix some of the obvious issues (see TODO).
Port of the lemon parser generator to the Go programming language
Overview
You might also like...
Simple, safe and compiled programming language.
The X Programming Language Simple, safe and compiled programming language. Table of Contents Overview OS Support Contributing License Overview The X p
A interpreter of SweetLang, is writed in Go Programming language.
SweetLang ( Soon ) A interpreter of SweetLang, is writed in Go Programming language. SweetLang is made with clarity and simplicity we try to make its
Monkey programming language project from 'Writing An Interpreter In Go'and 'Writing A Compiler In Go' Books
Monkey Monkey programming language π project from "Writing An Interpreter In Go
ReCT-Go-Compiler - A compiler for the ReCT programming language written in Golang
ReCT-Go-Compiler A compiler for the ReCT programming language written in Golang
ReCT-Go-Compiler - A compiler for the ReCT programming language written in Golang
ReCT-Go-Compiler A compiler for the ReCT programming language written in Golang
WindLang, A simple programming language built with golang π
WindLang, A simple programming language built with golang π WindLang, A simple programming language built with golang π What is wind? Playground Coo
An experimental port of TinyRb to Google go, both as a means of learning go and exploring alternate approaches to implementing Ruby. Work is currently focused on the GoLightly VM.
tinyrbΒΆ β A tiny subset of Ruby with a Lua'esc VM. Everything in TinyRb should run in the big Ruby. (except bugs and things that don't comply to the p
A basic Forth parser written in Go.
GoForth ======= I got really interested in Forth and thus I began making a parser, of sorts, in Go. Though I don't intend for it to catch on, it's st
A shell parser, formatter, and interpreter with bash support; includes shfmt
sh A shell parser, formatter, and interpreter. Supports POSIX Shell, Bash, and mksh. Requires Go 1.14 or later. Quick start To parse shell scripts, in
Comments
-
Any thought of updating this?
Hi there,
I ran across this while attempting to port pikchr to Go. Clearly, it's 11 years out of date, and not maintained. π
I was hoping that the original
lemon
would be stable enough that there would be, oh, six or seven or a dozen changes in the past 11 years, and I could just apply their equivalents. Unfortunately, there are a lot more than that π. (pikchr.y
uses%extra_context
in particular, but there are many important-looking changes besides that.)Failing your lack of interest (which would be entirely understandable!), I guess I could re-translate
lemon.c
βΒ do you have any memory of how difficult/invasive it was, or how you went about it? Thanks, and sorry for the hassle! -
doesn't compile on Go 1.0
Attempting to install on Go 1.0 produces the following errors:
$ go get -v github.com/nsf/golemon github.com/nsf/golemon (download) github.com/nsf/golemon
github.com/nsf/golemon
../nsf/golemon/lempar.go:13: syntax error: unexpected % ../nsf/golemon/lempar.go:63: non-declaration statement outside function body ../nsf/golemon/lempar.go:64: non-declaration statement outside function body ../nsf/golemon/lempar.go:65: syntax error: unexpected ) ../nsf/golemon/lempar.go:187: syntax error: unexpected %, expecting } ../nsf/golemon/lempar.go:193: syntax error: unexpected %, expecting } ../nsf/golemon/lempar.go:240: syntax error: unexpected %, expecting case or default or } ../nsf/golemon/lempar.go:380: syntax error: unexpected % ../nsf/golemon/lempar.go:426: syntax error: unexpected %, expecting } ../nsf/golemon/lempar.go:452: syntax error: unexpected %, expecting case or default or } ../nsf/golemon/lempar.go:452: too many errors
Floppa programming language inspired by the brainf*ck programming language. Created just for fun and you can convert your brainf*ck code to floppa code.
Floppa Programming Language Created just for fun. But if you want to contribute, why not? Floppa p.l. inspired by the brainf*ck programming language.
T# Programming Language. Something like Porth, Forth but written in Go. Stack-oriented programming language.
The T# Programming Language WARNING! THIS LANGUAGE IS A WORK IN PROGRESS! ANYTHING CAN CHANGE AT ANY MOMENT WITHOUT ANY NOTICE! Something like Forth a
Yayx programming language is begginer friendly programming language.
Yayx Yayx programming language is begginer friendly programming language. What have yayx: Easy syntax Dynamic types Can be compiled to outhers program
Yayx programming language is begginer friendly programming language.
Yayx Yayx programming language is begginer friendly programming language. What have yayx: Easy syntax Dynamic types Can be compiled to outhers program
a dynamically typed, garbage collected, embeddable programming language built with Go
The agora programming language Agora is a dynamically typed, garbage collected, embeddable programming language. It is built with the Go programming l
Gentee - script programming language for automation. It uses VM and compiler written in Go (Golang).
Gentee script programming language Gentee is a free open source script programming language. The Gentee programming language is designed to create scr
PHP bindings for the Go programming language (Golang)
PHP bindings for Go This package implements support for executing PHP scripts, exporting Go variables for use in PHP contexts, attaching Go method rec
The Slick programming language is an s-expression surface syntax for Go.
The Slick programming language The Slick programming language is a Lisp/Scheme-style s-expression surface syntax for the Go programming language, with
Pineapple Lang is a simple programming language demo implements by Go
Pineapple Lang is a simple programming language demo implements by Go. It includes a hand-written recursive descent parser and a simple interpreter, although the language is not even Turing-complete. But this repo's main goal is to give beginners of compilation principles a warm up and a simple look at how a programming language is built.
β³ A minimal programming language inspired by Ink, JavaScript, and Python.
β³ Golfcart My blog post: Creating the Golfcart Programming Language Getting Started Scope Rules Usage Building and tests Contributions License Golfcar