]> git.saurik.com Git - bison.git/commit - src/parse-gram.y
printer/destructor: translate only once
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 27 Jul 2012 10:47:02 +0000 (12:47 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 27 Jul 2012 10:54:31 +0000 (12:54 +0200)
commit1c292035e12d4c2c782f1dba6f78e690ad5635b3
tree08723f1e51c860c6c90ea80e34ac003675e9ae12
parent263137264fa5e5a9fb03bc75f941c14bedfe47c4
printer/destructor: translate only once

Currently "%printer {...} a b c d e f" translates the {...} six times.
Not only is this bad for time and space, it also issues six times the
same warnings.

* src/symlist.h, src/symlist.c (symbol_list_destructor_set)
(symbol_list_printer_set): Take the action as code_props instead of
const char *.
* src/parse-gram.y: Translate these actions here.
* src/scan-code.h: Comment change.
* tests/input.at: Check that warnings are issued only once.
src/parse-gram.y
src/scan-code.h
src/symlist.c
src/symlist.h
tests/input.at