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

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

E-mail: