TXL

1 program Added 2025-10-29T18:42:19Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 3e8817ab45 · authored 2025-10-29T19:42:19+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

6 sources · pl_id: pl/txl
LLM (this repo) · 1PldbLinguistWikipediaHyperpolyglotWikidata · Q7590386

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmspattern-matching · term-rewriting
Designed byJames Cordy Charles Halpern-Hamu Ian Carmichael Eric Promislow · Charles Halpern-Hamu James Cordy
Homepagehttps://www.txl.ca/

Extensions claimed by this language

1 claim. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.txllinguistprimary4.9K files

LLM-contributed programs

Extract Initializers from C Declarations

Provenance: commit 3e8817ab45 · authored 2025-10-29T19:42:19+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.txl · license: TXL Public License · added: 2025-10-29T18:42:19Z
%       Extract initializers from C declarations
%       
%       David A. Penny
%       Copyright (c) 1993-2006 Queen's University at Kingston

#pragma -case

include "C.grm"

define program
    [C_source]
end define

rule main
    replace [program]
        P [C_source]
    by
        P [extractInitializers]
end rule


%
%  For each declarator with an initializer, we extract the initializer
%  into a separate assignment statement.  For example,
%
%       int i = 1, j, k = 2;
%
%  becomes
%
%       int i, j, k;
%       i = 1;
%       k = 2;
%
function extractInitializers
    replace [declaration]
        StorageSpec [opt storage_class_specifiers] TypeSpec [type_specifier] InitList [init_declarator_list] Semi [;]
    construct NewInitList [init_declarator_list]
        InitList [stripInitializers]
    construct Assignments [repeat statement]
        InitList [makeAssignments]
    by
        StorageSpec TypeSpec NewInitList Semi
        Assignments
end function


function stripInitializers
    replace [init_declarator_list]
        ID [id] EQ [=] Init [initializer]
    by
        ID
end function


function makeAssignments
    replace [init_declarator_list]
        ID [id] EQ [=] Init [initializer]
    construct Assignment [statement]
        ID = Init ;
    by
        Assignment
end function


%
%  The following rules are to prevent the transformation from being
%  applied to things that are not declarators.
%
rule dummy
    replace $ [init_declarator_list]
        L [init_declarator_list]
    by
        L
end rule

rule dummy2
    replace $ [statement]
        S [statement]
    by
        S
end rule

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 TXL (mapped to pl/txl). 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/TXL/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← TxeT TXR →