#!/usr/bin/perl6 # nnnnnnnnnnnnnnnn my $origRwcode= ''; my $lastRwcode= ''; my $lastRwcodeDef= ''; $origRwcode= ' jumpTo <:0:TelService> [1__CODES (@@8 ( proc :TelService :0 {::: @@3 :CallSession:Stmt1:Stmt2 :::} ) ( proc :CallSession :4 : {::: : : jumpTo : : ( stepThru1 ( cTerm2 :~2 :~3 [PerEvntActnList] ) <:0:TelService> ) : : [ ~1 ] : : ( cTerm2 :~2 :~3 [NxtStateMap] ) : :::} ) ( term [cTerm2 :onhook [dialDigit:4] [PerEvntActnList]] [say(concat:hello[,][ ]:World)] ) ( term [cTerm2 :offhook :dialDigit6 [PerEvntActnList]] [say(concat:lets[ ]:talk)] ) ( term [cTerm2 :talking [dialDigit:8] [PerEvntActnList]] [say(concat:seeya[,][ ]:bye)] ) ( term [cTerm2 :onhook [dialDigit:4] [NxtStateMap]] :offhook ) ( term [cTerm2 :offhook :dialDigit6 [NxtStateMap]] :talking ) ( term [cTerm2 :talking [dialDigit:8] [NxtStateMap]] :disconnect ) ) ] [2__CURSTATE :onhook ] [3__EVENT [dialDigit:4] ] :dialDigit6 [dialDigit:8] '; #[ jumpTo <:0:TelService> ] #( jumpTo::=1={::: stepBy ( tSubstn ( ~0:x1 (concat:x(~0:x0)) ( ~0 :x1) ) ) :::} ) my $setup= 1; my $stopredOP= ''; my $stopredWhileMin= 0; my $stopredWhileMax= 0; my @stopredWFEcompArgList= Nil; my %*TERMS{Any}; my %*VARS{Any}; my %*VAR{Any}; my %*PROCS{Any}; my %*PROCSparmNum{Any}; my %*stateROM; my %*actionsROM; my %*AssocListArg0; my %*AssocListArg1; my %*GOTOARGNAMES{Any}; my @savedsr2WFEcompArgList= Nil;my @savedsr2tempLeftBrace= Nil; my @savedsr2tempRightBrace= Nil;my $savedsr2rewriteArgListElems= 0; my @tempWFEcompArgList= Nil;my @WFEcompArgListSav= Nil;my @tempLeftBraceSav= Nil; my @tempRightBraceSav= Nil;my $compareMax= 0;my $rewriteArgListElemsSav= 0; my @WFEcompArgListPreFx= Nil; my @WFEcompArgListSavPreFx= Nil; my $entryWFE4PreFx= ''; my $input= ''; my $tp0= ''; my $tp1= ''; my $tp2= ''; my $symbType= ''; my $output= 1; my $saySuccess= 0; my $addMultSuccess= 0; my @tempStmt= Nil; my $noSkips= 1; my $wrongArgTypes= 0; my @OPstr= Nil; my $OPsav= Nil; my $OPsav2= Nil; my @OPvariety= Nil; my @entryTempoeName= Nil; my $tempInt= 9999; my $srMax= -1; my @AssocComp0= Nil; my @AssocComp1= Nil; my @ARGLISTrankForGivenLevelAlreadyInitialized= Nil; my @ARGLISTrankInGivenARGLISTlevel= Nil; my $BIStemp2= 0; my $BIStemp22= 0; my @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun= Nil; my @BISlistOfWFErewritesForGivenARGLISTruleRun= Nil; my @BISlistOfWFEbraceTypesForGivenARGLISTruleRun= Nil; my $BIStempCurWFEbrace= ''; my @curWFEbraceForGivenActnum= Nil; my @isBaseBISlistOfWFEbraceTypesForGivenARGLISTruleRun= Nil; my $entryWFE= ''; my $entryWFE2= ''; my $entryWFE4= ''; my $entryWFE6= ''; my $entryWFE66= ''; my $entryWFE7= ''; my $actualTemplate= ''; my $tmplateStr= ''; my $tmplateOP= 0; my $debug= 0; my $debug2= 1; my $debug4= 0; my $englobingNoRWdegree= 0; my $curBrace= ''; my @listOfCurBraces= Nil; my @BraceTypeOfComponentWFEatGivenIndexInWFElistOfARGLISTatGivenSrLevel= Nil; my @currentARGLISTlistOfBraceTypesOfComponentWFEs= Nil; my @currentARGLISTlistOflistOfOPvarietyOfComponentWFEs= Nil; my $tempLeftBrace= ''; my $tempRightBrace= ''; my @tempLeftBrace= Nil; my @tempRightBrace= Nil; my @curbraceL= Nil; my @curbraceIdx= Nil; my $ttp= ''; my $tmplateNumOfParms= 0; my $b12 = ' '; my $i= '|'; my $l= ':'; my $temp1= 'blank'; my $temp2= 0; my $temp4= 0; my $temp6= 0; my $rewriteWFE= ''; my @curWFEbrace= Nil; my @curWFEopVariety= Nil; my $curIdx= 999; my $curIdx2= 999; my $curIdx4= 999; my $sr= 0; my $srw= -1; my $rewriteArgListElems= 0; my @tempArgList= Nil; my $rewriteArgList= ''; my @WFEcompArgList= Nil; my @WFEcompArgListTemp= Nil; my @methodStepOfCallingARGLISTrun= Nil; my @WFEcompArgListTemp2= Nil; my @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun= Nil; my @listOfWFErewritesForGivenARGLISTruleRun= Nil; my @listOfWFEbraceTypesForGivenARGLISTruleRun= Nil; my @listOfOPvarietyForGivenARGLISTruleRun= Nil; my @rewriteArgList= Nil; my $stopreduction= 0; my $needNewDescend= 0; my $rwcode= ''; my $match2= ''; my $lastRunNum= -1; my $runNum= 0; my $continue= 0; my @tmplateList= Nil; my $parmSubstnResult= ''; my @parm= Nil; sub fillRestOfArgsV1($startCurIdx) { my $curLocal= $startCurIdx; $stopredOP= $rewriteWFE; $stopredWhileMin= $curLocal; $stopredWhileMax= $rewriteArgListElems; while $curLocal < $rewriteArgListElems { @stopredWFEcompArgList[$curLocal]= @WFEcompArgList[$curLocal]; $rewriteWFE= $rewriteWFE ~ '[' ~ @WFEcompArgList[$curLocal] ~ ']'; $curLocal= 1 + $curLocal; }; }; sub trimBrackets(Str $x) { my $local= $x; $local= $local.subst( :g , / '@@1(' (.+?) ')[equals]' / , -> $/ { '{' ~ $0 ~ '}[equals]' } ); $local= $local.subst( :g , /^'['([<[a..zA..Z0..9]> | '_' ]+ | \d+)']' / , -> $/ { 'QWWw:' ~ $0 } ); $local= $local.subst( :g , / '['([<[a..zA..Z0..9]> | '_' ]+ | \d+)']' / , -> $/ { ' :' ~ $0 } ); $local= $local.subst( :g , /^('QWWw:') / , -> $/ { ':' } ); $local= $local.subst( :g , / '[@@2 :'([<[a..zA..Z0..9]> | '_' ]+ | \d+)' :'([<[a..zA..Z0..9]> | '_' ]+ | \d+)']' / , -> $/ { '< :' ~ $0 ~ ' :' ~ $1 ~ ' >' } ); $local= $local.subst( :g , / '[~'(\d+)']' / , -> $/ { ' :~' ~ $0 } ); $local= $local.subst( :g , / '[@@2 :'([<[a..zA..Z0..9]> | '_' ]+ | \d+)' :~'(\d+)']' / , -> $/ { '< :' ~ $0 ~ ' :~' ~ $1 ~ ' >' } ); $local= $local.subst( :g , / '[@@2 :~'(\d+)' :'([<[a..zA..Z0..9]> | '_' ]+ | \d+)']' / , -> $/ { '< :~' ~ $0 ~ ' :' ~ $1 ~ ' >' } ); $local= $local.subst( :g , / '[@@2~'(\d+)' :~'(\d+)']' / , -> $/ { '< ~' ~ $0 ~ ' :~' ~ $1 ~ ' >' } ); $local= $local.subst( :g , / '['(\%+)']' / , -> $/ { { '[' ~ "{' ' x$0.chars}" ~ ']' } } ); $local= $local.subst( :g , /^(\%+)$/ , -> $/ { { "{' ' x$0.chars}" } } ); $local= $local.subst( :g , / (''\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) '[' / , -> $/ { $0 ~ $1 ~ $2 ~ ' [' } ); $local= $local.subst( :g , / (''\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) '(' / , -> $/ { $0 ~ $1 ~ $2 ~ ' (' } ); $local= $local.subst( :g , / (''\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) '<' / , -> $/ { $0 ~ $1 ~ $2 ~ ' <' } ); $local= $local.subst( :g , / '< :'(\d+)' :'([<[a..zA..Z0..9]> | '_' ]+ | \d+)' >' / , -> $/ { '<:' ~ $0 ~ ':' ~ $1 ~ '>' } ); $local= $local.subst( :g , / ('subItem[') / , -> $/ { 'subItem [' } ); $local= $local.subst( :g , / ('subItem(') / , -> $/ { 'subItem (' } ); $local= $local.subst( :g , / ('subItem<') / , -> $/ { 'subItem <' } ); $local= $local.subst( :g , / ('subItem:') / , -> $/ { 'subItem :' } ); $local= $local.subst( :g , / ('subVar[') / , -> $/ { 'subVar [' } ); $local= $local.subst( :g , / ('subVar(') / , -> $/ { 'subVar (' } ); $local= $local.subst( :g , / ('subVar<') / , -> $/ { 'subVar <' } ); $local= $local.subst( :g , / ('subVar:') / , -> $/ { 'subVar :' } ); $local= $local.subst( :g , / ('proc[') / , -> $/ { 'proc [' } ); $local= $local.subst( :g , / ('proc(') / , -> $/ { 'proc (' } ); $local= $local.subst( :g , / ('proc<') / , -> $/ { 'proc <' } ); $local= $local.subst( :g , / ('proc:') / , -> $/ { 'proc :' } ); $local= $local.subst( :g , / ('term[') / , -> $/ { 'term [' } ); $local= $local.subst( :g , / ('term(') / , -> $/ { 'term (' } ); $local= $local.subst( :g , / ('term<') / , -> $/ { 'term <' } ); $local= $local.subst( :g , / ('term:') / , -> $/ { 'term :' } ); $local= $local.subst( :g , / 'stepThru'(\d+)'[' / , -> $/ { 'stepThru' ~ $0 ~ ' [' } ); $local= $local.subst( :g , / 'stepThru'(\d+)'(' / , -> $/ { 'stepThru' ~ $0 ~ ' (' } ); $local= $local.subst( :g , / 'stepThru'(\d+)'<' / , -> $/ { 'stepThru' ~ $0 ~ ' <' } ); $local= $local.subst( :g , / 'stepThru'(\d+)':' / , -> $/ { 'stepThru' ~ $0 ~ ' :' } ); $local= $local.subst( :g , / ('(@@')(\d+) / , -> $/ { '( @@' ~ $1 } ); $local= $local.subst( :g , / ('[@@')(\d+) / , -> $/ { '[ @@' ~ $1 } ); $local= $local.subst( :g , / ('[<:::') / , -> $/ { ' {::: ' } ); $local= $local.subst( :g , / (':::>]') / , -> $/ { ' :::}' } ); $local= $local.subst( :g , / ('@@')(\d+)('(') / , -> $/ { $0 ~ $1 ~ ' (' } ); $local= $local.subst( :g , / ('@@')(\d+)('[') / , -> $/ { $0 ~ $1 ~ ' [' } ); $local= $local.subst( :g , / ('@@')(\d+)('<') / , -> $/ { $0 ~ $1 ~ ' <' } ); $local= $local.subst( :g , / (':equals') / , -> $/ { '==' } ); $local= $local.subst( :g , / '@@1 (' (.+?) ') ==' / , -> $/ { '{' ~ $0 ~ '} ==' } ); ## $local= $local.subst( :g , / '@@1 (' ('~'\d+) ') ==' / , -> $/ { '{' ~ $0 ~ '} ==' } ); }; sub normalizeOrigCodes(Str $x) { my $local= $x; $local= $local.subst( :g , / ('==') / , -> $/ { ':equals' } ); $local= $local.subst( :g , / ('{:::') / , -> $/ { '[<:::' } ); $local= $local.subst( :g , / (':::}') / , -> $/ { ':::>]' } ); $local= $local.subst( :g , / (' : ') / , -> $/ { ' ' } ); $local= $local.subst( :g , / 'Run' / , -> $/ { 'goTo0' } ); $local= $local.subst( :g , / '('<[A..Z]>[<[A..Z0..9]> | '_' ]*','\s* / , -> $/ { '( ' } ); $local= $local.subst( :g , / '['<[A..Z]>[<[A..Z0..9]> | '_' ]*','\s* / , -> $/ { '[ ' } ); $local= $local.subst( :g , / '[' (\s+) ']' / , -> $/ { '[' ~ "{'%' x$0.chars}" ~ ']' } ); $local= $local.subst( :g , / '(' \s* [<[a..zA..Z]>]+ '## ' \s* / , -> $/ { '(' } ); $local= $local.subst( :g , / '[' \s* [<[a..zA..Z]>]+ '## ' \s* / , -> $/ { '[' } ); $local= $local.subst( :g , / '[' ([[<[a..z0..9;,]>]+]+)(\s*) ']' / , -> $/ { '[' ~ $0 ~ "{'#' x$1.chars}" ~ ']' } ); $local= $local.subst( :g , / (\s+) / , -> $/ { '' } ); $local= $local.subst( :g , / ([<[#]>]+) / , -> $/ { "{' ' x$0.chars}" } ); $local= $local.subst( :g , / ('<:::') / , -> $/ { '&&x&&' } ); $local= $local.subst( :g , / (':::>') / , -> $/ { '&&y&&' } ); $local= $local.subst( :g , / (':~')(\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) / , -> $/ { '[' ~ '~' ~ $1 ~ ']' } ); $local= $local.subst( :g , / (':~')(\d+) / , -> $/ { '[' ~ '~' ~ $1 ~ ']' } ); $local= $local.subst( :g , / ('<') / , -> $/ { '[@@2' } ); $local= $local.subst( :g , / ('>') / , -> $/ { ']' } ); $local= $local.subst( :g , / ('&&x&&') / , -> $/ { '<:::' } ); $local= $local.subst( :g , / ('&&y&&') / , -> $/ { ':::>' } ); $local= $local.subst( :g , / (':::') / , -> $/ { '&&&&' } ); $local= $local.subst( :g , / ':' (\d+) / , -> $/ { '-' ~ $0 } ); $local= $local.subst( :g , / ':' ([<[a..zA..Z0..9]> | '_' ]+ | \d+) / , -> $/ { '-' ~ $0 } ); $local= $local.subst( :g , / ('&&&&') / , -> $/ { ':::' } ); $local= $local.subst( :g , / '-' (\d+) / , -> $/ { '[' ~ $0 ~ ']' } ); $local= $local.subst( :g , / '-' ([<[a..zA..Z0..9]> | '_' ]+ | \d+) / , -> $/ { '[' ~ $0 ~ ']' } ); $local= $local.subst( :g , / ('proc[') ([<[a..zA..Z0..9]> | '_' ]+ | \d+) ('][') (\d+) (']{:::') (.+?) (':::}') / , -> $/ { $0 ~ $1 ~ $2 ~ $3 ~ '][<:::' ~ $5 ~ ':::>]' } ); $local= $local.subst( :g , / ('proc[') ([<[a..zA..Z0..9]> | '_' ]+ | \d+) ('][') (\d+) (']{') (.+?) ('}') / , -> $/ { $0 ~ $1 ~ $2 ~ $3 ~ '][<:::' ~ $5 ~ ':::>]' } ); $local= $local.subst( :g , / '{' (.+?) '}' / , -> $/ { '@@1(' ~ $0 ~ ')' } ); ## $local= $local.subst( :g , / '{' ('~'\d+) '}' / , -> $/ { '@@1(' ~ $0 ~ ')' } ); }; $lastRwcodeDef= 'stepBy ( jumpTo::=1={::: id ( ~0:x1 (concat:x(~0:x0)) ( ~0 :x1) ) :::} ) '; $lastRwcode= normalizeOrigCodes($lastRwcodeDef); say "\n\n\n\nOriginal Codes: "; say "---------------\n\n$origRwcode "; say "\n\n\nNormalized Codes: "; say "-----------------\n\n{normalizeOrigCodes($origRwcode)} \n\n"; $rwcode= ''; grammar Rewrite4 { rule TOP { { if $sr > $srMax { $srMax= $sr; }; $englobingNoRWdegree= 0; $sr++; } <WFE> {$sr--;} }; rule WFE { { $srw++; if $sr > $srMax { $srMax= $sr; }; if $sr == 1 { @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 3]= -1; } else { if @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1] == -1 { @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 3]= -1; }; $BIStemp2= @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1] + 1; $BIStemp22= @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1] + 1; @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1]= $BIStemp2; }; if $sr > 2 { if $runNum > 0 { if @curWFEbrace[$sr - 1] === '[' { if $englobingNoRWdegree == 0 { $englobingNoRWdegree= 1; @isBaseBISlistOfWFEbraceTypesForGivenARGLISTruleRun[$sr + 1][$BIStemp2]= 1; } else { @isBaseBISlistOfWFEbraceTypesForGivenARGLISTruleRun[$sr + 1][$BIStemp2]= 0; $englobingNoRWdegree++; }; } else { @isBaseBISlistOfWFEbraceTypesForGivenARGLISTruleRun[$sr + 1][$BIStemp2]= 0; }; }; }; @OPvariety[$sr]= 'na'; $sr++; $tmplateOP= 0; } <OP> <ARGLIST> {$sr--;} }; rule ARGLIST { { if $sr > $srMax { $srMax= $sr; }; @curbraceIdx[$sr]= 0; $sr++; } [<ARG>]* {$sr--;} }; rule ARG { [(['('|'[']){@curWFEbrace[$sr - 1]= $0.Str;}<.eol>* <WFE>[')'|']']] }; proto token OP {*} token OP:sym<NUM> { <NUM> } token NUM { \d+ }; token OP:sym<OP3> { <OP3> } token OP3 { <:alpha>\w* # <[a..zA..Z]>[<[a..z0..9]>]* }; token OP:sym<OP5> { <OP5> } token OP5 { 'stepBy'|'id'|'term'|'proc'|'subItem'|'subVar'|'maps'|'isVector'|'isSubstnTemplate'|'isPointy'|'concat'|'string'|'selfRepeat'|'cTerm'\d+|'@@'\d+|'add'|'sub'|'mult'|'IF'|\w+'::='\d+'='|'goTo'\d+|'say'|'dcl'|'stepThru'\d+ }; token OP:sym<OP2> { <OP2> } token OP2 { [[[<[a..zA..Z0..9]> | '_' ]+]]|'defTerm'|'defProc'|'ERROR'|'nil'|'hellotwelve'|'two'|'four'|'six'|'offhook'|'('|')'|'['|']'|'$'|'; '|': '|':'|'<<'|'>>'|'vector'|'~'|'+'|'-'|'='|'&'|'!'|'*'|'"'|'/'|"\\"|"\'"|[\%+]|[\.+]|[\,+]|[\;+] }; token OP:sym<PROC2> { <PROC2> } token PROC2 { '%'\d+ [<ARG>]+ }; token OP:sym<PROC> { <PROC> } token PROC { ['<' \s* [<OP><ARGLIST>] \s* [[';'] \s* [<OP><ARGLIST>] \s*]* '>'] }; token OP:sym<OP6> { <OP6> } token OP6 { '<:::' \s* ['.'|'@@'|'__'|'@'|'('|'='|','|'['|')'|']'|'~'|\d|\w|\n|\s]+ \s* ':::>' }; token eol { [ <[#;]> \N* ]? \n }; }; class RewriteAction4 { method TOP($/) { $/.make($rewriteWFE); $stopreduction= 0; $needNewDescend= 0; }; method WFE($/) { $stopredOP= ''; $stopredWhileMin= 0; $stopredWhileMax= 0; $wrongArgTypes= 0; $saySuccess= 0; $addMultSuccess= 0; @OPstr[$sr]= $<OP>.Str; if $runNum > 0 { if $lastRunNum < $runNum { $lastRunNum= $runNum; say " " if $debug; say " " if $debug; say " " if $debug; if $runNum == 1 {$entryWFE2= normalizeOrigCodes($origRwcode);} else {$entryWFE2= $rwcode;}; say "\n\n\n " if (($debug4 == 1) and (not($debug2 == 1))); say "\n\n" if (($debug4 == 1) and ($debug2 == 1)); say "\n\n\n\n==========================================================================>" if (($debug2 == 1) and ($debug4 == 0)); say "\( TREE DESCEND #{$runNum}: \)" if (($debug2 == 1) and ($debug4 == 0)); say ". . . . . . " if (($debug2 == 1) and ($debug4 == 0)); if $runNum == 1 { say '"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""' if $debug4; say "\( STARTING TREE DESCEED #1: \)\n\n {trimBrackets($entryWFE2)}\n" if ($debug4 == 1) and ($debug2 == 0); say "\( STARTING TREE DESCNND #1: \)\n" if ($debug4 == 1) and ($debug2 == 1); } else { say "\n==========================================================================>" if $debug4; say "\( TREE DESCEND #{$runNum}: \)\n\n {trimBrackets($entryWFE2)}\n" if ($debug4 == 1) and ($debug2 == 0); say "\( TREE DESCEND #{$runNum}: \)\n" if ($debug4 == 1) and ($debug2 == 1); }; }; if $rewriteArgListElems == 0 { $temp1= $<OP>.Str; } else { $temp1= "{ if $sr == 1 {"\n "}}" ~ $<OP>.Str ~ @rewriteArgList[$sr + 1]; }; if $englobingNoRWdegree > 0 { $noSkips= 0; } else { $noSkips= 1; }; say " " if $debug; }; if $stopreduction == 1 {} elsif $englobingNoRWdegree > 0 { say " " if $debug; if $sr > 1 { if $rewriteArgListElems == 0 { say ".{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) 0SKIP\.$englobingNoRWdegree: {trimBrackets($temp1)}" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); }; } else { say ".{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) 1SKIPnestg$englobingNoRWdegree:" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); }; }; if $sr > 2 { $BIStemp2= @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1]; }; if $rewriteArgListElems == 0 { $rewriteWFE= $<OP>.Str; if ($runNum > 0) and ($stopreduction == 0) and ($englobingNoRWdegree == 0) { }; $entryWFE= $<OP>.Str; if $sr > 2 { @listOfCurBraces[$sr-1][@curbraceIdx[$sr-1]]= @curWFEbrace[$sr - 1]; if @curbraceIdx[$sr-1] == 0 { $curBrace= @curWFEbrace[$sr - 1]; } else { if @curWFEbrace[$sr - 1] === '[' { $curBrace= '['; } else { $curBrace= '('; }; }; }; if $runNum > 0 { if $stopreduction == 1 { $wrongArgTypes= 1; }; }; } else { $rewriteWFE= $<OP>.Str ~ @rewriteArgList[$sr + 1]; $entryWFE= $rewriteWFE; if $sr > 2 { @listOfCurBraces[$sr-1][@curbraceIdx[$sr-1]]= @curWFEbrace[$sr - 1]; if @curbraceIdx[$sr-1] == 0 { $curBrace= @curWFEbrace[$sr - 1]; } else { if @curWFEbrace[$sr - 1] === '[' { $curBrace= '['; } else { $curBrace= '('; }; }; }; if $runNum == 0 {} elsif $englobingNoRWdegree > 0 { $curIdx= 0; $stopredOP= $<OP>.Str; $stopredWhileMin= $curIdx; $stopredWhileMax= $rewriteArgListElems; while $curIdx < $rewriteArgListElems { if @currentARGLISTlistOfBraceTypesOfComponentWFEs[$curIdx] === '[' { $tempLeftBrace= '['; $tempRightBrace= ']'; } else { $tempLeftBrace= '('; $tempRightBrace= ')'; }; @stopredWFEcompArgList[$curIdx]= $tempLeftBrace ~ @WFEcompArgList[$curIdx] ~ $tempRightBrace; $curIdx++; }; # say ".{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) 22SKIP\.$englobingNoRWdegree: {trimBrackets($entryWFE)}" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); say ".{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) 2SKIP\.$englobingNoRWdegree: " if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); say " {'|' x$sr} {trimBrackets($stopredOP)}" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); # say " {'|' x$sr} $stopredOP" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); $curIdx= $stopredWhileMin; while $curIdx < $stopredWhileMax { $entryWFE2= "{@stopredWFEcompArgList[$curIdx]}"; say " {'|' x$sr} {trimBrackets($entryWFE2)}" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); # say " {'|' x$sr} $entryWFE2" if (($englobingNoRWdegree == 1) and ($needNewDescend == 0) and ($debug4 == 1) and (not($debug2 == 1))); $curIdx= $curIdx + 1; }; } else { $rewriteWFE= $<OP>.Str ~ @rewriteArgList[$sr + 1]; if $stopreduction == 1 {} else { if @OPvariety[$sr] === 'NUM' { $rewriteWFE= $<OP>.Str; } elsif @OPvariety[$sr] === 'PROC' { $stopreduction= 1; } elsif @OPvariety[$sr] === 'OP5' { if ($<OP>.Str === 'IF') and ($rewriteArgListElems > 2) { if @WFEcompArgList[0] === '0' {$rewriteWFE= @WFEcompArgList[1]; } else {$rewriteWFE= @WFEcompArgList[2]; }; fillRestOfArgsV1(3); $stopreduction= 1; } elsif ($<OP>.Str === 'stepBy') and ($rewriteArgListElems > 0) { $rewriteWFE= @WFEcompArgList[$rewriteArgListElems - 1]; $stopreduction= 1; $stopredOP= $rewriteWFE; $stopredWhileMin= 0; $stopredWhileMax= 0; } elsif ($<OP>.Str === 'id') and ($rewriteArgListElems > 0) { $rewriteWFE= @WFEcompArgList[0]; fillRestOfArgsV1(1); $stopreduction= 1; } elsif ($<OP>.Str === 'say') and ($runNum > 0) { say " " if (($debug2 == 0) and ($debug4 == 1)); say " {' ' x$sr} {'( ****** LEVEL'}$sr {'ACTION '}\#$output\: {'say '}\) {@WFEcompArgList[0]}"; say " " if (($debug2 == 1) and ($debug4 == 0)); $rewriteWFE= 'nil'; $output++; $saySuccess= 1; } elsif (($<OP>.Str === 'concat') or ($<OP>.Str === 'string')) and ($rewriteArgListElems > 0) { $rewriteWFE= ''; $curIdx= 0; while $curIdx < $rewriteArgListElems { $input= @WFEcompArgList[$curIdx]; @tempStmt[0]= ''; $input= $input.subst( :g , /^(\%+)$/ , -> $/ { @tempStmt[0]= 'ok'; "{' ' x$0.chars}" } ); if @tempStmt[0] ~~ 'ok' {$rewriteWFE= $rewriteWFE ~ $input;} else {$rewriteWFE= $rewriteWFE ~ @WFEcompArgList[$curIdx];}; $curIdx= $curIdx + 1; }; if $<OP>.Str === 'string' { $stopreduction= 1; $stopredOP= $rewriteWFE; $stopredWhileMin= 0; $stopredWhileMax= 0; }; } elsif $runNum > 0 { $input= $<OP>.Str; @tempStmt[0]= ''; @tempStmt[1]= ''; @tempStmt[2]= ''; @tempStmt[3]= ''; $tp1= $input.subst( :g , /(\w+)(['::='])(\d+)(['='])/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1; @tempStmt[2]= $2; @tempStmt[3]= $3 } ); if (@tempStmt[1] ~~ '::=') and (@tempStmt[3] ~~ '=') { if %*PROCS{"{@tempStmt[0]}"} === Any { %*PROCS{"{@tempStmt[0]}"}= @WFEcompArgList[0]; %*PROCSparmNum{"{@tempStmt[0]}"}= @tempStmt[2]; $rewriteWFE= 'nil'; } else {die "duplicated shorthand"; }; }; $input= $<OP>.Str; @tempStmt[0]= ''; @tempStmt[1]= ''; $tp1= $input.subst( :g , /^(['stepThru'])(\d+)/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1; } ); if (@tempStmt[0] ~~ 'stepThru') and ($rewriteArgListElems > @tempStmt[1].Int) { $rewriteWFE= @WFEcompArgList[@tempStmt[1].Int]; fillRestOfArgsV1(@tempStmt[1].Int + 1); $stopreduction= 1; }; $input= $<OP>.Str; $tp1= ''; @tempStmt[0]= ''; @tempStmt[1]= ''; $tp1= $input.subst( :g , /^(['cTerm'])(\d+)/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1 } ); if (@tempStmt[0] ~~ 'cTerm') and (@tempStmt[1] > 0) { if $rewriteArgListElems == @tempStmt[1] {} elsif $rewriteArgListElems < @tempStmt[1] {$rewriteWFE= 'ERROR too short'; die; } elsif $rewriteArgListElems > @tempStmt[1] { $tp2= $<OP>.Str; $curIdx= 0; while $curIdx < (@tempStmt[1] + 1) { $tp2= $tp2 ~ '[' ~ @WFEcompArgList[$curIdx] ~ ']'; $curIdx= $curIdx + 1; }; if %*TERMS{"{$tp2}"} === Any {} else { $rewriteWFE= %*TERMS{"{$tp2}"}; fillRestOfArgsV1(@tempStmt[1] + 1); $stopreduction= 1; }; }; }; $input= $<OP>.Str; $tp1= ''; @tempStmt[0]= ''; @tempStmt[1]= ''; $tp1= $input.subst( :g , /^(['@@'])(\d+)/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1 } ); if (@tempStmt[0] ~~ '@@') and ((@tempStmt[1] > 0) or (@tempStmt[1] == 0)) { $tp0= @tempStmt[0]; if $rewriteArgListElems == @tempStmt[1] {} elsif $rewriteArgListElems < @tempStmt[1] {$rewriteWFE= 'ERROR';} elsif $rewriteArgListElems > @tempStmt[1] { if (@WFEcompArgList[@tempStmt[1]] ~~ 'setSubVar') and ((@tempStmt[1] > 0) or (@tempStmt[1] == 0)) { if @tempStmt[1] == 0 { # $rewriteWFE= 'assocList1[subVar[' ~ @WFEcompArgList[1] ~ '][' ~ @WFEcompArgList[2] ~ ']]'; if $rewriteArgListElems > 2 { $rewriteWFE= $tp0 ~ '1[subVar[' ~ @WFEcompArgList[1] ~ '][' ~ @WFEcompArgList[2] ~ ']]'; if $rewriteArgListElems > 3 { fillRestOfArgsV1(3); $stopreduction= 1; }; }; } else { if ( $rewriteArgListElems > (@tempStmt[1] + 2) ) { @WFEcompArgListTemp[@tempStmt[1] + 1] = 'subVar[' ~ @WFEcompArgList[@tempStmt[1] + 1] ~ ']'; $rewriteWFE= ''; $input= @WFEcompArgListTemp[@tempStmt[1] + 1] ~ '[' ~ @WFEcompArgList[@tempStmt[1] + 2] ~ ']'; $tp1= ''; $curIdx= 0; while $curIdx < @tempStmt[1] { if ( 'subVar[' ~ %*AssocListArg0{"{@WFEcompArgList[$curIdx]}Arg0"} ~ ']' ~~ @WFEcompArgListTemp[@tempStmt[1] + 1] ) { if ( ('subVar[' ~ %*AssocListArg0{"{@WFEcompArgList[$curIdx]}Arg0"} ~ ']' ~ '[' ~ %*AssocListArg1{"{@WFEcompArgList[$curIdx]}Arg1"} ~ ']' ) ~~ @WFEcompArgList[$curIdx] ) { $rewriteWFE= $rewriteWFE ~ '[' ~ $input ~ ']'; $tp1= 'SUCCESS'; } else {$rewriteWFE= 'ERRORvvvvvvvvvvvvvvvvvvvvvvvv'; $stopreduction= 1;}; } else { $rewriteWFE= $rewriteWFE ~ '[' ~ @WFEcompArgList[$curIdx] ~ ']'; }; $curIdx= $curIdx + 1; if $curIdx == @tempStmt[1] { if $tp1 ~~ 'SUCCESS' {$rewriteWFE= $tp0 ~ "{@tempStmt[1]}" ~ $rewriteWFE;} else { $rewriteWFE= $tp0 ~ "{@tempStmt[1] + 1}" ~ $rewriteWFE ~ '[' ~ $input ~ ']'; }; }; }; if $rewriteArgListElems > (@tempStmt[1] + 3) { fillRestOfArgsV1(@tempStmt[1] + 3); $stopreduction= 1; }; }; }; } elsif ((@WFEcompArgList[@tempStmt[1]] ~~ 'getSubVar') or (@WFEcompArgList[@tempStmt[1]] ~~ 'getSubItem')) and ((@tempStmt[1] > 0) or (@tempStmt[1] == 0)) { if ( $rewriteArgListElems < (@tempStmt[1] + 2) ) {} else { $rewriteWFE= 'nil'; $curIdx= 0; while $curIdx < @tempStmt[1] { if ( %*AssocListArg0{"{@WFEcompArgList[$curIdx]}Arg0"} ~~ @WFEcompArgList[@tempStmt[1] + 1] ) { $rewriteWFE= %*AssocListArg1{"{@WFEcompArgList[$curIdx]}Arg1"}; if @WFEcompArgList[@tempStmt[1]] ~~ 'getSubVar' { if ( ('subVar[' ~ @WFEcompArgList[@tempStmt[1] + 1] ~ '][' ~ $rewriteWFE ~ ']') ~~ @WFEcompArgList[$curIdx] ) {} else {$rewriteWFE= 'ERROR'; die "subVar hash problem"; }; } else { if ( ('subItem[' ~ @WFEcompArgList[@tempStmt[1] + 1] ~ '][' ~ $rewriteWFE ~ ']') ~~ @WFEcompArgList[$curIdx] ) {} else {$rewriteWFE= 'ERROR'; die "subItem hash problem"; }; }; $curIdx= @tempStmt[1]; } else {$curIdx= $curIdx + 1; }; }; if ( $rewriteWFE ~~ 'nil' ) {} else {fillRestOfArgsV1(@tempStmt[1] + 2); $stopreduction= 1; }; }; } elsif ((@WFEcompArgList[@tempStmt[1]] ~~ 'x0') or (@WFEcompArgList[@tempStmt[1]] ~~ 'x1') or (@WFEcompArgList[@tempStmt[1]] ~~ 'x2')) and (@tempStmt[1] > 0) { $input= @WFEcompArgList[@tempStmt[1]]; @tempStmt[2]= ''; $tp2= $input.subst( :g , /^['x'](\d+)/ , -> $/ { @tempStmt[2]= $0; } ); if @tempStmt[2] < @tempStmt[1] { $rewriteWFE= @WFEcompArgList[@tempStmt[2]]; fillRestOfArgsV1(@tempStmt[1] + 1); $stopreduction= 1; }; } else { $rewriteWFE= @WFEcompArgList[@tempStmt[1]]; $curIdx= 0; while $curIdx < $rewriteArgListElems { if $curIdx !== @tempStmt[1] {$rewriteWFE= $rewriteWFE ~ '[' ~ @WFEcompArgList[$curIdx] ~ ']'; }; $curIdx= $curIdx + 1; }; $stopreduction= 1; $stopredOP= $rewriteWFE; $stopredWhileMin= 0; $stopredWhileMax= 0; }; } else {}; }; } else { die "cccc"; }; } elsif (@OPvariety[$sr] === 'OP2') or (@OPvariety[$sr] === 'OP3') { $input= %*PROCS{"{$<OP>.Str}"}; if $input === Any { $input= %*TERMS{"{$<OP>.Str ~ '[' ~ @WFEcompArgList[0] ~ ']'}"}; if $input === Any {} else { $rewriteWFE= $input; fillRestOfArgsV1(1); $wrongArgTypes= 1; $stopreduction= 1; }; } elsif $rewriteArgListElems < %*PROCSparmNum{"{$<OP>.Str}"} {} else { say "zzzzzzzzzzzz0 sr $sr OPvariety {@OPvariety[$sr]} Elems $rewriteArgListElems"; $tp0= '___'; $tp1= $<OP>.Str; @tempStmt[0]= '___'; say "zzzzzzzzzzzz1 tp0 $tp0 tp1 $tp1 WFEcompArgList0 @WFEcompArgList[0] "; if %*PROCS{"{@WFEcompArgList[0]}"} === Any {} else { $input= %*PROCS{"{@WFEcompArgList[0]}"}.Str; say "zzzzzzzzzzzz2 input $input "; $input= $input.subst( :g , / ('@@')\d+ '[' ('CallSession') ']' / , -> $/ { @tempStmt[0]= $0; } ); say "zzzzzzzzzzzz3 tempStmt0 {@tempStmt[0]} "; if @tempStmt[0] ~~ '@@' {$tp0= @WFEcompArgList[0];}; }; say "zzzzzzzzzzzz4 tp0 $tp0 tp1 $tp1 WFEcompArgList0 @WFEcompArgList[0] "; $curIdx2= 0; while $curIdx2 < $rewriteArgListElems { @WFEcompArgListTemp[$curIdx2]= @WFEcompArgList[$curIdx2]; $curIdx2= $curIdx2 + 1; }; $curIdx2= 0; while $curIdx2 < $rewriteArgListElems { $input= @WFEcompArgListTemp[$curIdx2]; say "zzzzzzzzzzzz5 curIdx2 $curIdx2 tp0 $tp0 input $input "; @tempStmt[0]= 'com'; @tempStmt[1]= 'rew';@tempStmt[2]= 'com2'; @tempStmt[3]= 'rew2'; $input= $input.subst( :g , / ^(''\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) ['('|'['] (.+) [')'|']']$/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1; @tempStmt[2]= $2; @tempStmt[3]= $3; } ); if (@tempStmt[1] ~~ '__') { @WFEcompArgListTemp[$curIdx2]= @tempStmt[3]; if $tp0 ~~ '___' {} else { if %*GOTOARGNAMES{"{$tp0 ~ '--' ~ "{$curIdx2}"}"} === Any { %*GOTOARGNAMES{"{$tp0 ~ '--' ~ "{$curIdx2}"}"}= @tempStmt[0] ~ @tempStmt[1] ~ @tempStmt[2]; say "zzzzzzzzzzzz6 curIdx2 $curIdx2 tp0 $tp0 GOTOARGNAMES {%*GOTOARGNAMES{"{$tp0 ~ '--' ~ "{$curIdx2}"}"}} "; }; }; }; $curIdx2= $curIdx2 + 1; }; if %*PROCSparmNum{"{$<OP>.Str}"} == 0 { $input= %*PROCS{"{$<OP>.Str}"}; $input= $input.subst( :g , / '<:::' / , -> $/ { '' } ); $input= $input.subst( :g , / ':::>' / , -> $/ { '' } ); $rewriteWFE= $input; fillRestOfArgsV1(0); $stopreduction= 1; } else { ## $tmplateOP= 1; $actualTemplate= $<OP>.Str; $tmplateNumOfParms= %*PROCSparmNum{"{$<OP>.Str}"}; if $rewriteArgListElems < $tmplateNumOfParms { $parmSubstnResult= $actualTemplate; $curIdx= 0; while $curIdx < $rewriteArgListElems { $parmSubstnResult= $parmSubstnResult ~ '[' ~ @WFEcompArgList[$curIdx] ~ ']'; $curIdx= $curIdx + 1; }; $wrongArgTypes= 1; } else { $input= %*PROCS{"{$<OP>.Str}"}; $tp2= $input; $tmplateStr= $input; $input= $input.subst( :g , / '<:::' / , -> $/ { '' } ); $input= $input.subst( :g , / ':::>' / , -> $/ { '' } ); if $input === $tp2 {$parmSubstnResult= $tp2; } else { $input= $input.subst( :g , / ('~')(\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) / , -> $/ { $0 ~ $1 } ); $tp1= $input.subst( :g , / '~'(\d+) / , -> $/ { @WFEcompArgListTemp[$0]; } ); $parmSubstnResult= $tp1; $wrongArgTypes= 1; $stopreduction= 1; }; }; $rewriteWFE= $parmSubstnResult; if $parmSubstnResult ~~ $tp2 {fillRestOfArgsV1(0); } else {fillRestOfArgsV1($tmplateNumOfParms); }; }; }; } else { die "wrong OP"; }; }; }; }; $/.make($rewriteWFE); # as initialized below at call of method OP: # @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; if $sr > 2 { $temp2= @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr - 1]; @listOfWFErewritesForGivenARGLISTruleRun[$sr - 1][$temp2]= $rewriteWFE; if $runNum == 0 { @listOfWFEbraceTypesForGivenARGLISTruleRun[$sr - 1][$temp2]= @curWFEbrace[$sr - 1]; } else { if $englobingNoRWdegree > 0 { $wrongArgTypes= 1; }; if $stopreduction == 1 { $wrongArgTypes= 1; }; if ($stopreduction == 1) and ($saySuccess == 1) { $wrongArgTypes= 0; }; if $wrongArgTypes == 1 { @listOfWFEbraceTypesForGivenARGLISTruleRun[$sr - 1][$temp2]= @curWFEbrace[$sr - 1]; } else { @listOfWFEbraceTypesForGivenARGLISTruleRun[$sr - 1][$temp2]= '['; }; }; @listOfOPvarietyForGivenARGLISTruleRun[$sr - 1][$temp2]= @curWFEopVariety[$sr + 1]; if $addMultSuccess == 1 { @listOfOPvarietyForGivenARGLISTruleRun[$sr - 1][$temp2]= 'NUM'; }; @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr - 1]= $temp2 + 1; if $runNum == 0 { @BISlistOfWFEbraceTypesForGivenARGLISTruleRun[$sr + 1][$BIStemp2]= $curBrace; @BISlistOfWFErewritesForGivenARGLISTruleRun[$sr + 1][$BIStemp2]= $rewriteWFE; }; @curbraceIdx[$sr-1]= @curbraceIdx[$sr-1] + 1; if $curBrace === '[' { $englobingNoRWdegree--; if $englobingNoRWdegree == 1 { $BIStemp2= @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1]; $BIStemp22= @BISelemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr + 1]; if $sr > 2 { if @isBaseBISlistOfWFEbraceTypesForGivenARGLISTruleRun[$sr + 1][$BIStemp2] == 1 { $englobingNoRWdegree= 0; }; }; }; }; }; if $noSkips == 1 { if (($sr == 1) and ($debug2 == 1) and ($debug4 == 1)) {} else { if $runNum > 0 { $entryWFE2= $entryWFE; $entryWFE4= $/.made; if $entryWFE !=== $/.made { say " " if $debug; if $stopreduction == 0 { say "\n.{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) RW SUCCESS:" if $debug4; } else { say "\n.{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) EXPANDING RW - NEED NEW DESCEND NOW:" if $debug4; $needNewDescend= 1; }; say " {'|' x$sr} {trimBrackets($<OP>.Str)}" if $debug4; $curIdx= 0; while $curIdx < $rewriteArgListElems { $entryWFE2= '[' ~ "{@WFEcompArgList[$curIdx]}" ~ ']'; say " {'|' x$sr} {trimBrackets($entryWFE2)}" if $debug4; $curIdx++; }; if $stopreduction == 0 { say " {'|' x$sr} " if $debug4; say " {'|' x$sr} ====> {trimBrackets($entryWFE4)}" if $debug4; } else { say " {'|' x$sr} " if $debug4; say " {'|' x$sr} =============>" if $debug4; say " {'|' x$sr} {trimBrackets($stopredOP)}" if $debug4; if $stopredWhileMin < $stopredWhileMax {say " {'|' x$sr} " if $debug4;}; $curIdx= $stopredWhileMin; while $curIdx < $stopredWhileMax { $entryWFE2= '[' ~ "{@stopredWFEcompArgList[$curIdx]}" ~ ']'; say " {'|' x$sr} {trimBrackets($entryWFE2)}" if $debug4; $curIdx= $curIdx + 1; }; }; say " " if (($debug2 == 1) or ($debug4 == 1)) and (($debug2 == 0) or ($debug4 == 1)); say " " if $debug; } else { $input= $entryWFE; $tp1= ''; @tempStmt[0]= ''; @tempStmt[1]= ''; $tp1= $input.subst( :g , /^(['$'])(\w+)/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1 } ); if $stopreduction == 0 { say " " if $debug; if $rewriteArgListElems == 0 { say "\n.{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) NOT REWRITABLE: {trimBrackets($entryWFE2)}" if $debug4; } else { say "\n.{'m' x$sr}.LEVEL$sr \(type @OPvariety[$sr] w $rewriteArgListElems args\) NOT REWRITABLE:" if $debug4; say " {'|' x$sr} {trimBrackets($<OP>.Str)}" if $debug4; $curIdx= 0; while $curIdx < $rewriteArgListElems { $entryWFE2= '[' ~ "{@WFEcompArgList[$curIdx]}" ~ ']'; say " {'|' x$sr} {trimBrackets($entryWFE2)}" if $debug4; $curIdx++; }; }; say " " if $debug4; }; }; }; }; }; $srw--; }; method OP5($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; @OPstr[$sr - 1]= $/.made; @OPvariety[$sr - 1]= 'OP5'; @curWFEopVariety[$sr]= 'OP5'; }; method NUM($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; @OPstr[$sr - 1]= $/.made; @OPvariety[$sr - 1]= 'NUM'; @curWFEopVariety[$sr]= 'NUM'; }; method PROC($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; @OPstr[$sr - 1]= $/.made; @OPvariety[$sr - 1]= 'PROC'; @curWFEopVariety[$sr]= 'PROC'; @entryTempoeName[$sr - 1]= $/.Str; }; method OP6($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; @OPstr[$sr - 1]= $/.made; @OPvariety[$sr - 1]= 'OP6'; @curWFEopVariety[$sr]= 'OP6'; }; method OP3($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; @OPstr[$sr - 1]= $/.made; @OPvariety[$sr - 1]= 'OP3'; @curWFEopVariety[$sr]= 'OP3'; }; method OP2($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; @OPstr[$sr - 1]= $/.made; @OPvariety[$sr - 1]= 'OP2'; @curWFEopVariety[$sr]= 'OP2'; }; method OP($/) { $/.make($/.Str); @elemsTotalOfListOfWFErewritesForGivenARGLISTruleRun[$sr]= 0; @curWFEbrace[$sr]= ''; }; method ARGLIST($/) { $rewriteArgListElems= $<ARG>.list.elems; if $sr == 2 { $savedsr2rewriteArgListElems= $rewriteArgListElems; }; if $rewriteArgListElems == 0 {} else { @rewriteArgList[$sr]= ''; if $rewriteArgListElems == 0 {} else { $curIdx= 0; for $<ARG>.list -> $curItem { @WFEcompArgList[$curIdx]= @listOfWFErewritesForGivenARGLISTruleRun[$sr][$curIdx]; @currentARGLISTlistOfBraceTypesOfComponentWFEs[$curIdx]= @listOfWFEbraceTypesForGivenARGLISTruleRun[$sr][$curIdx]; @currentARGLISTlistOflistOfOPvarietyOfComponentWFEs[$curIdx]= @listOfOPvarietyForGivenARGLISTruleRun[$sr - 1][$curIdx]; if $sr == 2 { @savedsr2WFEcompArgList[$curIdx]= @WFEcompArgList[$curIdx]; }; $curIdx++; }; $curIdx= 0; for $<ARG>.list -> $curItem { if $curIdx > 0 { if @currentARGLISTlistOfBraceTypesOfComponentWFEs[$rewriteArgListElems - $curIdx] ~~ '[' { @currentARGLISTlistOfBraceTypesOfComponentWFEs[$rewriteArgListElems - $curIdx]= '['; } else { @currentARGLISTlistOfBraceTypesOfComponentWFEs[$rewriteArgListElems - $curIdx]= '('; }; }; $curIdx++; }; $curIdx= 0; for $<ARG>.list -> $curItem { @BraceTypeOfComponentWFEatGivenIndexInWFElistOfARGLISTatGivenSrLevel[$sr][$curIdx]= @currentARGLISTlistOfBraceTypesOfComponentWFEs[$curIdx]; $curIdx++; }; $curIdx= 0; for $<ARG>.list -> $curItem { if @currentARGLISTlistOfBraceTypesOfComponentWFEs[$curIdx] ~~ '[' { $tempLeftBrace= '['; $tempRightBrace= ']'; @tempLeftBrace[$curIdx]= '['; @tempRightBrace[$curIdx]= ']'; } else { $tempLeftBrace= '('; $tempRightBrace= ')'; @tempLeftBrace[$curIdx]= '('; @tempRightBrace[$curIdx]= ')'; }; @rewriteArgList[$sr]= @rewriteArgList[$sr] ~ $tempLeftBrace ~ @WFEcompArgList[$curIdx] ~ $tempRightBrace; if $sr == 2 { @savedsr2tempLeftBrace[$curIdx]= @tempLeftBrace[$curIdx]; @savedsr2tempRightBrace[$curIdx]= @tempRightBrace[$curIdx]; }; $curIdx++; }; }; if ($runNum > 0) and ($setup == 0) and (@OPstr[$sr - 1] ~~ 'subItem') and ($rewriteArgListElems == 2) { %*AssocListArg0{"{'subItem' ~ @rewriteArgList[$sr] ~ 'Arg0'}"}= @WFEcompArgList[0]; %*AssocListArg1{"{'subItem' ~ @rewriteArgList[$sr] ~ 'Arg1'}"}= @WFEcompArgList[1]; }; if ($runNum > 0) and ($setup == 0) and (@OPstr[$sr - 1] ~~ 'subVar') and ($rewriteArgListElems == 2) { %*AssocListArg0{"{'subVar' ~ @rewriteArgList[$sr] ~ 'Arg0'}"}= @WFEcompArgList[0]; %*AssocListArg1{"{'subVar' ~ @rewriteArgList[$sr] ~ 'Arg1'}"}= @WFEcompArgList[1]; }; if ($runNum > 0) and ($setup == 0) and (@OPstr[$sr - 1] ~~ 'proc') and ($rewriteArgListElems == 3) { $input= @WFEcompArgList[0]; @tempStmt[0]= 'errorNOTtemplate'; $input= $input.subst( :g , /^(\w+)/ , -> $/ { @tempStmt[0]= $0; } ); if @tempStmt[0] === 'errorNOTtemplate' {die "errorNOTtemplate";} else { $input= @WFEcompArgList[1]; @tempStmt[1]= 'errorNOTaNUM'; ## $input= $input.subst( :g , /^'@@2[' (\d+) ']' '[' (\s* ['.'|'vector'|'@'|'('|'='|','|'['|')'|']'|\d|\w|\n|\s]+ \s* | '<:::' \s* ['.'|'@@'|'@'|'('|'='|','|'['|')'|']'|'~'|\d|\w|\n|\s]+ \s* ':::>') ']'/ , -> $/ { @tempStmt[2]= $0; @tempStmt[3]= $1; } ); $input= $input.subst( :g , /^(\d+)/ , -> $/ { @tempStmt[1]= $0; } ); if @tempStmt[1] === 'errorNOTaNUM' {die "errorNOTaNUM";} else { $input= @WFEcompArgList[2]; @tempStmt[2]= 'errorNOTaTEMPLATE'; $input= $input.subst( :g , /^('<:::' \s* ['.'|'updateArgsTotaling'|'assocList'|'@@'|'@'|'('|'='|','|'['|')'|']'|'~'|\d|\w|\n|\s]+ \s* ':::>')/ , -> $/ { @tempStmt[2]= $0; } ); if @tempStmt[2] === 'errorNOTaTEMPLATE' {die "errorNOTaTEMPLATE";} else { if %*PROCS{"{@WFEcompArgList[0]}"} === Any { %*AssocListArg0{"{'proc' ~ @rewriteArgList[$sr] ~ 'Arg0'}"}= @WFEcompArgList[0]; %*PROCSparmNum{"{@WFEcompArgList[0]}"}= @WFEcompArgList[1]; %*PROCS{"{@WFEcompArgList[0]}"}= @WFEcompArgList[2]; } elsif %*PROCS{"{@WFEcompArgList[0]}"} === @WFEcompArgList[2] {} else {die "errorIsNAMEalreadyUsedForDifferentTemplate";}; }; }; }; }; if ($runNum > 0) and ($setup == 0) and (@OPstr[$sr - 1] ~~ 'term') and ($rewriteArgListElems == 2) { $input= @WFEcompArgList[0]; @tempStmt[0]= 'errorNOTmapping'; $input= $input.subst( :g , /^(\w+)/ , -> $/ { @tempStmt[0]= $0; } ); # $input= $input.subst( :g , /^('^^'\d+)/ , -> $/ { @tempStmt[0]= $0; } ); if @tempStmt[0] === 'errorNOTmapping' {die "errorNOTmapping";} else { if %*TERMS{"{@WFEcompArgList[0]}"} === Any { # %*AssocListArg0{"{'term' ~ @rewriteArgList[$sr] ~ 'Arg0'}"}= @WFEcompArgList[0]; # %*AssocListArg1{"{'term' ~ @rewriteArgList[$sr] ~ 'Arg1'}"}= @WFEcompArgList[1]; %*TERMS{"{@WFEcompArgList[0]}"}= @WFEcompArgList[1]; } elsif %*TERMS{"{@WFEcompArgList[0]}"} === @WFEcompArgList[1] {} else {die "errorIsNAMEalreadyUsedForDifferentTERMSmapping";}; }; }; $/.make(@rewriteArgList[$sr]); @curWFEbrace[$sr]= ''; }; }; }; if $debug {} else { $debug= 0; $debug2= 0; $debug4= 0; $lastRunNum= -1; $runNum= 0; $continue= 1; while $continue > 0 { $rwcode= $lastRwcode; $match2= Rewrite4.parse( $rwcode, actions => RewriteAction4.new, ); $lastRwcode= $match2.made; $lastRunNum= $runNum; $runNum++; $continue++; if $lastRwcode ~~ $rwcode { if $runNum > 1 { $continue= 0; }; }; }; $debug= 0; $debug2= 1; $debug4= 1; $lastRwcode= normalizeOrigCodes($origRwcode); $continue= 1; $setup= 0; $lastRunNum= -1; $runNum= 0; say "\n\n\n\nCODES EXECUTION:" if $debug4; say "\n\n\n\nHIGH LEVEL DESCEND-BY-DESCEND VIEW OF RW PROGRESS:" if $debug2; say "\(RECURSIVE LEFTMOST-INNERMOST APPLICATIVE REWRITE, TILL CODES NOT REWRITABLE\)\n\n" if $debug4; say "\n\n\nRW PROCESS STARTING:" if (($debug2 == 1) and (not($debug4 == 1))); ## say " {trimBrackets($lastRwcode)}" if ($debug4 == 1); while $continue > 0 { $rwcode= $lastRwcode; $match2= Rewrite4.parse( $rwcode, actions => RewriteAction4.new, ); $lastRwcode= $match2.made; if $runNum == 0 {} elsif $rewriteArgListElems > 0 { say " " if (($debug2 == 1) and ($debug4 == 1)); say ".m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #$runNum:" if $debug2; say ' | """""""""""""""""""""""""""""""""""""""""""""""""""""""' if $debug2; if $runNum < 1 {} else { if $runNum == 1 { say " | OP: {trimBrackets(@OPstr[1])} " if $debug2;} else { if @OPstr[1] ~~ $OPsav { say " | OP: <--------SAME AS IN ABOVE DESCEND: {trimBrackets($OPsav)}" if $debug2; } else { say " | OP: {trimBrackets(@OPstr[1])}" if $debug2; }; }; $OPsav2= $OPsav; $OPsav= @OPstr[1]; }; if $runNum < 1 {} else { $input= @OPstr[1]; @tempStmt[0]= 'mmm'; ## $tp1= $input.subst( :g , /^('goTo')\d+$/ , $tp1= $input.subst( :g , /^(['jumpTo'|'CallSession'])$/ , -> $/ { @tempStmt[0]= $0; } ); ## if @tempStmt[0] ~~ 'goTo' { if (@tempStmt[0] ~~ 'jumpTo') or (@tempStmt[0] ~~ 'CallSession') { $curIdx2= 0; while $curIdx2 < $temp6 { @WFEcompArgListTemp2[$curIdx2]= @WFEcompArgList[$curIdx2]; $curIdx2= $curIdx2 + 1; }; $curIdx2= 0; while $curIdx2 < $temp6 { $input= @WFEcompArgListTemp2[$curIdx2]; @tempStmt[0]= 'com'; @tempStmt[1]= 'rew';@tempStmt[2]= 'com2'; @tempStmt[3]= 'rew2'; $tp1= $input.subst( :g , / ^(''\d+) ('__') (<[A..Z]>[<[A..Z0..9]> | '_' ]*) ['('|'['] (.+) [')'|']']$/ , -> $/ { @tempStmt[0]= $0; @tempStmt[1]= $1; @tempStmt[2]= $2; @tempStmt[3]= $3; } ); if (@tempStmt[1] ~~ '__') { @WFEcompArgListTemp2[$curIdx2]= @tempStmt[3]; }; $curIdx2= $curIdx2 + 1; }; $tp2= '____'; $input= @WFEcompArgList[0]; ## $tp1= $input.subst( :g , / '[' ([<[a..zA..Z0..9]> | '_' ]+) ']'$/ , $tp1= $input.subst( :g , / '[' ('TelService') ']'$/ , -> $/ { $tp2= $0; } ); if $tp2 ~~ '____' {$tp2= @WFEcompArgList[0];}; $curIdx= 0; while $curIdx < $temp6 { $input= $tp2 ~ '--' ~ "{$curIdx}"; if %*GOTOARGNAMES{"{$input}"} === Any { @WFEcompArgList[$curIdx]= @WFEcompArgListTemp2[$curIdx]; @WFEcompArgListPreFx[$curIdx]= '____'; } else { @WFEcompArgList[$curIdx]= %*GOTOARGNAMES{"{$input}"} ~ '[' ~ @WFEcompArgListTemp2[$curIdx] ~ ']'; @WFEcompArgListPreFx[$curIdx]= %*GOTOARGNAMES{"{$input}"}; }; $curIdx++; }; $curIdx= $temp6; while $curIdx < $rewriteArgListElems { @WFEcompArgListPreFx[$curIdx]= '____'; $curIdx++; }; if $runNum > 1 { if $rewriteArgListElemsSav > $rewriteArgListElems { $compareMax= $rewriteArgListElems; } else { $compareMax= $rewriteArgListElemsSav; }; }; $curIdx= 0; while $curIdx < $rewriteArgListElems { $entryWFE2= "{@tempLeftBrace[$curIdx]} {@WFEcompArgList[$curIdx]} {@tempRightBrace[$curIdx]}"; if $runNum == 1 { say " | ARG$curIdx: {trimBrackets($entryWFE2)}" if $debug2; } else { if $curIdx < $compareMax { $entryWFE4= "{@tempLeftBraceSav[$curIdx]} {@WFEcompArgListSav[$curIdx]} {@tempRightBraceSav[$curIdx]}"; $entryWFE4PreFx= "{@WFEcompArgListSavPreFx[$curIdx]}"; if $entryWFE2 ~~ $entryWFE4 { if $entryWFE4PreFx ~~ '____' { say " | ARG$curIdx: .........NO UPDATES. " if $debug2; } else { say " | ARG$curIdx: .........NO UPDATES: $entryWFE4PreFx" if $debug2; }; } else { say " | ARG$curIdx: {trimBrackets($entryWFE2)}" if $debug2; $input= $OPsav2; $input= @OPstr[1]; @tempStmt[0]= 'com'; $tp1= $input.subst( :g , /^('goTo')\d+$/ , -> $/ { @tempStmt[0]= $0; } ); if @tempStmt[0] ~~ 'goTo' { ## say " | " if $debug2; say " | {'mmmmmmmmmmmmmmmmmmm'} UPDATED ! {'mmmmmmmmmmmmmmm'} WAS:" if $debug2; say " | {trimBrackets($entryWFE4)}" if $debug2; say " | " if $debug2; }; }; } else { say " | ARG$curIdx: {trimBrackets($entryWFE2)}" if $debug2; }; }; $curIdx= 1 + $curIdx; }; $curIdx2= 0; while $curIdx2 < $rewriteArgListElems { @tempLeftBraceSav[$curIdx2]= @tempLeftBrace[$curIdx2]; @tempRightBraceSav[$curIdx2]= @tempRightBrace[$curIdx2]; @WFEcompArgListSav[$curIdx2]= @WFEcompArgList[$curIdx2]; @WFEcompArgListSavPreFx[$curIdx2]= @WFEcompArgListPreFx[$curIdx2]; $curIdx2= 1 + $curIdx2; }; $rewriteArgListElemsSav= $rewriteArgListElems; } else { if $runNum > 1 { if $rewriteArgListElemsSav > $rewriteArgListElems { $compareMax= $rewriteArgListElems; } else { $compareMax= $rewriteArgListElemsSav; }; }; $curIdx= 0; while $curIdx < $rewriteArgListElems { $entryWFE2= "{@tempLeftBrace[$curIdx]} {@WFEcompArgList[$curIdx]} {@tempRightBrace[$curIdx]}"; if $runNum == 1 { say " | ARG$curIdx: {trimBrackets($entryWFE2)}" if $debug2; } else { if $curIdx < $compareMax { $entryWFE4= "{@tempLeftBraceSav[$curIdx]} {@WFEcompArgListSav[$curIdx]} {@tempRightBraceSav[$curIdx]}"; if $entryWFE2 ~~ $entryWFE4 { say " | ARG$curIdx: <--------SAME AS IN ABOVE DESCEND. " if $debug2; } else { say " | ARG$curIdx: {trimBrackets($entryWFE2)}" if $debug2; }; } else { say " | ARG$curIdx: {trimBrackets($entryWFE2)}" if $debug2; }; }; $curIdx= 1 + $curIdx; }; $curIdx2= 0; while $curIdx2 < $rewriteArgListElems { @tempLeftBraceSav[$curIdx2]= @tempLeftBrace[$curIdx2]; @tempRightBraceSav[$curIdx2]= @tempRightBrace[$curIdx2]; @WFEcompArgListSav[$curIdx2]= @WFEcompArgList[$curIdx2]; @WFEcompArgListSavPreFx[$curIdx2]= @WFEcompArgListPreFx[$curIdx2]; $curIdx2= 1 + $curIdx2; }; $rewriteArgListElemsSav= $rewriteArgListElems; }; }; say " " if $debug4; }; $lastRunNum= $runNum; $runNum++; $continue++; if $lastRwcode ~~ $rwcode { if $runNum > 1 { $continue= 0; }; }; }; say "\n\n"; say 'CODES NOW NOT REWRITABLE !'; say "END OF CODES EXECUTION"; };
Standard input is empty
Original Codes:
---------------
jumpTo
<:0:TelService>
[1__CODES
(@@8
( proc :TelService :0 {::: @@3 :CallSession:Stmt1:Stmt2 :::} )
( proc :CallSession :4
: {:::
: : jumpTo
: : ( stepThru1 ( cTerm2 :~2 :~3 [PerEvntActnList] ) <:0:TelService> )
: : [ ~1 ]
: : ( cTerm2 :~2 :~3 [NxtStateMap] )
: :::}
)
( term [cTerm2 :onhook [dialDigit:4] [PerEvntActnList]] [say(concat:hello[,][ ]:World)] )
( term [cTerm2 :offhook :dialDigit6 [PerEvntActnList]] [say(concat:lets[ ]:talk)] )
( term [cTerm2 :talking [dialDigit:8] [PerEvntActnList]] [say(concat:seeya[,][ ]:bye)] )
( term [cTerm2 :onhook [dialDigit:4] [NxtStateMap]] :offhook )
( term [cTerm2 :offhook :dialDigit6 [NxtStateMap]] :talking )
( term [cTerm2 :talking [dialDigit:8] [NxtStateMap]] :disconnect )
) ]
[2__CURSTATE :onhook ]
[3__EVENT [dialDigit:4] ]
:dialDigit6
[dialDigit:8]
Normalized Codes:
-----------------
jumpTo[@@2[0][TelService]][1__CODES(@@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect]))][2__CURSTATE[onhook]][3__EVENT[dialDigit[4]]][dialDigit6][dialDigit[8]]
CODES EXECUTION:
HIGH LEVEL DESCEND-BY-DESCEND VIEW OF RW PROGRESS:
(RECURSIVE LEFTMOST-INNERMOST APPLICATIVE REWRITE, TILL CODES NOT REWRITABLE)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
( STARTING TREE DESCNND #1: )
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 6
zzzzzzzzzzzz1 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz4 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input 1__CODES(@@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect]))
zzzzzzzzzzzz5 curIdx2 2 tp0 ___ input 2__CURSTATE[onhook]
zzzzzzzzzzzz5 curIdx2 3 tp0 ___ input 3__EVENT[dialDigit[4]]
zzzzzzzzzzzz5 curIdx2 4 tp0 ___ input dialDigit6
zzzzzzzzzzzz5 curIdx2 5 tp0 ___ input dialDigit[8]
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #1:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: jumpTo
| ARG0: [ @@2 :0 :TelService ]
| ARG1: [ 1__CODES ( @@8 (proc :TelService :0 {::: @@3 :CallSession :Stmt1 :Stmt2 :::})(proc :CallSession :4 {::: jumpTo(stepThru1 (cTerm2 :~2 :~3 :PerEvntActnList)<:0:TelService>) :~1(cTerm2 :~2 :~3 :NxtStateMap) :::})(term [cTerm2 :onhook[dialDigit :4] :PerEvntActnList][say(concat :hello[,][ ] :World)])(term [cTerm2 :offhook :dialDigit6 :PerEvntActnList][say(concat :lets[ ] :talk)])(term [cTerm2 :talking[dialDigit :8] :PerEvntActnList][say(concat :seeya[,][ ] :bye)])(term [cTerm2 :onhook[dialDigit :4] :NxtStateMap] :offhook)(term [cTerm2 :offhook :dialDigit6 :NxtStateMap] :talking)(term [cTerm2 :talking[dialDigit :8] :NxtStateMap] :disconnect)) ]
| ARG2: [ 2__CURSTATE :onhook ]
| ARG3: [ 3__EVENT [dialDigit :4] ]
| ARG4: [ dialDigit6 ]
| ARG5: [ dialDigit :8 ]
==========================================================================>
( TREE DESCEND #2: )
.mmmmmmm.LEVEL7 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||||| @@2
||||||| :0
||||||| :TelService
||||||| :x0
|||||||
||||||| =============>
||||||| 0
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #2:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: id
| ARG0: ( @@2 :0 :TelService :x1(concat :x(0))( @@2 :0 :TelService :x1) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
| ARG5: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #3: )
.mmmmmmm.LEVEL7 (type NUM w 0 args) NOT REWRITABLE: 0
.mmmmm.LEVEL5 (type OP5 w 2 args) RW SUCCESS:
||||| concat
||||| :x
||||| :0
|||||
||||| ====> x0
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| @@2
||||| :0
||||| :TelService
||||| :x1
|||||
||||| =============>
||||| TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #3:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@2 :0 :TelService :x1 :x0(TelService) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
| ARG5: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #4: )
.mmmmm.LEVEL5 (type OP2 w 0 args) NOT REWRITABLE: TelService
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@2
||| :0
||| :TelService
||| :x1
||| :x0
||| :TelService
|||
||| =============>
||| TelService
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #4:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( TelService :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
| ARG5: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #5: )
zzzzzzzzzzzz0 sr 3 OPvariety OP2 Elems 2
zzzzzzzzzzzz1 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz4 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input x0
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input TelService
.mmm.LEVEL3 (type OP2 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| TelService
||| :x0
||| :TelService
|||
||| =============>
||| @@3 :CallSession :Stmt1 :Stmt2
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #5:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@3 :CallSession :Stmt1 :Stmt2 :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
| ARG5: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #6: )
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@3
||| :CallSession
||| :Stmt1
||| :Stmt2
||| :x0
||| :TelService
|||
||| =============>
||| CallSession
|||
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #6:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( CallSession :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
| ARG5: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #7: )
.mmm.LEVEL3 (type OP2 w 1 args) NOT REWRITABLE:
||| CallSession
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #7:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: [ CallSession :TelService ]
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
| ARG5: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #8: )
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 6
zzzzzzzzzzzz1 tp0 ___ tp1 CallSession WFEcompArgList0 TelService
zzzzzzzzzzzz2 input <:::@@3[CallSession][Stmt1][Stmt2]:::>
zzzzzzzzzzzz3 tempStmt0 @@
zzzzzzzzzzzz4 tp0 TelService tp1 CallSession WFEcompArgList0 TelService
zzzzzzzzzzzz5 curIdx2 0 tp0 TelService input TelService
zzzzzzzzzzzz5 curIdx2 1 tp0 TelService input 1__CODES(@@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect]))
zzzzzzzzzzzz6 curIdx2 1 tp0 TelService GOTOARGNAMES 1__CODES
zzzzzzzzzzzz5 curIdx2 2 tp0 TelService input 2__CURSTATE[onhook]
zzzzzzzzzzzz6 curIdx2 2 tp0 TelService GOTOARGNAMES 2__CURSTATE
zzzzzzzzzzzz5 curIdx2 3 tp0 TelService input 3__EVENT[dialDigit[4]]
zzzzzzzzzzzz6 curIdx2 3 tp0 TelService GOTOARGNAMES 3__EVENT
zzzzzzzzzzzz5 curIdx2 4 tp0 TelService input dialDigit6
zzzzzzzzzzzz5 curIdx2 5 tp0 TelService input dialDigit[8]
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #8:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: CallSession
| ARG0: [ TelService ]
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
| ARG3: .........NO UPDATES.
| ARG4: .........NO UPDATES.
| ARG5: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #9: )
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| cTerm2
||||| :onhook
||||| [dialDigit :4]
||||| :PerEvntActnList
|||||
||||| =============>
||||| say(concat :hello[,][ ] :World)
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #9:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: jumpTo
| ARG0: ( stepThru1 (say(concat :hello[,][ ] :World))<:0:TelService> )
| ARG1: [ @@8 (proc :TelService :0 {::: @@3 :CallSession :Stmt1 :Stmt2 :::})(proc :CallSession :4 {::: jumpTo(stepThru1 (cTerm2 :~2 :~3 :PerEvntActnList)<:0:TelService>) :~1(cTerm2 :~2 :~3 :NxtStateMap) :::})(term [cTerm2 :onhook[dialDigit :4] :PerEvntActnList][say(concat :hello[,][ ] :World)])(term [cTerm2 :offhook :dialDigit6 :PerEvntActnList][say(concat :lets[ ] :talk)])(term [cTerm2 :talking[dialDigit :8] :PerEvntActnList][say(concat :seeya[,][ ] :bye)])(term [cTerm2 :onhook[dialDigit :4] :NxtStateMap] :offhook)(term [cTerm2 :offhook :dialDigit6 :NxtStateMap] :talking)(term [cTerm2 :talking[dialDigit :8] :NxtStateMap] :disconnect) ]
| ARG2: ( cTerm2 :onhook[dialDigit :4] :NxtStateMap )
| ARG3: [ dialDigit6 ]
| ARG4: [ dialDigit :8 ]
==========================================================================>
( TREE DESCEND #10: )
.mmmmmmm.LEVEL7 (type OP5 w 4 args) RW SUCCESS:
||||||| concat
||||||| :hello
||||||| [,]
||||||| [ ]
||||||| :World
|||||||
||||||| ====> hello, World
( ****** LEVEL5 ACTION #1: say ) hello, World
.mmmmm.LEVEL5 (type OP5 w 1 args) RW SUCCESS:
||||| say
||||| [hello, World]
|||||
||||| ====> nil
.mmm.LEVEL3 (type OP5 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| stepThru1
||| :nil
||| <:0:TelService>
|||
||| =============>
||| @@2 :0 :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #10:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: ( @@2 :0 :TelService )
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
| ARG3: .........NO UPDATES.
| ARG4: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #11: )
.mmm.LEVEL3 (type OP5 w 2 args) NOT REWRITABLE:
||| @@2
||| :0
||| :TelService
.mmm.LEVEL3 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| cTerm2
||| :onhook
||| [dialDigit :4]
||| :NxtStateMap
|||
||| =============>
||| offhook
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #11:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: [ @@2 :0 :TelService ]
| ARG1: .........NO UPDATES.
| ARG2: ( offhook )
| ARG3: .........NO UPDATES.
| ARG4: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #12: )
.mmm.LEVEL3 (type OP2 w 0 args) NOT REWRITABLE: offhook
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 5
zzzzzzzzzzzz1 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz4 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input @@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect])
zzzzzzzzzzzz5 curIdx2 2 tp0 ___ input offhook
zzzzzzzzzzzz5 curIdx2 3 tp0 ___ input dialDigit6
zzzzzzzzzzzz5 curIdx2 4 tp0 ___ input dialDigit[8]
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #12:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: .........NO UPDATES.
| ARG1: .........NO UPDATES.
| ARG2: [ offhook ]
| ARG3: .........NO UPDATES.
| ARG4: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #13: )
.mmmmmmm.LEVEL7 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||||| @@2
||||||| :0
||||||| :TelService
||||||| :x0
|||||||
||||||| =============>
||||||| 0
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #13:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: id
| ARG0: ( @@2 :0 :TelService :x1(concat :x(0))( @@2 :0 :TelService :x1) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #14: )
.mmmmmmm.LEVEL7 (type NUM w 0 args) NOT REWRITABLE: 0
.mmmmm.LEVEL5 (type OP5 w 2 args) RW SUCCESS:
||||| concat
||||| :x
||||| :0
|||||
||||| ====> x0
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| @@2
||||| :0
||||| :TelService
||||| :x1
|||||
||||| =============>
||||| TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #14:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@2 :0 :TelService :x1 :x0(TelService) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #15: )
.mmmmm.LEVEL5 (type OP2 w 0 args) NOT REWRITABLE: TelService
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@2
||| :0
||| :TelService
||| :x1
||| :x0
||| :TelService
|||
||| =============>
||| TelService
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #15:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( TelService :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #16: )
zzzzzzzzzzzz0 sr 3 OPvariety OP2 Elems 2
zzzzzzzzzzzz1 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz4 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input x0
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input TelService
.mmm.LEVEL3 (type OP2 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| TelService
||| :x0
||| :TelService
|||
||| =============>
||| @@3 :CallSession :Stmt1 :Stmt2
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #16:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@3 :CallSession :Stmt1 :Stmt2 :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #17: )
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@3
||| :CallSession
||| :Stmt1
||| :Stmt2
||| :x0
||| :TelService
|||
||| =============>
||| CallSession
|||
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #17:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( CallSession :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #18: )
.mmm.LEVEL3 (type OP2 w 1 args) NOT REWRITABLE:
||| CallSession
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #18:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: [ CallSession :TelService ]
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
| ARG4: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #19: )
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 5
zzzzzzzzzzzz1 tp0 ___ tp1 CallSession WFEcompArgList0 TelService
zzzzzzzzzzzz2 input <:::@@3[CallSession][Stmt1][Stmt2]:::>
zzzzzzzzzzzz3 tempStmt0 @@
zzzzzzzzzzzz4 tp0 TelService tp1 CallSession WFEcompArgList0 TelService
zzzzzzzzzzzz5 curIdx2 0 tp0 TelService input TelService
zzzzzzzzzzzz5 curIdx2 1 tp0 TelService input @@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect])
zzzzzzzzzzzz5 curIdx2 2 tp0 TelService input offhook
zzzzzzzzzzzz5 curIdx2 3 tp0 TelService input dialDigit6
zzzzzzzzzzzz5 curIdx2 4 tp0 TelService input dialDigit[8]
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #19:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: CallSession
| ARG0: [ TelService ]
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
| ARG3: .........NO UPDATES.
| ARG4: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #20: )
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| cTerm2
||||| :offhook
||||| :dialDigit6
||||| :PerEvntActnList
|||||
||||| =============>
||||| say(concat :lets[ ] :talk)
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #20:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: jumpTo
| ARG0: ( stepThru1 (say(concat :lets[ ] :talk))<:0:TelService> )
| ARG1: .........NO UPDATES.
| ARG2: ( cTerm2 :offhook :dialDigit6 :NxtStateMap )
| ARG3: [ dialDigit :8 ]
==========================================================================>
( TREE DESCEND #21: )
.mmmmmmm.LEVEL7 (type OP5 w 3 args) RW SUCCESS:
||||||| concat
||||||| :lets
||||||| [ ]
||||||| :talk
|||||||
||||||| ====> lets talk
( ****** LEVEL5 ACTION #2: say ) lets talk
.mmmmm.LEVEL5 (type OP5 w 1 args) RW SUCCESS:
||||| say
||||| [lets talk]
|||||
||||| ====> nil
.mmm.LEVEL3 (type OP5 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| stepThru1
||| :nil
||| <:0:TelService>
|||
||| =============>
||| @@2 :0 :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #21:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: ( @@2 :0 :TelService )
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
| ARG3: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #22: )
.mmm.LEVEL3 (type OP5 w 2 args) NOT REWRITABLE:
||| @@2
||| :0
||| :TelService
.mmm.LEVEL3 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| cTerm2
||| :offhook
||| :dialDigit6
||| :NxtStateMap
|||
||| =============>
||| talking
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #22:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: [ @@2 :0 :TelService ]
| ARG1: .........NO UPDATES.
| ARG2: ( talking )
| ARG3: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #23: )
.mmm.LEVEL3 (type OP2 w 0 args) NOT REWRITABLE: talking
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 4
zzzzzzzzzzzz1 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz4 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input @@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect])
zzzzzzzzzzzz5 curIdx2 2 tp0 ___ input talking
zzzzzzzzzzzz5 curIdx2 3 tp0 ___ input dialDigit[8]
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #23:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: .........NO UPDATES.
| ARG1: .........NO UPDATES.
| ARG2: [ talking ]
| ARG3: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #24: )
.mmmmmmm.LEVEL7 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||||| @@2
||||||| :0
||||||| :TelService
||||||| :x0
|||||||
||||||| =============>
||||||| 0
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #24:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: id
| ARG0: ( @@2 :0 :TelService :x1(concat :x(0))( @@2 :0 :TelService :x1) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #25: )
.mmmmmmm.LEVEL7 (type NUM w 0 args) NOT REWRITABLE: 0
.mmmmm.LEVEL5 (type OP5 w 2 args) RW SUCCESS:
||||| concat
||||| :x
||||| :0
|||||
||||| ====> x0
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| @@2
||||| :0
||||| :TelService
||||| :x1
|||||
||||| =============>
||||| TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #25:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@2 :0 :TelService :x1 :x0(TelService) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #26: )
.mmmmm.LEVEL5 (type OP2 w 0 args) NOT REWRITABLE: TelService
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@2
||| :0
||| :TelService
||| :x1
||| :x0
||| :TelService
|||
||| =============>
||| TelService
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #26:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( TelService :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #27: )
zzzzzzzzzzzz0 sr 3 OPvariety OP2 Elems 2
zzzzzzzzzzzz1 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz4 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input x0
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input TelService
.mmm.LEVEL3 (type OP2 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| TelService
||| :x0
||| :TelService
|||
||| =============>
||| @@3 :CallSession :Stmt1 :Stmt2
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #27:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@3 :CallSession :Stmt1 :Stmt2 :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #28: )
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@3
||| :CallSession
||| :Stmt1
||| :Stmt2
||| :x0
||| :TelService
|||
||| =============>
||| CallSession
|||
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #28:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( CallSession :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #29: )
.mmm.LEVEL3 (type OP2 w 1 args) NOT REWRITABLE:
||| CallSession
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #29:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: [ CallSession :TelService ]
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
| ARG3: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #30: )
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 4
zzzzzzzzzzzz1 tp0 ___ tp1 CallSession WFEcompArgList0 TelService
zzzzzzzzzzzz2 input <:::@@3[CallSession][Stmt1][Stmt2]:::>
zzzzzzzzzzzz3 tempStmt0 @@
zzzzzzzzzzzz4 tp0 TelService tp1 CallSession WFEcompArgList0 TelService
zzzzzzzzzzzz5 curIdx2 0 tp0 TelService input TelService
zzzzzzzzzzzz5 curIdx2 1 tp0 TelService input @@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect])
zzzzzzzzzzzz5 curIdx2 2 tp0 TelService input talking
zzzzzzzzzzzz5 curIdx2 3 tp0 TelService input dialDigit[8]
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #30:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: CallSession
| ARG0: [ TelService ]
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
| ARG3: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #31: )
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| cTerm2
||||| :talking
||||| [dialDigit :8]
||||| :PerEvntActnList
|||||
||||| =============>
||||| say(concat :seeya[,][ ] :bye)
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #31:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: jumpTo
| ARG0: ( stepThru1 (say(concat :seeya[,][ ] :bye))<:0:TelService> )
| ARG1: .........NO UPDATES.
| ARG2: ( cTerm2 :talking[dialDigit :8] :NxtStateMap )
==========================================================================>
( TREE DESCEND #32: )
.mmmmmmm.LEVEL7 (type OP5 w 4 args) RW SUCCESS:
||||||| concat
||||||| :seeya
||||||| [,]
||||||| [ ]
||||||| :bye
|||||||
||||||| ====> seeya, bye
( ****** LEVEL5 ACTION #3: say ) seeya, bye
.mmmmm.LEVEL5 (type OP5 w 1 args) RW SUCCESS:
||||| say
||||| [seeya, bye]
|||||
||||| ====> nil
.mmm.LEVEL3 (type OP5 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| stepThru1
||| :nil
||| <:0:TelService>
|||
||| =============>
||| @@2 :0 :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #32:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: ( @@2 :0 :TelService )
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
==========================================================================>
( TREE DESCEND #33: )
.mmm.LEVEL3 (type OP5 w 2 args) NOT REWRITABLE:
||| @@2
||| :0
||| :TelService
.mmm.LEVEL3 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| cTerm2
||| :talking
||| [dialDigit :8]
||| :NxtStateMap
|||
||| =============>
||| disconnect
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #33:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: [ @@2 :0 :TelService ]
| ARG1: .........NO UPDATES.
| ARG2: ( disconnect )
==========================================================================>
( TREE DESCEND #34: )
.mmm.LEVEL3 (type OP2 w 0 args) NOT REWRITABLE: disconnect
zzzzzzzzzzzz0 sr 1 OPvariety OP2 Elems 3
zzzzzzzzzzzz1 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz4 tp0 ___ tp1 jumpTo WFEcompArgList0 @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input @@2[0][TelService]
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input @@8(proc[TelService][0][<:::@@3[CallSession][Stmt1][Stmt2]:::>])(proc[CallSession][4][<:::jumpTo(stepThru1(cTerm2[~2][~3][PerEvntActnList])[@@2[0][TelService]])[~1](cTerm2[~2][~3][NxtStateMap]):::>])(term[cTerm2[onhook][dialDigit[4]][PerEvntActnList]][say(concat[hello][,][%][World])])(term[cTerm2[offhook][dialDigit6][PerEvntActnList]][say(concat[lets][%][talk])])(term[cTerm2[talking][dialDigit[8]][PerEvntActnList]][say(concat[seeya][,][%][bye])])(term[cTerm2[onhook][dialDigit[4]][NxtStateMap]][offhook])(term[cTerm2[offhook][dialDigit6][NxtStateMap]][talking])(term[cTerm2[talking][dialDigit[8]][NxtStateMap]][disconnect])
zzzzzzzzzzzz5 curIdx2 2 tp0 ___ input disconnect
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #34:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: jumpTo
| ARG0: .........NO UPDATES.
| ARG1: .........NO UPDATES.
| ARG2: [ disconnect ]
==========================================================================>
( TREE DESCEND #35: )
.mmmmmmm.LEVEL7 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||||| @@2
||||||| :0
||||||| :TelService
||||||| :x0
|||||||
||||||| =============>
||||||| 0
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #35:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: id
| ARG0: ( @@2 :0 :TelService :x1(concat :x(0))( @@2 :0 :TelService :x1) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #36: )
.mmmmmmm.LEVEL7 (type NUM w 0 args) NOT REWRITABLE: 0
.mmmmm.LEVEL5 (type OP5 w 2 args) RW SUCCESS:
||||| concat
||||| :x
||||| :0
|||||
||||| ====> x0
.mmmmm.LEVEL5 (type OP5 w 3 args) EXPANDING RW - NEED NEW DESCEND NOW:
||||| @@2
||||| :0
||||| :TelService
||||| :x1
|||||
||||| =============>
||||| TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #36:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@2 :0 :TelService :x1 :x0(TelService) )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #37: )
.mmmmm.LEVEL5 (type OP2 w 0 args) NOT REWRITABLE: TelService
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@2
||| :0
||| :TelService
||| :x1
||| :x0
||| :TelService
|||
||| =============>
||| TelService
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #37:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( TelService :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #38: )
zzzzzzzzzzzz0 sr 3 OPvariety OP2 Elems 2
zzzzzzzzzzzz1 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz4 tp0 ___ tp1 TelService WFEcompArgList0 x0
zzzzzzzzzzzz5 curIdx2 0 tp0 ___ input x0
zzzzzzzzzzzz5 curIdx2 1 tp0 ___ input TelService
.mmm.LEVEL3 (type OP2 w 2 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| TelService
||| :x0
||| :TelService
|||
||| =============>
||| @@3 :CallSession :Stmt1 :Stmt2
|||
||| :x0
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #38:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( @@3 :CallSession :Stmt1 :Stmt2 :x0 :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #39: )
.mmm.LEVEL3 (type OP5 w 5 args) EXPANDING RW - NEED NEW DESCEND NOW:
||| @@3
||| :CallSession
||| :Stmt1
||| :Stmt2
||| :x0
||| :TelService
|||
||| =============>
||| CallSession
|||
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #39:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: ( CallSession :TelService )
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #40: )
.mmm.LEVEL3 (type OP2 w 1 args) NOT REWRITABLE:
||| CallSession
||| :TelService
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #40:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: <--------SAME AS IN ABOVE DESCEND: id
| ARG0: [ CallSession :TelService ]
| ARG1: <--------SAME AS IN ABOVE DESCEND.
| ARG2: <--------SAME AS IN ABOVE DESCEND.
==========================================================================>
( TREE DESCEND #41: )
.m.LEVEL1 AT ENTRY OF OUTERMOST RW ATTEMPT IN CURRENT DESCEND #41:
| """""""""""""""""""""""""""""""""""""""""""""""""""""""
| OP: CallSession
| ARG0: [ TelService ]
| ARG1: .........NO UPDATES.
| ARG2: .........NO UPDATES.
CODES NOW NOT REWRITABLE !
END OF CODES EXECUTION