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

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

E-mail: