Skip to content

[kast-ast] [feature] Add ability to parse tokens without parsing new syntax-defs #3

Open
@bhavyakukkar

Description

@bhavyakukkar

There is no way to prevent the parser from parsing syntax-definitions.

At current, the only public functions that can be used to receive an AST from a source-file are read_syntax to read syntax definitions and parse to parse a source-file into syntax-trees (including new syntax-definitions) from a set of existing syntax-definitions.
There is no way to just use an existing set of syntax-definitions to parse a source-file, without the ability to parse new syntax-definitions.

From the perspective of wanting to use kast-ast to design parsers for languages other than kast, it would make sense to have a switch or a different function to disable the ability to read syntax-definitions from the source file. This would make it easier to decouple the parser into a parser generator and the parser that it generates, i.e., the syntax-definition

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