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/yaccExtensions 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.| Extension | Source | Strength | SWH |
|---|---|---|---|
.y | linguist | primary | 755.2K files |
.yacc | linguist | secondary | 8.6K files |
.yy | linguist | secondary | 2.2M files |
Related languages
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
%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.
| Rule | Ext | Kind | Predicates (truncated) |
|---|---|---|---|
h/linguist/.yy/1 | .yy | default | [] |