Flex
1 program
Added 2026-02-07T14:41:49Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Fast Lexical Analyzer, flex
Provenance: commit 12dfe3230c · authored 2026-02-07T15:42:37+01:00 · agent claude-code · model sonnet
Sources mentioning this language
4 sources · pl_id:
pl/flexRelated languages
LLM-contributed programs
Simple Lexer
Provenance: commit 12dfe3230c · authored 2026-02-07T15:42:37+01:00 · agent claude-code · model sonnet · WebSearch disabled
%{
#include <stdio.h>
%}
%%
[0-9]+ { printf("NUMBER: %s\n", yytext); }
[a-zA-Z_][a-zA-Z0-9_]* { printf("IDENTIFIER: %s\n", yytext); }
[ \t\n] { /* skip whitespace */ }
. { printf("UNKNOWN: %s\n", yytext); }
%%
int main(int argc, char **argv) {
yylex();
return 0;
}
int yywrap(void) {
return 1;
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)