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 is horrible #15

Open
mechaniputer opened this issue Feb 18, 2019 · 1 comment
Open

Parser is horrible #15

mechaniputer opened this issue Feb 18, 2019 · 1 comment

Comments

@mechaniputer
Copy link
Owner

The piece of code that takes a line of input (from either a file or the interactive prompt) and divides it into commands is especially horrible and error-prone. The command stack itself should probably be rewritten as a queue so that the parser doesn't need to fill a linked list before adding anything to the stack (in reverse order). It could instead just put stuff right into the back of the queue.

This calls for a fundamental redesign of the way commands are processed prior to being evaluated. This is the worst part of the code right now and also the most annoying to rewrite. It greatly affects the efficiency and safety of the interpreter so it is a high priority.

@mechaniputer
Copy link
Owner Author

Relevant to this, it is currently not allowed to have a comment between clauses in a BR/ELSE statement. The new parsing system should allow this since that's a place where comments are likely to be useful.

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