1 /*----------------------------------------------------------------------------
2 ChucK Concurrent, On-the-fly Audio Programming Language
3 Compiler and Virtual Machine
5 Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
6 http://chuck.cs.princeton.edu/
7 http://soundlab.cs.princeton.edu/
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 -----------------------------------------------------------------------------*/
25 //-----------------------------------------------------------------------------
27 // desc: chuck type-system / type-checker
29 // author: Ge Wang (gewang@cs.princeton.edu)
30 // Perry R. Cook (prc@cs.princeton.edu)
31 // date: Autumn 2002 - original
32 // Autumn 2004 - rewrite
33 //-----------------------------------------------------------------------------
34 #ifndef __CHUCK_TYPE_H__
35 #define __CHUCK_TYPE_H__
37 #include "chuck_def.h"
38 #include "chuck_absyn.h"
41 #include "chuck_errmsg.h"
45 //-----------------------------------------------------------------------------
47 // desc: basic, default ChucK types
48 //-----------------------------------------------------------------------------
51 te_int
, te_uint
, te_single
, te_float
, te_double
, te_time
, te_dur
,
52 te_complex
, te_polar
, te_string
, te_thread
, te_shred
, te_class
,
53 te_function
, te_object
, te_user
, te_array
, te_null
, te_ugen
, te_uana
,
54 te_event
, te_void
, te_stdout
, te_stderr
, te_adc
, te_dac
, te_bunghole
,
55 te_uanablob
, te_io
, te_fileio
, te_multi
61 //-----------------------------------------------------------------------------
62 // name: enum te_HowMuch
63 // desc: how much to scan/type check
64 //-----------------------------------------------------------------------------
66 te_do_all
= 0, te_do_classes_only
, te_do_no_classes
72 //-----------------------------------------------------------------------------
73 // name: struct Chuck_Scope
74 // desc: scoping structure
75 //-----------------------------------------------------------------------------
81 Chuck_Scope() { this->push(); }
83 ~Chuck_Scope() { this->pop(); }
86 void push() { scope
.push_back( new std::map
<S_Symbol
, Chuck_VM_Object
*> ); }
91 assert( scope
.size() != 0 );
92 // TODO: release contents of scope.back()
93 delete scope
.back(); scope
.pop_back();
98 { scope
.clear(); this->push(); }
103 assert( scope
.size() != 0 );
104 std::map
<S_Symbol
, Chuck_VM_Object
*>::iterator iter
;
107 for( iter
= commit_map
.begin(); iter
!= commit_map
.end(); iter
++ )
109 // add to front/where
110 (*scope
.front())[(*iter
).first
] = (*iter
).second
;
117 // roll back since last commit or beginning
120 assert( scope
.size() != 0 );
121 std::map
<S_Symbol
, Chuck_VM_Object
*>::iterator iter
;
124 for( iter
= commit_map
.begin(); iter
!= commit_map
.end(); iter
++ )
127 (*iter
).second
->release();
135 void add( const std::string
& xid
, Chuck_VM_Object
* value
)
136 { this->add( insert_symbol(xid
.c_str()), value
); }
137 void add( S_Symbol xid
, Chuck_VM_Object
* value
)
139 assert( scope
.size() != 0 );
140 // add if back is NOT front
141 if( scope
.back() != scope
.front() )
142 (*scope
.back())[xid
] = value
;
144 else commit_map
[xid
] = value
;
150 T
operator []( const std::string
& xid
)
151 { return (T
)this->lookup( xid
); }
152 T
lookup( const std::string
& xid
, t_CKINT climb
= 1 )
153 { return (T
)this->lookup( insert_symbol(xid
.c_str()), climb
); }
154 // -1 base, 0 current, 1 climb
155 T
lookup( S_Symbol xid
, t_CKINT climb
= 1 )
157 Chuck_VM_Object
* val
= NULL
; assert( scope
.size() != 0 );
161 val
= (*scope
.back())[xid
];
162 // look in commit buffer if the back is the front
163 if( !val
&& scope
.back() == scope
.front()
164 && (commit_map
.find(xid
) != commit_map
.end()) )
165 val
= commit_map
[xid
];
169 for( t_CKUINT i
= scope
.size(); i
> 0; i
-- )
170 { if( val
= (*scope
[i
-1])[xid
] ) break; }
172 // look in commit buffer
173 if( !val
&& (commit_map
.find(xid
) != commit_map
.end()) )
174 val
= commit_map
[xid
];
178 val
= (*scope
.front())[xid
];
179 // look in commit buffer
180 if( !val
&& (commit_map
.find(xid
) != commit_map
.end()) )
181 val
= commit_map
[xid
];
187 // get list of top level
188 void get_toplevel( std::vector
<Chuck_VM_Object
*> & out
)
190 assert( scope
.size() != 0 );
191 std::map
<S_Symbol
, Chuck_VM_Object
*>::iterator iter
;
195 // get the front of the array
196 std::map
<S_Symbol
, Chuck_VM_Object
*> * m
= scope
.front();
199 for( iter
= m
->begin(); iter
!= m
->end(); iter
++ )
202 out
.push_back( (*iter
).second
);
207 std::vector
<std::map
<S_Symbol
, Chuck_VM_Object
*> *> scope
;
208 std::map
<S_Symbol
, Chuck_VM_Object
*> commit_map
;
218 struct Chuck_VM_Code
;
223 //-----------------------------------------------------------------------------
224 // name: struct Chuck_Namespace
225 // desc: Chuck Namespace containing semantic information
226 //-----------------------------------------------------------------------------
227 struct Chuck_Namespace
: public Chuck_VM_Object
230 Chuck_Scope
<Chuck_Type
*> type
;
231 Chuck_Scope
<Chuck_Value
*> value
;
232 Chuck_Scope
<Chuck_Func
*> func
;
235 Chuck_VTable obj_v_table
;
236 // static data segment
237 t_CKBYTE
* class_data
;
238 // static data segment size
239 t_CKUINT class_data_size
;
244 Chuck_VM_Code
* pre_ctor
;
246 Chuck_VM_Code
* dtor
;
247 // type that contains this
248 Chuck_Namespace
* parent
;
253 Chuck_Namespace() { pre_ctor
= NULL
; dtor
= NULL
; parent
= NULL
; offset
= 0;
254 class_data
= NULL
; class_data_size
= 0; }
256 virtual ~Chuck_Namespace() {
257 /* TODO: SAFE_RELEASE( this->parent ); */
258 /* TODO: SAFE_DELETE( pre_ctor ); */
259 /* TODO: SAFE_DELETE( dtor ); */
263 Chuck_Type
* lookup_type( const std::string
& name
, t_CKINT climb
= 1 );
264 Chuck_Type
* lookup_type( S_Symbol name
, t_CKINT climb
= 1 );
266 Chuck_Value
* lookup_value( const std::string
& name
, t_CKINT climb
= 1 );
267 Chuck_Value
* lookup_value( S_Symbol name
, t_CKINT climb
= 1 );
269 Chuck_Func
* lookup_func( const std::string
& name
, t_CKINT climb
= 1 );
270 Chuck_Func
* lookup_func( S_Symbol name
, t_CKINT climb
= 1 );
274 EM_log( CK_LOG_FINER
, "committing namespace: '%s'...", name
.c_str() );
275 type
.commit(); value
.commit(); func
.commit();
280 EM_log( CK_LOG_FINER
, "rolling back namespace: '%s'...", name
.c_str() );
281 type
.rollback(); value
.rollback(); func
.rollback();
284 // get top level types
285 void get_types( std::vector
<Chuck_Type
*> & out
);
286 // get top level values
287 void get_values( std::vector
<Chuck_Value
*> & out
);
288 // get top level functions
289 void get_funcs( std::vector
<Chuck_Func
*> & out
);
295 //-----------------------------------------------------------------------------
296 // name: struct Chuck_Context
297 // desc: runtime type information pertaining to a file
298 //-----------------------------------------------------------------------------
299 struct Chuck_Context
: public Chuck_VM_Object
302 std::string filename
;
304 a_Program parse_tree
;
306 Chuck_Namespace
* nspc
;
307 // public class def if any
308 a_Class_Def public_class_def
;
309 // error - means to free nspc too
313 enum { P_NONE
= 0, P_CLASSES_ONLY
, P_ALL
};
314 // progress in scan / type check / emit
317 // things to release with the context
318 std::vector
<Chuck_VM_Object
*> new_types
;
319 std::vector
<Chuck_VM_Object
*> new_values
;
320 std::vector
<Chuck_VM_Object
*> new_funcs
;
321 std::vector
<Chuck_VM_Object
*> new_nspc
;
324 std::map
<Chuck_Namespace
*, Chuck_Namespace
*> commit_map
;
325 // add for commit/rollback
326 void add_commit_candidate( Chuck_Namespace
* nspc
);
333 Chuck_Context() { parse_tree
= NULL
; nspc
= new Chuck_Namespace
;
334 public_class_def
= NULL
; has_error
= FALSE
;
337 virtual ~Chuck_Context();
338 // get the top-level code
339 Chuck_VM_Code
* code() { return nspc
->pre_ctor
; }
342 Chuck_Type
* new_Chuck_Type();
343 Chuck_Value
* new_Chuck_Value( Chuck_Type
* t
, const std::string
& name
);
344 Chuck_Func
* new_Chuck_Func();
345 Chuck_Namespace
* new_Chuck_Namespace();
351 //-----------------------------------------------------------------------------
352 // name: struct Chuck_Env
353 // desc: chuck env with type info
354 //-----------------------------------------------------------------------------
355 struct Chuck_Env
: public Chuck_VM_Object
358 static t_CKBOOL
startup();
359 static Chuck_Env
* instance();
360 static t_CKBOOL
shutdown();
363 static Chuck_Env
* our_instance
;
367 // lock from being deleted
368 global_context
.lock();
370 context
= &global_context
; SAFE_ADD_REF(context
);
372 context
->filename
= "@[global]";
374 global_nspc
= global_context
.nspc
; SAFE_ADD_REF(global_nspc
);
376 deprecated
.clear(); deprecate_level
= 1;
383 Chuck_Namespace
* global_nspc
;
385 Chuck_Context global_context
;
389 Chuck_Namespace
* global() { return global_nspc
; }
391 std::vector
<Chuck_Namespace
*> nspc_stack
;
392 // expression namespace
393 Chuck_Namespace
* curr
;
395 std::vector
<Chuck_Type
*> class_stack
;
396 // current class definition
397 Chuck_Type
* class_def
;
398 // current function definition
400 // how far nested in a class definition
401 t_CKUINT class_scope
;
403 // current contexts in memory
404 std::vector
<Chuck_Context
*> contexts
;
406 Chuck_Context
* context
;
408 // control scope (for break, continue)
409 std::vector
<a_Stmt
> breaks
;
412 std::map
<std::string
, t_CKBOOL
> key_words
;
413 std::map
<std::string
, t_CKBOOL
> key_types
;
414 std::map
<std::string
, t_CKBOOL
> key_values
;
417 std::map
<std::string
, std::string
> deprecated
;
418 // level - 0:stop, 1:warn, 2:ignore
419 t_CKINT deprecate_level
;
422 virtual ~Chuck_Env() { }
427 // TODO: release stack items?
428 nspc_stack
.clear(); nspc_stack
.push_back( this->global() );
429 // TODO: release stack items?
430 class_stack
.clear(); class_stack
.push_back( NULL
);
431 // should be at top level
432 assert( context
== &global_context
);
433 // assign : TODO: release curr? class_def? func?
434 // TODO: need another function, since this is called from constructor
435 curr
= this->global(); class_def
= NULL
; func
= NULL
;
436 // make sure this is 0
441 Chuck_Namespace
* nspc_top( )
442 { assert( nspc_stack
.size() > 0 ); return nspc_stack
.back(); }
443 Chuck_Type
* class_top( )
444 { assert( class_stack
.size() > 0 ); return class_stack
.back(); }
450 //-----------------------------------------------------------------------------
451 // name: struct Chuck_UGen_Info
452 // desc: ugen info stored with ugen types
453 //-----------------------------------------------------------------------------
454 struct Chuck_UGen_Info
: public Chuck_VM_Object
456 // tick function pointer
458 // pmsg function pointer
460 // number of incoming channels
462 // number of outgoing channels
465 // for uana, NULL for ugen
467 // number of incoming ana channels
468 t_CKUINT num_ins_ana
;
469 // number of outgoing channels
470 t_CKUINT num_outs_ana
;
474 { tick
= NULL
; pmsg
= NULL
; num_ins
= num_outs
= 1;
475 tock
= NULL
; num_ins_ana
= num_outs_ana
= 1; }
481 //-----------------------------------------------------------------------------
482 // name: struct Chuck_Type
483 // desc: class containing information about a type
484 //-----------------------------------------------------------------------------_id
485 struct Chuck_Type
: public Chuck_VM_Object
491 // type parent (could be NULL)
496 Chuck_Namespace
* owner
;
498 union { Chuck_Type
* array_type
; Chuck_Type
* actual_type
; };
499 // array size (equals 0 means not array, else dimension of array)
500 t_CKUINT array_depth
;
501 // object size (size in memory)
504 Chuck_Namespace
* info
;
510 Chuck_UGen_Info
* ugen_info
;
514 t_CKBOOL is_complete
;
515 // has pre constructor
516 t_CKBOOL has_constructor
;
518 t_CKBOOL has_destructor
;
522 Chuck_Type( te_Type _id
= te_null
, const std::string
& _n
= "",
523 Chuck_Type
* _p
= NULL
, t_CKUINT _s
= 0 )
525 xid
= _id
; name
= _n
; parent
= _p
; size
= _s
; owner
= NULL
;
526 array_type
= NULL
; array_depth
= 0; obj_size
= 0;
527 info
= NULL
; func
= NULL
; def
= NULL
; is_copy
= FALSE
;
528 ugen_info
= NULL
; is_complete
= TRUE
; has_constructor
= FALSE
;
529 has_destructor
= FALSE
;
533 virtual ~Chuck_Type() { reset(); }
538 // fprintf( stderr, "type: %s %i\n", c_name(), (t_CKUINT)this );
540 size
= array_depth
= obj_size
= 0;
543 // free only if not locked: to prevent garbage collection after exit
544 if( !this->m_locked
)
546 // TODO: uncomment this, fix it to behave correctly
547 // release references
548 // SAFE_RELEASE(parent);
549 // SAFE_RELEASE(array_type);
551 // SAFE_RELEASE(owner);
552 // SAFE_RELEASE(func);
553 // SAFE_RELEASE(ugen_info);
557 // assignment - this does not touch the Chuck_VM_Object
558 const Chuck_Type
& operator =( const Chuck_Type
& rhs
)
565 this->name
= rhs
.name
;
566 this->parent
= rhs
.parent
;
567 this->obj_size
= rhs
.obj_size
;
568 this->size
= rhs
.size
;
570 this->is_copy
= TRUE
;
571 this->array_depth
= rhs
.array_depth
;
572 this->array_type
= rhs
.array_type
;
573 // SAFE_ADD_REF(this->array_type);
574 this->func
= rhs
.func
;
575 // SAFE_ADD_REF(this->func);
576 this->info
= rhs
.info
;
577 SAFE_ADD_REF(this->info
);
578 this->owner
= rhs
.owner
;
579 // SAFE_ADD_REF(this->owner);
585 Chuck_Type
* copy( Chuck_Env
* env
) const
586 { Chuck_Type
* n
= env
->context
->new_Chuck_Type();
587 *n
= *this; return n
; }
591 const std::string
& str()
593 for( t_CKUINT i
= 0; i
< array_depth
; i
++ ) ret
+= std::string("[]");
596 const char * c_name()
597 { return str().c_str(); }
603 //-----------------------------------------------------------------------------
604 // name: struct Chuck_Value
605 // desc: a variable in scope
606 //-----------------------------------------------------------------------------
607 struct Chuck_Value
: public Chuck_VM_Object
622 t_CKBOOL is_static
; // do something
623 // is context-global?
624 t_CKBOOL is_context_global
;
626 t_CKBOOL is_decl_checked
;
627 // 0 = public, 1 = protected, 2 = private
630 Chuck_Namespace
* owner
;
632 Chuck_Type
* owner_class
;
633 // remember function pointer - if this is a function
634 Chuck_Func
* func_ref
;
636 t_CKINT func_num_overloads
;
639 Chuck_Value( Chuck_Type
* t
, const std::string
& n
, void * a
= NULL
,
640 t_CKBOOL c
= FALSE
, t_CKBOOL acc
= 0, Chuck_Namespace
* o
= NULL
,
641 Chuck_Type
* oc
= NULL
, t_CKUINT s
= 0 )
642 { type
= t
; SAFE_ADD_REF(type
); // add reference
643 name
= n
; offset
= s
;
644 is_const
= c
; access
= acc
;
645 owner
= o
; SAFE_ADD_REF(o
); // add reference
646 owner_class
= oc
; SAFE_ADD_REF(oc
); // add reference
647 addr
= a
; is_member
= FALSE
;
648 is_static
= FALSE
; is_context_global
= FALSE
;
649 is_decl_checked
= TRUE
; // only set to false in certain cases
650 func_ref
= NULL
; func_num_overloads
= 0; }
653 virtual ~Chuck_Value()
656 // SAFE_RELEASE( type );
657 // SAFE_RELEASE( owner ):
658 // SAFE_RELEASE( owner_class );
659 // SAFE_RELEASE( func_ref );
666 //-----------------------------------------------------------------------------
667 // name: struct Chuck_Func
668 // desc: function definition
669 //-----------------------------------------------------------------------------
670 struct Chuck_Func
: public Chuck_VM_Object
674 // func def from parser
677 Chuck_VM_Code
* code
;
679 Chuck_DL_Func
* dl_code
;
682 // virtual table index
685 Chuck_Value
* value_ref
;
692 Chuck_Func() { def
= NULL
; code
= NULL
; is_member
= FALSE
; vt_index
= 0xffffffff;
693 value_ref
= NULL
; dl_code
= NULL
; next
= NULL
; up
= NULL
; }
696 virtual ~Chuck_Func()
703 //-----------------------------------------------------------------------------
704 // primary chuck type checker interface
705 //-----------------------------------------------------------------------------
706 // initialize the type engine
707 Chuck_Env
* type_engine_init( Chuck_VM
* vm
);
708 // shutdown the type engine
709 void type_engine_shutdown( Chuck_Env
* env
);
710 // load a context to be type-checked or emitted
711 t_CKBOOL
type_engine_load_context( Chuck_Env
* env
, Chuck_Context
* context
);
712 // unload a context after being emitted
713 t_CKBOOL
type_engine_unload_context( Chuck_Env
* env
);
715 // type check a program into the env
716 t_CKBOOL
type_engine_check_prog( Chuck_Env
* env
, a_Program prog
,
717 const std::string
& filename
);
719 Chuck_Context
* type_engine_make_context( a_Program prog
,
720 const std::string
& filename
);
721 // type check a context into the env
722 t_CKBOOL
type_engine_check_context( Chuck_Env
* env
,
723 Chuck_Context
* context
,
724 te_HowMuch how_much
= te_do_all
);
725 // type check a statement
726 t_CKBOOL
type_engine_check_stmt( Chuck_Env
* env
, a_Stmt stmt
);
727 // type check an expression
728 t_CKTYPE
type_engine_check_exp( Chuck_Env
* env
, a_Exp exp
);
729 // add an chuck dll into the env
730 t_CKBOOL
type_engine_add_dll( Chuck_Env
* env
, Chuck_DLL
* dll
, const std::string
& nspc
);
732 t_CKBOOL
operator ==( const Chuck_Type
& lhs
, const Chuck_Type
& rhs
);
733 t_CKBOOL
operator !=( const Chuck_Type
& lhs
, const Chuck_Type
& rhs
);
734 t_CKBOOL
equals( Chuck_Type
* lhs
, Chuck_Type
* rhs
);
735 t_CKBOOL
operator <=( const Chuck_Type
& lhs
, const Chuck_Type
& rhs
);
736 t_CKBOOL
isa( Chuck_Type
* lhs
, Chuck_Type
* rhs
);
737 t_CKBOOL
isprim( Chuck_Type
* type
);
738 t_CKBOOL
isobj( Chuck_Type
* type
);
739 t_CKBOOL
isfunc( Chuck_Type
* type
);
742 Chuck_Type
* type_engine_import_class_begin( Chuck_Env
* env
, Chuck_Type
* type
,
743 Chuck_Namespace
* where
, f_ctor pre_ctor
, f_dtor dtor
= NULL
);
744 Chuck_Type
* type_engine_import_class_begin( Chuck_Env
* env
, const char * name
, const char * parent
,
745 Chuck_Namespace
* where
, f_ctor pre_ctor
, f_dtor dtor
= NULL
);
746 Chuck_Type
* type_engine_import_ugen_begin( Chuck_Env
* env
, const char * name
, const char * parent
,
747 Chuck_Namespace
* where
, f_ctor pre_ctor
, f_dtor dtor
,
748 f_tick tick
, f_pmsg pmsg
,
749 t_CKUINT num_ins
= 0xffffffff, t_CKUINT num_outs
= 0xffffffff );
750 Chuck_Type
* type_engine_import_uana_begin( Chuck_Env
* env
, const char * name
, const char * parent
,
751 Chuck_Namespace
* where
, f_ctor pre_ctor
, f_dtor dtor
,
752 f_tick tick
, f_tock tock
, f_pmsg pmsg
,
753 t_CKUINT num_ins
= 0xffffffff, t_CKUINT num_outs
= 0xffffffff,
754 t_CKUINT num_ins_ana
= 0xffffffff, t_CKUINT num_outs_ana
= 0xffffffff );
755 t_CKBOOL
type_engine_import_mfun( Chuck_Env
* env
, Chuck_DL_Func
* mfun
);
756 t_CKBOOL
type_engine_import_sfun( Chuck_Env
* env
, Chuck_DL_Func
* sfun
);
757 t_CKUINT
type_engine_import_mvar( Chuck_Env
* env
, const char * type
,
758 const char * name
, t_CKUINT is_const
);
759 t_CKBOOL
type_engine_import_svar( Chuck_Env
* env
, const char * type
,
760 const char * name
, t_CKUINT is_const
,
762 t_CKBOOL
type_engine_import_ugen_ctrl( Chuck_Env
* env
, const char * type
, const char * name
,
763 f_ctrl ctrl
, t_CKBOOL write
, t_CKBOOL read
);
764 t_CKBOOL
type_engine_import_class_end( Chuck_Env
* env
);
765 t_CKBOOL
type_engine_register_deprecate( Chuck_Env
* env
,
766 const std::string
& former
, const std::string
& latter
);
769 t_CKBOOL
type_engine_check_reserved( Chuck_Env
* env
, const std::string
& xid
, int pos
);
770 t_CKBOOL
type_engine_check_reserved( Chuck_Env
* env
, S_Symbol xid
, int pos
);
771 t_CKBOOL
type_engine_check_primitive( Chuck_Type
* type
);
772 t_CKBOOL
type_engine_compat_func( a_Func_Def lhs
, a_Func_Def rhs
, int pos
, std::string
& err
, t_CKBOOL print
= TRUE
);
773 t_CKBOOL
type_engine_get_deprecate( Chuck_Env
* env
, const std::string
& from
, std::string
& to
);
774 Chuck_Type
* type_engine_find_common_anc( Chuck_Type
* lhs
, Chuck_Type
* rhs
);
775 Chuck_Type
* type_engine_find_type( Chuck_Env
* env
, a_Id_List path
);
776 Chuck_Value
* type_engine_find_value( Chuck_Type
* type
, const std::string
& xid
);
777 Chuck_Value
* type_engine_find_value( Chuck_Type
* type
, S_Symbol xid
);
778 Chuck_Value
* type_engine_find_value( Chuck_Env
* env
, const std::string
& xid
, t_CKBOOL climb
, int linepos
= 0 );
779 Chuck_Namespace
* type_engine_find_nspc( Chuck_Env
* env
, a_Id_List path
);
781 t_CKBOOL
verify_array( a_Array_Sub array
);
783 Chuck_Type
* new_array_type( Chuck_Env
* env
, Chuck_Type
* array_parent
,
784 t_CKUINT depth
, Chuck_Type
* base_type
,
785 Chuck_Namespace
* owner_nspc
);
787 const char * type_path( a_Id_List path
);
788 a_Id_List
str2list( const std::string
& path
);
789 a_Id_List
str2list( const std::string
& path
, t_CKBOOL
& is_array
);
790 const char * howmuch2str( te_HowMuch how_much
);
791 t_CKBOOL
escape_str( char * str_lit
, int linepos
);
794 extern Chuck_Type t_void
;
795 extern Chuck_Type t_int
;
796 extern Chuck_Type t_float
;
797 extern Chuck_Type t_time
;
798 extern Chuck_Type t_dur
;
799 extern Chuck_Type t_complex
;
800 extern Chuck_Type t_polar
;
801 extern Chuck_Type t_object
;
802 extern Chuck_Type t_null
;
803 extern Chuck_Type t_string
;
804 extern Chuck_Type t_array
;
805 extern Chuck_Type t_shred
;
806 extern Chuck_Type t_thread
;
807 extern Chuck_Type t_function
;
808 extern Chuck_Type t_class
;
809 extern Chuck_Type t_event
;
810 extern Chuck_Type t_io
;
811 extern Chuck_Type t_fileio
;
812 extern Chuck_Type t_ugen
;
813 extern Chuck_Type t_uana
;
814 extern Chuck_Type t_uanablob
;