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

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

E-mail: