A long lost how-to snippet: simple, one-liner configuration file parser written in lex and C. Serves the purpose most of the time. Quite simple and neat!
A typically super-verbose config.c gets auto-generated from lex code.
Yes, I can hear the skeptics! 🙄 Why call parser if it is based on a lexer? Well… it is a Type-3 Grammar (Chomsky hierarchy), i.e. regex. So the configuration data is placed in “structured” (hence, parser!) manner into a representation defined by the application program.