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

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

E-mail: