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

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

E-mail: