Testing grammar rule expansion... 101: p-->[] p(A,B):-A=B 102: p-->[b] p(A,B):-A=[b|B] 103: p-->[abc,xyz] p(A,B):-A=[abc,xyz|B] 104: p-->[abc|xyz] error: error(type_error(list,xyz),A) expansion failed! 105: p-->[[],{},3,3.2,a(b)] p(A,B):-A=[[],{},3,3.2,a(b)|B] 106: p-->[A] p(A,B):-A=[C|B] 107: p-->[a,b,c],[q] p(A,B):-A=[a,b,c|C],C=[q|B] 108: p-->[a,b,c];[q] p(A,B):-A=[a,b,c|B];A=[q|B] 109: p-->q(A),[a,b|A] error: error(instantiation_error,A) expansion failed! 110: p-->[a,b|A],q(A) error: error(instantiation_error,A) expansion failed! 201: p-->b p(A,B):-b(A,B) 202: p-->3 error: error(type_error(callable,3),A) expansion failed! 203: p(A)-->b(A) p(A,B,C):-b(A,B,C) 301: p-->b,c p(A,B):-b(A,C),c(C,B) 311: p-->true,c p(A,B):-true(A,C),c(C,B) 312: p-->fail,c p(A,B):-fail(A,C),c(C,B) 313: p(A)-->call(A),c p(A,B,C):-call(A,B,D),c(D,C) 351: p-->b;c p(A,B):-b(A,B);c(A,B) 352: p-->q;[] p(A,B):-q(A,B);A=B 353: p-->[a];[b] p(A,B):-A=[a|B];A=[b|B] 354: p-->[a];[b],!;c;d,{e};[] p(A,B):-A=[a|B];(A=[b|C],!),C=B;c(A,B);(d(A,D),e),D=B;A=B 361: p-->b|c p(A,B):-b(A,B);c(A,B) 362: p-->q|[] p(A,B):-q(A,B);A=B 363: p-->[a]|[b] p(A,B):-A=[a|B];A=[b|B] 364: p-->[a]|[b],!|c|d,{e}|[] p(A,B):-A=[a|B];(A=[b|C],!),C=B;c(A,B);(d(A,D),e),D=B;A=B 371: p-->b|c p(A,B):-b(A,B);c(A,B) 372: p-->q|[] p(A,B):-q(A,B);A=B 373: p-->[a]|[b] p(A,B):-A=[a|B];A=[b|B] 374: p-->[a]|[b],!|c|d,{e}|[] p(A,B):-A=[a|B];(A=[b|C],!),C=B;c(A,B);(d(A,D),e),D=B;A=B 401: p-->b->c p(A,B):-b(A,C)->c(C,B) 411: p-->b->c;d p(A,B):-b(A,C)->c(C,B);d(A,B) 421: p-->b->c1,c2;d p(A,B):-b(A,C)->c1(C,D),c2(D,B);d(A,B) 422: p-->b->c;d1,d2 p(A,B):-b(A,C)->c(C,B);d1(A,D),d2(D,B) 423: p-->b1,b2->c;d p(A,B):-b1(A,C),b2(C,D)->c(D,B);d(A,B) 424: p-->[x]->[];q p(A,B):-A=[x|C]->C=B;q(A,B) 430: p-->b->c|d p(A,B):-b(A,C)->c(C,B);d(A,B) 431: p-->b->c1,c2|d p(A,B):-b(A,C)->c1(C,D),c2(D,B);d(A,B) 432: p-->b->c|d1,d2 p(A,B):-b(A,C)->c(C,B);d1(A,D),d2(D,B) 433: p-->b1,b2->c|d p(A,B):-b1(A,C),b2(C,D)->c(D,B);d(A,B) 434: p-->[x]->[]|q p(A,B):-A=[x|C]->C=B;q(A,B) 440: p-->b->c|d p(A,B):-b(A,C)->c(C,B);d(A,B) 441: p-->b->c1,c2|d p(A,B):-b(A,C)->c1(C,D),c2(D,B);d(A,B) 442: p-->b->c|d1,d2 p(A,B):-b(A,C)->c(C,B);d1(A,D),d2(D,B) 443: p-->b1,b2->c|d p(A,B):-b1(A,C),b2(C,D)->c(D,B);d(A,B) 444: p-->[x]->[]|q p(A,B):-A=[x|C]->C=B;q(A,B) 451: p--> \+b,c p(A,B):- \+(b,A,C),c(C,B) 452: p-->b,\+c,d p(A,B):-b(A,C),\+(c,C,D),d(D,B) 453: p(A)-->b,\+A,d p(A,B,C):-b(B,D),\+(A,D,E),d(E,C) 501: p-->!,[a] p(A,B):-!,A=[a|B] 502: p-->b,!,c,d p(A,B):-b(A,C),!,c(C,D),d(D,B) 503: p-->b,!,c;d p(A,B):-b(A,C),!,c(C,B);d(A,B) 504: p-->[a],!,{fail} p(A,B):-(A=[a|C],!,fail),C=B 505: p(a),[A]-->!,[A,a],q p(a,A,B):-(!,A=[C,a|D],q(D,E)),B=[C|E] 506: p-->a,!;b p(A,B):-(a(A,C),!),C=B;b(A,B) 507: p-->a,! p(A,B):-(a(A,C),!),C=B 508: p-->A,! p(A,B):-(phrase(C,A,D),!),D=B 601: p-->{b} p(A,B):-b,A=B 602: p-->{3} p(A,B):-3,A=B 603: p-->{c,d} p(A,B):-(c,d),A=B 604: p-->{c,d} p(A,B):-(c,d),A=B 605: p-->{a},{b},{c} p(A,B):-(a,b,c),A=B 606: p-->{q}->[a];[b] p(A,B):-q->A=[a|B];A=[b|B] 607: p-->{q}->[];b p(A,B):-q->A=B;b(A,B) 608: p-->[foo],{write(x)},[bar] p(A,B):-A=[foo|C],write(x),C=[bar|B] 609: p-->[foo],{write(hello)},{nl} p(A,B):-(A=[foo|C],write(hello),nl),C=B 610: p-->[foo],{write(hello),nl} p(A,B):-(A=[foo|C],write(hello),nl),C=B 620: p-->{} p(A,A):-true 621: p-->q,{},r p(A,B):-q(A,C),r(C,B) 622: p-->q,{!},r p(A,B):-q(A,C),!,r(C,B) 623: p-->q,{} p(A,B):-q(A,B) 701: p(A)-->A p(A,B,C):-phrase(A,B,C) 702: p-->A p(A,B):-phrase(C,A,B) 703: p(A)-->A,[a] p(A,B,C):-phrase(A,B,D),D=[a|C] 801: '['-->b,c '['(A,B):-b(A,C),c(C,B) 802: (=)-->b,c A=B:-b(A,C),c(C,B) 803: p,q-->a error: error(type_error(list,q),A) expansion failed! 804: p;q-->a error: error(type_error(nonterminal,(p;q)),A) expansion failed! 805: p->q-->a error: error(type_error(nonterminal,(p->q)),A) expansion failed! 806: p|q-->a error: error(type_error(nonterminal,(p|q)),A) expansion failed! 807: \+p-->a \+(p,A,B):-a(A,B) 808: !-->a error: error(type_error(nonterminal,!),A) expansion failed! 809: []-->a error: error(type_error(nonterminal,[]),A) expansion failed! 810: [a]-->a error: error(type_error(nonterminal,[a]),A) expansion failed! 811: {}-->a error: error(type_error(nonterminal,{}),A) expansion failed! 812: {a}-->a error: error(type_error(nonterminal,{a}),A) expansion failed! 901: p,[t]-->b,c p(A,B):-(b(A,C),c(C,D)),B=[t|D] 902: p,[t]-->b,[t] p(A,B):-(b(A,C),C=[t|D]),B=[t|D] 903: p,[t]-->b,[s,t] p(A,B):-(b(A,C),C=[s,t|D]),B=[t|D] 904: p,[t]-->b,[s],[t] p(A,B):-(b(A,C),C=[s|D],D=[t|E]),B=[t|E] 905: p(A),[A]-->[A] p(A,B,C):-B=[A|D],C=[A|D] 906: p(A,B),[A,B]-->[A,B] p(A,B,C,D):-C=[A,B|E],D=[A,B|E] 907: p(a),[A]-->!,[A,a],q p(a,A,B):-(!,A=[C,a|D],q(D,E)),B=[C|E] 908: p,[a,b]-->[foo],{write(hello),nl} p(A,B):-(A=[foo|C],write(hello),nl),B=[a,b|C] 909: p,[t1],[t2]-->b,c error: error(type_error(list,([t1],[t2])),A) expansion failed! 910: p,b-->b error: error(type_error(list,b),A) expansion failed! 911: [t],p-->b error: error(type_error(nonterminal,[t]),A) expansion failed! 912: [t]-->b error: error(type_error(nonterminal,[t]),A) expansion failed! 913: [t],p-->b error: error(type_error(nonterminal,[t]),A) expansion failed! 914: [t1],[t2]-->b error: error(type_error(nonterminal,[t1]),A) expansion failed! 915: p,[t|A]-->b error: error(instantiation_error,A) expansion failed! 916: [t1],p,[t2]-->b error: error(type_error(nonterminal,[t1]),A) expansion failed! 917: p,A-->b(A) error: error(instantiation_error,A) expansion failed! 920: p,3-->b error: error(type_error(list,3),A) expansion failed! 921: p,q-->b error: error(type_error(list,q),A) expansion failed! 922: p,{true}-->b error: error(type_error(list,{true}),A) expansion failed! 923: p,(q;r)-->b error: error(type_error(list,(q;r)),A) expansion failed! 924: p,[]-->b p(A,B):-b(A,B) 2000: p(A)-->m:A p(A,B,C):-phrase(m:A,B,C) 2001: p-->m:[] error: error(type_error(nonterminal,[]),A) expansion failed! 2002: p-->m:[a] error: error(type_error(nonterminal,[a]),A) expansion failed! 2003: p-->m:{} error: error(type_error(nonterminal,{}),A) expansion failed! 2004: p-->m:{foo} error: error(type_error(nonterminal,{foo}),A) expansion failed! 2005: p-->m:q p(A,B):-m:q(A,B) 2006: p-->m:q(f) p(A,B):-m:q(f,A,B) 2007: p-->m:(q,r) p(A,B):-m:(q(A,C),r(C,B)) 2008: p-->m:(q;r) p(A,B):-m:(q(A,B);r(A,B)) 2009: p-->m:(q->r) p(A,B):-m:(q(A,C)->r(C,B)) 2010: p-->m:(q|r) p(A,B):-m:(q(A,B);r(A,B)) 2011: p-->m:! p(A,B):-m:!,A=B 2012: p-->m:{!} error: error(type_error(nonterminal,{!}),A) expansion failed! 2100: m:p-->q m:p(A,B):-q(A,B) 2101: m:p,[a]-->q m:p(A,B):-q(A,C),B=[a|C] 2102: m:[a]-->q error: error(type_error(nonterminal,[a]),A) expansion failed! 2103: m:(p,[a])-->q error: error(type_error(nonterminal,(p,[a])),A) expansion failed! 2104: m:(p;q)-->q error: error(type_error(nonterminal,(p;q)),A) expansion failed!