yacc: rename types for states

* data/skeletons/yacc.c (yy_state_num): Rename as...
(yy_state_t): this.
(yy_state_fast_t): New.
Use it.
This commit is contained in:
Akim Demaille
2019-10-12 11:00:05 +02:00
parent d563a01709
commit e5cbac98b6
2 changed files with 37 additions and 34 deletions

View File

@@ -258,8 +258,10 @@ AT_BISON_OPTION_PUSHDEFS
AT_REQUIRE([ruby $abs_top_srcdir/tests/linear $1 >input.y])
# Old versions of GCC reject large values given to #line.
AT_FULL_COMPILE([input], [], [], [], [--no-line])
AT_CHECK([grep 'define YYNSTATES *$1' input.c], [], [ignore])
AT_CHECK([grep 'typedef $2 yy_state_num' input.c], [], [ignore])
AT_CHECK([[sed -ne 's/#define YYNSTATES *\([0-9]*\)/\1/p' input.c]], [], [$1
])
AT_CHECK([[sed -ne 's/typedef \(.*\) yy_state_t;/\1/p' input.c]], [], [$2
])
AT_PARSER_CHECK([input])
AT_BISON_OPTION_POPDEFS