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: Lexing #1

Description

@bvisness

This explainer demonstrates the lexing process in a compiler. It is a simple demonstration where you can type into a text box and the list of tokens updates in real time.

image

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

This explainer should use C's lexing rules as laid out in Annex A.1 of the C99 spec. Line and block comments should also be supported, and their contents ignored.

Ideally, all aspects of the lexical grammar would be supported, but if this is too difficult, please just ask questions here and we can work out which parts are most important.

Functional requirements:

  • Can lex and display the output of up to 1000 characters of C code in real time, comfortably maintaining 60fps as the user types.
  • Exhibits all the behaviors laid out in the Figma.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions