Giter Site home page Giter Site logo

lotus's Introduction

lotus

A toy language for personally exploring compilers and language design.

You can find some (somewhat outdated) notes and drafts about lotus in the wiki, although a large amount of ideas are just floating around in my personal notes. In either case, lotus is an ever-changing thing, so most samples and document are subject to documentation-rot. For example, some features (such as enums or generic types) are currently severely limited or even not supported at all. Once I'm satisfied with the parser and front-end for lotus (e.g. good CLI, or the ability to process a project instead of a single file), I'll most likely write a sample project to test things on; but until then test.lts is the most up-to-date example of lotus code.

Usage

Although lotus is nowhere-near usable, it is distributed with a very basic CLI, currently built with System.CommandLine. It supports checking an input file for parsing errors, as well as output the parse tree in Graphviz/DOT format (optionally with const-coloring). It can also try to reconstruct the original source file solely from the parse tree. For more info, run dotnet run --project ./src/Lotus.CLI/ -- -h.

lotus's People

Contributors

blokyk avatar redoste avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

redoste

lotus's Issues

How should GraphMakers be organized ?

Should we put all GraphMakers into the same (partial) class but separate each part (tl/stmt/expr) into different files, each in the right folder ?

Should simple semantic checks be done during parsing, or during semantic analysis ?

Checks like IsName() are pretty simple and don't require any other context; as such, they can be done during parsing.

However, this might make them harder to extend or maintain, and having a weird separation like that may come back to bite us later.

It also might be better to do all the checking at analysis-time, because right now some nodes are valid while others not.

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.