Annotation of parser3/www/htdocs/index.html, revision 1.159

1.104     paf         1: @USE
1.105     paf         2: /derived.p
1.145     paf         3: /operators.p
1.15      paf         4: 
1.72      paf         5: @auto[filespec]
                      6: $selffilespec[$filespec]
1.63      paf         7: #$form:here
1.131     paf         8: #$request:charset[UTF-8]
                      9: $request:charset[windows-1251]
                     10: $response:charset[windows-1251]
1.112     paf        11: #$response:charset[UTF-8]
1.131     paf        12: #$response:charset[empty]
1.84      paf        13: #$response:content-type[$.value[text/html]$.charset[$response:charset]]
1.15      paf        14: 
1.60      paf        15: #@postprocess[body]
                     16: #<b>$body</b>
                     17: #$result[123]
1.37      paf        18: 
1.15      paf        19: @main[]
1.72      paf        20: #$a(123)
                     21: #^a.format[%.10u]
1.71      paf        22: #$result[111]
1.70      paf        23: #^f[a]
1.133     paf        24: #^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
1.88      paf        25: #      ^int:sql{select news_id from news where news_id=-1}[
1.143     paf        26: #      $.default{2}
1.88      paf        27: #      ]<br>
1.115     paf        28: #    ^hash::sql{bad}
1.88      paf        29: #    ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
1.109     paf        30: #      ^file::load[text;^string:sql{select 'from sql server' }]
1.95      paf        31: #      ^string:sql{select '^^hello[]' }] $ORIGINS(1)
1.96      paf        32: #      ^process{       ^^h[]}
1.97      paf        33: #      ^process{^string:sql{select '1
                     34: #      ^^hello[]' }]   }
1.131     paf        35: #      ^double:sql{select '2*' ^; }
1.133     paf        36: #$card_sequence_expect_no(^double:sql{select 20020909131047 #card_sequence_expect_no from card_sequence})
                     37: #^card_sequence_expect_no.format[%15.f]
                     38: #}
1.49      paf        39: #^eval(2)
1.48      paf        40: #^tcrashlocaljunctionsv2[]
1.49      paf        41: #^tcrashlocaljunctions[]
1.50      paf        42: #^tjunctions[]
1.47      paf        43: #^replacetest[]
1.48      paf        44: #^matchoptionpp[]
1.46      paf        45: #^txdocxnodechild[]
1.44      paf        46: #^tclasses[]
1.43      paf        47: #$math:PI
                     48: #^b:method[]
1.42      paf        49: #^main[]
1.41      paf        50: #^errort[]
1.44      paf        51: #^tselectNumber[]
1.39      paf        52: #$result[hello]
1.36      paf        53: #^invaliddate2[]
                     54: #^process2[]
                     55: #^casehashtext[]
1.35      paf        56: #^subjvaltest[]
                     57: #^tableselect0[]
1.34      paf        58: #^memnotest1[]
1.32      paf        59: #^voidparams[]
1.31      paf        60: #^rolls2[]
1.30      paf        61: #^cacheexpireschanging[]
1.29      paf        62: #^cacheexpiresfixed[]
                     63: #^dateoffsets[]
                     64: #^exceptionTypes[]
1.28      paf        65: #^roll2[]
1.27      paf        66: #^rolls[]
1.25      paf        67: #^exceptions1[]
1.22      paf        68: #^locate_by_expr[]
1.18      paf        69: #^method_junction_params{...}
1.17      paf        70: #^verifyCookie[paf]
1.37      paf        71: #^execlangs[]
1.16      paf        72: #$t[^tobjeresult[]]$t.a
                     73: #^xmlprobs[]
1.15      paf        74: #^doubleprobs[]
                     75: #^math:random(-10)
                     76: #^divnamestop[]
                     77: #^arrayclone[]
                     78: #^operator_tricks[]
                     79: #^xoutputrusattr[]
                     80: #^xdocset1[]
                     81: #^regexp3[]
                     82: #^exec2[]
                     83: #^tlock[]
                     84: #^xmloutattrwithoutvalue[]
                     85: #^precisionProblem[]
                     86: #^xpath[]
                     87: #^ttablesetlang[]
                     88: #^ttime[]
                     89: #^tupper[]
                     90: #^treplace[]
                     91: #^xslt2[]
                     92: #^tcache2[]
                     93: #$ORIGINS(1)
                     94: #$t[^table::set{a b} ^table::set{c d}]
                     95: #^ttaintuntaint[]
                     96: #^tappend2[]
                     97: #^badvsnprintf[]
                     98: #^badoracequoting[]
                     99: #^badconstructors[]
                    100: #^xloadwrongtable[]
                    101: #^xsetwrongtable[]
                    102: #^if($form:test){y}{n}
                    103: #^tablecolumnerror[]
                    104: #^roll[]
                    105: #^tableset[]
                    106: #^math:PI.format{%.30f}
                    107: #^xchildren[]
                    108: #^thashforeach3[]
                    109: #^thashforeach2[]
                    110: #^thashforeach[]
                    111: #^thashdelete[]
                    112: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                    113: #^tappend[]
                    114: #^sappend[]
                    115: #^eval(10\3)<br>
                    116: #^tform[]
                    117: #^formattest[]
                    118: #^filelist[]
                    119: #^connect[mysql://user:pass@host]{ }
                    120: #^безнадёжна_попытка_поправить_непоправимое[]
                    121: #^tcache[]
                    122: #^thashfileexp[]
                    123: #^tcounter[]
                    124: #^tablehash[]
                    125: #j^hashfile[]
                    126: #^formclass[]
                    127: #^hren[]
                    128: #^domedit[]
                    129: #^domxslt[]
                    130: #^lsplit2[]
                    131: #^faceesize[]
                    132: #^imageresize[]
                    133: #^ifassignhash[]
                    134: #^tintdefault[]
                    135: #$response:status[404]
                    136: #^ifpasshash[]
                    137: #^movedir[]
                    138: #^replace[]
                    139: #^set[]
                    140: #^hash[]<hr>
                    141: #$t[^methresult[]] ->$t
                    142: #^terror[]
                    143: #^ssave[]
                    144: #^thash[]
                    145: #^tdef[]
                    146: #^ford[]
                    147: #^tif[]
1.84      paf       148: #^image[]
1.15      paf       149: #^response[]
                    150: #^regexp2[]
                    151: #^ttablerem[]
                    152: #^pcre[]
                    153: #^regexp[]<hr>
                    154: #^mail[]
                    155: #^fori[]
                    156: #^tconnect[]
                    157: #^xslt[]
                    158: #^header[]
1.53      paf       159: #^tablehasht[]
1.54      paf       160: #^datecreatestring[]
1.56      paf       161: #^mssqltypes1[]
                    162: #^badthrows[]
1.57      paf       163: #^xmlspace[]
                    164: #^counter[main.counter]
                    165: #^xpath2[]
                    166: #^callindirect[]
                    167: #^junctionprob[]
1.59      paf       168: #^datecreatestring2[]
                    169: #^tstoredproc[]
                    170: #^tstoredproc2[]
                    171: #^forkeys[]
1.60      paf       172: #^pngsize[]
1.61      paf       173: #^checkList[]
1.63      paf       174: #^datetest[]
1.65      paf       175: #^tserge[]
1.69      paf       176: #^envt[]
1.67      paf       177: #^selectt[]
                    178: #^select2[]
                    179: #^selectSingle2[]
                    180: #^selectString2[]
                    181: #^selectNumber2[]
                    182: #^selectBool2[]
                    183: #^xdoccreate[]
                    184: #^xdoccreatetag[]
1.70      paf       185: #^xdocload[]
1.67      paf       186: #^xdocstring[]
                    187: #^xdocsave[]
1.68      paf       188: #^div[]
                    189: #^datecreatestring3[]
1.73      paf       190: #^tfilespec[]
1.77      paf       191: #^tcrypt[]
1.74      paf       192: #^cryptdocsample[]
1.78      paf       193: #^tnormalize[]
1.83      paf       194: #^xmltransformbyxdoc[]
1.81      paf       195: #^sergestrandef[]
1.83      paf       196: #^tstdin[]
                    197: #^tfind[]
1.86      paf       198: #^mimet[]
1.92      paf       199: #^joinlimit[]
1.89      paf       200: #^tableclonelimit[]
1.91      paf       201: #^transparams[]
                    202: #^sendtests[]
1.93      paf       203: #^wwrapperpass[]
1.95      paf       204: #^badpos[]
1.98      paf       205: #^processtest[]
                    206: #^mail3[]
1.100     paf       207: #^datesaving[]
1.101     paf       208: #^badconstructor[]
1.103     paf       209: #^calendar[]
1.104     paf       210: #^monthdays(8)
                    211: #^xdoctypetest[]
1.105     paf       212: #^xtabletest[]
1.117     paf       213: #^staticstest[]
1.108     paf       214: #^staticstest2[]
1.115     paf       215: #^rbodytest[]
                    216: #^cookie[]
1.116     paf       217: #^cookieexpirestest[]
1.119     paf       218: #^postest[]
1.120     paf       219: #^voidpostest[]
1.122     paf       220: #^badcolumntest[]
1.124     paf       221: #^delimiters[]
1.125     paf       222: #^новый-split[]
1.127     paf       223: #^грязные-cookie[]
                    224: #^html-почта[]
                    225: #^badswitchtest[]
1.128     paf       226: #^okswitchtest[]
1.131     paf       227: #^cgit[]
1.132     paf       228: #^ttransformsep[]
1.133     paf       229: #^calltest[]
1.134     paf       230: #^xpath3[]
1.139     paf       231: #^doubleliterals[]
                    232: #^newxor[]
1.135     paf       233: #^mail2[]
1.139     paf       234: #^exec[]
1.140     paf       235: #^passpost[]
                    236: #^menudelim[]
1.141     paf       237: #^fordelim[]
1.143     paf       238: #^duplicatetable2hashkey[]
1.142     paf       239: #^duplicatehashsqlkey[]
1.145     paf       240: #^longlreplace[]
                    241: #^table2hash_onecolumn[]
1.146     paf       242: #^crossopvars[]
1.148     paf       243: #^three[]
1.149     paf       244: #^badLangAfterCatch[]
1.150     paf       245: #^zeroinstdin[]
1.151     paf       246: #^shifts[]
                    247: #^jspace[]
1.152     paf       248: #^user-foreach-test[]
                    249: #^hashselfmodification[]
                    250: #^emptyTransformResult[]
                    251: #^badxdoccreate[]
1.154     paf       252: #^if(-d "CVS"){y}{n}
1.155     paf       253: #^badjunctioncall[]
1.156     paf       254: #^russianindex[]
                    255: #^virtualtest[]
                    256: #^xml[]
                    257: #^mail4[]
1.157     paf       258: #^voidconstructorpass[]
1.158     paf       259: #^touchittest[]
1.159   ! paf       260: #^$form:CLASS.a=$form:CLASS.a<br>
        !           261: ^cookie2[]
        !           262: 
        !           263: 
1.157     paf       264: @rusage2[]
1.77      paf       265: <hr>
1.74      paf       266: OK
1.157     paf       267: 
                    268: @rusage2[]
                    269: $s[$status:rusage]
                    270: 
                    271: ^s.tv_sec.format[%.0f].^s.tv_usec.format[%06.0f]
                    272: 
1.150     paf       273: 
1.156     paf       274: @voidconstructorpass[]
                    275: $a[$form:a]
                    276: =^form:a.int(1)=
                    277: =^a.int(1)=
                    278: 
                    279: 
1.155     paf       280: @russianindex[]
                    281: #dir with files with russian-lang names
                    282: $where[dir]
                    283: 
                    284: $dir[^file:list[$where;\.txt^$]]
                    285: ^dir.menu{
                    286:        <a href=$where/^untaint[uri]{$dir.name}>$dir.name</a><br>
                    287: }
                    288: 
1.154     paf       289: @badjunctioncall[]
                    290: ^badjunctioncallinside{code}
                    291: 
                    292: @badjunctioncallinside[code]
1.155     paf       293: xx^code[]
1.152     paf       294: 
                    295: @badxdoccreate[]
                    296: $xdoc[^xdoc::create[вася]]
                    297: #$xdoc[^xdoc::create{<?xml version="1.0" encoding="$request:charset"?><doc>вася</doc>}]
                    298: 
                    299: ^xdoc.firstChild.setAttribute[name;значение]
                    300: ^xdoc.string[]
                    301: 
                    302: 
                    303: @emptyTransformResult[]
                    304: $input[^xdoc::create[docBad]]
                    305: $sheet[^xdoc::create{<?xml version="1.0"?> 
                    306: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
                    307:        <xsl:template match="doc">
                    308:                output
                    309:        </xsl:template>
                    310: </xsl:stylesheet>
                    311: }]
                    312: $output[^input.transform[$sheet]]
                    313: $response:body[^output.file[]]
                    314: 
                    315: @hashselfmodification[]
                    316: $hash[
                    317:        $.a[1]
                    318:        $.b[2]
                    319: ]
                    320: ^hash.foreach[key;value]{
                    321: #      $hash.c[1]
                    322:        $hash.a[1]
                    323: }      
                    324: 
                    325: @touchittest[][i]
1.158     paf       326: $i[before]
1.152     paf       327: ^touchit[]
                    328: $i
                    329: 
                    330: 
                    331: @user-foreach-test[][key;value]
                    332: ^user-foreach[key;value]{$key=$value<br>}
                    333: 
1.151     paf       334: @user-foreach[key;value;code]
                    335: ^for[i](1;10){
1.152     paf       336:        $code.$key($i)
                    337:        $code.$value($i*2)
1.151     paf       338:        $code
                    339: }
                    340: 
                    341: @jspace[]
                    342: $a(1)
                    343: ^jspace_call{^eval($a*2)}
                    344: #$a(2)
                    345: #$junction
                    346: 
                    347: @jspace_call[param][a]
                    348: $a[unrelcfgdfgated]
                    349: $junction<br>
                    350: $junction.a(2)
                    351: $junction<br>
                    352: 
1.150     paf       353: @shifts[]
                    354: ^eval(1<<3)<br>
                    355: ^eval(8>>2)<br>
1.151     paf       356: #^if(1=1){y;n}<br>
1.150     paf       357: 
1.149     paf       358: 
                    359: @zeroinstdin[]
                    360: #$f[^file::exec[a.pl;$.stdin[$.shit[]]]]
                    361: $f[^file::exec[a.pl;$.stdin[^file::load[binary;1z2.txt]]]]
                    362: =$f.text=
                    363: ^f.save[binary;1z2.out]
1.148     paf       364: 
                    365: @badLangAfterCatch[]
                    366: ^try{
                    367:        $a[ 
                    368:                тут язык сменился на pass_appended
                    369:                ^throw[user;test]
                    370:                и улетело с не тем  языком
                    371:        ]
                    372: }{
                    373:        $exception.handled(1)
                    374: }
                    375: 1  2
1.145     paf       376: 
                    377: @crossopvars[]
                    378: #^one[]<hr>
                    379: ^two[]<hr>
                    380: 
                    381: @table2hash_onecolumn[]
                    382: $t[^table::create{a
                    383: 1
                    384: 1
                    385: }]
                    386: #^t.hash[a]
                    387: #^t.hash[a;b]
                    388: $h[^t.hash[a][$.distinct(1)]]
                    389: $h.1.a
1.143     paf       390: 
                    391: @longlreplace[]
1.144     paf       392: $str1[  мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла ]
1.143     paf       393: $str2[ела]
                    394: $str[Мама $str1 раму]
                    395: 
1.144     paf       396: ^str.replace[^table::create[nameless]{мыла     $str2}]
1.141     paf       397: 
                    398: @duplicatehashsqlkey[]
                    399: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                    400:        $t[^table::sql{select * from news}]
                    401:        $c[^t.columns[]]
                    402:        ^c.menu{$c.column}[,]
                    403: 
1.142     paf       404:        $h[^hash::sql{select news_type_id, name from news}[$.distinct(1)]]
1.141     paf       405: }
                    406: 
                    407: @duplicatetable2hashkey[]
                    408: $t[^table::create{a    b
                    409: 1      2
                    410: 1      3
                    411: }]
1.142     paf       412: #^t.hash[a]
                    413: #^t.hash[a;b]
                    414: ^t.hash[a][$.distinct[1]]
1.140     paf       415: 
                    416: @menudelim[]
                    417: $t[^table::create{a
                    418: 1
                    419: 2
                    420: 3
                    421: 4
                    422: 5
                    423: }]
                    424: 
                    425: ^t.menu{^if($t.a<3){}{$t.a}}[,]
                    426: 
                    427: @fordelim[]
                    428: ^for[a](0;6){^if($a<3){}{$a}}[,]
                    429: 
1.135     paf       430: 
1.139     paf       431: @passpost[]
                    432: <form method=post name="test" id="test">
                    433: <textarea name="text" cols=20 rows =6>^taint[html][1
                    434: 2
                    435: 
                    436: 3]</textarea><br>
                    437: <input type=submit>
                    438: </form>
                    439: 
                    440: ^if(def $form:text){
                    441:        $a[^file::cgi[a.pl]]
                    442:        $a.text|$a.status|$a.stderr<hr>
                    443: }
                    444: 
                    445: @exec[]
                    446: #$a[^file::exec[a.cmd]]
                    447: $a[^file::cgi[a.cmd]]
                    448: $a.text|$a.status|$a.stderr<hr>
                    449: 
                    450: 
1.137     paf       451: @newxor[]
1.138     paf       452: ^eval(1!|2 #примечание()zzz
                    453: |0x100)<br>
1.137     paf       454: #^eval(1!||2)<br>
                    455: ^if(1!|1){y}{n}
                    456: 
                    457: #@method[$bad]
1.136     paf       458: 
1.135     paf       459: @doubleliterals[]
                    460: #^eval(1e-10)
                    461: ^eval("1e-20")
1.133     paf       462: 
                    463: @xpath3[]
                    464: $constr[^xdoc::create{<?xml version="1.0" encoding="$request:charset" standalone="no"?> <constructor-data><object object_type_id="1" template_id="1" data_process_id="1" is_published="1">проверка</object> <block-list> <block name="date" type="0" label="Дата" is_hide_pub="1" data_type="1"/> <block name="content" type="0" label="Текст" is_hide_pub="1" data_type=""/> </block-list></constructor-data>}]
                    465: $objectData[^constr.selectSingle[/constructor-data/object]]
                    466: $objectData.nodeType<br>
                    467: $objectData.firstChild.nodeValue
                    468: 
                    469: @calltest[]
                    470: ^calltest2[string]
                    471: 
                    472: @calltest2[s]
                    473: $s
1.131     paf       474: 
                    475: @ttransformsep[]
                    476: $input[^xdoc::load[20020909131046.xml]]
                    477: $output[^input.transform[generated.xsl]]
                    478: ^output.string[]
1.127     paf       479: 
                    480: @okswitchtest[]
                    481: $local[local value]
                    482: ^switch[1]{
                    483:        ^case[1]{1code $local}
                    484: }
                    485: 
                    486: @badswitchtest[]
                    487: ^switch[1]{
                    488:        ^badswitchtestcase[]
                    489: }
                    490: @badswitchtestcase[][local]
                    491: $local[local value]
                    492:        ^case[1]{1code $local}
                    493: 
                    494: @badjunction[]
                    495: ^badj1[]
                    496: ^badj2[]
                    497: 
                    498: @html-почта[]
                    499: $переменная[значение]
                    500: ^mail:send[
                    501:        $.from[paf@mail]
                    502:        $.to[paf@mail]
                    503:        $.subject[htmltest1]
                    504:        $.html{тест$переменная=  !}
                    505: ]
                    506: 
1.124     paf       507:                  
                    508: @грязные-cookie[]
1.126     paf       509: $cookie:a[&]
1.125     paf       510: $cookie:a
1.124     paf       511: 
                    512: @новый-split[]
                    513: $abc[a.b.c]
                    514: #$table[^abc.split[.]]
                    515: #$table[^abc.split[.;l]]
                    516: #$table[^abc.split[.;v]]
                    517: $table[^abc.split[.;lv]]
                    518: ^table.menu{$table.piece}[,]
                    519: <hr>
                    520: #$table[^abc.split[.;h]]
                    521: $table[^abc.split[.;hr]]
                    522: $table.0,$table.1,$table.2<br>
1.123     paf       523: 
                    524: @delimiters[]
                    525: $a#1[1]<br>
                    526: $a#1=<br>
                    527: 
1.121     paf       528: 
                    529: @badcolumntest[]
                    530: $table[^table::load[ext.cfg]]
                    531: $table.b
                    532: 
1.120     paf       533: 
                    534: @virtualtest[]
                    535: $derived[^derived::create[derived create actual param]]
                    536: ^derived.test[]
                    537: 
1.119     paf       538: 
                    539: @voidpostest[]
                    540: $s[]
                    541: ^s.pos[$nothing]
1.118     paf       542: 
                    543: @postest[]
                    544: $s[$nothing]
                    545: ^s.pos[$nothing]
1.113     paf       546: 
1.115     paf       547: @cookieexpirestest[]
                    548: #$cookie:exptest[1]
                    549: #$cookie:exptest[$.value[2] $.expires(+1)]
                    550: $response:xxxx[^date::now(+10)]
                    551: $response:yyy[$.value[^date::now(+20)]]
                    552: $response:yyy[$.value[vvv] $.aaaa[^date::now(+20)]]
                    553: 
1.113     paf       554: @rbodytest[]
                    555: $request:body=
                    556: <form method=post>
                    557: <input type=submit name=paf value=123>
                    558: </form>
1.107     paf       559: 
                    560: @staticstest2[]
                    561: ^$derived:derived_var=$derived:derived_var<br>
                    562: ^$derived:a=$derived:a<br>
1.108     paf       563: $derived:a[changed] ^$derived:a=$derived:a<br>
1.107     paf       564: $derived:derived_var[changed] 
                    565: ^$derived:derived_var=$derived:derived_var<br>
                    566: 
1.105     paf       567: @staticstest[]
                    568: $derived[^derived::create[]]
                    569: ^derived.test[]
1.110     paf       570: <hr>
1.106     paf       571: ^$derived.a=$derived.a<br>
                    572: ^$derived.x=$derived.x<br>
1.110     paf       573: <hr>
                    574: ^if($derived is derived){derived is derived}{error: derived is not derived}<br>
                    575: ^if($derived is table){derived is table}{error:derived is not table}<br>
1.111     paf       576: <hr>
                    577: ^^eval(^$derived)=^eval($derived)<br>
                    578: ^^if(^$derived)=^if($derived){y}{n}<br>
1.106     paf       579: 
1.105     paf       580: 
1.104     paf       581: @xdoctypetest[]
                    582: $xdoc[^xdoc::create[x]]
                    583: ^if($xdoc is xdoc){y}{n}
                    584: 
                    585: @xtabletest[]
                    586: $xtableo[^xtable::create[]]
                    587: ^if($xtableo is table){y}{n}
1.105     paf       588: #^xtableo.columns[]
1.100     paf       589: 
1.103     paf       590: @monthdays[month]
                    591: $from[^date::create(2000;$month;1)]
                    592: $to[^date::create($from)] ^to.roll[month](+1)
                    593: $result($to-$from)
                    594: 
1.100     paf       595: @badconstructor[]
                    596: ^date::now[]
1.99      paf       597: 
                    598: @datesaving[]
                    599: $now[^date::now[]]
                    600: $now.daylightsaving<br>
                    601: $now.yearday<br>
                    602: #
                    603: $date[^date::create(2002;1;3)]
                    604: $date.daylightsaving<br>
                    605: $date.yearday
1.97      paf       606: 
1.98      paf       607: @mail4[]
                    608: ^mail:send[
                    609:        $.from[paf@mail.design.ru]
                    610:        $.to[paf@mail.design.ru]
1.156     paf       611:        $.subject[^taint[uri][москва=E0_+ ]=2]
1.98      paf       612:        $.text[^taint[uri][москва]=]
                    613:        $.html{<a href=http://there.ru/?city=^taint[uri][Москва]>link</a>}
                    614: ]
1.97      paf       615: @processtest[]
                    616:     $f[^file::load[text;piece.p]]      ^process{$f.text}
                    617:        $ORIGINS(1)
1.93      paf       618: 
                    619: 
                    620: @badpos[]
                    621: $s[123]
1.94      paf       622: ^s.mid(0;2)
1.92      paf       623: 
                    624: @wwrapperpass[]
                    625: $h[^hash::create[]]
                    626: $h.a(1)
                    627: ^my_method[^if(1){$h}]
                    628: работает. так и должно быть?
                    629: 
                    630: @my_method[p]
                    631: ^p._count[]
                    632: 
1.88      paf       633: 
                    634: @tableclonelimit[]
                    635: $source[^table::create{a
                    636: aa
                    637: bb
                    638: cc}]
                    639: ^source.offset(1)
                    640: #$dest[^table::create[$source]]
                    641: $dest[^table::create[$source;$.offset(2)]]
                    642: $dest[^table::create[$source;$.limit(2)]]
                    643: $dest[^table::create[$source;$.offset(1)$.limit(1)]]
                    644: $dest[^table::create[$source;$.offset(1)$.limit(2)]]
                    645: $dest[^table::create[$source;$.offset[cur]$.limit(2)]]
                    646: 
                    647: ^dest.menu{$dest.a}[,]<br>
                    648: 
                    649: @joinlimit[]
                    650: $source[^table::create{a
                    651: aa
                    652: bb
                    653: cc}]
                    654: ^source.offset(2)
                    655: $dest[^table::create{a
                    656: xx
                    657: }]
                    658: #^dest.join[$source]
                    659: #^dest.join[$source;$.offset(2)]
                    660: #^dest.join[$source;$.limit(2)]
                    661: #^dest.join[$source;$.offset(1)$.limit(1)]
                    662: #^dest.join[$source;$.offset(1)$.limit(2)]
1.91      paf       663: #^dest.join[$source;$.offset[cur]$.limit(1)]
                    664: ^dest.join[$source;$.limit(0)]
1.88      paf       665: 
                    666: ^dest.menu{$dest.a}[,]<br>
1.86      paf       667: 
                    668: @cgit[]
                    669: $f[^file::cgi[showenv.cmd]]
                    670: $f.HELLO=<br>
                    671: $f.CONTENT-TYPE=<br>
                    672: $f.content-type=<br>
                    673: 
1.83      paf       674: 
1.84      paf       675: @mimet[]
1.85      paf       676: $f[^file::stat[a.GIF]]
                    677: $f.content-type
1.84      paf       678: 
                    679: 
1.83      paf       680: @tfind[]
                    681: ^file:find[index.html]
                    682: 
                    683: @tstdin[]
                    684: $f[^file::exec[test.pl;$.stdin[проверка stdin потока]]]
                    685: <pre>$f.text</pre>
1.80      paf       686: 
                    687: @sergestrandef[]
                    688: $sQuantity[ ]
                    689: ^sQuantity.int(10)
1.78      paf       690: 
                    691: @xmltransformbyxdoc[]
                    692: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    693: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    694: <people>
                    695:        <man id="1" имя="word слово">
                    696:                <name>1  2</name>
                    697:        </man>
                    698: </people>
                    699: }}]
                    700: $sheet[^xdoc::create{<?xml version="1.0"?> 
1.79      paf       701: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                    702: 
                    703: >
1.78      paf       704: <!--<xsl:output doctype-public ="-//W3C//DTD XHTML" indent="yes"/>-->
                    705: 
1.79      paf       706:        <!--<xsl:import href="http://localhost/html.xsl"/>-->
                    707:        <xsl:import href="html.xsl"/>
                    708: 
1.78      paf       709: <xsl:param name="param1">defparam1</xsl:param>
                    710: <xsl:param name="param2">defparam2</xsl:param>
1.79      paf       711: 
1.78      paf       712: 
                    713:        <xsl:template match="doc">
                    714:                param1=<xsl:value-of select="^$param1"/><br/>
                    715:                param2=<xsl:value-of select="^$param2"/><br/>
                    716: 
                    717:                test return <something background=""/>
                    718:        </xsl:template>
                    719: 
                    720:        <xsl:template name="test">
1.81      paf       721:                test return3
1.78      paf       722:        </xsl:template>
                    723: 
                    724:   <xsl:template match="people">
                    725:      <html>
1.155     paf       726:      <head>
                    727: <link type='text/xml' rel='alternate' href='/Default.vsdisco'/>
                    728: z</head>
1.78      paf       729:                para1=<xsl:copy-of select="^$param1"/>
                    730:        <xsl:apply-templates/>
                    731:        <hr/>
                    732:        <xsl:call-template name="test"/>
                    733:      </html>   
                    734:   </xsl:template>
                    735: 
                    736:   <xsl:template match="name">
                    737:     <b><xsl:value-of select="."/></b>
                    738:   </xsl:template>
                    739: </xsl:stylesheet>
                    740: }]
                    741: 
                    742: 
                    743: $xdoc[^xdoc.transform[$sheet]]
                    744: $string[^xdoc.string[$.method[html]]]
                    745: ^string.save[a]
                    746: ^untaint[html]{$string}
                    747: 
                    748: 
1.77      paf       749: 
                    750: @tnormalize[]
                    751: #s состоит из 1000 фрагментов
                    752: $s[^for[i](0;999){фрагмент }]
                    753: #это займет много ресурсов
                    754: ^s.match[фраг][g]{перга}
                    755: #это займет меньше ресурсов
                    756: #$normalized[^s.normalize[]]
                    757: #^normalized.match[фраг][g]{перга}
1.74      paf       758: 
                    759: @sendtests[]
1.89      paf       760: ^text[]
1.74      paf       761: #^html[]
                    762: #^text-n-html[]
                    763: #^file[]
                    764: #^text-n-file[]
1.89      paf       765: #^text-n-html-n-file[]
1.74      paf       766: #^backwardcomp[]
                    767: 
                    768: @backwardcomp[]
                    769: ^mail:send[
                    770:        $.from[paf]
                    771:        $.to[paf]
                    772:        $.body[this is text value]
                    773: ]
                    774: 
                    775: @text[]
                    776: ^mail:send[
                    777:        $.from[paf]
1.90      paf       778:        $.to[paf]
1.74      paf       779:        $.text[
                    780:                $.value[this is text value]
                    781:        ]
                    782: ]
                    783: 
                    784: @html[]
                    785: ^mail:send[
                    786:        $.from[paf]
                    787:        $.to[paf]
                    788:        $.html{this is <b>html</b> value ^taint[<] 10}
                    789: ]
                    790: 
                    791: @text-n-html[]
                    792: ^mail:send[
                    793:        $.from[paf]
                    794:        $.to[paf]
                    795:        $.text[
                    796:                $.value[this is text value]
                    797:        ]
                    798:        $.html[
                    799:        $.value{this is <b>html</b> value ^taint[<] 10}
                    800:        ]
                    801: ]
                    802: 
                    803: @file[]
                    804: ^mail:send[
                    805:        $.from[paf]
                    806:        $.to[paf]
                    807:        $.file[^file::load[binary;image.jpg]]
                    808: ]
                    809: 
                    810: @text-n-file[]
                    811: ^mail:send[
                    812:        $.from[paf]
                    813:        $.to[paf]
                    814:        $.text[
                    815:                $.value[this is text value]
                    816:        ]
                    817:        $.file[^file::load[binary;image.jpg]]
                    818: ]
                    819: 
                    820: @text-n-html-n-file[]
                    821: ^mail:send[
                    822:        $.from[paf]
                    823:        $.to[paf]
                    824:        $.text[
                    825:                $.value[this is text value]
                    826:        ]
                    827:        $.html[
                    828:        $.COntent-type[$.value[text/html]$.charset[windows-1251xx]]
                    829:        $.value{this is <b>html</b> value ^taint[<] 10}
                    830:        ]
                    831:        $.file[^file::load[binary;image.jpg]]
                    832: ]
                    833: 
                    834: 
                    835: 
                    836: @md5salt[]
                    837: 1234
                    838: 
                    839: @cryptdocsample[]
                    840: $users[^table::create{name     password
                    841: alice  ***
                    842: bob    ***
                    843: }]
                    844: 
                    845: $htpasswd[^table::create[nameless]{}]
                    846: ^users.menu{
                    847:        ^htpasswd.append{$users.name:^math:crypt[$users.password;^$apr1^$^md5salt[]]}
                    848: }
                    849: 
                    850: ^htpasswd.save[nameless;.htpasswd-parser-test]
                    851: 
1.73      paf       852: 
                    853: @tcrypt[]
1.76      paf       854: #^math:crypt[123;^$apr1^$1234567890abcdef]<br>
                    855: ^math:crypt[123;^$apr1^$]<br>
1.72      paf       856: 
                    857: @tfilespec[]
                    858: src=$selffilespec<br>
                    859: dirname=^file:dirname[$selffilespec]<br>
                    860: basename=^file:basename[$selffilespec]<br>
                    861: justname=^file:justname[$selffilespec]<br>
                    862: justext=^file:justext[$selffilespec]<br>
1.68      paf       863: 
                    864: @datecreatestring3[]
                    865: $new_after[^date::now(-3)]
                    866: $articles[^table::create{id    title   last_update
                    867: 1      привет  2002-07-03}]
                    868: ^articles.menu{
                    869:     $last_update[^date::create[$articles.last_update]]
                    870:     <a href=${articles.id}.html>$articles.title</a>
                    871:     ^if($last_update > $new_after){новая}
                    872:     <br>
                    873: }
1.67      paf       874: 
                    875: @div[]
                    876: $var(5)
                    877: ^var.inc(7)
                    878: ^var.dec(3)
                    879: ^var.div(4)
                    880: ^var.mul(2)
                    881: $var
                    882: 
                    883: 
                    884: @xdocsave[]
                    885: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    886: <document>
                    887: строка1<br/>
                    888: строка2<br/>
                    889: </document>}]
                    890: ^document.save[test.xml]
                    891: 
                    892: @xdocstring[]
                    893: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    894: <document>
                    895: строка1<br/>
                    896: строка2<br/>
                    897: </document>}]
                    898: ^document.string[
                    899:     $.method[html]
                    900: ]
                    901: 
                    902: 
                    903: @xdocload[]
                    904: $document[^xdoc::load[article.xml]]
                    905: $response:body[^document.file[$.media-type[text/xml]]]
                    906: 
                    907: 
                    908: @xdoccreatetag[]
                    909: $document[^xdoc::create[document]]
                    910: $paraNode[^document.createElement[para]]
                    911: $dummy[^document.documentElement.appendChild[$paraNode]]
                    912: $response:body[^document.file[$.media-type[text/xml]]]
                    913: 
                    914: 
                    915: @xdoccreate[]
                    916: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    917: <document>
                    918: текст
                    919: </document>}]
                    920: $response:body[^document.file[$.media-type[text/xml]]]
                    921: 
                    922: @selectBool2[]
                    923: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    924: <t attr="привет" n="123"/>}]
                    925: ^if(^d.selectBool[/t/@n > 10]){
                    926:     /t/@n больше 10
                    927: }{
                    928:     не больше
                    929: }
                    930: 
                    931: 
                    932: @selectNumber2[]
                    933: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    934: <t attr="привет" n="123"/>}]
                    935: ^d.selectNumber[number(/t/@n)+1]<br>
                    936: ^d.selectNumber[2*2]<br>
                    937: 
                    938: 
                    939: @selectString2[]
                    940: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    941: <t attr="привет" n="123"/>}]
                    942: # результат=привет
                    943: ^d.selectString[string(t/@attr)]
                    944: 
                    945: 
                    946: @selectSingle2[]
                    947: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    948: <t attr="привет" n="123"/>}]
                    949: # результат=один элемент "t"
                    950: $element[^d.selectSingle[t]]
                    951: # результат=2 (количество атрибутов <t>)
                    952: Количество атрибутов: ^element.attributes._count[]<br>
                    953: # результат=не существует (нет <x>)
                    954: ^if(^d.select[x]){
                    955:     x существует
                    956: }{
                    957:     x не существует
                    958: }
                    959: 
                    960: @select2[]
                    961: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                    962: # результат: список из одного элемента "t"
                    963: $list[^d.select[t]]
                    964: # результат: 2 = количество атрибутов <t>
                    965: ^list.0.attributes._count[]<br>
                    966: ^for[i](0;$list-1){
                    967:     $attr[$list.$i]
                    968:     $attr.nodeName = $attr.nodeType<br>
                    969: }
                    970: 
                    971: 
                    972: @selectt[]
                    973: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                    974: $list[^d.select[t]]
                    975: ^list.0.attributes._count[]
1.65      paf       976: 
                    977: @envt[]
1.66      paf       978: $f[^file::exec[showenv.cmd;
                    979:        $.bad[value]
                    980:        $.CGI_good[value]
                    981: ]]
1.65      paf       982: $f.status<br>
                    983: $f.stderr<br>
                    984: <pre>$f.text</pre>
                    985: 
1.63      paf       986: 
                    987: @tserge[]
1.64      paf       988: ^if(" 09 "){y}
1.61      paf       989: 
                    990: @datetest[]
                    991:        $f[^file::stat[some.zip]]
                    992: Размер в байтах: $f.size<br>
                    993: Год создания: $f.cdate.year<br>
                    994: $now[^date::now[]]
                    995: $DAYS_CONSIDERED_NEW(3)
                    996: Статус: ^if($f.mdate >= $now-$DAYS_CONSIDERED_NEW){новый;старый}
                    997: 
1.60      paf       998: 
                    999: @checkList[]
                   1000: ...^oneOf[a;a,b,c]...<br>
                   1001: #...^oneOf[a;ax,b,c]...<br>
                   1002: ...^oneWord[word]...<br>
                   1003: #...^oneWord[wo rd]...<br>
                   1004: 
                   1005: 
                   1006: @oneOf[s;list][t] выдаёт строку, если строка она есть в списке(разделенном запятыми)
                   1007: $t[^list.lsplit[,]]
                   1008: ^if(!^t.locate[piece;$s]){^throw[user;$s;unknown]}
                   1009: $result[$s]
                   1010: 
                   1011: @oneWord[s]
                   1012: ^if(^s.match[\W]){^throw[user.data;$s;not word]}{$s}
1.59      paf      1013: 
                   1014: @pngsize[]
                   1015: $i[^image::measure[test.png]]
                   1016: ^i.html[]
                   1017: 
                   1018: 
                   1019: @forkeys[]
                   1020: $text[^form:fields.foreach[key;val]{$key=$val
                   1021: }]
                   1022: ^text.save[ttt.txt]
                   1023: =$text=
                   1024: 
                   1025: 
                   1026: @tstoredproc2[]
                   1027: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                   1028:        ^void:sql{exec pafvoid}
                   1029: }
                   1030: 
                   1031: @tstoredproc[]
                   1032: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                   1033:        $t[^table::sql{exec pafproc}]
                   1034: #      $t[^table::sql{{call pafproc}}]
                   1035:        $c[^t.columns[]]
                   1036:        ^c.menu{$c.column}[<br>]
                   1037: }
1.57      paf      1038: 
                   1039: @datecreatestring2[]
1.58      paf      1040: <table border=1>
                   1041: ^datecreatestring2show[2000]
                   1042: ^datecreatestring2show[2000-02]
1.59      paf      1043: ^datecreatestring2show[2000-2-03]
1.58      paf      1044: ^datecreatestring2show[2000-02-03 15]
                   1045: ^datecreatestring2show[2000-02-03 15:30] 
                   1046: ^datecreatestring2show[2000-02-03 15:30:04] 
                   1047: ^datecreatestring2show[2000-02-03 15:30:04 hren] 
                   1048: ^datecreatestring2show[15:30] 
                   1049: ^datecreatestring2show[15:30:05] 
                   1050: ^datecreatestring2show[15:30:05 hren] 
                   1051: </table>
                   1052: 
                   1053: @datecreatestring2show[s]
                   1054: $date[^date::create[$s]]
                   1055: <tr>
                   1056: <td>$s</td><td align=right>^date.sql-string[]</td>
                   1057: </tr>
                   1058: 
1.57      paf      1059: 
                   1060: @junctionprob[][l]
                   1061: $l[123]
                   1062: $a{$l}
                   1063: ^junctionprobnested[$a]
                   1064: @junctionprobnested[p]
                   1065: $p
                   1066: 
                   1067: 
                   1068: @callindirecttarget[]
                   1069: callindirecttarget called
                   1070: @callindirect[]
                   1071: $f[$callindirecttarget]
                   1072: ^f[]
                   1073: 
                   1074: @xpath2[]
                   1075: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
                   1076: <doc>
                   1077: <field-list>
                   1078: <field name="aa"/>
                   1079: <field name="bb"/>
                   1080: </field-list>
                   1081: </doc>
                   1082: }]
                   1083: 
                   1084: #^xdoc.string[]
                   1085: 
                   1086: $fieldList[^xdoc.selectSingle[/doc/field-list]]
                   1087: #^fieldList.childNodes._count[]
                   1088: $fields[^fieldList.select[field]]
                   1089: #^fields._count[]
                   1090: ^fields.foreach[k;node]{
                   1091:        $node.nodeName<br>
                   1092: }
                   1093: @counter[filespec][f;s]
                   1094: ^file:lock[$filespec]{
                   1095:        $f[^file::load[text;$filespec]]
                   1096:        $s[^eval($f.text+1)]
                   1097:        ^s.save[$filespec]      
                   1098: }
                   1099: $s
1.56      paf      1100: 
                   1101: @xmlspace[]
                   1102: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                   1103: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1104: <people>
                   1105:        <man id="1" имя="word слово">
                   1106:                <name>1  2</name>
                   1107:        </man>
                   1108: </people>
                   1109: }}]
                   1110: $xdoc[^xdoc.transform[global.xsl]]
                   1111: $string[^xdoc.string[$.method[html]]]
                   1112: ^string.save[a]
                   1113: ^untaint[html]{$string}
                   1114: 
                   1115: @badthrows[]
                   1116: #^throw[a;b;]
                   1117: ^throw[a;]
1.54      paf      1118: 
                   1119: @mssqltypes1[]
                   1120: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
1.55      paf      1121: #    ^string:sql{select { ts '1998-05-02 01:23:56.123' }}
                   1122: #    ^string:sql{select CAST({ ts '1998-05-02 01:23:56.123' }AS smalldatetime)}
                   1123: #      ^string:sql{select CAST({ts '2002-04-28 00:00:00.000'} AS smalldatetime)}
                   1124:        $t[^table::sql{select a from paf}]
                   1125:        ^t.count[]
1.54      paf      1126: }
1.51      paf      1127: 
1.53      paf      1128: @datecreatestring[]
1.54      paf      1129: $d[^date::create[2002-04-33 01:03:04]]
1.53      paf      1130: ^d.sql-string[]
1.52      paf      1131: 
                   1132: @method[hash]
                   1133: $hash.key
                   1134: @mainZ[]
                   1135: ^method[
                   1136:     $.key{code}
                   1137: ]
                   1138: 
1.51      paf      1139: @tablehasht[]
                   1140: $t[^table::create{p
                   1141: 1
                   1142: 3
                   1143: 2
                   1144: 4}]
                   1145: 
                   1146: $h[^t.hash[p]]
                   1147: 
                   1148: =^h._count[]=
                   1149: 
                   1150: 
                   1151: @sqldefaults[]
                   1152: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                   1153:        ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
                   1154:     ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
                   1155: }
1.60      paf      1156: =======
                   1157: <hr>
                   1158: OK
                   1159: >>>>>>> 1.50
1.48      paf      1160: 
                   1161: @tcrashlocaljunctionsv2[]
                   1162: $a[
                   1163:        $b{  $c[1] }
                   1164: ]
                   1165: $b
                   1166: $c
                   1167: 
                   1168: @tcrashlocaljunctions[]
                   1169: $var[aaa]
                   1170: ^if(1){
                   1171: ^tcrashlocaljunctions1[]
                   1172: }
                   1173: 
                   1174: $j
                   1175: 
1.49      paf      1176: @tcrashlocaljunctions1[][var]
                   1177: $var[varvalue]
1.48      paf      1178:        $j{
                   1179:                $var
                   1180:        }
1.49      paf      1181: $j
1.48      paf      1182: 
                   1183: @tjunctions[][tl]
                   1184: $t[^t::create[]]
                   1185: ^tjunctionsi[]
                   1186: 
                   1187: @tjunctionsi[][tl]
                   1188: $tl[12345]
                   1189: ^t.tjunctionsm[
                   1190:        $.key{
                   1191:                $tl
                   1192:        }
                   1193: ]
1.46      paf      1194: 
1.47      paf      1195: @replacetest[]
                   1196: $b[b]
                   1197: $s[
                   1198: aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1199: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1200: ]
                   1201: ^s.replace[^table::create{from to
                   1202: ba     !_}]
                   1203: 
                   1204: 
1.46      paf      1205: @matchoptionpp[]
1.47      paf      1206: #$ORIGINS(1)
1.46      paf      1207: $s[
                   1208: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.47      paf      1209: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1210: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1211: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1212: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1213: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1214: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1215: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1216: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1217: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46      paf      1218: ]
                   1219: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
                   1220: 
1.44      paf      1221: 
                   1222: @txdocxnodechild[]
                   1223: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
                   1224: $xdoc.nodeName
                   1225: ^xdoc.selectNumber[2*2]
1.45      paf      1226: $xdoc:ELEMENT_NODE
1.44      paf      1227: 
                   1228: 
                   1229: @tclasses[]
                   1230: $t[^t::create[]]
                   1231: ^t.method[]
                   1232: <hr>
                   1233: ^t.base_method[]
                   1234: 
1.40      paf      1235: 
                   1236: @errort[]
1.42      paf      1237: ^xdoc::create[a]
1.40      paf      1238: #^throw[user;here;this]
                   1239: 
                   1240: @tselectNumber[]
                   1241: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
                   1242: ^d.selectString[string(d/@attr)]<br>
                   1243: ^d.selectNumber[2*2]<br>
                   1244: ^d.selectNumber[number(/d/@n)+1]<br>
                   1245: 
1.34      paf      1246: 
1.36      paf      1247: @invaliddate2[]
                   1248: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
                   1249: 
                   1250: @process2[]
                   1251: ^^process{
                   1252:        ^process{
                   1253:                ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
                   1254:        }
                   1255: }
                   1256: 
1.35      paf      1257: @casehashtext[]
                   1258: $tt[1]
                   1259: $tmp[
                   1260:         ^switch[$tt]{
                   1261:                 ^case[1]{
                   1262:                         $.aaa[123]
                   1263:                 }
                   1264:                 ^case[DEFAULT]{
                   1265:                         $.bbb[456]
                   1266:                 }
                   1267:         }
1.36      paf      1268:         shit!
1.35      paf      1269: ]
1.36      paf      1270: #$tmp
1.35      paf      1271: $tmp.aaa
                   1272: 
                   1273: @subjvaltest[]
                   1274: $a12[val]
                   1275: $b[12]
                   1276: $a$b
                   1277: 
1.34      paf      1278: @tableselect0[]
                   1279: $person[^table::create{name    height
                   1280: paf    1.77
                   1281: шохин  2.07
                   1282: moko   1.77
                   1283: }]
                   1284: $nottoohigh[^person.select($person.height<2)]
                   1285: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32      paf      1286: 
                   1287: @transparams[]
                   1288: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
                   1289: $odoc[^idoc.transform[global.xsl;
                   1290:        $.param1['1']
                   1291:        $.param2['2']
                   1292: ]]
                   1293: <pre>^taint[^odoc.string[$.method[html]]]
                   1294: 
                   1295: @memnotest1[]
                   1296: ^for[i](0;4000){
                   1297: 
                   1298:  $xxxx[$i]
                   1299:  $xxxx
                   1300: 
                   1301: }
                   1302: 
                   1303: @memnotest1notes[]
                   1304: одна итерация цикла:
                   1305: [Mon Apr  8 20:12:02 2002] execution-------------------------|
1.35      paf      1306: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32      paf      1307: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                   1308: [Mon Apr  8 20:12:02 2002]  "|| "
                   1309: [Mon Apr  8 20:12:02 2002] 12:WITH_ROOT
                   1310: [Mon Apr  8 20:12:02 2002] 13:VALUE
                   1311: [Mon Apr  8 20:12:02 2002]  "xxxx" string
1.35      paf      1312: [Mon Apr  8 20:12:02 2002] 14:CREATE_EWPOOL'469377+=24 wcodeframe -> 0 !optimize[1]''469401+=49 string -> 41 !optimize[7]'
1.32      paf      1313: [Mon Apr  8 20:12:02 2002] 16:WITH_READ
                   1314: [Mon Apr  8 20:12:02 2002] 17:VALUE
                   1315: [Mon Apr  8 20:12:02 2002]  "i" string
                   1316: [Mon Apr  8 20:12:02 2002] 18:GET_ELEMENT
1.35      paf      1317: [Mon Apr  8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
                   1318: [Mon Apr  8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32      paf      1319: [Mon Apr  8 20:12:02 2002] 15:CONSTRUCT_VALUE
                   1320: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                   1321: [Mon Apr  8 20:12:02 2002]  "| "
                   1322: [Mon Apr  8 20:12:02 2002] 12:WITH_READ
                   1323: [Mon Apr  8 20:12:02 2002] 13:VALUE
                   1324: [Mon Apr  8 20:12:02 2002]  "xxxx" string
                   1325: [Mon Apr  8 20:12:02 2002] 14:GET_ELEMENT
                   1326: [Mon Apr  8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
                   1327: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
1.35      paf      1328: [Mon Apr  8 20:12:02 2002]  "||"'469617+=24 VString -> 0 !optimize[6]'
1.32      paf      1329: [Mon Apr  8 20:12:02 2002] <-ja returned
                   1330: [Mon Apr  8 20:12:02 2002] ja->
                   1331: 
                   1332: 201/328=0.612804878049 %%optimized
                   1333: 
                   1334: 1.
                   1335: CREATE_*POOL
                   1336:     сделать
                   1337: *POOL_POOLED+CODE
                   1338:     где
                   1339:         wwrapper
                   1340:         и(возможно) wcodeframe
                   1341:         +string
                   1342:         стековая переменная
                   1343: 
                   1344: 2.
                   1345: избавиться от обёртки при возврате результата process [см. тело _for]
                   1346: 
                   1347: 3.
                   1348: сделать callback для process, чтобы вынести invariants из _for & co.
                   1349: 
                   1350: 4.
                   1351:  @todo склеить get_element и write_value (при вставлении? write_value)
                   1352: 
                   1353: 5.
                   1354: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
                   1355: обёртка сразу выбрасывается = не нужна]
                   1356: 
                   1357: 6.
                   1358: process вариант получить именно string, без VString обёртки [часто обёртка
                   1359: сразу выбрасывается = не нужна]
                   1360: 
                   1361: 7.
                   1362: string head, убить 8 байт неправильной link
1.31      paf      1363: 
                   1364: @voidparams[]
                   1365: ^voidparamsm[$form:field]
                   1366: 
                   1367: @voidparamsm[p]
                   1368: ^p.int(123)
1.29      paf      1369: 
1.30      paf      1370: @rolls2[]
                   1371: $now[^date::now[]]
                   1372: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
                   1373: ^for[i](1;12){
                   1374:        ^d.roll[month](-1) ^d.sql-string[]<br>
                   1375: }
                   1376: 
1.29      paf      1377: @cacheexpireschanging[]
                   1378: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
                   1379:     ^cache[^date::now(+4/24/60/60)]
                   1380: #    ^cache(2)
1.30      paf      1381: #    ^cache(0)
1.29      paf      1382:        ^math:random(100)
                   1383: }
                   1384: 
                   1385: 
                   1386: 
                   1387: @cacheexpiresfixed[]
                   1388: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
                   1389:        ^math:random(100)
                   1390: }
                   1391: 
                   1392: @dateoffsets[]
                   1393: $d[^date::create(^date::now[]+1/24/60)]
                   1394: #$d[^date::now(+1/24/60)]
                   1395: ^d.sql-string[]
                   1396: #$d
