phpman > man > yacc(1)

Markdown | JSON | MCP    

TLDR: yacc (tldr-pages)

Generate an LALR parser (in C) with a formal grammar specification file.

  • Create a file `y.tab.c` containing the C parser code and compile the grammar file with all necessary constant declarations for values. (Constant declarations file `y.tab.h` is created only when the `-d` flag is used)
    yacc -d {{path/to/grammar_file.y}}
  • Compile a grammar file containing the description of the parser and a report of conflicts generated by ambiguities in the grammar
    yacc -d {{path/to/grammar_file.y}} -v
  • Compile a grammar file, and prefix output filenames with `prefix` instead of `y`
    yacc -d {{path/to/grammar_file.y}} -v -b {{prefix}}
YACC(1)                                     User Commands                                    YACC(1)



NAME
       yacc - GNU Project parser generator

SYNOPSIS
       yacc [OPTION]... FILE

DESCRIPTION
       Yacc (Yet Another Compiler Compiler) is a parser generator.  This version is a simple wrapper
       around bison(1).  It passes option -y, --yacc to activate the upward compatibility mode.  See
       bison(1) for more information.

AUTHOR
       Written by Paul Eggert.

REPORTING BUGS
       Report bugs to <bug-bison AT gnu.org>.

COPYRIGHT
       Copyright © 2021 Free Software Foundation, Inc.
       This is free software; see the source for copying conditions.  There is NO warranty; not even
       for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
       lex(1), flex(1), bison(1).

       The full documentation for bison is maintained as a Texinfo manual.  If the  info  and  bison
       programs are properly installed at your site, the command

              info bison

       should give you access to the complete manual.



GNU Bison 3.8.2                             November 2007                                    YACC(1)

Generated by phpman local Author: Che Dong Under GNU General Public License
2026-06-15 06:22 @216.73.216.200
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!