https://github.com/jafarlihi/clex<p>I very recently updated clex to be instance-based (instead of being a single global instance) and thread-safe based on previous feedback.<p>clex lets you programatically generate lexers in your C program without going through extra intermediary generation/compilation step, and now you can have more than one in your application!<p>There’s also cparse: https://github.com/jafarlihi/cparse<p>It lets you generate LR(1) and LALR(1) parsers in much the same way, and it uses clex under the hood. It’s currently not updated to the latest version of instance-based clex but it is in my plans to do so soon.<p>Feedback and contributions are appreciated!