Skip to content

Add a simple frontend demo #16

@certik

Description

@certik

This libasr repository should depend on LFortran as a submodule for "upstream libasr", and contain a simple demo. A good idea is a frontend for Pascal or Oberon, which can be parsed with a simple recursive descent parser and single pass (the full grammar is short: https://en.wikipedia.org/wiki/Oberon-2#Syntax). So it will be just one file that does the parsing and semantics at the same time, and constructs ASR. Then in the main program we expose the various backends of libasr (C, Fortran, WASM, etc.).

We will maintain this as a template how to start new frontends.

Here is the full parser for Oberon-2: https://grok.com/share/bGVnYWN5_cf6f61b3-557f-49ed-b6ba-8e6551d7fbc1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions