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