Giter Site home page Giter Site logo

plgh's Introduction

plgh

Programming Languages Grammar House (BNF like grammars)

Individual grammars can have different license in the origin !

Notice: The online railroad generator has changed to IPV6 only and soemone else hosted it on an IPV4 address.

The railroad generator project can be found here https://github.com/GuntherRademacher/rr .

Initially this project is using a Javascript (QuickJS) program that converts the tree-sitter generated "src/grammar.json" to an EBNF format that can be used on (IPV6) https://www.bottlecaps.de/rr/ui or (IPV4) https://rr.red-dove.com/ui (some grammars still require a bit of manual editing the generated EBNF, most of the ones here were manually edited just enough to alow then be viewed as rail road diagram).

To view the rail road diagram copy the EBNF file and paste on (IPV6) https://www.bottlecaps.de/rr/ui or (IPV4) https://rr.red-dove.com/ui in the Edit Grammar tab then switch to the View Diagram tab.

Short guide of the equivalences between tree-sitter Javascript notation and EBNF from rail road diagram (notice that rr does some optmizations and simplifications that help tidy the grammar):

seq(a,b,c) <=> a b c
repeat(a) <=> a*
repeat1(a) <=> a+
choice(a,b,c) <=> a | b | c
optional(a) <=> a?
commaSep(a) <=> a (',' a)*

There is a script (QuickJS) to convert "src/grammar.json" to SQL json2sql.js that was used to generated and manually fixed a SQL file with all "src/grammar.json" for the grammars on this repository.

Good Reads

From https://github.com/tajmone/lemon-grove/edit/master/README.md

Links to useful books, articles and tutorials on the topics of lexing and parsing.

Compiler Design in C

Free PDF book + sources, 984 pp.

Originally published in 1990 by Prentice-Hall Inc., Compiler Design in C, by [Allen Holub], is an excellent book on the topic. Written in plain language, this book takes the reader through a 984 pages long journey on how to build a compiler, step by step, introducing and explaining each compiler component in detail, and providing source code examples of each implementation step.

Since the book is now out of print, the author has generously made it available for free download on his website, in PDF format, including all the source code files and the release notes.

plgh's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plgh's Issues

TypeError: std.open is not a function

Was really hopeful this would work! Unfortunately, there isn't a package.json file so I'm not sure where you're importing std from. I tried the package on npmjs.com and received the following error upon running the script: TypeError: std.open is not a function

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.