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

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

E-mail: