{
    "content": [
        {
            "type": "text",
            "text": "# yacc (man)\n\n## NAME\n\nyacc - GNU Project parser generator\n\n## SYNOPSIS\n\nyacc [OPTION]... FILE\n\n## DESCRIPTION\n\nYacc (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\n## TLDR\n\n> Generate an LALR parser (in C) with a formal grammar specification file.\n\n- 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):\n  `yacc -d {{path/to/grammar_file.y}}`\n- Compile a grammar file containing the description of the parser and a report of conflicts generated by ambiguities in the grammar:\n  `yacc -d {{path/to/grammar_file.y}} -v`\n- Compile a grammar file, and prefix output filenames with `prefix` instead of `y`:\n  `yacc -d {{path/to/grammar_file.y}} -v -b {{prefix}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "yacc",
        "section": "",
        "mode": "man",
        "summary": "yacc - GNU Project parser generator",
        "synopsis": "yacc [OPTION]... FILE",
        "tldr_summary": "Generate an LALR parser (in C) with a formal grammar specification file.",
        "tldr_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}}"
            }
        ],
        "tldr_source": "official",
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 12,
                "subsections": []
            }
        ],
        "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": []
            }
        }
    }
}