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

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

E-mail: