Hacker News new | ask | show | jobs
Show HN: Clex is now thread-safe and instance-based, a lexer generator for C
4 points by jafarlihi 1166 days ago
https://github.com/jafarlihi/clex

I very recently updated clex to be instance-based (instead of being a single global instance) and thread-safe based on previous feedback.

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!

There’s also cparse: https://github.com/jafarlihi/cparse

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.

Feedback and contributions are appreciated!

1 comments

Exciting. Looking through the source now. Plus you have an example right on the repo’s home page! Congratulations.