1DOLLY 72PACKAGE yacc3REQUIRES HOST runtime@045# Berkeley Yacc from upstream's release archive, unchanged. Slop does not run6# its configure, so config.h says what it would find here. byacc is the name7# it goes by beside another yacc.8FROM /v0.1.4/demos/tools/Dollyfile-tools-build 81e1c1bc8b06c83b1daead6c8f09bc8b1382e8fe165f896a98109396b58bb305910REQUIRES HEADER libc11REQUIRES TOOL   cc12REQUIRES TOOL   cp13REQUIRES TOOL   echo14REQUIRES TOOL   gzip15REQUIRES TOOL   ln16REQUIRES TOOL   make17REQUIRES TOOL   mkdir18REQUIRES TOOL   tar19REQUIRES TOOL   test20REQUIRES TOOL   text-page2122SOURCE /v0.1.4/dist/static/tools/byacc-20260126.tgz b618c5fb44c2f5f048843db90f7d1b24f78f47b07913c8c7ba8c942d3eb24b00 /tmp/byacc.tgz23SLOP gzip -dc /tmp/byacc.tgz | tar -xf - -C /tmp2425FILE /tmp/byacc-20260126/config.h26    #define HAVE_FCNTL_H 127    #define HAVE_GETOPT 128    #define HAVE_GETOPT_H 129    #define HAVE_GETOPT_HEADER 130    #define HAVE_INTTYPES_H 131    #define HAVE_MKSTEMP 132    #define HAVE_STDINT_H 133    #define HAVE_STDLIB_H 134    #define HAVE_STDNORETURN_H 135    #define HAVE_STRINGS_H 136    #define HAVE_STRING_H 137    #define HAVE_SYS_STAT_H 138    #define HAVE_SYS_TYPES_H 139    #define HAVE_UNISTD_H 140    #define HAVE_VSNPRINTF 141    #define MIXEDCASE_FILENAMES 142    #define NEED_GETOPT_H 143    #define STDC_HEADERS 144    #define STDC_NORETURN 145FILE /tmp/yacc.mk46    .RECIPEPREFIX := >47    S := /tmp/byacc-2026012648    BIN := /usr/bin49    # The sources of upstream's makefile, with its plain skeleton.50    NAMES := closure error graph lalr lr0 main mkpar mstring output reader yaccpar symtab verbose warshall51    $(BIN)/yacc: $(addprefix $S/,$(addsuffix .o,$(NAMES)))52    >cc $^ -o $@53    $S/%.o: $S/%.c $S/config.h $S/defs.h54    >cc -O2 -DHAVE_CONFIG_H -DYYPATCH=20260126 -I $S -c $< -o $@55SLOP make -j4 -f /tmp/yacc.mk56SLOP ln -s yacc /usr/bin/byacc57SLOP mkdir -p /usr/share/licenses/yacc58SLOP cp /tmp/byacc-20260126/LICENSE /usr/share/licenses/yacc/LICENSE59SLOP text-page /tmp/byacc-20260126/yacc.16061# A grammar with precedence becomes a parser that computes.62FILE /tmp/yacc-check/sum.y63    %{64    #include <ctype.h>65    #include <stdio.h>66    int yylex(void);67    void yyerror(const char *message) { fputs(message, stderr); }68    %}69    %token NUMBER70    %left '+'71    %left '*'72    %%73    line: sum '\n' { printf("%d\n", $1); };74    sum: NUMBER | sum '+' sum { $$ = $1 + $3; } | sum '*' sum { $$ = $1 * $3; };75    %%76    int yylex(void) {77      int c = getchar();78      if (!isdigit(c)) return c == EOF ? 0 : c;79      for (yylval = 0; isdigit(c); c = getchar()) yylval = yylval * 10 + c - '0';80      ungetc(c, stdin);81      return NUMBER;82    }83    int main(void) { return yyparse(); }84SLOP CWD /tmp/yacc-check yacc -o sum.c sum.y && cc sum.c -o sum && test "$(echo '2+4*10' | ./sum)" = 428586EXPORTS TOOL yacc87EXPORTS TOOL byacc88FILE /usr/share/licenses/yacc/LICENSE89FILE /usr/share/man/cat1/yacc.190