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

H5LT lexer and parser share state with global variables when there is no need. #398

Closed
gnuoyd opened this issue Feb 26, 2021 · 0 comments · Fixed by #399
Closed

H5LT lexer and parser share state with global variables when there is no need. #398

gnuoyd opened this issue Feb 26, 2021 · 0 comments · Fixed by #399
Assignees

Comments

@gnuoyd
Copy link
Contributor

gnuoyd commented Feb 26, 2021

The lexer uses an unconventional strategy for parsing lexical categories NUMBER (decimal numbers) and STRING (double-quoted strings) that involves sharing the parse context with the lexer using global variables. There are a couple of problems with that. First, the lexer is too complicated for the simple tokenization it performs—it's hard to tell if it is correct. Second, as @seanm points out, the shared global variables spill into the namespace shared by other libraries and application programs—e.g., VTK.

@gnuoyd gnuoyd self-assigned this Feb 26, 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

Successfully merging a pull request may close this issue.

1 participant