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

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

E-mail: