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

1.15      paf         1: #@USE
                      2: #z/t.p
                      3: 
                      4: @autoz[]
                      5: $request:charset[windows-1251]
                      6: $response:charset[windows-1251]
                      7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
                      8: 
                      9: @main[]
1.22    ! paf        10: ^exceptions1[]
        !            11: #^locate_by_expr[]
1.18      paf        12: #^method_junction_params{...}
1.17      paf        13: #^verifyCookie[paf]
1.21      paf        14: #^execlangs[]
1.16      paf        15: #$t[^tobjeresult[]]$t.a
                     16: #^xmlprobs[]
1.15      paf        17: #^doubleprobs[]
                     18: #^math:random(-10)
                     19: #^divnamestop[]
                     20: #^arrayclone[]
                     21: #^operator_tricks[]
                     22: #^xoutputrusattr[]
                     23: #^xdocset1[]
                     24: #^regexp3[]
                     25: #^exec2[]
                     26: #^tlock[]
                     27: #^xmloutattrwithoutvalue[]
                     28: #^precisionProblem[]
                     29: #^xpath[]
                     30: #^ttablesetlang[]
                     31: #^mail3[]
                     32: #^ttime[]
                     33: #^tupper[]
                     34: #^treplace[]
                     35: #^xslt2[]
                     36: #^tcache2[]
                     37: #$ORIGINS(1)
                     38: #$t[^table::set{a b} ^table::set{c d}]
                     39: #^ttaintuntaint[]
                     40: #^tappend2[]
                     41: #^badvsnprintf[]
                     42: #^badoracequoting[]
                     43: #^badconstructors[]
                     44: #^xloadwrongtable[]
                     45: #^xsetwrongtable[]
                     46: #^if($form:test){y}{n}
                     47: #^tablecolumnerror[]
                     48: #^roll[]
                     49: #^cookie2[]
                     50: #^tableset[]
                     51: #^math:PI.format{%.30f}
                     52: #^xchildren[]
                     53: #^thashforeach3[]
                     54: #^thashforeach2[]
                     55: #^thashforeach[]
                     56: #^thashdelete[]
                     57: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                     58: #^tappend[]
                     59: #^sappend[]
                     60: #^eval(10\3)<br>
                     61: #^tform[]
                     62: #^formattest[]
                     63: #^filelist[]
                     64: #^connect[mysql://user:pass@host]{ }
                     65: #^безнадёжна_попытка_поправить_непоправимое[]
                     66: #^tcache[]
                     67: #^thashfileexp[]
                     68: #^tcounter[]
                     69: #^tablehash[]
                     70: #j^hashfile[]
                     71: #^formclass[]
                     72: #^hren[]
                     73: #^domedit[]
                     74: #^domxslt[]
                     75: #^lsplit2[]
                     76: #^faceesize[]
                     77: #^imageresize[]
                     78: #^ifassignhash[]
                     79: #^tintdefault[]
                     80: #$response:status[404]
                     81: #^ifpasshash[]
                     82: #^movedir[]
                     83: #^replace[]
                     84: #^set[]
                     85: #^hash[]<hr>
                     86: #$t[^methresult[]] ->$t
                     87: #^terror[]
                     88: #^ssave[]
                     89: #^calendar[]
                     90: #^thash[]
                     91: #^tdef[]
                     92: #^ford[]
                     93: #^tif[]
                     94: #^image[]
                     95: #^mail2[]
                     96: #^cookie[]
                     97: #^response[]
                     98: #^regexp2[]
                     99: #^ttablerem[]
                    100: #^pcre[]
                    101: #^regexp[]<hr>
                    102: #^mail[]
                    103: #^exec[]
                    104: #^fori[]
                    105: #^tconnect[]
                    106: #^xslt[]
                    107: #^xml[]
                    108: #^header[]
                    109: <hr>
                    110: OK
1.22    ! paf       111: 
        !           112: @exceptions1[]
        !           113: ^try{
        !           114:        aaa
        !           115:        ^throw[user;paf;is stupid]
        !           116: }{
        !           117: $exception.handled(1)
        !           118: #^throw[$exception]
        !           119:        type=$exception.type<br>
        !           120:     source=$exception.source<br>
        !           121:     file=$exception.file<br>
        !           122:     lineno=$exception.lineno<br>
        !           123:     comment=$exception.comment<br>
        !           124: }
