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

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

E-mail: