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

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

E-mail: