GCC Middle and Back End API Reference
|
#include "bconfig.h"
#include "system.h"
#include "errors.h"
#include "version.h"
#include "obstack.h"
#include "gengtype.h"
Data Structures | |
struct | state_ident_st |
struct | state_token_st |
class | s_expr_writer |
class | state_writer |
Macros | |
#define | NULL_STATE_TOKEN (struct state_token_st*)0 |
#define | fatal_reading_state_printf(Tok, Fmt, ...) |
Enumerations | |
enum | state_token_en { STOK_NONE , STOK_INTEGER , STOK_STRING , STOK_LEFTPAR , STOK_RIGHTPAR , STOK_NAME } |
Variables | |
static htab_t | state_ident_tab |
struct state_token_st * | state_token = NULL_STATE_TOKEN |
static FILE * | state_file |
static const char * | state_path = NULL |
static int | state_line = 0 |
static long | state_bol = 0 |
static htab_t | state_seen_types |
#define fatal_reading_state_printf | ( | Tok, | |
Fmt, | |||
... ) |
Fatal printf-like message while reading state. This can't be a function, because there is no way to pass a va_arg to a variant of fatal.
Referenced by read_a_state_token(), read_state(), read_state_common_type_content(), read_state_fields(), read_state_pair(), read_state_structures(), read_state_typedefs(), read_state_variables(), and read_state_version().
#define NULL_STATE_TOKEN (struct state_token_st*)0 |
Referenced by next_state_tokens(), read_a_state_token(), read_state(), and read_state_structures().
enum state_token_en |
The state file has simplistic lispy lexical tokens. Its lexer gives a linked list of struct state_token_st, through the peek_state_token function. Lexical tokens are consumed with next_state_tokens.
The lexical kind of each lispy token.
Enumerator | |
---|---|
STOK_NONE | |
STOK_INTEGER | |
STOK_STRING | |
STOK_LEFTPAR | |
STOK_RIGHTPAR | |
STOK_NAME |
|
static |
References type::state_number.
Referenced by read_state().
|
static |
Fatal error messages when reading the state. They are extremely unlikely, and only appear when this gengtype-state.cc file is buggy, or when reading a gengtype state which was not generated by the same version of gengtype or GCC.
Fatal message while reading state.
References fatal(), msg, state_line, state_path, state_token_st::stok_col, state_token_st::stok_file, and state_token_st::stok_line.
Referenced by next_state_tokens(), read_a_state_token(), read_state_already_seen_type(), read_state_array_type(), read_state_fields(), read_state_fileloc(), read_state_files_list(), read_state_gc_used(), read_state_lang_bitmap(), read_state_lang_struct_type(), read_state_languages(), read_state_nested_option(), read_state_option(), read_state_options(), read_state_pair(), read_state_srcdir(), read_state_string_option(), read_state_struct_type(), read_state_structures(), read_state_trailer(), read_state_type(), read_state_typedefs(), read_state_undefined_type(), read_state_union_type(), read_state_user_struct_type(), read_state_variables(), and read_state_version().
|
static |
Utility functions for the state_seen_types hash table.
References type::state_number, and ty.
Referenced by read_state().
|
static |
Consume the next DEPTH tokens and free them.
References fatal_reading_state(), free(), NULL, NULL_STATE_TOKEN, state_token, and state_token_st::stok_next.
Referenced by read_state_already_seen_type(), read_state_array_type(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), read_state_files_list(), read_state_gc_used(), read_state_lang_bitmap(), read_state_lang_struct_type(), read_state_languages(), read_state_nested_option(), read_state_option(), read_state_options(), read_state_pair(), read_state_srcdir(), read_state_string_option(), read_state_struct_type(), read_state_structures(), read_state_trailer(), read_state_type(), read_state_typedefs(), read_state_undefined_type(), read_state_union_type(), read_state_user_struct_type(), read_state_variables(), and read_state_version().
|
static |
Return the length of a linked list made of pairs.
Compute the length of a list of pairs, starting from the first one.
References pair::next, and NULL.
Referenced by state_writer::write_state_fields(), state_writer::write_state_typedefs(), and state_writer::write_state_variables().
|
static |
Used for lexical look-ahead. Retrieves the lexical token of rank DEPTH, starting with 0 when reading the state file. Gives null on end of file.
References NULL, read_a_state_token(), and state_token.
Referenced by read_state_already_seen_type(), read_state_array_type(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), read_state_files_list(), read_state_gc_used(), read_state_lang_bitmap(), read_state_lang_struct_type(), read_state_languages(), read_state_nested_option(), read_state_option(), read_state_options(), read_state_pair(), read_state_pair_list(), read_state_srcdir(), read_state_string_option(), read_state_struct_type(), read_state_structures(), read_state_trailer(), read_state_type(), read_state_typedefs(), read_state_undefined_type(), read_state_union_type(), read_state_user_struct_type(), read_state_variables(), and read_state_version().
|
static |
Our token lexer is heavily inspired by MELT's lexer, and share some code with the file gcc/melt-runtime.c of the GCC MELT branch! We really want the gengtype state to be easily parsable by MELT. This is a usual lispy lexing routine, dealing with spaces and comments, numbers, parenthesis, names, strings.
References fatal_reading_state(), fatal_reading_state_printf, NULL, NULL_STATE_TOKEN, obstack, state_bol, state_file, state_ident_by_name(), state_line, state_path, state_token_st::stok_col, state_token_st::stok_file, state_token_st::stok_ident, STOK_INTEGER, state_token_st::stok_kind, STOK_LEFTPAR, state_token_st::stok_line, STOK_NAME, state_token_st::stok_next, state_token_st::stok_num, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, and state_token_st::stok_un.
Referenced by peek_state_token().
void read_state | ( | const char * | path | ) |
The function reading the state, called by main from gengtype.cc.
References equals_type_number(), errno, fatal(), fatal_reading_state_printf, fopen, hash_type_number(), NULL, NULL_STATE_TOKEN, path, progname, read_state_files_list(), read_state_languages(), read_state_srcdir(), read_state_structures(), read_state_trailer(), read_state_typedefs(), read_state_variables(), read_state_version(), state_file, state_ident_tab, state_line, state_path, state_seen_types, structures, typedefs, variables, and verbosity_level.
|
static |
Read an already seen type.
References fatal_reading_state(), GC_UNUSED, next_state_tokens(), NULL, peek_state_token(), type::state_number, state_seen_types, state_token_kind(), STOK_INTEGER, state_token_st::stok_num, state_token_st::stok_un, and TYPE_SCALAR.
Referenced by read_state_type().
|
static |
Read a GTY-ed array type.
References type::a, DBGPRINTF, fatal_reading_state(), type::kind, type::len, next_state_tokens(), NULL, type::p, peek_state_token(), read_state_common_type_content(), read_state_type(), type::state_number, state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, TYPE_ARRAY, and type::u.
Referenced by read_state_type().
|
static |
Read the callback_type.
References callback_type, and read_state_common_type_content().
Referenced by read_state_type().
|
static |
Utility function to read the common content of types.
References fatal_reading_state_printf, type::gc_used, next_state_tokens(), peek_state_token(), type::pointer_to, read_state_gc_used(), read_state_type(), record_type(), state_line, type::state_number, state_token_kind(), STOK_INTEGER, state_token_st::stok_num, and state_token_st::stok_un.
Referenced by read_state_array_type(), read_state_callback_type(), read_state_lang_struct_type(), read_state_pointer_type(), read_state_scalar_char_type(), read_state_scalar_nonchar_type(), read_state_string_type(), read_state_struct_type(), read_state_undefined_type(), read_state_union_type(), and read_state_user_struct_type().
|
static |
Read the fields of a GTY-ed type.
References fatal_reading_state(), fatal_reading_state_printf, fields, next_state_tokens(), NULL, peek_state_token(), read_state_pair_list(), state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, and state_token_st::stok_un.
Referenced by read_state_lang_struct_type(), read_state_struct_type(), read_state_union_type(), and read_state_user_struct_type().
|
static |
End of writing routines! The corresponding reading routines follow. *
Forward declarations, since some read_state_* functions are recursive!
Read a file location. Files within the source directory are dealt with specifically.
References DIR_SEPARATOR, fatal_reading_state(), fileloc::file, free(), gcc_assert, input_file_by_name(), fileloc::line, next_state_tokens(), NULL, peek_state_token(), srcdir, state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, and state_token_st::stok_un.
Referenced by read_state_lang_struct_type(), read_state_pair(), read_state_struct_type(), read_state_undefined_type(), read_state_union_type(), and read_state_user_struct_type().
|
static |
Read the sequence of files.
References build_headers, DIR_SEPARATOR, fatal_reading_state(), free(), gt_files, i, input_file_by_name(), next_state_tokens(), NULL, num_build_headers, num_gt_files, peek_state_token(), set_lang_bitmap(), srcdir, state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, and state_token_st::stok_un.
Referenced by read_state().
|
static |
Read the gc used information.
References fatal_reading_state(), GC_MAYBE_POINTED_TO, GC_POINTED_TO, GC_UNUSED, GC_USED, next_state_tokens(), peek_state_token(), and state_token_is_name().
Referenced by read_state_common_type_content().
|
static |
Read a lang_bitmap representing a set of GCC front-end languages.
References fatal_reading_state(), next_state_tokens(), peek_state_token(), state_token_kind(), STOK_INTEGER, state_token_st::stok_num, and state_token_st::stok_un.
Referenced by read_state_lang_struct_type(), read_state_struct_type(), and read_state_union_type().
|
static |
Read a lang_struct type for GTY-ed struct-s which depends upon GCC front-end languages. This is a tricky function and it was painful to debug. Change it with extreme care. See also write_state_lang_struct_type.
References type::bitmap, DBGPRINTF, fatal_reading_state(), type::fields, i, type::kind, type::lang_struct, type::line, type::next, next_state_tokens(), NULL, type::opt, peek_state_token(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), read_state_lang_bitmap(), read_state_options(), read_state_type(), type::s, type::state_number, state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, type::tag, TYPE_LANG_STRUCT, and type::u.
Referenced by read_state_type().
|
static |
Read the sequence of GCC front-end languages.
References fatal_reading_state(), i, lang_dir_names, next_state_tokens(), NULL, num_lang_dirs, peek_state_token(), state_token_is_name(), state_token_kind(), state_ident_st::stid_name, state_token_st::stok_ident, STOK_INTEGER, STOK_LEFTPAR, STOK_NAME, state_token_st::stok_num, STOK_RIGHTPAR, and state_token_st::stok_un.
Referenced by read_state().
|
static |
Read a nested option.
References nested_ptr_data::convert_from, nested_ptr_data::convert_to, fatal_reading_state(), options::info, options::kind, options::nested, next_state_tokens(), NULL, OPTION_NESTED, peek_state_token(), read_state_type(), state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, and nested_ptr_data::type.
Referenced by read_state_option().
|
static |
Read an GTY option.
References fatal_reading_state(), next_state_tokens(), NULL, peek_state_token(), read_state_nested_option(), read_state_string_option(), read_state_type_option(), state_token_is_name(), state_token_kind(), state_ident_st::stid_name, state_token_st::stok_ident, STOK_LEFTPAR, STOK_NAME, STOK_RIGHTPAR, and state_token_st::stok_un.
Referenced by read_state_options().
|
static |
Read a list of options.
References fatal_reading_state(), options::next, next_state_tokens(), NULL, peek_state_token(), read_state_option(), state_token_is_name(), state_token_kind(), STOK_LEFTPAR, and STOK_RIGHTPAR.
Referenced by read_state_lang_struct_type(), read_state_pair(), read_state_struct_type(), and read_state_union_type().
|
static |
Read a pair.
References fatal_reading_state(), fatal_reading_state_printf, next_state_tokens(), NULL, peek_state_token(), read_state_fileloc(), read_state_options(), read_state_type(), state_token, state_token_is_name(), state_token_kind(), state_token_st::stok_kind, STOK_LEFTPAR, STOK_NAME, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, and state_token_st::stok_un.
Referenced by read_state_pair_list().
|
static |
Return the number of pairs actually read.
References pair::next, NULL, peek_state_token(), read_state_pair(), state_token_kind(), and STOK_RIGHTPAR.
Referenced by read_state_fields(), read_state_typedefs(), and read_state_variables().
|
static |
Read a GTY-ed pointer type.
References DBGPRINTF, type::kind, type::p, read_state_common_type_content(), read_state_type(), type::state_number, TYPE_POINTER, and type::u.
Referenced by read_state_type().
|
static |
Read the scalar_char type.
References read_state_common_type_content(), and scalar_char.
Referenced by read_state_type().
|
static |
Read the scalar_nonchar type.
References read_state_common_type_content(), and scalar_nonchar.
Referenced by read_state_type().
|
static |
Read the source directory.
References fatal_reading_state(), next_state_tokens(), peek_state_token(), srcdir, srcdir_len, state_token_is_name(), state_token_kind(), STOK_LEFTPAR, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, and state_token_st::stok_un.
Referenced by read_state().
|
static |
Read a string option.
References fatal_reading_state(), options::info, options::kind, next_state_tokens(), NULL, OPTION_STRING, peek_state_token(), state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, and options::string.
Referenced by read_state_option().
|
static |
Read the string_type.
References read_state_common_type_content(), and string_type.
Referenced by read_state_type().
|
static |
Read a GTY-ed struct type.
References add_subclass(), type::base_class, type::bitmap, DBGPRINTF, fatal_reading_state(), type::fields, type::kind, type::lang_struct, type::line, next_state_tokens(), NULL, type::opt, peek_state_token(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), read_state_lang_bitmap(), read_state_options(), read_state_type(), type::s, type::state_number, state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, type::tag, TYPE_STRUCT, and type::u.
Referenced by read_state_type().
|
static |
Read the structures.
References fatal_reading_state(), fatal_reading_state_printf, type::next, next_state_tokens(), NULL, NULL_STATE_TOKEN, peek_state_token(), progname, read_state_type(), state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, state_token_st::stok_un, structures, and verbosity_level.
Referenced by read_state().
|
static |
Read the trailer.
References fatal_reading_state(), next_state_tokens(), peek_state_token(), state_token_is_name(), state_token_kind(), STOK_LEFTPAR, and STOK_RIGHTPAR.
Referenced by read_state().
|
static |
Read a GTY-ed type.
References fatal_reading_state(), next_state_tokens(), NULL, peek_state_token(), read_state_already_seen_type(), read_state_array_type(), read_state_callback_type(), read_state_lang_struct_type(), read_state_pointer_type(), read_state_scalar_char_type(), read_state_scalar_nonchar_type(), read_state_string_type(), read_state_struct_type(), read_state_undefined_type(), read_state_union_type(), read_state_user_struct_type(), state_token_is_name(), state_token_kind(), STOK_LEFTPAR, and STOK_RIGHTPAR.
Referenced by read_state_array_type(), read_state_common_type_content(), read_state_lang_struct_type(), read_state_nested_option(), read_state_pair(), read_state_pointer_type(), read_state_struct_type(), read_state_structures(), read_state_type_option(), and read_state_union_type().
|
static |
Read a type option.
References options::info, options::kind, OPTION_TYPE, read_state_type(), and options::type.
Referenced by read_state_option().
|
static |
Read the typedefs.
References fatal_reading_state(), fatal_reading_state_printf, next_state_tokens(), NULL, peek_state_token(), progname, read_state_pair_list(), state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, state_token_st::stok_un, typedefs, and verbosity_level.
Referenced by read_state().
|
static |
Read an undefined type.
References DBGPRINTF, fatal_reading_state(), type::kind, type::line, next_state_tokens(), NULL, peek_state_token(), read_state_common_type_content(), read_state_fileloc(), type::s, type::state_number, state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, type::tag, TYPE_UNDEFINED, and type::u.
Referenced by read_state_type().
|
static |
Read a GTY-ed union type.
References type::bitmap, DBGPRINTF, fatal_reading_state(), type::fields, type::kind, type::lang_struct, type::line, next_state_tokens(), NULL, type::opt, peek_state_token(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), read_state_lang_bitmap(), read_state_options(), read_state_type(), type::s, type::state_number, state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, type::tag, TYPE_UNION, and type::u.
Referenced by read_state_type().
|
static |
Read a GTY-ed user-provided struct TYPE.
References DBGPRINTF, fatal_reading_state(), type::fields, type::kind, type::line, next_state_tokens(), NULL, peek_state_token(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), type::s, type::state_number, state_token_is_name(), state_token_kind(), STOK_STRING, state_token_st::stok_string, state_token_st::stok_un, type::tag, TYPE_USER_STRUCT, and type::u.
Referenced by read_state_type().
|
static |
Read the variables.
References fatal_reading_state(), fatal_reading_state_printf, next_state_tokens(), NULL, peek_state_token(), progname, read_state_pair_list(), state_token_is_name(), state_token_kind(), STOK_INTEGER, STOK_LEFTPAR, state_token_st::stok_num, STOK_RIGHTPAR, state_token_st::stok_un, variables, and verbosity_level.
Referenced by read_state().
|
static |
Read a version, and check against the version of the gengtype.
References fatal_reading_state(), fatal_reading_state_printf, next_state_tokens(), peek_state_token(), state_token_is_name(), state_token_kind(), STOK_LEFTPAR, STOK_RIGHTPAR, STOK_STRING, state_token_st::stok_string, and state_token_st::stok_un.
Referenced by read_state().
|
static |
Record into the state_seen_types hash-table a type which we are reading, to enable recursive or circular references to it.
References gcc_assert, state_seen_types, and type().
Referenced by create_task_copyfn(), install_var_field(), lower_omp_task_reductions(), lower_send_shared_vars(), neuter_worker_single(), oacc_do_neutering(), read_state_common_type_content(), and worker_single_copy().
|
static |
Find or allocate an identifier in our name hash table.
References NULL, state_ident_tab, and state_ident_st::stid_name.
Referenced by read_a_state_token().
|
inlinestatic |
Test if a token is a given name i.e. an identifier.
References NULL, state_ident_st::stid_name, state_token_st::stok_ident, state_token_st::stok_kind, STOK_NAME, and state_token_st::stok_un.
Referenced by read_state_array_type(), read_state_fields(), read_state_fileloc(), read_state_files_list(), read_state_gc_used(), read_state_lang_struct_type(), read_state_languages(), read_state_nested_option(), read_state_option(), read_state_options(), read_state_pair(), read_state_srcdir(), read_state_string_option(), read_state_struct_type(), read_state_structures(), read_state_trailer(), read_state_type(), read_state_typedefs(), read_state_undefined_type(), read_state_union_type(), read_state_user_struct_type(), read_state_variables(), and read_state_version().
|
inlinestatic |
Safely retrieve the lexical kind of a token.
References NULL, state_token_st::stok_kind, and STOK_NONE.
Referenced by read_state_already_seen_type(), read_state_array_type(), read_state_common_type_content(), read_state_fields(), read_state_fileloc(), read_state_files_list(), read_state_lang_bitmap(), read_state_lang_struct_type(), read_state_languages(), read_state_nested_option(), read_state_option(), read_state_options(), read_state_pair(), read_state_pair_list(), read_state_srcdir(), read_state_string_option(), read_state_struct_type(), read_state_structures(), read_state_trailer(), read_state_type(), read_state_typedefs(), read_state_undefined_type(), read_state_union_type(), read_state_user_struct_type(), read_state_variables(), and read_state_version().
|
inlinestatic |
Gengtype persistent state serialization & de-serialization. Useful for gengtype in plugin mode. Copyright (C) 2010-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. Contributed by Jeremie Salvucci <jeremie.salvucci@free.fr> and Basile Starynkevitch <basile@starynkevitch.net>
Gives the file location of a type, if any.
References CONST_CAST, gcc_unreachable, fileloc::line, NULL, ty, TYPE_ARRAY, TYPE_CALLBACK, TYPE_LANG_STRUCT, TYPE_NONE, TYPE_POINTER, TYPE_SCALAR, TYPE_STRING, TYPE_STRUCT, TYPE_UNDEFINED, TYPE_UNION, and TYPE_USER_STRUCT.
Referenced by state_writer::write_state_struct_union_type(), state_writer::write_state_undefined_type(), and state_writer::write_state_user_struct_type().
void write_state | ( | const char * | state_path | ) |
The write_state routine is the only writing routine called by main in gengtype.cc. To avoid messing the state if gengtype is interrupted or aborted, we write a temporary file and rename it after having written it in totality.
|
static |
Write the trailer.
References errno, fatal(), and state_file.
|
static |
Referenced by read_a_state_token().
|
static |
Used by the reading lexer.
Referenced by s_expr_writer::begin_s_expr(), s_expr_writer::end_s_expr(), read_a_state_token(), read_state(), s_expr_writer::write_any_indent(), s_expr_writer::write_new_line(), state_writer::write_state_a_string(), state_writer::write_state_array_type(), state_writer::write_state_callback_type(), state_writer::write_state_common_type_content(), state_writer::write_state_fields(), state_writer::write_state_fileloc(), state_writer::write_state_files_list(), state_writer::write_state_gc_used(), state_writer::write_state_lang_bitmap(), state_writer::write_state_lang_struct_type(), state_writer::write_state_languages(), state_writer::write_state_nested_option(), state_writer::write_state_option(), state_writer::write_state_options(), state_writer::write_state_pair(), state_writer::write_state_pointer_type(), state_writer::write_state_scalar_type(), state_writer::write_state_string_option(), state_writer::write_state_string_type(), state_writer::write_state_struct_union_type(), state_writer::write_state_structures(), write_state_trailer(), state_writer::write_state_type(), state_writer::write_state_type_option(), state_writer::write_state_typedefs(), state_writer::write_state_undefined_type(), state_writer::write_state_user_struct_type(), and state_writer::write_state_variables().
|
static |
Referenced by read_state(), and state_ident_by_name().
|
static |
Referenced by fatal_reading_state(), read_a_state_token(), read_state(), and read_state_common_type_content().
|
static |
Referenced by fatal_reading_state(), read_a_state_token(), and read_state().
|
static |
Following routines are useful for serializing datas. * * We want to serialize : * - typedefs list * - structures list * - variables list * * So, we have one routine for each kind of data. The main writing * routine is write_state. The main reading routine is * read_state. Most writing routines write_state_FOO have a * corresponding reading routine read_state_FOO. Reading is done in a * recursive descending way, and any read error is fatal.
When reading the state, we need to remember the previously seen types by their state_number, since GTY-ed types are usually shared.
Referenced by read_state(), read_state_already_seen_type(), and record_type().
struct state_token_st* state_token = NULL_STATE_TOKEN |
the state_token pointer contains the leftmost current token. The tokens are organized in a linked queue, using stok_next, for token look-ahead.
Referenced by next_state_tokens(), peek_state_token(), and read_state_pair().