static void init_module_constant_terms (void) { ATprotect(&(term0)); term0 = (ATerm) ATmakeAppl(ATmakeSymbol("kaas", 0, ATtrue)); ATprotect(&(term1)); term1 = term0; }
ATerm lf_8 ( ATerm arg0 ) { { ATerm tmp [ 2 ] ; FUNC_ENTRY ( lf_8sym , ATmakeAppl ( lf_8sym , arg0 ) ) ; if ( check_sym ( arg0 , lf_list_6sym ) ) { ( tmp [ 1 ] = arg_0 ( arg0 ) ) ; { ATerm atmp001110 ; ATerm atmp00110 [ 2 ] ; ATerm atmp0010 ; ATerm atmp000 [ 2 ] ; ( atmp000 [ 0 ] = tmp [ 1 ] ) ; ( atmp000 [ 1 ] = tmp [ 1 ] ) ; while ( not_empty_list ( tmp [ 1 ] ) ) { ( atmp0010 = list_head ( tmp [ 1 ] ) ) ; ( tmp [ 1 ] = list_tail ( tmp [ 1 ] ) ) ; ( atmp00110 [ 0 ] = tmp [ 1 ] ) ; ( atmp00110 [ 1 ] = tmp [ 1 ] ) ; while ( not_empty_list ( tmp [ 1 ] ) ) { ( atmp001110 = list_head ( tmp [ 1 ] ) ) ; ( tmp [ 1 ] = list_tail ( tmp [ 1 ] ) ) ; if ( term_equal ( atmp0010 , atmp001110 ) ) { FUNC_EXIT ( lf_8_recursive ( cons ( slice ( atmp000 [ 0 ] , atmp000 [ 1 ] ) , cons ( make_list ( atmp0010 ) , cons ( slice ( atmp00110 [ 0 ] , atmp00110 [ 1 ] ) , tmp [ 1 ] ) ) ) ) ) ; } ( atmp00110 [ 1 ] = list_tail ( atmp00110 [ 1 ] ) ) ; ( tmp [ 1 ] = atmp00110 [ 1 ] ) ; } ( atmp000 [ 1 ] = list_tail ( atmp000 [ 1 ] ) ) ; ( tmp [ 1 ] = atmp000 [ 1 ] ) ; } } } FUNC_EXIT ( make_nf1 ( lf_8sym , arg0 ) ) ; } }
ATerm lf_2 ( ATerm arg0 , ATerm arg1 ) { { ATerm tmp [ 2 ] ; FUNC_ENTRY ( lf_2sym , ATmakeAppl ( lf_2sym , arg0 , arg1 ) ) ; if ( check_sym ( arg1 , lf_list_1sym ) ) { ( tmp [ 1 ] = arg_0 ( arg1 ) ) ; { ATerm atmp1010 ; ATerm atmp100 [ 2 ] ; ( atmp100 [ 0 ] = tmp [ 1 ] ) ; ( atmp100 [ 1 ] = tmp [ 1 ] ) ; while ( not_empty_list ( tmp [ 1 ] ) ) { ( atmp1010 = list_head ( tmp [ 1 ] ) ) ; ( tmp [ 1 ] = list_tail ( tmp [ 1 ] ) ) ; if ( term_equal ( arg0 , atmp1010 ) ) { FUNC_EXIT_CONST ( constant0 , make_nf0 ( lf_3sym ) ) ; } ( atmp100 [ 1 ] = list_tail ( atmp100 [ 1 ] ) ) ; ( tmp [ 1 ] = atmp100 [ 1 ] ) ; } } } if ( check_sym ( arg1 , lf_list_1sym ) ) { { ATerm atmp10 = arg_0 ( arg1 ) ; FUNC_EXIT_CONST ( constant1 , make_nf0 ( lf_4sym ) ) ; } } FUNC_EXIT ( make_nf2 ( lf_2sym , arg0 , arg1 ) ) ; } }
void STRSGLR_ensure_init(void) { ATerm foo; static ATbool STRSGLR_init = ATfalse; if(STRSGLR_init) return; STRSGLR_init = ATtrue; ATregisterBlobDestructor(parse_table_blob_destructor); PT_initMEPTApi(); PT_initAsFix2Api(); initErrorApi(); SG_TOOLBUS_OFF(); SG_OUTPUT_ON(); foo = STRSGLR_set_default_config(); none_term = (ATerm) ATmakeAppl(ATmakeAFun("None", 0, ATfalse)); active_parse_tables = ATmakeList(0); inactive_parse_tables = malloc(sizeof(ATerm*) * MAX_INACTIVE_PARSE_TABLES); num_inactive_parse_tables = 0; ATprotect(&none_term); ATprotect(&parse_error_term); ATprotectList(&active_parse_tables); }
static void init_module_constant_terms(void) { ATfprintf(stderr, "init_constant_terms (bar.c)()\n"); ATprotect(&(term_p_0)); term_p_0 = (ATerm) ATmakeAppl(ATmakeSymbol("a", 0, ATtrue)); ATfprintf(stderr, "init_constant_terms (bar.c) end()\n"); }
ATerm lf_5_recursive ( ATerm arg0 ) { { ATerm tmp [ 7 ] ; FUNC_ENTRY ( lf_5_recursivesym , ATmakeAppl ( lf_5_recursivesym , arg0 ) ) ; ( tmp [ 1 ] = arg0 ) ; { ATerm atmp001110 ; ATerm atmp00110 [ 2 ] ; ATerm atmp0010 ; ATerm atmp000 [ 2 ] ; ( atmp000 [ 0 ] = tmp [ 1 ] ) ; ( atmp000 [ 1 ] = tmp [ 1 ] ) ; while ( not_empty_list ( tmp [ 1 ] ) ) { ( atmp0010 = list_head ( tmp [ 1 ] ) ) ; ( tmp [ 1 ] = list_tail ( tmp [ 1 ] ) ) ; ( atmp00110 [ 0 ] = tmp [ 1 ] ) ; ( atmp00110 [ 1 ] = tmp [ 1 ] ) ; while ( not_empty_list ( tmp [ 1 ] ) ) { ( atmp001110 = list_head ( tmp [ 1 ] ) ) ; ( tmp [ 1 ] = list_tail ( tmp [ 1 ] ) ) ; if ( term_equal ( atmp0010 , atmp001110 ) ) { ( tmp [ 2 ] = lf_5_recursive ( cons ( make_list ( atmp0010 ) , tmp [ 1 ] ) ) ) ; if ( check_sym ( tmp [ 2 ] , lf_5_recursivesym ) ) { ( tmp [ 3 ] = arg_0 ( tmp [ 2 ] ) ) ; ( tmp [ 4 ] = arg_0 ( tmp [ 3 ] ) ) ; if ( not_empty_list ( tmp [ 4 ] ) ) { ( tmp [ 5 ] = list_head ( tmp [ 4 ] ) ) ; ( tmp [ 4 ] = list_tail ( tmp [ 4 ] ) ) ; ( tmp [ 6 ] = lf_5_recursive ( cons ( slice ( atmp000 [ 0 ] , atmp000 [ 1 ] ) , cons ( make_list ( tmp [ 5 ] ) , cons ( slice ( atmp00110 [ 0 ] , atmp00110 [ 1 ] ) , tmp [ 4 ] ) ) ) ) ) ; FUNC_EXIT ( tmp [ 6 ] ) ; } } } ( atmp00110 [ 1 ] = list_tail ( atmp00110 [ 1 ] ) ) ; ( tmp [ 1 ] = atmp00110 [ 1 ] ) ; } ( atmp000 [ 1 ] = list_tail ( atmp000 [ 1 ] ) ) ; ( tmp [ 1 ] = atmp000 [ 1 ] ) ; } } FUNC_EXIT ( make_nf1 ( lf_5_recursivesym , lf_list_1 ( arg0 ) ) ) ; } }
ATerm lf_list_1 ( ATerm arg0 ) { { ATerm tmp [ 1 ] ; FUNC_ENTRY ( lf_list_1sym , ATmakeAppl ( lf_list_1sym , arg0 ) ) ; { ATerm ltmp [ 1 ] ; lbl_lf_list_1 : ltmp [ 0 ] = arg0 ; ( tmp [ 0 ] = ltmp [ 0 ] ) ; { ATerm atmp01110 ; ATerm atmp0110 [ 2 ] ; ATerm atmp010 ; ATerm atmp00 [ 2 ] ; ( atmp00 [ 0 ] = tmp [ 0 ] ) ; ( atmp00 [ 1 ] = tmp [ 0 ] ) ; while ( not_empty_list ( tmp [ 0 ] ) ) { ( atmp010 = list_head ( tmp [ 0 ] ) ) ; ( tmp [ 0 ] = list_tail ( tmp [ 0 ] ) ) ; ( atmp0110 [ 0 ] = tmp [ 0 ] ) ; ( atmp0110 [ 1 ] = tmp [ 0 ] ) ; while ( not_empty_list ( tmp [ 0 ] ) ) { ( atmp01110 = list_head ( tmp [ 0 ] ) ) ; ( tmp [ 0 ] = list_tail ( tmp [ 0 ] ) ) ; if ( term_equal ( atmp010 , atmp01110 ) ) { ( arg0 = cons ( slice ( atmp00 [ 0 ] , atmp00 [ 1 ] ) , cons ( make_list ( atmp010 ) , cons ( slice ( atmp0110 [ 0 ] , atmp0110 [ 1 ] ) , tmp [ 0 ] ) ) ) ) ; goto lbl_lf_list_1 ; } ( atmp0110 [ 1 ] = list_tail ( atmp0110 [ 1 ] ) ) ; ( tmp [ 0 ] = atmp0110 [ 1 ] ) ; } ( atmp00 [ 1 ] = list_tail ( atmp00 [ 1 ] ) ) ; ( tmp [ 0 ] = atmp00 [ 1 ] ) ; } } FUNC_EXIT ( make_nf1 ( lf_list_1sym , ltmp [ 0 ] ) ) ; } } }
ATerm lf_list_1 ( ATerm arg0 ) { CONS_ENTRY ( lf_list_1sym , ATmakeAppl ( lf_list_1sym , arg0 ) ) ; CONS_EXIT ( make_nf1 ( lf_list_1sym , arg0 ) ) ; }
int CSwriteString(CompressedStream *cs, char *str){ return HFencodeATerm(cs->bs, &cs->tree, (ATerm)ATmakeAppl(ATmakeAFun(str,0,ATtrue))); }