## bindings.pkg
# Compiled by:
#
src/lib/c-kit/src/ast/ast.sublib# types the namings of program identifiers, including types,
# labels, chunks (variables and function names) in dictionaries,
# i.e. tidtabs and symbol tables
# the old pidInfo corresponds to the identifier types now in raw_syntax,
# and the old symInfo to symNaming
package namings {
Named_Ctype
= STRUCT
(tid::Uid, List ((raw_syntax::Ctype, Null_Or( raw_syntax::Member ), Null_Or( large_int::Int )) ))
# pid is optional because of anonymous bit fields
| UNION (tid::Uid, List ((raw_syntax::Ctype, raw_syntax::Member)))
# pid is mandatory for unions
| ENUM (tid::Uid, List ((raw_syntax::Member, large_int::Int)))
| TYPEDEFX (tid::Uid, raw_syntax::Ctype);
# type info contained in tidtabs namings
# name = NULL for anonymous structs, unions, enums -- can't refer to it
# ntype = NULL means is a "partial" type -- has been used, but not defined
Tid_Naming =
{ name: Null_Or( String ),
ntype: Null_Or( Named_Ctype ),
global: Bool, /* is it a top level definition? */
location: line_number_db::Location
};
# info used in dictionary symbol tables
# Coincidentally the same as raw_syntax::member
Type_Id_Info =
{ name: symbol::Symbol,
uid: pid::Uid, # unique identifier
location: line_number_db::Location,
ctype: raw_syntax::Ctype
};
# type of namings in symbol tables
Sym_Naming
= MEMBER raw_syntax::Member
| ID raw_syntax::Id
# Chunks and functions
| TYPEDEF Type_Id_Info
| TAG Type_Id_Info;
}; # package namings
## Copyright (c) 1999 by Lucent Technologies
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.