1.26      paf      1397: 
1.28      paf      1398: @exceptionTypes[]
                   1399: #    parser.compile       ^test[}                компиляция (непарная скобка, ...)
                   1400: #    parser.runtime       ^if(0).                параметры (больше/меньше, чем нужно, не тех типов, ...)
                   1401: #    number.zerodivision  ^eval(1/0) ^eval(1%0)
                   1402: #    number.format        ^eval(abc*5)
                   1403: #    file.missing         ^file:delete[delme]                       not found
                   1404: #    file.access          ^table::load[.]                       no rights
                   1405: #    image.format         ^image::measure[index.html]                        not gif/jpg
                   1406: #    sql.connect          ^connect[mysql://baduser:pass@host/db]{}                       not found/timeout
                   1407: #    sql.execute          ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}}                       syntax error
                   1408: #    xml                  ^xdoc::create{<forgot?>}                       any error in xml/xslt libs
                   1409: #    smtp.connect                                not found/timeout
                   1410: #    smtp.execute                                communication error
                   1411: 
1.26      paf      1412: @roll2[]
                   1413: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27      paf      1414: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26      paf      1415: 
1.25      paf      1416: 
                   1417: @rolls[]
                   1418: $d[^date::create(2002;4;4)]
                   1419: ^d.sql-string[]<br>
                   1420: ^for[i](1;7){
                   1421: ^d.roll[day](-1)
                   1422: ^d.sql-string[]<br>
                   1423: }
                   1424: <hr>
                   1425: $d[^date::create(2002;3;28)]
                   1426: ^d.sql-string[]<br>
                   1427: ^for[i](1;7){
                   1428: ^d.roll[day](+1)
                   1429: ^d.sql-string[]<br>
                   1430: }
                   1431: <hr>
                   1432: $d[^date::create(2002;12;3)]
                   1433: ^d.sql-string[]<br>
                   1434: ^for[i](1;14){
                   1435: ^d.roll[day](-1)
                   1436: ^d.sql-string[]<br>
                   1437: }
                   1438: <hr>
                   1439: $d[^date::create(2002;10;19)]
                   1440: ^d.sql-string[]<br>
                   1441: ^for[i](1;14){
                   1442: ^d.roll[day](+1)
                   1443: ^d.sql-string[]<br>
                   1444: }
                   1445: 
                   1446: 
                   1447: 
                   1448: 
                   1449: 
1.22      paf      1450: 
                   1451: @exceptions1[]
                   1452: ^try{
                   1453:        aaa
1.24      paf      1454:        ^throw[custom1;paf;is stupid]
1.22      paf      1455: }{
1.24      paf      1456:        ^if($exception.type eq custom1){
1.28      paf      1457: #              $exception.handled(1)
                   1458:        ^throw[$exception]
1.24      paf      1459:                type=$exception.type<br>
                   1460:            source=$exception.source<br>
                   1461:            file=$exception.file<br>
                   1462:            lineno=$exception.lineno<br>
                   1463:        comment=$exception.comment<br>
                   1464:        }
1.22      paf      1465: }
1.21      paf      1466: 
                   1467: @locate_by_expr[]
                   1468: $t[^table::create{a    b
                   1469: 1      nok
                   1470: 2      ok
                   1471: 3      nok
                   1472: }]
                   1473: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf      1474: 
                   1475: @method_junction_params[param]
                   1476: ^if($param is junction){junction}{ne junction}
                   1477: 
                   1478: @verifyCookie[value] 
                   1479: ^if($cookie:dummyvote eq $value){ 
                   1480:        $result(1) 
                   1481: }{ 
                   1482:        $cookie:dummyvote[$value] 
                   1483:        $result(0) 
                   1484: }
1.16      paf      1485: 
                   1486: @execlangs[]
1.20      paf      1487: $f[^file::exec[test.pl]]
1.36      paf      1488: err:$f.stderr<br>
1.16      paf      1489: ^process{$f.text}
                   1490: #$c[^t.columns[]]
                   1491: #^c.menu{
                   1492: #* $c.column<br>
                   1493: #}
1.36      paf      1494: c:$t.c<br>
1.16      paf      1495: 
                   1496: @tobjeresult[]
                   1497: ^table::create{a
                   1498: 12}
1.15      paf      1499: 
                   1500: @xmlprobs[]
                   1501: $xmlDataType[^xdoc::load[program.xml]]
                   1502: #<pre>^taint[^xmlDataType.string[]]
                   1503: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                   1504: #=^xmlDataTypes._count[]=
                   1505: =^xmlDataTypes.0.getAttribute[type-id]=
                   1506: 
                   1507: @doubleprobs[]
                   1508: $1(^math:radians(180))
                   1509: $2($math:PI)
                   1510: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                   1511: ^if($1==$2){y;n}
                   1512: ^if(^math:radians(180)==$math:PI){y;n}
                   1513: 
                   1514: 
                   1515: @divnamestop[]
                   1516: $a(10)
                   1517: ^eval($a\3)
                   1518: 
                   1519: @arrayclone[]
                   1520: $t[^table::create{a    b
                   1521: 1      11
                   1522: 2      22
                   1523: }]
                   1524: $c[^table::create[$t]]
                   1525: ^c.append{2    33}
                   1526: ^t.count[]
                   1527: ^c.count[]
                   1528: 
                   1529: @operator_tricks[]
                   1530: ^if(1){$a[^t[]]}
                   1531: $a!
                   1532: $a($b)
                   1533: ^if(1){y}{n}
                   1534: $MAIN:a(^t[] eq OK)
                   1535: #$MAIN:a(1)
                   1536: ^if($a){y}{n}
                   1537: #^if(1){y}{n}
                   1538: $form:if
                   1539: $a[$.n[1]]
                   1540: $a.if
                   1541: 
                   1542: @xoutputrusattr[]
                   1543: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                   1544: ^show_xdoc2[$d]
                   1545: 
                   1546: @xdocset1[]
                   1547: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                   1548: ^show_xdoc2[$d]
                   1549: 
                   1550: @regexp3[]
                   1551: $s[abcАБВ]
                   1552: ^if(^s.match[][i]){y}{n}
                   1553: 
                   1554: 
                   1555: @exec2[]
                   1556: $a[^file::exec[bin/t.cmd]]
                   1557: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                   1558: 
                   1559: 
                   1560: @tlock[]
                   1561: ^file:lock[lockfile]{
                   1562:        code
                   1563: }
                   1564: 
                   1565: @xmloutattrwithoutvalue[]
                   1566: #$ORIGINS(1)
                   1567: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                   1568: $doc[^doc.transform[global.xsl]]
                   1569: =^taint[html][^doc.string[$.method[html]]]=
                   1570: 
                   1571: 
                   1572: 
                   1573: @precisionProblem[]
                   1574: $a[123456789012345678901234567890]
                   1575: $b(^a.double[])
                   1576: ^b.format{%.20E}
                   1577: <hr>
                   1578: ^eval(2*2)
                   1579: 
                   1580: @xpath[]
                   1581: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1582: <document><block><p>привет</p></block></document>
                   1583: }]
                   1584: #^show_xdoc2[$xdoc]
                   1585: $node[^xdoc.selectSingle[/document/block/p]]
                   1586: ^if(def $node){
                   1587:        ^if($node is string){
                   1588:                $node
                   1589:        }{
                   1590:        ^if($node is hash){
                   1591:                ^node._count[]
                   1592:        }{
                   1593:                $node.nodeType
                   1594:        }
                   1595:        }
                   1596: #$node.firstChild.nodeValue
                   1597: }{
                   1598:        node not found
                   1599: }
                   1600: 
                   1601: 
                   1602: @ttablesetlang[]
                   1603: $a-tab-b[a     b
                   1604: 1      2]
                   1605: 
                   1606: $t[^table::set{$a-tab-b}]
                   1607: =$t.a=
                   1608: <hr>
                   1609: 
                   1610: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                   1611: =$t.0=
                   1612: <hr>
                   1613: 
                   1614: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                   1615: =$t.a=
                   1616: 
                   1617: #^t.append{1   2}
                   1618: 
                   1619: @mail3[]
                   1620: ^mail:send[
1.98      paf      1621:        $.from[Александр Петросян <paf@mail.design.ru>]
                   1622:        $.to[Александр Петросян <paf@mail.design.ru>]
                   1623:        $.subject[проверка2]
1.15      paf      1624:        $.body[
                   1625:                $.text[
                   1626:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
1.98      paf      1627:                        $.body[проверка^taint[uri][москва]=]
1.15      paf      1628:                ]
                   1629:                $.attachment[
                   1630:                        $.value[^file::load[text;index.html]]
                   1631:                        $.file-name[привет всем.html]                   
                   1632:                ]
                   1633:        ]
                   1634: ]
                   1635: 
                   1636: 
                   1637: @ttime[]
                   1638: $now[^date::now[]]
                   1639: $now.hour:$now.minute
                   1640: 
                   1641: @tupper[]
                   1642: $t[abcABCабвАБВ]
                   1643: $t<br>
                   1644: ^t.upper[]
                   1645: 
                   1646: @treplace[]
                   1647: $copy-paste-clean[^table::set{a b
                   1648: .      _
                   1649: ,      _
                   1650: +      _
                   1651: &      _
                   1652: ?      _
                   1653: =      _}]
                   1654: 
                   1655: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                   1656: # почему-то этот replace роняет апач в 500 ошибку :(
                   1657: #^cache_key.replace[$copy-paste-clean]
                   1658: $test[abc]
                   1659: ^test.save[$cache_key]saved<br>
                   1660: $cache[^file:list[.;\.cache^$]]
                   1661: ^file:delete[$cache_key]deleted($cache.name)<br>
                   1662: 
                   1663: 
                   1664: 
                   1665: @xslt2[]
                   1666: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1667: <document><block><p>привет</p></block></document>
                   1668: }]
                   1669: ^show_xdoc2[$xdoc]
                   1670: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                   1671: <hr>
                   1672: 
                   1673: 
                   1674: @tcache2[]
                   1675: ^cache[$DB_HOME/keyключ](2){
                   1676:        ^math:random(100)
                   1677: }
                   1678: 
                   1679: @ttaintuntaint[]
                   1680: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                   1681: 
                   1682: ]zz
                   1683: <hr>
                   1684: ^untaint[html]{1^taint[  ]2  3}
                   1685: 
                   1686: 
                   1687: @tappend2[]
                   1688: $t[^table::set{a       b}]^t.append{1  2}$t.a
                   1689: 
                   1690: @badvsnprintf[]
                   1691: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                   1692: }
                   1693: 
                   1694: 
                   1695: @badoracequoting[]
                   1696: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                   1697: ^connect[$SQL.connect-string]{
                   1698: ^void:sql{delete from paf}
                   1699: ^void:sql{insert into paf values (1, '$form:text')}
                   1700: $paf[^table::sql{select * from paf}]
                   1701: ^paf.menu{
                   1702:        $paf.id: ^untaint{$paf.block}<hr>
                   1703: 
                   1704: }
                   1705: <hr>
                   1706: 
                   1707: 
                   1708: ^rem{
                   1709: $news[^table::sql{select description from news}[$.limit(3)]]
                   1710: ^news.menu{
                   1711:        ^untaint{$news.description}<hr>
                   1712: 
                   1713: }
                   1714: <hr>
                   1715: }
                   1716: 
                   1717: $tables[^table::sql{select table_name from user_tables}]
                   1718: ^tables.menu{
                   1719: $tables.table_name<br>
                   1720: }
                   1721: 
                   1722: }
                   1723: <hr>
                   1724: $env:PATH
                   1725: 
                   1726: @badconstructors[]
                   1727: $bred[^string::length[]]
                   1728: $bred[^response::clear[]]
                   1729: $bred[^int::int[]]
                   1730: 
                   1731: 
                   1732: @xloadwrongtable[]
                   1733: $constr[^xdoc::load[wrongtable.xml]]
                   1734: ^show_xdoc2[$constr]
                   1735: 
                   1736: @xsetwrongtable[]
                   1737: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                   1738: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   1739: 
                   1740: 
                   1741: @tablecolumnerror[]
                   1742: $t[^table::set{a}]
                   1743: $t.$a
                   1744: 
                   1745: @roll[]
                   1746: #$date[^date::set(1970;1;2)]
                   1747: #^date.roll[month](-1)
                   1748: $date[^date::set(2038;1;1)]
                   1749: ^date.roll[month](+1)
                   1750: $date.year  $date.month  $date.day
                   1751: 
                   1752: @cookie2[]
                   1753: #=$cookie:clientType[$.value[test]]=<br>
1.159   ! paf      1754: =$cookie:CLASS.clientType=<br>
1.15      paf      1755: 
                   1756: 
                   1757: @tableset[]
                   1758: $a[^table::set{a
                   1759: 1
                   1760: 2}]
                   1761: ^eval(100\$a)
                   1762: 
                   1763: 
                   1764: 
                   1765: @zzz[]
                   1766: 
                   1767: 
                   1768: $constructor[
                   1769: <block1 name="main_srvr" type="0" label="Основное тело" />
                   1770: <block2 name="main_srvr2" type="0" label="Основное тело" />
                   1771: ]
                   1772: 
                   1773: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1774: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   1775: 
                   1776: $children[$constr.documentElement.childNodes]
                   1777: ^if($children){
                   1778: ^for[i](1;^children._count[]){
                   1779:        $node[$children.$i]
                   1780:        $node.nodeName<br>
                   1781: }
                   1782: }
                   1783:    
                   1784: 
                   1785: @thashforeach3[]
                   1786: $h[
                   1787:        $.a[1] 
                   1788:        $.b[2]
                   1789: ]
                   1790: $c[^table::set{a
                   1791: ^h.foreach[key;value]{$value
                   1792: }}]
                   1793: $c.a
                   1794: 
                   1795: @thashforeach2[]
                   1796: $h[
                   1797:        $.a[1] 
                   1798:        $.b[2]
                   1799: ]
                   1800: $c[
                   1801: ^h.foreach[key;value]{
                   1802:        $.$key[$value]
                   1803: }
                   1804: ]
                   1805: $c.b
                   1806: 
                   1807: @thashforeach[]
                   1808: $h[
                   1809:        $.a[1] 
                   1810:        $.b[2]
                   1811: ]
                   1812: ^h.foreach[key;value]{
                   1813:        $key=$value<br>
                   1814: }
                   1815: 
                   1816: @thashdelete[]
                   1817: $h[$.a[1] $.b[2]]
                   1818: was:<br>
                   1819: count=^h._count[] <br>
                   1820: b='$h.b' <br>
                   1821: 
                   1822: ^h.delete[b] 
                   1823: 
                   1824: now:<br>
                   1825: count=^h._count[] <br>
                   1826: b='$h.b' 
                   1827: 
                   1828: @sappend[]
                   1829: $test[123]
                   1830: ^test.save[test]
                   1831: ^test.save[append;test]
                   1832: 
                   1833: @tappend[]
                   1834: $test[^table::set{a    b
                   1835: a1     b1}]
                   1836: ^test.save[test]
                   1837: $test[^table::set{a    b
                   1838: a2     b2}]
                   1839: ^test.save[append;test]
                   1840: 
                   1841: 
                   1842: @tform[]
                   1843: ^if(def $form:new_file){y}{n}
                   1844: <form method="post" enctype="multipart/form-data">
                   1845: <input type="file" name="new_file" />
                   1846: <input type=submit>
                   1847: </input>
                   1848: 
                   1849: @formattest[]
                   1850: $size(15.124)
                   1851: 
                   1852: ^size.format{%.2f}
                   1853: 
                   1854: @filelist[]
                   1855: $html[^file:list[.;\.html^$]]
                   1856: ^html.menu{
                   1857:        $html.name<br>
                   1858: }
                   1859: <hr>
                   1860: 
                   1861: @безнадёжна_попытка_поправить_непоправимое[]
                   1862: $dom_from_disk[^xdoc::load[input.xml]]
                   1863: $dom_created_in_air[^xdoc::create[doc]]
                   1864: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                   1865: ^show_xdoc2[$dom_created_in_air]
                   1866: 
                   1867: 
                   1868: @tcache[]
                   1869: #^hashfile:clear[cache]
                   1870: $code[^hashfile::open[$DB_HOME;cache]]
                   1871: ^code.cache[key](2){
                   1872:        ^math:random(100)
                   1873: #      ^code.delete[]
                   1874: }
                   1875: 
                   1876: @thashfileexp[]
                   1877: $hf[^hashfile::open[$DB_HOME;hashfile]]
                   1878: $hf.paf[$.value[крут] $.expires(3)]
                   1879: paf=$hf.paf
                   1880: <hr>
                   1881: ^hf.foreach[key;value]{
                   1882:        $key=$value<br>
                   1883: }
                   1884: <hr>
                   1885: $hash[^hf.hash[]]
                   1886: =$hash.paf=
                   1887: <hr>
                   1888: 
                   1889: @tcounter[]
                   1890: ^tcounterone[$DB_HOME]
                   1891: other root:
                   1892: ^tcounterone[${DB_HOME}2]
                   1893: again, first:
                   1894: ^tcounterone[$DB_HOME]
                   1895: 
                   1896: @tcounterone[DB_HOME]
                   1897: $counter[^hashfile::open[$DB_HOME;counter]]
                   1898: #^counter.clear[]
                   1899: ^counter.transaction{
                   1900: #      $counter.value(10)
                   1901:        $counter.value($counter.value+1)
                   1902: #      ^counter.delete[value]
                   1903:        $counter.value
                   1904: }
                   1905: <hr>
                   1906: ^rem{
                   1907: $hash[^counter.hash[]]
                   1908: =$hash.value=
                   1909: <hr>
                   1910: }
                   1911: 
                   1912: @tablehash[]
                   1913: $productList[^table::set{id    name
                   1914: 1      носки
                   1915: 2      валенки
                   1916: 3      ушанка
                   1917: }]
                   1918: 
                   1919: #скажем, у первого дилера
                   1920: $firstPriceList[^table::set{id price
                   1921: 1      0.3
                   1922: 3      1000
                   1923: }]
                   1924: 
                   1925: $firstPriceHash[^firstPriceList.hash[id]]
                   1926: 
                   1927: ^productList.menu{
                   1928:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                   1929: }
                   1930: 
                   1931: 
                   1932: @hashfile[]
                   1933: $hf[^hashfile::assign[hashfile]]
                   1934: #$hf.paf[крут5]
                   1935: paf=$hf.paf
                   1936: 
                   1937: @formclass[]
                   1938: ^$form:CLASS.a=$form:CLASS.a
                   1939: 
                   1940: @domdata[]
                   1941: ^if(1){
                   1942: #      $a{^hren[]}
                   1943: }
                   1944: $a
                   1945: $xdoc[^xdoc::create[doc]]
                   1946: $doc[$xdoc.documentElement]
                   1947: $name[^doc.appendChild[^xdoc.createElement[name]]]
                   1948: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                   1949: ^untaint[as-is]{=$text.nodeValue=}
                   1950: 
                   1951: @domedit[]
                   1952: ^domdata[]
                   1953: #$paf.nodeName<br>
                   1954: #$doc.documentElement.nodeName<br>
                   1955: 
                   1956: ^show_xnode1[$xdoc.documentElement;0;1]
                   1957: <hr>
                   1958: ^show_xdoc2[$xdoc]
                   1959: <hr>
                   1960: 
                   1961: @domxslt[]
                   1962: ^domdata[]
                   1963: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                   1964: <hr>
                   1965: 
                   1966: @lsplit2[]
                   1967: $path[/optics/]
                   1968: $pathTable[^path.lsplit[/]]
                   1969: ^pathTable.menu{
                   1970:        ^if(def $pathTable.piece){
                   1971:                =$pathTable.piece=
                   1972:        }
                   1973: }
                   1974: 
                   1975: 
                   1976: @faceesize[]
                   1977: $k(2)
                   1978: $pict[^image::load[paf.gif]]
                   1979: $small[^image::create($pict.width/$k;$pict.height/$k)]
                   1980: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                   1981: $response:body[^small.gif[]]
                   1982: 
                   1983: @imageresize[]
                   1984: $k(2)
                   1985: $pict[^image::create(400*$k;200*$k)]
                   1986: $pict.line-width(2)
                   1987: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   1988: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                   1989: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   1990: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                   1991: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                   1992: $response:body[^pict.gif[]]
                   1993: 
                   1994: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                   1995: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                   1996: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                   1997: 
                   1998: #$response:body[^small.gif[]]
                   1999: 
                   2000: 
                   2001: @tintdefault[]
                   2002: #$abc[abc]
                   2003: $abc[33]
                   2004: ^abc.int[z]
                   2005: #^abc.int(123)
                   2006: 
                   2007: @ifassignhash[]
                   2008: $h[^if(1){$.a(1);$.a(2)}]
                   2009: $h.a
                   2010: 
                   2011: @ifpasshash[]
                   2012: $a[$.e[a]]
                   2013: $b[$.e[b]]
                   2014: ^ifpasshashdest[^if(1){$a;$b}]
                   2015: #$x[^if(1){$a}{$b}]
                   2016: #^ifpasshashdest[$x]
                   2017: 
                   2018: @ifpasshashdest[p]
                   2019: $p.e
                   2020: 
                   2021: @movedir[]
                   2022: ^file:move[a;deeper/a]
                   2023: 
                   2024: @replace[]
                   2025: $a[12^;3]
                   2026: ^a.replace[^table::set{from    to
                   2027: 2^;    !
                   2028: }]
                   2029: 
                   2030: 
                   2031: @set[]
                   2032: ^setdata[]
                   2033: ^a.add[$b]
                   2034: add:$a.3<br>
                   2035: 
                   2036: ^setdata[]
                   2037: ^a.sub[$b]
                   2038: sub2:$a.2<br>
                   2039: sub1:$a.1<br>
                   2040: 
                   2041: ^setdata[]
                   2042: $c[^a.union[$b]]
                   2043: union3:$c.3<br>
                   2044: union2:$c.2<br>
                   2045: 
                   2046: ^setdata[]
                   2047: $c[^a.intersection[$b]]
                   2048: intersection3:$c.3<br>
                   2049: intersection2:$c.2<br>
                   2050: 
                   2051: ^setdata[]
                   2052: intersects:^if(^a.intersects[$b]){y;n}<br>
                   2053: intersects2:^if(^a.intersects[ ]){y;n}<br>
                   2054: 
                   2055: 
                   2056: <hr>
                   2057: 
                   2058: @setdata[]
                   2059: $a[$.1[a1] $.2[a2]]
                   2060: $b[        $.2[b2] $.3[b3]]
                   2061: 
                   2062: 
                   2063: @hash[]
                   2064: $h[^hash::create[$._default[123]]]
                   2065: $h.paf[not kretin]
                   2066: $h.paf<br>
                   2067: =$h.that=<br>
                   2068: 
                   2069: @methresult[]
                   2070: $result[^table::set{1}]
                   2071: 
                   2072: @terror[]
                   2073: ^error[method z must be called with z]
                   2074: 
                   2075: @syntax1[]
                   2076: #^a[^b]
                   2077: 
                   2078: @syntax2[]
                   2079: #^a[
                   2080: 
                   2081: @ssave[]
                   2082: $abc[abc]
                   2083: ^abc.save[abc]
                   2084: 
                   2085: @calendar[]
1.103     paf      2086: $year(2002)
                   2087: $month(12)
1.84      paf      2088: ${year}-${month}:<br>
                   2089: $week_days[^date:calendar[rus]($year;$month)]
1.15      paf      2090: <pre>
1.101     paf      2091: ^week_days.menu{^for[wday](0;6){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }=$week_days.week,$week_days.year=<br>}
1.15      paf      2092: </pre>
                   2093: 
                   2094: @thash[]
                   2095: $table[^table::set{id  name    age
                   2096: 1      paf     278
                   2097: 2      пиф     234
                   2098: }]
                   2099: $hash[^table.hash[id;^table::set[nameless]{id
                   2100: name}]]
                   2101: $hash.2.id $hash.2.name $hash.2.age
                   2102: 
                   2103: @tdef[]
                   2104: $s[0]
                   2105: if 0=^if($s){}{n}<br>
                   2106: if def 0=^if(def $s){y}{}<br>
                   2107: <hr>
                   2108: 
                   2109: @ford[]
                   2110: ^for[i](0;5){$i}{($i)}
                   2111: 
                   2112: @tif[]
                   2113: ^if[def]{y;n}
                   2114: 
                   2115: @image[]
                   2116: $pict[^image::create(400;200)]
                   2117: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   2118: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                   2119: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   2120: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                   2121: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                   2122: $response:body[^pict.gif[]]
                   2123: 
                   2124: 
                   2125: 
                   2126: @mail2[]
                   2127: ^mail:send[
1.139     paf      2128:        $.message-id[<6615%1@parser.ru>]
1.15      paf      2129:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                   2130:        $.from[Александр Петросян <paf@design.ru>]
                   2131:        $.to[Александр Петросян <paf@design.ru>]
1.134     paf      2132:        $.subject[проверка проверка]
                   2133:        $.text[проверка]
1.15      paf      2134: ]
                   2135: 
                   2136: @cookie[]
1.115     paf      2137: #$env:HTTP_COOKIE<br>
1.15      paf      2138: 
                   2139: #$cookie:переменная[test тест ТЕСТ2]
                   2140: =$cookie:переменная=<br>
                   2141: #$cookie:переменная2[test тест ТЕСТ3]
                   2142: =$cookie:переменная2=<br>
                   2143: =$cookie:CLASS.переменная2=<br>
                   2144: 
                   2145: @response[]
                   2146: #^if($form:reload){
                   2147:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                   2148: #}
                   2149: 
                   2150: @xslt[]
                   2151: ^xdata[]
                   2152: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                   2153: ^show_xdoc2[$transformed]
                   2154: 
                   2155: @regexp2[]
                   2156: $s[  select]
                   2157: $s[^s.match[^^\s*][]{!}]
                   2158: $s
                   2159: 
                   2160: @header[]
                   2161: $response:refresh[
                   2162:        $.value[0]
                   2163:        $.url[http://design.ru?a=^taint[123]]
                   2164: ]
                   2165: 
                   2166: @ttablerem[]
                   2167: $table[^table::load[a.cfg]]
                   2168: ^table.menu{$table.a}
                   2169: 
                   2170: @tconnect[]
                   2171: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                   2172: $tables[^table::sql{show tables}]
                   2173: #$cols[^tables.columns[]]
                   2174: #$cols.column
                   2175: ^tables.menu{
                   2176:        $tables.[Tables_in_test]<br>
                   2177: }
                   2178: }
                   2179: 
                   2180: @pcre[]
                   2181: $s[1 2]
                   2182: ^s.match[\s;ig]{!}
                   2183: #^s.match[\d;ig]{!}
                   2184: 
                   2185: 
                   2186: @regexp[]
                   2187: $s[abcАБВ]
                   2188: ^if(^s.match[б][i]){y}{n}
                   2189: 
                   2190: @mail[]
                   2191: #$ORIGINS(1)
                   2192: ^mail:send[
                   2193:        $.from[paf@design.ru]
                   2194:        $.to[paf@design.ru]
                   2195:        $.body[1
                   2196:        
                   2197:        2
                   2198:        
                   2199:        
                   2200:                3]
                   2201: ]
                   2202: 
                   2203: @fori[][i]
                   2204: ^for[i](1;3){... =$i= ...}
                   2205: 
                   2206: @xdata0[]
                   2207: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   2208: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   2209: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   2210: <people>
                   2211:        <man id="1" имя="word слово">
                   2212:                <name>P&#171^;AF        B</name>
                   2213:        </man>
                   2214:                <man id="2">
                   2215:                        <name>ПИФ^taint[&]</name>
                   2216:                </man>
                   2217: </people>
                   2218: }]
                   2219: 
                   2220: @xdata[]
                   2221: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.156     paf      2222: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
1.15      paf      2223: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   2224: <people>
                   2225:        <man id="1" имя="word слово">
                   2226:                <name>P&#171^;AF        B</name>
                   2227:        </man>
                   2228:                <man id="2">
                   2229:             <name>ПИФ^taint[&]</name>
                   2230:                </man>
                   2231: </people>
1.156     paf      2232: }]
1.15      paf      2233: 
                   2234: @xml[]
                   2235: ^xdata[]
                   2236: 
                   2237: ^show_xdoc2[$xdoc]<hr>
                   2238: #^show_xnode1[$xdoc]<hr>
                   2239: $people[^xdoc.select[*/man]]
                   2240: #^show1[]
                   2241: ^show_xnodes1[$people]<hr>
                   2242: #^people.0.owner.hren[]
                   2243: 
                   2244: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                   2245: 
                   2246: by id:
                   2247: ^show_xnode1[^xdoc.getElementById[1];0;1]
                   2248: <hr>
                   2249: 
                   2250: @show1[array]
                   2251: ^for[i](0;^array._count[]-1){
                   2252:     $x[$array.$i]
                   2253:        $x.firstChild.nodeValue: 
                   2254:                $pattributes[$x.parentNode.attributes]
                   2255:                ^if(^pattributes._count[]){
                   2256:                        $pattributes.id.name=$pattributes.id.nodeValue
                   2257:                }
                   2258:        <br>
                   2259: }
                   2260:        
                   2261: @show_xnodes1[array][i]
                   2262: ^for[i](0;^array._count[]-1){
                   2263:        ^show_xnode1[$array.$i;0;1]
                   2264: }
                   2265: 
                   2266: @show_xnode1[x;level;single][l]
                   2267: ^if(def $x){
                   2268:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                   2269:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   2270:        &lt^;$x.nodeName
                   2271:            $pairs[$x.attributes]
                   2272:            ^if(def $pairs){
                   2273:                $names[^pairs._keys[]]
                   2274:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                   2275:            }
                   2276:            &gt^;
                   2277:     }{
                   2278:        [$x.nodeType]
                   2279:     }
                   2280:     
                   2281:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                   2282:     ^show_xnode1[$x.firstChild]($level+1)
                   2283:     ^if(!$single){
                   2284:            ^show_xnode1[$x.nextSibling]($level)
                   2285:     }
                   2286: 
                   2287:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   2288:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                   2289:     }
                   2290: }
                   2291: 
                   2292: @show_xdoc2[xdoc]
                   2293: ^xdoc.save[out/save.xml;
                   2294: #      $.encoding[utf-8]
                   2295:        $.method[xml]
                   2296: ]
                   2297: $file[^xdoc.file[
                   2298:        $.encoding[utf-8]
                   2299:        $.method[html]
                   2300: ]]
                   2301: ^file.save[text;out/save_file.html]
                   2302: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   2303: <pre>^taint[html][^xdoc.string[
                   2304:        $.method[html]
                   2305: #      $.encoding[utF-8]
                   2306: #      $.omit-xml-declaration[yes]
                   2307: #      $.standalone[no]
                   2308: #      -$.doctype-public[-//W3C//DTD XHTML]
                   2309: #      -$.doctype-system[/a/b/c/]
                   2310: #      $.indent[yes]
                   2311: #      $.media-type[text/paf]
                   2312: ]]
                   2313: </pre>

E-mail: