Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bhavyakukkar opened this issue Oct 3, 2024 · 0 comments

Comments

@bhavyakukkar
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant