Annotation of parser3/src/www/htdocs/index.html, revision 1.542

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

E-mail: