{
    "mode": "man",
    "parameter": "yacc",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/yacc/1/json",
    "generated": "2026-06-15T14:39:13Z",
    "synopsis": "yacc [OPTION]... FILE",
    "sections": {
        "NAME": {
            "content": "yacc - GNU Project parser generator\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "yacc [OPTION]... FILE\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Yacc (Yet Another Compiler Compiler) is a parser generator.  This version is a simple wrapper\naround bison(1).  It passes option -y, --yacc to activate the upward compatibility mode.  See\nbison(1) for more information.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Written by Paul Eggert.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs to <bug-bison@gnu.org>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2021 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions.  There is NO warranty; not even\nfor MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "lex(1), flex(1), bison(1).\n\nThe full documentation for bison is maintained as a Texinfo manual.  If the  info  and  bison\nprograms are properly installed at your site, the command\n\ninfo bison\n\nshould give you access to the complete manual.\n\n\n\nGNU Bison 3.8.2                             November 2007                                    YACC(1)",
            "subsections": []
        }
    },
    "summary": "yacc - GNU Project parser generator",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "lex",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lex/1/json"
        },
        {
            "name": "flex",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/flex/1/json"
        },
        {
            "name": "bison",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/bison/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Generate an LALR parser (in C) with a formal grammar specification file.",
        "examples": [
            {
                "description": "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)",
                "command": "yacc -d {{path/to/grammar_file.y}}"
            },
            {
                "description": "Compile a grammar file containing the description of the parser and a report of conflicts generated by ambiguities in the grammar",
                "command": "yacc -d {{path/to/grammar_file.y}} -v"
            },
            {
                "description": "Compile a grammar file, and prefix output filenames with `prefix` instead of `y`",
                "command": "yacc -d {{path/to/grammar_file.y}} -v -b {{prefix}}"
            }
        ]
    }
}