/* ------- code automatically created by ../scripts/adms_build_object.pl -------------- */ #include #include inline void adms_admstpathparser_free(p_admstpathparser myadmstpathparser) { if(!myadmstpathparser) return; adms_quark_free(myadmstpathparser->_admstpath); adms_global_increment_nbadmstpathparserdestroy(); free(myadmstpathparser); } int adms_admstpathparser_cmp (p_admstpathparser myadmstpathparser,p_admstpathparser refadmstpathparser) { int status; status = ( (adms_admstpathparser_valueof_admsttransform (myadmstpathparser) != adms_admstpathparser_valueof_admsttransform (refadmstpathparser)) || !!strcmp(adms_admstpathparser_valueof_admstpath (myadmstpathparser)->_value,adms_admstpathparser_valueof_admstpath (refadmstpathparser)->_value) ); return status; } p_admstpathparser adms_admstpathparser_new(p_admsttransform myadmsttransform,p_quark myadmstpath) { p_admstpathparser mynewadmstpathparser=(p_admstpathparser) calloc(1,(size_t)sizeof(t_admstpathparser)); adms_global_increment_nbadmstpathparsernew(); mynewadmstpathparser->_adms._datatypename=adms_adms_enumeration_datatypename_admstpathparser; mynewadmstpathparser->_adms._seen=adms_adms_enumeration_seen_no; mynewadmstpathparser->_admsttransform_isdefault=-1; adms_admstpathparser_valueto_admsttransform (mynewadmstpathparser,myadmsttransform); mynewadmstpathparser->_admsttransform_isdefault=1; mynewadmstpathparser->_admstpath_isdefault=-1; adms_admstpathparser_valueto_admstpath (mynewadmstpathparser,myadmstpath); mynewadmstpathparser->_admstpath_isdefault=1; mynewadmstpathparser->_stringposition_isdefault=-1; mynewadmstpathparser->_tokenstrstart_isdefault=-1; mynewadmstpathparser->_tokenstrlen_isdefault=-1; mynewadmstpathparser->_token_isdefault=-1; return mynewadmstpathparser; } p_adms adms_admstpathparser_new_impl (p_adms arguments[]) { p_admstpathparser mynewadmstpathparser; p_admsttransform myadmsttransform=(p_admsttransform)arguments[0]; p_quark myadmstpath=adms_quark_new((char*)arguments[1]); mynewadmstpathparser=adms_admstpathparser_new(myadmsttransform,myadmstpath); return adms_adms(mynewadmstpathparser); } /*$1($2)*/ char*adms_admstpathparser_uid (p_admstpathparser mynewadmstpathparser) { char*myuid=NULL; char*myuid0=adms_admsttransform_uid(mynewadmstpathparser->_admsttransform); char*myuid1=adms_quark_uid(mynewadmstpathparser->_admstpath); adms_strconcat(&myuid,myuid0); adms_strconcat2(&myuid,"("); adms_strconcat(&myuid,myuid1); adms_strconcat2(&myuid,")"); return myuid; } inline void adms_admstpathparser_valueto_admsttransform (p_admstpathparser myadmstpathparser,p_admsttransform _admsttransform) { myadmstpathparser->_admsttransform=_admsttransform; myadmstpathparser->_admsttransform_isdefault=0; } inline void adms_admstpathparser_valueto_admstpath (p_admstpathparser myadmstpathparser,p_quark _admstpath) { if(myadmstpathparser->_admstpath_isdefault!=-1) adms_quark_free(myadmstpathparser->_admstpath); myadmstpathparser->_admstpath=_admstpath; myadmstpathparser->_admstpath_isdefault=0; } inline void adms_admstpathparser_valueto_stringposition (p_admstpathparser myadmstpathparser,const char* _stringposition) { myadmstpathparser->_stringposition=_stringposition; myadmstpathparser->_stringposition_isdefault=0; } inline void adms_admstpathparser_valueto_tokenstrstart (p_admstpathparser myadmstpathparser,const char* _tokenstrstart) { myadmstpathparser->_tokenstrstart=_tokenstrstart; myadmstpathparser->_tokenstrstart_isdefault=0; } inline void adms_admstpathparser_valueto_tokenstrlen (p_admstpathparser myadmstpathparser,int _tokenstrlen) { myadmstpathparser->_tokenstrlen=_tokenstrlen; myadmstpathparser->_tokenstrlen_isdefault=0; } inline void adms_admstpathparser_valueto_token (p_admstpathparser myadmstpathparser,e_admstpathparser_token _token) { myadmstpathparser->_token=_token; myadmstpathparser->_token_isdefault=0; } e_admstpathparser_token adms_admstpathparser_fromstring_token_impl (p_admsttransform myadmsttransform,char*token) { if(!strcmp(token,"addm")) return adms_admstpathparser_enumeration_token_addm; if(!strcmp(token,"addp")) return adms_admstpathparser_enumeration_token_addp; if(!strcmp(token,"admst")) return adms_admstpathparser_enumeration_token_admst; if(!strcmp(token,"and")) return adms_admstpathparser_enumeration_token_and; if(!strcmp(token,"closeCond")) return adms_admstpathparser_enumeration_token_closeCond; if(!strcmp(token,"closeE")) return adms_admstpathparser_enumeration_token_closeE; if(!strcmp(token,"comma")) return adms_admstpathparser_enumeration_token_comma; if(!strcmp(token,"contains")) return adms_admstpathparser_enumeration_token_contains; if(!strcmp(token,"count")) return adms_admstpathparser_enumeration_token_count; if(!strcmp(token,"dot")) return adms_admstpathparser_enumeration_token_dot; if(!strcmp(token,"dotdot")) return adms_admstpathparser_enumeration_token_dotdot; if(!strcmp(token,"eos")) return adms_admstpathparser_enumeration_token_eos; if(!strcmp(token,"equal")) return adms_admstpathparser_enumeration_token_equal; if(!strcmp(token,"exists")) return adms_admstpathparser_enumeration_token_exists; if(!strcmp(token,"false")) return adms_admstpathparser_enumeration_token_false; if(!strcmp(token,"id")) return adms_admstpathparser_enumeration_token_id; if(!strcmp(token,"ident")) return adms_admstpathparser_enumeration_token_ident; if(!strcmp(token,"index")) return adms_admstpathparser_enumeration_token_index; if(!strcmp(token,"integer")) return adms_admstpathparser_enumeration_token_integer; if(!strcmp(token,"isdefault")) return adms_admstpathparser_enumeration_token_isdefault; if(!strcmp(token,"lower-case")) return adms_admstpathparser_enumeration_token_lower_mcase; if(!strcmp(token,"minus")) return adms_admstpathparser_enumeration_token_minus; if(!strcmp(token,"nilled")) return adms_admstpathparser_enumeration_token_nilled; if(!strcmp(token,"not")) return adms_admstpathparser_enumeration_token_not; if(!strcmp(token,"notequal")) return adms_admstpathparser_enumeration_token_notequal; if(!strcmp(token,"number")) return adms_admstpathparser_enumeration_token_number; if(!strcmp(token,"openCond")) return adms_admstpathparser_enumeration_token_openCond; if(!strcmp(token,"openE")) return adms_admstpathparser_enumeration_token_openE; if(!strcmp(token,"or")) return adms_admstpathparser_enumeration_token_or; if(!strcmp(token,"plus")) return adms_admstpathparser_enumeration_token_plus; if(!strcmp(token,"position")) return adms_admstpathparser_enumeration_token_position; if(!strcmp(token,"quotedstring")) return adms_admstpathparser_enumeration_token_quotedstring; if(!strcmp(token,"real")) return adms_admstpathparser_enumeration_token_real; if(!strcmp(token,"returned")) return adms_admstpathparser_enumeration_token_returned; if(!strcmp(token,"reverse")) return adms_admstpathparser_enumeration_token_reverse; if(!strcmp(token,"separator")) return adms_admstpathparser_enumeration_token_separator; if(!strcmp(token,"sort")) return adms_admstpathparser_enumeration_token_sort; if(!strcmp(token,"space")) return adms_admstpathparser_enumeration_token_space; if(!strcmp(token,"star")) return adms_admstpathparser_enumeration_token_star; if(!strcmp(token,"string")) return adms_admstpathparser_enumeration_token_string; if(!strcmp(token,"true")) return adms_admstpathparser_enumeration_token_true; if(!strcmp(token,"uid")) return adms_admstpathparser_enumeration_token_uid; if(!strcmp(token,"upper-case")) return adms_admstpathparser_enumeration_token_upper_mcase; if(!strcmp(token,"variable")) return adms_admstpathparser_enumeration_token_variable; adms_message_fatal_continue(("select='admstpathparser/token': possible values:\n")) adms_message_fatal_continue(("addm|addp|admst|and|closeCond|closeE|comma|contains|count|dot|dotdot|eos|equal|exists|false|id|ident|index|integer|isdefault|lower-case|minus|nilled|not|notequal|number|openCond|openE|or|plus|position|quotedstring|real|returned|reverse|separator|sort|space|star|string|true|uid|upper-case|variable\n")) adms_message_fatal(("see %s\n",adms_admsttransform_uid(myadmsttransform))) return 0; } char* adms_admstpathparser_tostring_token_impl (p_admsttransform myadmsttransform,e_admstpathparser_token e) { if(e==adms_admstpathparser_enumeration_token_addm) return "addm"; if(e==adms_admstpathparser_enumeration_token_addp) return "addp"; if(e==adms_admstpathparser_enumeration_token_admst) return "admst"; if(e==adms_admstpathparser_enumeration_token_and) return "and"; if(e==adms_admstpathparser_enumeration_token_closeCond) return "closeCond"; if(e==adms_admstpathparser_enumeration_token_closeE) return "closeE"; if(e==adms_admstpathparser_enumeration_token_comma) return "comma"; if(e==adms_admstpathparser_enumeration_token_contains) return "contains"; if(e==adms_admstpathparser_enumeration_token_count) return "count"; if(e==adms_admstpathparser_enumeration_token_dot) return "dot"; if(e==adms_admstpathparser_enumeration_token_dotdot) return "dotdot"; if(e==adms_admstpathparser_enumeration_token_eos) return "eos"; if(e==adms_admstpathparser_enumeration_token_equal) return "equal"; if(e==adms_admstpathparser_enumeration_token_exists) return "exists"; if(e==adms_admstpathparser_enumeration_token_false) return "false"; if(e==adms_admstpathparser_enumeration_token_id) return "id"; if(e==adms_admstpathparser_enumeration_token_ident) return "ident"; if(e==adms_admstpathparser_enumeration_token_index) return "index"; if(e==adms_admstpathparser_enumeration_token_integer) return "integer"; if(e==adms_admstpathparser_enumeration_token_isdefault) return "isdefault"; if(e==adms_admstpathparser_enumeration_token_lower_mcase) return "lower-case"; if(e==adms_admstpathparser_enumeration_token_minus) return "minus"; if(e==adms_admstpathparser_enumeration_token_nilled) return "nilled"; if(e==adms_admstpathparser_enumeration_token_not) return "not"; if(e==adms_admstpathparser_enumeration_token_notequal) return "notequal"; if(e==adms_admstpathparser_enumeration_token_number) return "number"; if(e==adms_admstpathparser_enumeration_token_openCond) return "openCond"; if(e==adms_admstpathparser_enumeration_token_openE) return "openE"; if(e==adms_admstpathparser_enumeration_token_or) return "or"; if(e==adms_admstpathparser_enumeration_token_plus) return "plus"; if(e==adms_admstpathparser_enumeration_token_position) return "position"; if(e==adms_admstpathparser_enumeration_token_quotedstring) return "quotedstring"; if(e==adms_admstpathparser_enumeration_token_real) return "real"; if(e==adms_admstpathparser_enumeration_token_returned) return "returned"; if(e==adms_admstpathparser_enumeration_token_reverse) return "reverse"; if(e==adms_admstpathparser_enumeration_token_separator) return "separator"; if(e==adms_admstpathparser_enumeration_token_sort) return "sort"; if(e==adms_admstpathparser_enumeration_token_space) return "space"; if(e==adms_admstpathparser_enumeration_token_star) return "star"; if(e==adms_admstpathparser_enumeration_token_string) return "string"; if(e==adms_admstpathparser_enumeration_token_true) return "true"; if(e==adms_admstpathparser_enumeration_token_uid) return "uid"; if(e==adms_admstpathparser_enumeration_token_upper_mcase) return "upper-case"; if(e==adms_admstpathparser_enumeration_token_variable) return "variable"; adms_message_fatal_continue(("select='admstpathparser/token': possible values:\n")) adms_message_fatal_continue(("addm|addp|admst|and|closeCond|closeE|comma|contains|count|dot|dotdot|eos|equal|exists|false|id|ident|index|integer|isdefault|lower-case|minus|nilled|not|notequal|number|openCond|openE|or|plus|position|quotedstring|real|returned|reverse|separator|sort|space|star|string|true|uid|upper-case|variable\n")) adms_message_fatal(("see %s\n",adms_admsttransform_uid(myadmsttransform))) return NULL; }