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

Grammar generator #7

Description

@AlphabetsAlphabets
EXPR -> LITERAL | UNARY | BINARY | GROUPING

LITERAL -> number | string | "TRUE" | "FALSE"

UNARY -> ("!" | "-") EXPR

BINARY -> EXPR OP EXPR
OP -> "+" | "-" | "*" | "/" | "%" |
      "==" | "!=" | "<" | ">" | ">=" | "<="

GROUPING -> "(" EXPR ")"

This is a super simple grammar for a very basic language. Not even Moon, but the code required to represent this grammar while not difficult to write is incredibly tedious. A tool should be created that can take the whole grammar file as input, and convert it into the equivalent in C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions