]> git.saurik.com Git - bison.git/blame - src/assoc.c
* src/gram.c: Remove comments that duplicate comments in gram.h.
[bison.git] / src / assoc.c
CommitLineData
a945ec39 1/* Associativity information.
06f01bc4 2 Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
a945ec39
AD
3
4 This file is part of Bison, the GNU Compiler Compiler.
5
f16b0819 6 This program is free software: you can redistribute it and/or modify
a945ec39 7 it under the terms of the GNU General Public License as published by
f16b0819
PE
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
a945ec39 10
f16b0819 11 This program is distributed in the hope that it will be useful,
a945ec39
AD
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
f16b0819 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
a945ec39 18
2cec9080 19#include <config.h>
a945ec39 20#include "system.h"
c134bfbe 21
a945ec39
AD
22#include "assoc.h"
23
24
25const char *
c134bfbe 26assoc_to_string (assoc a)
a945ec39 27{
c134bfbe 28 switch (a)
a945ec39 29 {
06f01bc4
PE
30 default:
31 abort ();
32
a945ec39 33 case undef_assoc:
427c0dda 34 return "undefined associativity";
a945ec39
AD
35
36 case right_assoc:
37 return "%right";
38
39 case left_assoc:
40 return "%left";
41
42 case non_assoc:
43 return "%nonassoc";
44 }
a945ec39 45}