Skip to content

class interface for flex#1695

Draft
kroening wants to merge 1 commit intomainfrom
flex_interface
Draft

class interface for flex#1695
kroening wants to merge 1 commit intomainfrom
flex_interface

Conversation

@kroening
Copy link
Copy Markdown
Collaborator

@kroening kroening commented Mar 4, 2026

This adds an abstract class that serves as interface for flex-generated tokenizers.

@tautschnig
Copy link
Copy Markdown
Collaborator

  1. What about the C++ interface provided by flex? I think we should at least say why we don't use it (portability across system-provided flex versions could be one reason).
  2. If we go down this route, shouldn't this be done in the CBMC repository?

@kroening
Copy link
Copy Markdown
Collaborator Author

kroening commented Mar 4, 2026

  1. What about the C++ interface provided by flex? I think we should at least say why we don't use it (portability across system-provided flex versions could be one reason).

Yes; the flex C++ interface was the first thing I tried, and I wasn't able to make the build work reliably, owing to the header file. I've added a comment saying so.

  1. If we go down this route, shouldn't this be done in the CBMC repository?

Yes. I'll need to find a way to deliver the line number, which is done by the macro in util/parser.h.

This adds an abstract class that serves as interface for flex-generated
tokenizers.
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 this pull request may close these issues.

2 participants