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

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

E-mail: