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 tables should be on the class side #44

Open
apblack opened this issue Oct 9, 2017 · 0 comments
Open

Parser tables should be on the class side #44

apblack opened this issue Oct 9, 2017 · 0 comments

Comments

@apblack
Copy link
Contributor

apblack commented Oct 9, 2017

Information such as the #symbolNames and the #symbolTypes of a parser is not instance-specific. So would it not be more reasonable to put it in a class-side method?

The use case that would benefit from this is when one is patching up, for example, the tokenActions table at scanner initialization time. It seems unnecessary to create a parser instance just so that one can look up a code corresponding to a symbol in aParser symbolNames.

#transitionTable is also not-instance specific, but there may be a reason to keep this on the instance side.

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