# phpman > man > yacc(1)

> **TLDR:** 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}}`

*Source: tldr-pages*

---

[YACC(1)](https://www.chedong.com/phpMan.php/man/YACC/1/markdown)                                     User Commands                                    [YACC(1)](https://www.chedong.com/phpMan.php/man/YACC/1/markdown)



## 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)](https://www.chedong.com/phpMan.php/man/bison/1/markdown).  It passes option **-y**, **--yacc** to activate the upward compatibility mode.  See
       [_bison_(1)](https://www.chedong.com/phpMan.php/man/bison/1/markdown) for more information.

## AUTHOR
       Written by Paul Eggert.

## REPORTING BUGS
       Report bugs to <<bug-bison@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)](https://www.chedong.com/phpMan.php/man/lex/1/markdown), [**flex**(1)](https://www.chedong.com/phpMan.php/man/flex/1/markdown), [**bison**(1)](https://www.chedong.com/phpMan.php/man/bison/1/markdown).

       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)](https://www.chedong.com/phpMan.php/man/YACC/1/markdown)
