1%% ``Licensed under the Apache License, Version 2.0 (the "License"); 2%% you may not use this file except in compliance with the License. 3%% You may obtain a copy of the License at 4%% 5%% http://www.apache.org/licenses/LICENSE-2.0 6%% 7%% Unless required by applicable law or agreed to in writing, software 8%% distributed under the License is distributed on an "AS IS" BASIS, 9%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10%% See the License for the specific language governing permissions and 11%% limitations under the License. 12%% 13%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. 14%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings 15%% AB. All Rights Reserved.'' 16%% 17%% $Id: v3_kernel.hrl,v 1.1 2008/12/17 09:53:43 mikpe Exp $ 18%% 19 20%% Purpose : Kernel Erlang as records. 21 22%% It would be nice to incorporate some generic functions as well but 23%% this could make including this file difficult. 24%% N.B. the annotation field is ALWAYS the first field! 25 26%% Kernel annotation record. 27-record(k, {us, %Used variables 28 ns, %New variables 29 a}). %Core annotation 30 31%% Literals 32%% NO CHARACTERS YET. 33%%-record(k_char, {anno=[],val}). 34-record(k_int, {anno=[],val}). 35-record(k_float, {anno=[],val}). 36-record(k_atom, {anno=[],val}). 37-record(k_string, {anno=[],val}). 38-record(k_nil, {anno=[]}). 39 40-record(k_tuple, {anno=[],es}). 41-record(k_cons, {anno=[],hd,tl}). 42-record(k_binary, {anno=[],segs}). 43-record(k_bin_seg, {anno=[],size,unit,type,flags,seg,next}). 44-record(k_bin_end, {anno=[]}). 45-record(k_var, {anno=[],name}). 46 47-record(k_local, {anno=[],name,arity}). 48-record(k_remote, {anno=[],mod,name,arity}). 49-record(k_internal, {anno=[],name,arity}). 50 51-record(k_mdef, {anno=[],name,exports,attributes,body}). 52-record(k_fdef, {anno=[],func,arity,vars,body}). 53 54-record(k_seq, {anno=[],arg,body}). 55-record(k_put, {anno=[],arg,ret=[]}). 56-record(k_bif, {anno=[],op,args,ret=[]}). 57-record(k_test, {anno=[],op,args}). 58-record(k_call, {anno=[],op,args,ret=[]}). 59-record(k_enter, {anno=[],op,args}). 60-record(k_receive, {anno=[],var,body,timeout,action,ret=[]}). 61-record(k_receive_accept, {anno=[]}). 62-record(k_receive_next, {anno=[]}). 63-record(k_try, {anno=[],arg,vars,body,evars,handler,ret=[]}). 64-record(k_catch, {anno=[],body,ret=[]}). 65 66-record(k_match, {anno=[],vars,body,ret=[]}). 67-record(k_alt, {anno=[],first,then}). 68-record(k_select, {anno=[],var,types}). 69-record(k_type_clause, {anno=[],type,values}). 70-record(k_val_clause, {anno=[],val,body}). 71-record(k_guard, {anno=[],clauses}). 72-record(k_guard_clause, {anno=[],guard,body}). 73 74-record(k_break, {anno=[],args=[]}). 75-record(k_return, {anno=[],args=[]}). 76 77%%k_get_anno(Thing) -> element(2, Thing). 78%%k_set_anno(Thing, Anno) -> setelement(2, Thing, Anno). 79