GithubHelp home page GithubHelp logo

flo-l / rustypop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nikomatsakis/rustypop

0.0 2.0 0.0 71 KB

A not-yet-functional Rust parser written in LALRPOP.

License: Apache License 2.0

Rust 100.00%

rustypop's Introduction

Rustypop

This is a not-yet-functional port of lalr-parser.y, from the Rust repository, into LALRPOP. As of the moment, I am still in the process of working my way through shift-reduce failures.

Eventually, I am aiming for the following conventions:

  1. Terminal names will use "" if they are keywords or other literals, otherwise the terminal will be named with camel-case like Ident.

  2. For multi-character symbols that can also be interpreted as single characters, like &&, <<, or ||, we will introduce two terminals:

    • One for the character when following by another of the same character, written with a [] to denote lookahead, e.g. <[<].
    • One for the character alone, written with empty lookahead, e.g., <[].

    Therefore, to match <<, you would match "<[<]" "<[]". In cases, like types, where << is to be considered as two distinct < tokens, we would match either "<[<]" OR "<[]" equivalently.

  3. Nonterminal names will be camel-case like Expr.

  4. Variants on expressions and the like will be implemented with LALRPOP macros, as will comma-separated lists (Comma<V>) and so forth. We can also employ Foo? instead of conventions like maybe_foo.

The easiest way to experiment right now is to just run cargo build --release; make sure you build release, because other LALRPOP itself builds in debug mode, and that is horribly slow.

Licensing

Licensed under the same terms as Rust itself: dual MIT and Apache2.

rustypop's People

Contributors

leotestard avatar nikomatsakis avatar

Watchers

 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.