Yacc

1 program Added 2025-10-30T07:26:25Z Model: x-ai/grok-4-fastTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit e7766cdb48 · authored 2025-10-30T08:26:25+01:00 · model x-ai/grok-4-fast

Sources mentioning this language

4 sources · pl_id: pl/yacc
LLM (this repo) · 1PldbLinguistHyperpolyglot

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.ylinguistprimary755.2K files
.yacclinguistsecondary8.6K files
.yylinguistsecondary2.2M files

Related languages

OpenACC (0.25)Yabasic (0.23)YARA (0.18)Yatima (0.17)CCured (0.14)

LLM-contributed programs

Simple arithmetic expression parser

Provenance: commit e7766cdb48 · authored 2025-10-30T08:26:25+01:00 · model x-ai/grok-4-fast · Temp 0.4
code.y · added: 2025-10-30T07:26:25Z
%token NUMBER
%left '+' '-'
%left '*' '/'
%nonassoc UMINUS
%%
lines : lines expr '\n' { printf("%g\n", $2); }
 | lines '\n'
 | /* empty */
 | error '\n' { yyerrok; }
 ;
expr : expr '+' expr { $$ = $1 + $3; }
 | expr '-' expr { $$ = $1 - $3; }
 | expr '*' expr { $$ = $1 * $3; }
 | expr '/' expr { $$ = $1 / $3; }
 | '-' expr %prec UMINUS { $$ = -$2; }
 | '(' expr ')' { $$ = $2; }
 | NUMBER { $$ = $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.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.yy/1.yydefault[]

Contribute — propose a file extension

Tell us where to find evidence about Yacc (mapped to pl/yacc). 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/Yacc/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Yacas Yael →