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

Kill code generation #2

Open
erikrose opened this issue Jul 11, 2011 · 1 comment
Open

Kill code generation #2

erikrose opened this issue Jul 11, 2011 · 1 comment

Comments

@erikrose
Copy link
Owner

I hate code generation. It makes it difficult for callers to extend the grammar at runtime, as it require a build phase and write access to the disk. There's no reason we should need to generate code. Instead, let's just build up the grammar interpreter-style and return a Parser instance or something. If it's slow, we could be clever and create a class at runtime, which callers could instantiate when they need to use it.

@erikrose
Copy link
Owner Author

erikrose commented Aug 1, 2011

Another possibility is to call make_parser once per unique parser and make its result deep-copyable such that the copies share everything but the memoization cache.

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