1.21      paf       125: 
                    126: @locate_by_expr[]
                    127: $t[^table::create{a    b
                    128: 1      nok
                    129: 2      ok
                    130: 3      nok
                    131: }]
                    132: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf       133: 
                    134: @method_junction_params[param]
                    135: ^if($param is junction){junction}{ne junction}
                    136: 
                    137: @verifyCookie[value] 
                    138: ^if($cookie:dummyvote eq $value){ 
                    139:        $result(1) 
                    140: }{ 
                    141:        $cookie:dummyvote[$value] 
                    142:        $result(0) 
                    143: }
1.16      paf       144: 
                    145: @execlangs[]
1.20      paf       146: $f[^file::exec[test.pl]]
1.16      paf       147: ^process{$f.text}
                    148: #$c[^t.columns[]]
                    149: #^c.menu{
                    150: #* $c.column<br>
                    151: #}
                    152: =$t.c=
                    153: 
                    154: @tobjeresult[]
                    155: ^table::create{a
                    156: 12}
1.15      paf       157: 
                    158: @xmlprobs[]
                    159: $xmlDataType[^xdoc::load[program.xml]]
                    160: #<pre>^taint[^xmlDataType.string[]]
                    161: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                    162: #=^xmlDataTypes._count[]=
                    163: =^xmlDataTypes.0.getAttribute[type-id]=
                    164: 
                    165: @doubleprobs[]
                    166: $1(^math:radians(180))
                    167: $2($math:PI)
                    168: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                    169: ^if($1==$2){y;n}
                    170: ^if(^math:radians(180)==$math:PI){y;n}
                    171: 
                    172: 
                    173: @divnamestop[]
                    174: $a(10)
                    175: ^eval($a\3)
                    176: 
                    177: @arrayclone[]
                    178: $t[^table::create{a    b
                    179: 1      11
                    180: 2      22
                    181: }]
                    182: $c[^table::create[$t]]
                    183: ^c.append{2    33}
                    184: ^t.count[]
                    185: ^c.count[]
                    186: 
                    187: @operator_tricks[]
                    188: ^if(1){$a[^t[]]}
                    189: $a!
                    190: $a($b)
                    191: ^if(1){y}{n}
                    192: $MAIN:a(^t[] eq OK)
                    193: #$MAIN:a(1)
                    194: ^if($a){y}{n}
                    195: #^if(1){y}{n}
                    196: $form:if
                    197: $a[$.n[1]]
                    198: $a.if
                    199: 
                    200: @xoutputrusattr[]
                    201: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                    202: ^show_xdoc2[$d]
                    203: 
                    204: @xdocset1[]
                    205: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                    206: ^show_xdoc2[$d]
                    207: 
                    208: @regexp3[]
                    209: $s[abcАБВ]
                    210: ^if(^s.match[][i]){y}{n}
                    211: 
                    212: 
                    213: @exec2[]
                    214: $a[^file::exec[bin/t.cmd]]
                    215: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                    216: 
                    217: 
                    218: @tlock[]
                    219: ^file:lock[lockfile]{
                    220:        code
                    221: }
                    222: 
                    223: @xmloutattrwithoutvalue[]
                    224: #$ORIGINS(1)
                    225: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                    226: $doc[^doc.transform[global.xsl]]
                    227: =^taint[html][^doc.string[$.method[html]]]=
                    228: 
                    229: 
                    230: 
                    231: @precisionProblem[]
                    232: $a[123456789012345678901234567890]
                    233: $b(^a.double[])
                    234: ^b.format{%.20E}
                    235: <hr>
                    236: ^eval(2*2)
                    237: 
                    238: @xpath[]
                    239: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    240: <document><block><p>привет</p></block></document>
                    241: }]
                    242: #^show_xdoc2[$xdoc]
                    243: $node[^xdoc.selectSingle[/document/block/p]]
                    244: ^if(def $node){
                    245:        ^if($node is string){
                    246:                $node
                    247:        }{
                    248:        ^if($node is hash){
                    249:                ^node._count[]
                    250:        }{
                    251:                $node.nodeType
                    252:        }
                    253:        }
                    254: #$node.firstChild.nodeValue
                    255: }{
                    256:        node not found
                    257: }
                    258: 
                    259: 
                    260: @ttablesetlang[]
                    261: $a-tab-b[a     b
                    262: 1      2]
                    263: 
                    264: $t[^table::set{$a-tab-b}]
                    265: =$t.a=
                    266: <hr>
                    267: 
                    268: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                    269: =$t.0=
                    270: <hr>
                    271: 
                    272: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                    273: =$t.a=
                    274: 
                    275: #^t.append{1   2}
                    276: 
                    277: @mail3[]
                    278: ^mail:send[
                    279:        $.from[Александр Петросян <paf@design.ru>]
                    280:        $.to[Александр Петросян <paf@design.ru>]
                    281:        $.subject[проверка4]
                    282:        $.body[
                    283:                $.text[
                    284:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    285:                        $.body[проверка]
                    286:                ]
                    287:                $.attachment[
                    288:                        $.value[^file::load[text;index.html]]
                    289:                        $.file-name[привет всем.html]                   
                    290:                ]
                    291:        ]
                    292: ]
                    293: 
                    294: 
                    295: @ttime[]
                    296: $now[^date::now[]]
                    297: $now.hour:$now.minute
                    298: 
                    299: @tupper[]
                    300: $t[abcABCабвАБВ]
                    301: $t<br>
                    302: ^t.upper[]
                    303: 
                    304: @treplace[]
                    305: $copy-paste-clean[^table::set{a b
                    306: .      _
                    307: ,      _
                    308: +      _
                    309: &      _
                    310: ?      _
                    311: =      _}]
                    312: 
                    313: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                    314: # почему-то этот replace роняет апач в 500 ошибку :(
                    315: #^cache_key.replace[$copy-paste-clean]
                    316: $test[abc]
                    317: ^test.save[$cache_key]saved<br>
                    318: $cache[^file:list[.;\.cache^$]]
                    319: ^file:delete[$cache_key]deleted($cache.name)<br>
                    320: 
                    321: 
                    322: 
                    323: @xslt2[]
                    324: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    325: <document><block><p>привет</p></block></document>
                    326: }]
                    327: ^show_xdoc2[$xdoc]
                    328: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                    329: <hr>
                    330: 
                    331: 
                    332: @tcache2[]
                    333: ^cache[$DB_HOME/keyключ](2){
                    334:        ^math:random(100)
                    335: }
                    336: 
                    337: @ttaintuntaint[]
                    338: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                    339: 
                    340: ]zz
                    341: <hr>
                    342: ^untaint[html]{1^taint[  ]2  3}
                    343: 
                    344: 
                    345: @tappend2[]
                    346: $t[^table::set{a       b}]^t.append{1  2}$t.a
                    347: 
                    348: @badvsnprintf[]
                    349: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz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zzzzzzzzzzzzzzzzzzzzzzz]{
                    350: }
                    351: 
                    352: 
                    353: @badoracequoting[]
                    354: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                    355: ^connect[$SQL.connect-string]{
                    356: ^void:sql{delete from paf}
                    357: ^void:sql{insert into paf values (1, '$form:text')}
                    358: $paf[^table::sql{select * from paf}]
                    359: ^paf.menu{
                    360:        $paf.id: ^untaint{$paf.block}<hr>
                    361: 
                    362: }
                    363: <hr>
                    364: 
                    365: 
                    366: ^rem{
                    367: $news[^table::sql{select description from news}[$.limit(3)]]
                    368: ^news.menu{
                    369:        ^untaint{$news.description}<hr>
                    370: 
                    371: }
                    372: <hr>
                    373: }
                    374: 
                    375: $tables[^table::sql{select table_name from user_tables}]
                    376: ^tables.menu{
                    377: $tables.table_name<br>
                    378: }
                    379: 
                    380: }
                    381: <hr>
                    382: $env:PATH
                    383: 
                    384: @badconstructors[]
                    385: $bred[^string::length[]]
                    386: $bred[^response::clear[]]
                    387: $bred[^int::int[]]
                    388: 
                    389: 
                    390: @xloadwrongtable[]
                    391: $constr[^xdoc::load[wrongtable.xml]]
                    392: ^show_xdoc2[$constr]
                    393: 
                    394: @xsetwrongtable[]
                    395: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                    396: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    397: 
                    398: 
                    399: @tablecolumnerror[]
                    400: $t[^table::set{a}]
                    401: $t.$a
                    402: 
                    403: @roll[]
                    404: #$date[^date::set(1970;1;2)]
                    405: #^date.roll[month](-1)
                    406: $date[^date::set(2038;1;1)]
                    407: ^date.roll[month](+1)
                    408: $date.year  $date.month  $date.day
                    409: 
                    410: @cookie2[]
                    411: #=$cookie:clientType[$.value[test]]=<br>
                    412: =$cookie:clientType=<br>
                    413: 
                    414: 
                    415: @tableset[]
                    416: $a[^table::set{a
                    417: 1
                    418: 2}]
                    419: ^eval(100\$a)
                    420: 
                    421: 
                    422: 
                    423: @zzz[]
                    424: 
                    425: 
                    426: $constructor[
                    427: <block1 name="main_srvr" type="0" label="Основное тело" />
                    428: <block2 name="main_srvr2" type="0" label="Основное тело" />
                    429: ]
                    430: 
                    431: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    432: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    433: 
                    434: $children[$constr.documentElement.childNodes]
                    435: ^if($children){
                    436: ^for[i](1;^children._count[]){
                    437:        $node[$children.$i]
                    438:        $node.nodeName<br>
                    439: }
                    440: }
                    441:    
                    442: 
                    443: @thashforeach3[]
                    444: $h[
                    445:        $.a[1] 
                    446:        $.b[2]
                    447: ]
                    448: $c[^table::set{a
                    449: ^h.foreach[key;value]{$value
                    450: }}]
                    451: $c.a
                    452: 
                    453: @thashforeach2[]
                    454: $h[
                    455:        $.a[1] 
                    456:        $.b[2]
                    457: ]
                    458: $c[
                    459: ^h.foreach[key;value]{
                    460:        $.$key[$value]
                    461: }
                    462: ]
                    463: $c.b
                    464: 
                    465: @thashforeach[]
                    466: $h[
                    467:        $.a[1] 
                    468:        $.b[2]
                    469: ]
                    470: ^h.foreach[key;value]{
                    471:        $key=$value<br>
                    472: }
                    473: 
                    474: @thashdelete[]
                    475: $h[$.a[1] $.b[2]]
                    476: was:<br>
                    477: count=^h._count[] <br>
                    478: b='$h.b' <br>
                    479: 
                    480: ^h.delete[b] 
                    481: 
                    482: now:<br>
                    483: count=^h._count[] <br>
                    484: b='$h.b' 
                    485: 
                    486: @sappend[]
                    487: $test[123]
                    488: ^test.save[test]
                    489: ^test.save[append;test]
                    490: 
                    491: @tappend[]
                    492: $test[^table::set{a    b
                    493: a1     b1}]
                    494: ^test.save[test]
                    495: $test[^table::set{a    b
                    496: a2     b2}]
                    497: ^test.save[append;test]
                    498: 
                    499: 
                    500: @tform[]
                    501: ^if(def $form:new_file){y}{n}
                    502: <form method="post" enctype="multipart/form-data">
                    503: <input type="file" name="new_file" />
                    504: <input type=submit>
                    505: </input>
                    506: 
                    507: @formattest[]
                    508: $size(15.124)
                    509: 
                    510: ^size.format{%.2f}
                    511: 
                    512: @filelist[]
                    513: $html[^file:list[.;\.html^$]]
                    514: ^html.menu{
                    515:        $html.name<br>
                    516: }
                    517: <hr>
                    518: 
                    519: @безнадёжна_попытка_поправить_непоправимое[]
                    520: $dom_from_disk[^xdoc::load[input.xml]]
                    521: $dom_created_in_air[^xdoc::create[doc]]
                    522: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                    523: ^show_xdoc2[$dom_created_in_air]
                    524: 
                    525: 
                    526: @tcache[]
                    527: #^hashfile:clear[cache]
                    528: $code[^hashfile::open[$DB_HOME;cache]]
                    529: ^code.cache[key](2){
                    530:        ^math:random(100)
                    531: #      ^code.delete[]
                    532: }
                    533: 
                    534: @thashfileexp[]
                    535: $hf[^hashfile::open[$DB_HOME;hashfile]]
                    536: $hf.paf[$.value[крут] $.expires(3)]
                    537: paf=$hf.paf
                    538: <hr>
                    539: ^hf.foreach[key;value]{
                    540:        $key=$value<br>
                    541: }
                    542: <hr>
                    543: $hash[^hf.hash[]]
                    544: =$hash.paf=
                    545: <hr>
                    546: 
                    547: @tcounter[]
                    548: ^tcounterone[$DB_HOME]
                    549: other root:
                    550: ^tcounterone[${DB_HOME}2]
                    551: again, first:
                    552: ^tcounterone[$DB_HOME]
                    553: 
                    554: @tcounterone[DB_HOME]
                    555: $counter[^hashfile::open[$DB_HOME;counter]]
                    556: #^counter.clear[]
                    557: ^counter.transaction{
                    558: #      $counter.value(10)
                    559:        $counter.value($counter.value+1)
                    560: #      ^counter.delete[value]
                    561:        $counter.value
                    562: }
                    563: <hr>
                    564: ^rem{
                    565: $hash[^counter.hash[]]
                    566: =$hash.value=
                    567: <hr>
                    568: }
                    569: 
                    570: @tablehash[]
                    571: $productList[^table::set{id    name
                    572: 1      носки
                    573: 2      валенки
                    574: 3      ушанка
                    575: }]
                    576: 
                    577: #скажем, у первого дилера
                    578: $firstPriceList[^table::set{id price
                    579: 1      0.3
                    580: 3      1000
                    581: }]
                    582: 
                    583: $firstPriceHash[^firstPriceList.hash[id]]
                    584: 
                    585: ^productList.menu{
                    586:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                    587: }
                    588: 
                    589: 
                    590: @hashfile[]
                    591: $hf[^hashfile::assign[hashfile]]
                    592: #$hf.paf[крут5]
                    593: paf=$hf.paf
                    594: 
                    595: @formclass[]
                    596: ^$form:CLASS.a=$form:CLASS.a
                    597: 
                    598: @domdata[]
                    599: ^if(1){
                    600: #      $a{^hren[]}
                    601: }
                    602: $a
                    603: $xdoc[^xdoc::create[doc]]
                    604: $doc[$xdoc.documentElement]
                    605: $name[^doc.appendChild[^xdoc.createElement[name]]]
                    606: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                    607: ^untaint[as-is]{=$text.nodeValue=}
                    608: 
                    609: @domedit[]
                    610: ^domdata[]
                    611: #$paf.nodeName<br>
                    612: #$doc.documentElement.nodeName<br>
                    613: 
                    614: ^show_xnode1[$xdoc.documentElement;0;1]
                    615: <hr>
                    616: ^show_xdoc2[$xdoc]
                    617: <hr>
                    618: 
                    619: @domxslt[]
                    620: ^domdata[]
                    621: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                    622: <hr>
                    623: 
                    624: @lsplit2[]
                    625: $path[/optics/]
                    626: $pathTable[^path.lsplit[/]]
                    627: ^pathTable.menu{
                    628:        ^if(def $pathTable.piece){
                    629:                =$pathTable.piece=
                    630:        }
                    631: }
                    632: 
                    633: 
                    634: @faceesize[]
                    635: $k(2)
                    636: $pict[^image::load[paf.gif]]
                    637: $small[^image::create($pict.width/$k;$pict.height/$k)]
                    638: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                    639: $response:body[^small.gif[]]
                    640: 
                    641: @imageresize[]
                    642: $k(2)
                    643: $pict[^image::create(400*$k;200*$k)]
                    644: $pict.line-width(2)
                    645: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    646: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                    647: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    648: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                    649: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                    650: $response:body[^pict.gif[]]
                    651: 
                    652: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                    653: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                    654: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                    655: 
                    656: #$response:body[^small.gif[]]
                    657: 
                    658: 
                    659: @tintdefault[]
                    660: #$abc[abc]
                    661: $abc[33]
                    662: ^abc.int[z]
                    663: #^abc.int(123)
                    664: 
                    665: @ifassignhash[]
                    666: $h[^if(1){$.a(1);$.a(2)}]
                    667: $h.a
                    668: 
                    669: @ifpasshash[]
                    670: $a[$.e[a]]
                    671: $b[$.e[b]]
                    672: ^ifpasshashdest[^if(1){$a;$b}]
                    673: #$x[^if(1){$a}{$b}]
                    674: #^ifpasshashdest[$x]
                    675: 
                    676: @ifpasshashdest[p]
                    677: $p.e
                    678: 
                    679: @movedir[]
                    680: ^file:move[a;deeper/a]
                    681: 
                    682: @replace[]
                    683: $a[12^;3]
                    684: ^a.replace[^table::set{from    to
                    685: 2^;    !
                    686: }]
                    687: 
                    688: 
                    689: @set[]
                    690: ^setdata[]
                    691: ^a.add[$b]
                    692: add:$a.3<br>
                    693: 
                    694: ^setdata[]
                    695: ^a.sub[$b]
                    696: sub2:$a.2<br>
                    697: sub1:$a.1<br>
                    698: 
                    699: ^setdata[]
                    700: $c[^a.union[$b]]
                    701: union3:$c.3<br>
                    702: union2:$c.2<br>
                    703: 
                    704: ^setdata[]
                    705: $c[^a.intersection[$b]]
                    706: intersection3:$c.3<br>
                    707: intersection2:$c.2<br>
                    708: 
                    709: ^setdata[]
                    710: intersects:^if(^a.intersects[$b]){y;n}<br>
                    711: intersects2:^if(^a.intersects[ ]){y;n}<br>
                    712: 
                    713: 
                    714: <hr>
                    715: 
                    716: @setdata[]
                    717: $a[$.1[a1] $.2[a2]]
                    718: $b[        $.2[b2] $.3[b3]]
                    719: 
                    720: 
                    721: @hash[]
                    722: $h[^hash::create[$._default[123]]]
                    723: $h.paf[not kretin]
                    724: $h.paf<br>
                    725: =$h.that=<br>
                    726: 
                    727: @methresult[]
                    728: $result[^table::set{1}]
                    729: 
                    730: @terror[]
                    731: ^error[method z must be called with z]
                    732: 
                    733: @syntax1[]
                    734: #^a[^b]
                    735: 
                    736: @syntax2[]
                    737: #^a[
                    738: 
                    739: @ssave[]
                    740: $abc[abc]
                    741: ^abc.save[abc]
                    742: 
                    743: @calendar[]
                    744: 2001;11:<br>
                    745: $week_days[^date:calendar[rus](2001;11)]
                    746: <pre>
                    747: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }<br>}
                    748: </pre>
                    749: 
                    750: @thash[]
                    751: $table[^table::set{id  name    age
                    752: 1      paf     278
                    753: 2      пиф     234
                    754: }]
                    755: $hash[^table.hash[id;^table::set[nameless]{id
                    756: name}]]
                    757: $hash.2.id $hash.2.name $hash.2.age
                    758: 
                    759: @tdef[]
                    760: $s[0]
                    761: if 0=^if($s){}{n}<br>
                    762: if def 0=^if(def $s){y}{}<br>
                    763: <hr>
                    764: 
                    765: @ford[]
                    766: ^for[i](0;5){$i}{($i)}
                    767: 
                    768: @tif[]
                    769: ^if[def]{y;n}
                    770: 
                    771: @image[]
                    772: $pict[^image::create(400;200)]
                    773: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    774: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                    775: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    776: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                    777: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                    778: $response:body[^pict.gif[]]
                    779: 
                    780: 
                    781: 
                    782: @mail2[]
                    783: ^mail:send[
                    784:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    785:        $.from[Александр Петросян <paf@design.ru>]
                    786:        $.to[Александр Петросян <paf@design.ru>]
                    787:        $.subject[проверка]
                    788:        $.body[проверка]
                    789: ]
                    790: 
                    791: @cookie[]
                    792: $env:HTTP_COOKIE<br>
                    793: 
                    794: #$cookie:переменная[test тест ТЕСТ2]
                    795: =$cookie:переменная=<br>
                    796: #$cookie:переменная2[test тест ТЕСТ3]
                    797: =$cookie:переменная2=<br>
                    798: =$cookie:CLASS.переменная2=<br>
                    799: 
                    800: @response[]
                    801: #^if($form:reload){
                    802:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                    803: #}
                    804: 
                    805: @xslt[]
                    806: ^xdata[]
                    807: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                    808: ^show_xdoc2[$transformed]
                    809: 
                    810: @regexp2[]
                    811: $s[  select]
                    812: $s[^s.match[^^\s*][]{!}]
                    813: $s
                    814: 
                    815: @header[]
                    816: $response:refresh[
                    817:        $.value[0]
                    818:        $.url[http://design.ru?a=^taint[123]]
                    819: ]
                    820: 
                    821: @ttablerem[]
                    822: $table[^table::load[a.cfg]]
                    823: ^table.menu{$table.a}
                    824: 
                    825: @tconnect[]
                    826: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                    827: $tables[^table::sql{show tables}]
                    828: #$cols[^tables.columns[]]
                    829: #$cols.column
                    830: ^tables.menu{
                    831:        $tables.[Tables_in_test]<br>
                    832: }
                    833: }
                    834: 
                    835: @pcre[]
                    836: $s[1 2]
                    837: ^s.match[\s;ig]{!}
                    838: #^s.match[\d;ig]{!}
                    839: 
                    840: 
                    841: @regexp[]
                    842: $s[abcАБВ]
                    843: ^if(^s.match[б][i]){y}{n}
                    844: 
                    845: @mail[]
                    846: #$ORIGINS(1)
                    847: ^mail:send[
                    848:        $.from[paf@design.ru]
                    849:        $.to[paf@design.ru]
                    850:        $.body[1
                    851:        
                    852:        2
                    853:        
                    854:        
                    855:                3]
                    856: ]
                    857: 
                    858: @exec[]
                    859: $a[^file::exec[fc.exe;;a;b]]
                    860: $a.status|$a.stderr<hr>
                    861: 
                    862: @fori[][i]
                    863: ^for[i](1;3){... =$i= ...}
                    864: 
                    865: @xdata0[]
                    866: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                    867: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    868: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    869: <people>
                    870:        <man id="1" имя="word слово">
                    871:                <name>P&#171^;AF        B</name>
                    872:        </man>
                    873:                <man id="2">
                    874:                        <name>ПИФ^taint[&]</name>
                    875:                </man>
                    876: </people>
                    877: }]
                    878: 
                    879: @xdata[]
                    880: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                    881: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    882: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    883: <people>
                    884:        <man id="1" имя="word слово">
                    885:                <name>P&#171^;AF        B</name>
                    886:        </man>
                    887:                <man id="2">
                    888:             <name>ПИФ^taint[&]</name>
                    889:                </man>
                    890: </people>
                    891: }}]
                    892: 
                    893: @xml[]
                    894: ^xdata[]
                    895: 
                    896: ^show_xdoc2[$xdoc]<hr>
                    897: #^show_xnode1[$xdoc]<hr>
                    898: $people[^xdoc.select[*/man]]
                    899: #^show1[]
                    900: ^show_xnodes1[$people]<hr>
                    901: #^people.0.owner.hren[]
                    902: 
                    903: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                    904: 
                    905: by id:
                    906: ^show_xnode1[^xdoc.getElementById[1];0;1]
                    907: <hr>
                    908: 
                    909: @show1[array]
                    910: ^for[i](0;^array._count[]-1){
                    911:     $x[$array.$i]
                    912:        $x.firstChild.nodeValue: 
                    913:                $pattributes[$x.parentNode.attributes]
                    914:                ^if(^pattributes._count[]){
                    915:                        $pattributes.id.name=$pattributes.id.nodeValue
                    916:                }
                    917:        <br>
                    918: }
                    919:        
                    920: @show_xnodes1[array][i]
                    921: ^for[i](0;^array._count[]-1){
                    922:        ^show_xnode1[$array.$i;0;1]
                    923: }
                    924: 
                    925: @show_xnode1[x;level;single][l]
                    926: ^if(def $x){
                    927:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                    928:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    929:        &lt^;$x.nodeName
                    930:            $pairs[$x.attributes]
                    931:            ^if(def $pairs){
                    932:                $names[^pairs._keys[]]
                    933:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                    934:            }
                    935:            &gt^;
                    936:     }{
                    937:        [$x.nodeType]
                    938:     }
                    939:     
                    940:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                    941:     ^show_xnode1[$x.firstChild]($level+1)
                    942:     ^if(!$single){
                    943:            ^show_xnode1[$x.nextSibling]($level)
                    944:     }
                    945: 
                    946:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    947:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                    948:     }
                    949: }
                    950: 
                    951: @show_xdoc2[xdoc]
                    952: ^xdoc.save[out/save.xml;
                    953: #      $.encoding[utf-8]
                    954:        $.method[xml]
                    955: ]
                    956: $file[^xdoc.file[
                    957:        $.encoding[utf-8]
                    958:        $.method[html]
                    959: ]]
                    960: ^file.save[text;out/save_file.html]
                    961: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                    962: <pre>^taint[html][^xdoc.string[
                    963:        $.method[html]
                    964: #      $.encoding[utF-8]
                    965: #      $.omit-xml-declaration[yes]
                    966: #      $.standalone[no]
                    967: #      -$.doctype-public[-//W3C//DTD XHTML]
                    968: #      -$.doctype-system[/a/b/c/]
                    969: #      $.indent[yes]
                    970: #      $.media-type[text/paf]
                    971: ]]
                    972: </pre>

E-mail: