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

Consider making a pure flex parser for potential distribution of the pre-generated file #726

Open
hzeller opened this issue Apr 1, 2021 · 2 comments
Labels
C++ portability matters pertaining to C++ toolchain compatibility, or standard compliance

Comments

@hzeller
Copy link
Collaborator

hzeller commented Apr 1, 2021

Currently, we're using flex to generate the lexer. This has all kinds of portability issues on platforms not Unix (#307 #260).

To minimize dependencies on the generated code, one option would be to check it into the repository and potentially update only on change.

The current c++ generated flex code however also requires another header to interface, which comes with the particular flex installation. It might be worthwhile investigating to just generate a C lexer, since we have our interfacing c++ wrapper around it anyway. Once that is done, the 'distribute the generated code' might also be easier.

@hzeller hzeller added rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017). C++ portability matters pertaining to C++ toolchain compatibility, or standard compliance and removed rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017). labels Apr 1, 2021
@mkschreder
Copy link

The fact that flex and bison by default do not generate pure reentrant C code is sickening 🤮

@hzeller
Copy link
Collaborator Author

hzeller commented Nov 13, 2023

We're using the C++ wrapper, so this is not one of the problems; they are reentrant.
(Only if you use the C version without requesting reentrance this will be a problem; but not used in this project).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ portability matters pertaining to C++ toolchain compatibility, or standard compliance
Projects
None yet
Development

No branches or pull requests

2 participants