Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Explainer: Parsing #2

@bvisness

Description

@bvisness

This explainer visualizes a language grammar like a flamegraph, allowing the user to drag-and-drop a list of tokens and instantly see they fit into a toy language.

image

Figma link: https://www.figma.com/file/Ba0jBreapnyhOKloA0dSXu/Education-Wireframes?type=design&node-id=7%3A177&mode=design&t=7e9UWAd2mXHXBVHj-1

The grammar for this demonstration is extremely simple. We make no attempt to support a "real" programming language grammar.

Rather than entering their program textually, users will drag and drop tokens into a list. This Scratch-like design avoids the possibility of lexing errors and emphasizes the idea that parsing is performed on a stream of tokens, not a stream of text.

Functional requirements:

  • Support all the behaviors described in the Figma.
  • Support both desktop and mobile.
  • The grammar should ideally be customizable so we can adjust it to fit the content, and reuse the same demonstration with multiple different grammars within the same article. (The grammar need not be customizable by the user, only by the authors of the article.)

Remember - explainers do not have to be pretty at this stage. They only have to meet the functional requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions