| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: yacc.1,v 1.7 2018/07/24 05:40:15 wiz Exp $ | | 1 | .\" $NetBSD: yacc.1,v 1.8 2020/07/26 23:18:06 uwe Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1989, 1990 The Regents of the University of California. | | 3 | .\" Copyright (c) 1989, 1990 The Regents of the University of California. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to Berkeley by | | 6 | .\" This code is derived from software contributed to Berkeley by |
7 | .\" Robert Paul Corbett. | | 7 | .\" Robert Paul Corbett. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -22,27 +22,27 @@ | | | @@ -22,27 +22,27 @@ |
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
31 | .\" SUCH DAMAGE. | | 31 | .\" SUCH DAMAGE. |
32 | .\" | | 32 | .\" |
33 | .\" from: @(#)yacc.1 5.7 (Berkeley) 7/30/91 | | 33 | .\" from: @(#)yacc.1 5.7 (Berkeley) 7/30/91 |
34 | .\" from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp | | 34 | .\" from: Id: yacc.1,v 1.24 2014/10/06 00:03:48 tom Exp |
35 | .\" $NetBSD: yacc.1,v 1.7 2018/07/24 05:40:15 wiz Exp $ | | 35 | .\" $NetBSD: yacc.1,v 1.8 2020/07/26 23:18:06 uwe Exp $ |
36 | .\" | | 36 | .\" |
37 | .Dd October 5, 2014 | | 37 | .Dd October 5, 2014 |
38 | .Dt YACC 1 | | 38 | .Dt YACC 1 |
39 | .Os | | 39 | .Os |
40 | .Sh NAME | | 40 | .Sh NAME |
41 | .Nm yacc | | 41 | .Nm yacc |
42 | .Nd an | | 42 | .Nd an |
43 | .Tn LALR(1) | | 43 | .Tn LALR(1) |
44 | parser generator | | 44 | parser generator |
45 | .Sh SYNOPSIS | | 45 | .Sh SYNOPSIS |
46 | .Nm | | 46 | .Nm |
47 | .Op Fl BdgilLPrtvVy | | 47 | .Op Fl BdgilLPrtvVy |
48 | .Op Fl b Ar file_prefix | | 48 | .Op Fl b Ar file_prefix |
| @@ -414,27 +414,27 @@ Make the parser's names for tokens avail | | | @@ -414,27 +414,27 @@ Make the parser's names for tokens avail |
414 | array. | | 414 | array. |
415 | However, | | 415 | However, |
416 | .Nm | | 416 | .Nm |
417 | yacc | | 417 | yacc |
418 | does not predefine | | 418 | does not predefine |
419 | .Dq $end , | | 419 | .Dq $end , |
420 | .Dq $error | | 420 | .Dq $error |
421 | or | | 421 | or |
422 | .Dq $undefined | | 422 | .Dq $undefined |
423 | in this array. | | 423 | in this array. |
424 | .El | | 424 | .El |
425 | .Sh PORTABILITY | | 425 | .Sh PORTABILITY |
426 | According to Robert Corbett: | | 426 | According to Robert Corbett: |
427 | .Bd -offset indent | | 427 | .Bd -filled -offset indent |
428 | Berkeley Yacc is an LALR(1) parser generator. | | 428 | Berkeley Yacc is an LALR(1) parser generator. |
429 | Berkeley Yacc has been made as compatible as possible with AT\*[Am]T Yacc. | | 429 | Berkeley Yacc has been made as compatible as possible with AT\*[Am]T Yacc. |
430 | Berkeley Yacc can accept any input specification that conforms to the | | 430 | Berkeley Yacc can accept any input specification that conforms to the |
431 | AT\*[Am]T Yacc documentation. | | 431 | AT\*[Am]T Yacc documentation. |
432 | Specifications that take advantage of undocumented features of AT\*[Am]T | | 432 | Specifications that take advantage of undocumented features of AT\*[Am]T |
433 | Yacc will probably be rejected. | | 433 | Yacc will probably be rejected. |
434 | .Ed | | 434 | .Ed |
435 | .Pp | | 435 | .Pp |
436 | The rationale in | | 436 | The rationale in |
437 | .%U http://pubs.opengroup.org/onlinepubs/9699919799/utilities/yacc.html | | 437 | .%U http://pubs.opengroup.org/onlinepubs/9699919799/utilities/yacc.html |
438 | documents some features of AT\*[Am]T yacc which are no longer required for | | 438 | documents some features of AT\*[Am]T yacc which are no longer required for |
439 | POSIX compliance. | | 439 | POSIX compliance. |
440 | .Pp | | 440 | .Pp |
| @@ -465,27 +465,27 @@ and | | | @@ -465,27 +465,27 @@ and |
465 | .Fn yyerror | | 465 | .Fn yyerror |
466 | without providing prototypes. | | 466 | without providing prototypes. |
467 | .Pp | | 467 | .Pp |
468 | .Xr bison 1 | | 468 | .Xr bison 1 |
469 | support for | | 469 | support for |
470 | .Dq %expect | | 470 | .Dq %expect |
471 | is broken in more than one release. | | 471 | is broken in more than one release. |
472 | For best results using | | 472 | For best results using |
473 | .Xr bison 1 , | | 473 | .Xr bison 1 , |
474 | delete that directive. | | 474 | delete that directive. |
475 | .Pp | | 475 | .Pp |
476 | .Xr bison 1 | | 476 | .Xr bison 1 |
477 | no equivalent for some of | | 477 | no equivalent for some of |
478 | .Nm 's | | 478 | .Nm Ns 's |
479 | command-line options, relying on directives embedded in the grammar file. | | 479 | command-line options, relying on directives embedded in the grammar file. |
480 | .Pp | | 480 | .Pp |
481 | .Xr bison 1 | | 481 | .Xr bison 1 |
482 | .Fl y | | 482 | .Fl y |
483 | option does not affect bison's lack of support for | | 483 | option does not affect bison's lack of support for |
484 | features of AT\*[Am]T yacc which were deemed obsolescent. | | 484 | features of AT\*[Am]T yacc which were deemed obsolescent. |
485 | .Pp | | 485 | .Pp |
486 | .Nm | | 486 | .Nm |
487 | accepts multiple parameters with | | 487 | accepts multiple parameters with |
488 | .Dq %lex-param | | 488 | .Dq %lex-param |
489 | and | | 489 | and |
490 | .Dq %parse-param | | 490 | .Dq %parse-param |
491 | in two forms | | 491 | in two forms |
| @@ -512,27 +512,26 @@ to the destructor declared using | | | @@ -512,27 +512,26 @@ to the destructor declared using |
512 | .Pp | | 512 | .Pp |
513 | .Xr bison 1 | | 513 | .Xr bison 1 |
514 | puts the additional parameters | | 514 | puts the additional parameters |
515 | .Dv first | | 515 | .Dv first |
516 | for | | 516 | for |
517 | .Fn yyparse | | 517 | .Fn yyparse |
518 | and | | 518 | and |
519 | .Fn yyerror | | 519 | .Fn yyerror |
520 | but | | 520 | but |
521 | .Dv last | | 521 | .Dv last |
522 | for destructors. | | 522 | for destructors. |
523 | .Nm | | 523 | .Nm |
524 | matches this behavior. | | 524 | matches this behavior. |
525 | .El | | | |
526 | .Sh ENVIRONMENT | | 525 | .Sh ENVIRONMENT |
527 | The following environment variable is referenced by | | 526 | The following environment variable is referenced by |
528 | .Nm : | | 527 | .Nm : |
529 | .Bl -tag -width TMPDIR | | 528 | .Bl -tag -width TMPDIR |
530 | .It Ev TMPDIR | | 529 | .It Ev TMPDIR |
531 | If the environment variable | | 530 | If the environment variable |
532 | .Ev TMPDIR | | 531 | .Ev TMPDIR |
533 | is set, the string denoted by | | 532 | is set, the string denoted by |
534 | .Ev TMPDIR | | 533 | .Ev TMPDIR |
535 | will be used as the name of the directory where the temporary | | 534 | will be used as the name of the directory where the temporary |
536 | files are created. | | 535 | files are created. |
537 | .El | | 536 | .El |
538 | .Sh TABLES | | 537 | .Sh TABLES |