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

Parser generator performance #54

Closed
teofr opened this issue Dec 2, 2019 · 2 comments
Closed

Parser generator performance #54

teofr opened this issue Dec 2, 2019 · 2 comments

Comments

@teofr
Copy link
Contributor

teofr commented Dec 2, 2019

The Makam parser generator takes too much memory. This started as an issue for Circle, but is now an issue for local building as well.

Even if some quick fixes could help, I think the ideal solution would be to generate it on Rust (or even JS) and do some interop. It's also nice to only mantain one grammar.

I'd need to:

  • Understand how JS <-> Makam interop works.
  • Understand how Rust <-> JS interop works.
  • Make the parser on the Rust side (and the AST) an independent library (this is also nice for the project)

cc @aspiwack @astampoulis

@teofr
Copy link
Contributor Author

teofr commented Dec 4, 2019

I'll leave this for now, but just documenting how the Makam <-> JS interop seems to work (as far as I could tell).

There's a builtin js.eval : string -> string -> prop that evaluates the first string (JS code) and returns the result as a string. Then, you would use refl.fromstring : [A] string -> A -> prop that relates a string (a Makam expression) with its actual expression.

@yannham
Copy link
Member

yannham commented Sep 3, 2021

Closing old stale issues about Makam.

@yannham yannham closed this as completed Sep 3, 2021
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

2 participants