5 dnl tables_shared.c - tables serialization code
7 dnl Copyright (c) 1990 The Regents of the University of California.
8 dnl All rights reserved.
10 dnl This code is derived from software contributed to Berkeley by
13 dnl The United States Government has rights in this work pursuant
14 dnl to contract no. DE-AC03-76SF00098 between the United States
15 dnl Department of Energy and the University of California.
17 dnl This file is part of flex.
19 dnl Redistribution and use in source and binary forms, with or without
20 dnl modification, are permitted provided that the following conditions
23 dnl 1. Redistributions of source code must retain the above copyright
24 dnl notice, this list of conditions and the following disclaimer.
25 dnl 2. Redistributions in binary form must reproduce the above copyright
26 dnl notice, this list of conditions and the following disclaimer in the
27 dnl documentation and/or other materials provided with the distribution.
29 dnl Neither the name of the University nor the names of its contributors
30 dnl may be used to endorse or promote products derived from this software
31 dnl without specific prior written permission.
33 dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
34 dnl IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
35 dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
40 /* This file is meant to be included in both the skeleton and the actual
41 * flex code (hence the name "_shared").
44 #define yyskel_static static
55 /** Get the number of integers in this table. This is NOT the
56 * same thing as the number of elements.
58 * @return the number of integers in the table
60 yyskel_static flex_int32_t
yytbl_calc_total_len (const struct yytbl_data
*tbl
)
64 /* total number of ints */
66 if (tbl
->td_hilen
> 0)
69 if (tbl
->td_id
== YYTD_ID_TRANSITION
)