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

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

E-mail: