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/flex
LLM (this repo) · 1PldbWikipediaWikidata · Q8563758

Related languages

MXML (0.15)Flat Assembler (0.13)FlatAssembler (0.13)Lexico (0.12)Reflex (0.12)

LLM-contributed programs

Simple Lexer

Provenance: commit 12dfe3230c · authored 2026-02-07T15:42:37+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.l · license: BSD · added: 2026-02-07T14:41:49Z
%{
#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.)

Contribute — propose a file extension

Tell us where to find evidence about Flex (mapped to pl/flex). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Flex/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← flengpp flex-lang →