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

1.104     paf         1: @USE
1.105     paf         2: /derived.p
1.145     paf         3: /operators.p
1.15      paf         4: 
1.72      paf         5: @auto[filespec]
                      6: $selffilespec[$filespec]
1.63      paf         7: #$form:here
1.131     paf         8: #$request:charset[UTF-8]
1.177     paf         9: $request:charset[windows-1251]
                     10: $response:charset[windows-1251]
1.112     paf        11: #$response:charset[UTF-8]
1.131     paf        12: #$response:charset[empty]
1.84      paf        13: #$response:content-type[$.value[text/html]$.charset[$response:charset]]
1.15      paf        14: 
1.171     paf        15: @postprocess[body]
1.60      paf        16: #<b>$body</b>
                     17: #$result[123]
1.171     paf        18: $body
                     19: <hr>
                     20: OK
1.37      paf        21: 
1.15      paf        22: @main[]
1.72      paf        23: #$a(123)
                     24: #^a.format[%.10u]
1.71      paf        25: #$result[111]
1.70      paf        26: #^f[a]
1.133     paf        27: #^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
1.88      paf        28: #      ^int:sql{select news_id from news where news_id=-1}[
1.143     paf        29: #      $.default{2}
1.88      paf        30: #      ]<br>
1.115     paf        31: #    ^hash::sql{bad}
1.88      paf        32: #    ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
1.109     paf        33: #      ^file::load[text;^string:sql{select 'from sql server' }]
1.95      paf        34: #      ^string:sql{select '^^hello[]' }] $ORIGINS(1)
1.96      paf        35: #      ^process{       ^^h[]}
1.97      paf        36: #      ^process{^string:sql{select '1
                     37: #      ^^hello[]' }]   }
1.131     paf        38: #      ^double:sql{select '2*' ^; }
1.133     paf        39: #$card_sequence_expect_no(^double:sql{select 20020909131047 #card_sequence_expect_no from card_sequence})
                     40: #^card_sequence_expect_no.format[%15.f]
                     41: #}
1.49      paf        42: #^eval(2)
1.48      paf        43: #^tcrashlocaljunctionsv2[]
1.49      paf        44: #^tcrashlocaljunctions[]
1.50      paf        45: #^tjunctions[]
1.47      paf        46: #^replacetest[]
1.48      paf        47: #^matchoptionpp[]
1.46      paf        48: #^txdocxnodechild[]
1.44      paf        49: #^tclasses[]
1.43      paf        50: #$math:PI
                     51: #^b:method[]
1.42      paf        52: #^main[]
1.41      paf        53: #^errort[]
1.44      paf        54: #^tselectNumber[]
1.39      paf        55: #$result[hello]
1.36      paf        56: #^invaliddate2[]
                     57: #^process2[]
                     58: #^casehashtext[]
1.35      paf        59: #^subjvaltest[]
                     60: #^tableselect0[]
1.34      paf        61: #^memnotest1[]
1.32      paf        62: #^voidparams[]
1.31      paf        63: #^rolls2[]
1.30      paf        64: #^cacheexpireschanging[]
1.29      paf        65: #^cacheexpiresfixed[]
                     66: #^dateoffsets[]
                     67: #^exceptionTypes[]
1.28      paf        68: #^roll2[]
1.27      paf        69: #^rolls[]
1.25      paf        70: #^exceptions1[]
1.22      paf        71: #^locate_by_expr[]
1.18      paf        72: #^method_junction_params{...}
1.17      paf        73: #^verifyCookie[paf]
1.37      paf        74: #^execlangs[]
1.16      paf        75: #$t[^tobjeresult[]]$t.a
                     76: #^xmlprobs[]
1.15      paf        77: #^doubleprobs[]
                     78: #^math:random(-10)
                     79: #^divnamestop[]
                     80: #^arrayclone[]
                     81: #^operator_tricks[]
                     82: #^xoutputrusattr[]
                     83: #^xdocset1[]
                     84: #^regexp3[]
                     85: #^exec2[]
                     86: #^tlock[]
                     87: #^xmloutattrwithoutvalue[]
                     88: #^precisionProblem[]
                     89: #^xpath[]
                     90: #^ttablesetlang[]
                     91: #^ttime[]
                     92: #^tupper[]
                     93: #^treplace[]
                     94: #^xslt2[]
                     95: #^tcache2[]
                     96: #$ORIGINS(1)
                     97: #$t[^table::set{a b} ^table::set{c d}]
                     98: #^ttaintuntaint[]
                     99: #^tappend2[]
                    100: #^badvsnprintf[]
                    101: #^badoracequoting[]
                    102: #^badconstructors[]
                    103: #^xloadwrongtable[]
                    104: #^xsetwrongtable[]
                    105: #^if($form:test){y}{n}
                    106: #^tablecolumnerror[]
                    107: #^roll[]
                    108: #^tableset[]
                    109: #^math:PI.format{%.30f}
                    110: #^xchildren[]
                    111: #^thashforeach3[]
                    112: #^thashforeach2[]
                    113: #^thashforeach[]
                    114: #^thashdelete[]
                    115: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                    116: #^tappend[]
                    117: #^sappend[]
                    118: #^eval(10\3)<br>
                    119: #^tform[]
                    120: #^formattest[]
                    121: #^filelist[]
                    122: #^connect[mysql://user:pass@host]{ }
                    123: #^безнадёжна_попытка_поправить_непоправимое[]
                    124: #^tcache[]
                    125: #^thashfileexp[]
                    126: #^tcounter[]
                    127: #^tablehash[]
                    128: #j^hashfile[]
                    129: #^formclass[]
                    130: #^hren[]
                    131: #^domedit[]
                    132: #^domxslt[]
                    133: #^lsplit2[]
                    134: #^faceesize[]
                    135: #^imageresize[]
                    136: #^ifassignhash[]
                    137: #^tintdefault[]
                    138: #$response:status[404]
                    139: #^ifpasshash[]
                    140: #^movedir[]
                    141: #^replace[]
                    142: #^set[]
                    143: #^hash[]<hr>
                    144: #$t[^methresult[]] ->$t
                    145: #^terror[]
                    146: #^ssave[]
                    147: #^thash[]
                    148: #^tdef[]
                    149: #^ford[]
                    150: #^tif[]
1.84      paf       151: #^image[]
1.15      paf       152: #^response[]
                    153: #^regexp2[]
                    154: #^ttablerem[]
                    155: #^pcre[]
                    156: #^regexp[]<hr>
                    157: #^mail[]
                    158: #^fori[]
                    159: #^tconnect[]
                    160: #^xslt[]
                    161: #^header[]
1.53      paf       162: #^tablehasht[]
1.54      paf       163: #^datecreatestring[]
1.56      paf       164: #^mssqltypes1[]
                    165: #^badthrows[]
1.57      paf       166: #^xmlspace[]
                    167: #^counter[main.counter]
                    168: #^xpath2[]
                    169: #^callindirect[]
                    170: #^junctionprob[]
1.59      paf       171: #^datecreatestring2[]
                    172: #^tstoredproc[]
                    173: #^tstoredproc2[]
                    174: #^forkeys[]
1.60      paf       175: #^pngsize[]
1.61      paf       176: #^checkList[]
1.63      paf       177: #^datetest[]
1.65      paf       178: #^tserge[]
1.69      paf       179: #^envt[]
1.67      paf       180: #^selectt[]
                    181: #^select2[]
                    182: #^selectSingle2[]
                    183: #^selectString2[]
                    184: #^selectNumber2[]
                    185: #^selectBool2[]
                    186: #^xdoccreate[]
                    187: #^xdoccreatetag[]
1.70      paf       188: #^xdocload[]
1.67      paf       189: #^xdocstring[]
                    190: #^xdocsave[]
1.68      paf       191: #^div[]
                    192: #^datecreatestring3[]
1.73      paf       193: #^tfilespec[]
1.77      paf       194: #^tcrypt[]
1.74      paf       195: #^cryptdocsample[]
1.78      paf       196: #^tnormalize[]
1.83      paf       197: #^xmltransformbyxdoc[]
1.81      paf       198: #^sergestrandef[]
1.83      paf       199: #^tstdin[]
                    200: #^tfind[]
1.86      paf       201: #^mimet[]
1.92      paf       202: #^joinlimit[]
1.89      paf       203: #^tableclonelimit[]
1.91      paf       204: #^transparams[]
                    205: #^sendtests[]
1.93      paf       206: #^wwrapperpass[]
1.95      paf       207: #^badpos[]
1.98      paf       208: #^processtest[]
                    209: #^mail3[]
1.100     paf       210: #^datesaving[]
1.101     paf       211: #^badconstructor[]
1.103     paf       212: #^calendar[]
1.104     paf       213: #^monthdays(8)
                    214: #^xdoctypetest[]
1.105     paf       215: #^xtabletest[]
1.117     paf       216: #^staticstest[]
1.108     paf       217: #^staticstest2[]
1.115     paf       218: #^rbodytest[]
                    219: #^cookie[]
1.116     paf       220: #^cookieexpirestest[]
1.119     paf       221: #^postest[]
1.120     paf       222: #^voidpostest[]
1.122     paf       223: #^badcolumntest[]
1.124     paf       224: #^delimiters[]
1.125     paf       225: #^новый-split[]
1.127     paf       226: #^грязные-cookie[]
                    227: #^html-почта[]
                    228: #^badswitchtest[]
1.128     paf       229: #^okswitchtest[]
1.131     paf       230: #^cgit[]
1.132     paf       231: #^ttransformsep[]
1.133     paf       232: #^calltest[]
1.134     paf       233: #^xpath3[]
1.139     paf       234: #^doubleliterals[]
                    235: #^newxor[]
1.135     paf       236: #^mail2[]
1.139     paf       237: #^exec[]
1.140     paf       238: #^passpost[]
1.141     paf       239: #^fordelim[]
1.143     paf       240: #^duplicatetable2hashkey[]
1.142     paf       241: #^duplicatehashsqlkey[]
1.145     paf       242: #^longlreplace[]
                    243: #^table2hash_onecolumn[]
1.146     paf       244: #^crossopvars[]
1.148     paf       245: #^three[]
1.149     paf       246: #^badLangAfterCatch[]
1.150     paf       247: #^zeroinstdin[]
1.151     paf       248: #^shifts[]
                    249: #^jspace[]
1.152     paf       250: #^hashselfmodification[]
                    251: #^emptyTransformResult[]
                    252: #^badxdoccreate[]
1.154     paf       253: #^if(-d "CVS"){y}{n}
1.155     paf       254: #^badjunctioncall[]
1.156     paf       255: #^russianindex[]
                    256: #^virtualtest[]
                    257: #^xml[]
                    258: #^mail4[]
1.157     paf       259: #^voidconstructorpass[]
1.160     paf       260: #^$form:CLASS.a=$form:CLASS.a<br>
                    261: #^cookie2[]
                    262: #^menudelim[]
1.158     paf       263: #^touchittest[]
1.162     paf       264: #^touchittest2[]
1.160     paf       265: #^opauto[]
1.161     paf       266: #^trycontextt[]
                    267: #^tfor[]
1.162     paf       268: #^user-foreach-test[]
                    269: #^includet[]
1.163     paf       270: #^derived:includet[]
1.164     paf       271: #^fortestsep[]
1.165     paf       272: #^derived:inclass_process_test[]
                    273: #$derived[^derived::create[]]^derived.inclass_process_test[]
1.166     paf       274: #^domorigint[]
1.167     paf       275: #^junctiontest2[]
1.169     paf       276: #^junctionselftest[]
1.170     paf       277: #^bad-compiletosystem[]
                    278: #^steppedfor[i](1;10;2){$i }
1.171     paf       279: #^file:fullpath[a.gif]<br>
                    280: #^file:fullpath[/abs/a.gif]<br>
                    281: #$form:a/$form:image-map=
                    282: #^foreachform[]
                    283: #^selectSingleoct[]
                    284: #^compilebug[]
                    285: #^badhashcreate[]
1.172     paf       286: #^badsendmail[]
                    287: #^keygenedhash[]<br>
                    288: #<hr>[$env:HTTP_REFERER]
                    289: #$response:Content-TypE[bad]
1.174     paf       290: #^emailhead2[]
1.175     paf       291: #^includet2overridedynamic[]
1.176     paf       292: #^includet2overridestatic[]
1.177     paf       293: #^virtualtest2[]
                    294: #^message-id-test[]
1.179     paf       295: #^test_exif[jpg]
1.183   ! paf       296: #^http_prefix[]
1.179     paf       297: #^http_prefix_table[]
1.180     paf       298: #^http_prefix_xml[]
1.183   ! paf       299: ^imagefont[]
        !           300: 
        !           301: @imagefont[]
        !           302: $image[^image::create(200;30)]
        !           303: height(font)=1950<br>
        !           304: $alph[ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя0123456789-+=!\"%:,.^;<>?@()^[^]'&*/]
        !           305: ^^alph.length[]=^alph.length[]<br>
        !           306: ^eval(1950/^alph.length[])[%.10f]
        !           307: 
        !           308: ^image.font[$alph;0/font.gif](20)
        !           309: ^image.text(0;0)[Привет*]
        !           310: $response:body[^image.gif[]]
1.179     paf       311: 
                    312: @http_prefix_xml[]
1.180     paf       313:  $xdoc[^xdoc::load[http://www.cbr.ru/scripts/XML_daily.asp?date_req=02/03/2002;
                    314: #      $.method[HEAD]
                    315:        $.headers[
                    316:                $.user-agent[1]
                    317:        ]
                    318: ]]
1.181     paf       319: 
1.179     paf       320: <pre>^taint[^xdoc.string[]]</pre>
                    321: 
                    322: @http_prefix_table[]
                    323: $table[^table::load[nameless;http://www.artlebedev.ru;$.USER-AGENT[paf]]]
                    324: ^table.count[]
                    325: <hr>
                    326: <pre>$table.0</pre>
                    327: 
                    328: @http_prefix[]
                    329: #$file[^file::load[text;http://www.artlebedev.ru]]
                    330: #$file[^file::load[text;http://www.artlebedev.ru;alt]]
1.182     paf       331: #$file[^file::load[text;http://parser3/exif.html;
1.180     paf       332: $file[^file::load[text;http://parser3/none;
                    333:        $.headers[
                    334:                $.USER-AGENT[paf]
                    335:        ]
1.179     paf       336: ]]
1.181     paf       337: server: $file.SERVER<br>
1.179     paf       338: $file.status
                    339: <hr>
                    340: <pre>$file.text</pre>
1.177     paf       341: 
1.178     paf       342: @test_exif[dir]
                    343: $file[^file:list[$dir;\.(jpe?g|JPE?G)^$]]
                    344: <table border=1>
1.177     paf       345: ^file.menu{
1.178     paf       346: <tr valign=top>
1.177     paf       347:        $image[^image::measure[$dir/$file.name]]
1.178     paf       348:        <td>^image.html[$.width(100)$.height(100)]</td>
                    349:        <td>
                    350:                $file.name<hr>
                    351:        $exif[$image.exif]
                    352:        ^if($exif){
                    353:                $keys[^exif._keys[]] ^keys.sort{$keys.key}
                    354:                ^keys.menu{
                    355:                        $key[$keys.key]
                    356:                        $value[$exif.$key]
                    357: 
                    358:                        ${key}: <b>^show_exif_value[$value]</b><br>
                    359:                }
                    360:        }{
                    361:                no EXIF info<br>
                    362:        }
                    363:     </td>
                    364: </tr>
                    365: }
                    366: </table>
                    367: 
                    368: @show_exif_value[value][i]
                    369: ^if($value is hash){
                    370:        ^for[i](0;$value-1){$value.$i}[,]
                    371: }{
                    372:        $value
1.177     paf       373: }
1.178     paf       374: 
1.177     paf       375: 
                    376: @message-id-test[]
                    377: ^mail:send[
                    378:        $.from[paf@mail]
                    379:        $.to[paf@mail]
                    380:        $.subject[test]
                    381: #      $.message-id[<1@parser.ru>]
                    382:        $.Message-id[<2@parser.ru>]
                    383:        $.subject[проверка]
                    384:        $.text[мычит!]
                    385: ]
1.176     paf       386: 
                    387: @virtualtest2[]
                    388: $derived[^derived::create[]]
                    389: ^derived.first[]
                    390: 
1.174     paf       391: 
1.175     paf       392: @includet2overridedynamic[]
1.176     paf       393: includet2overridedynamic:<br>
                    394: shold say 'hello in some.p'<br>
                    395: <hr>
1.174     paf       396: $derived[^derived::create[]]
                    397: ^derived.includet2override[]
1.175     paf       398: 
                    399: @includet2overridestatic[]
1.176     paf       400: includet2overridestatic:<br>
                    401: shold say 'hello in derived.p'<br>
                    402: because in static classes there's no way to determine derived class (no virtual mech becase of no virtual table)<br>
                    403: <hr>
1.175     paf       404: ^derived:includet2override[]
1.172     paf       405: 
                    406: @emailhead2[]
                    407: ^mail:send[
                    408:        $.charset[koi8-r]
                    409:        $.from[paf@design.ru]
                    410:        $.to[paf@mail]
1.174     paf       411: #      $.reply-to[^taint[agat] <^taint[ag_7k@mail.ru]>]
                    412: $user[^taint[agat]]
                    413: $email[^taint[ag_7k@mail.ru]]
                    414:        $.reply-to[$user $email]
                    415:        $.subject[test2]
1.172     paf       416: ]
                    417: 
                    418: @keygenedhash[]
                    419: $table[^table::create{key      value
                    420: 1      a
                    421: 2      b
                    422: }]
                    423: $hash[^table.hash($table.key*2)]
                    424: '$hash.4.value' must be 'b'
1.171     paf       425: 
                    426: @badsendmail[]
                    427: ^mail:send[
                    428:        $.from[hren < paf@design.ru
                    429:        >]
                    430:        $.to[paf@design.ru]
                    431:        $.subject[test]
                    432: ]
                    433: 
                    434: @badhashcreate[]
                    435: $hash[
                    436:        $.ok[1]
                    437: ]
                    438: $.bad[1]
                    439: 
                    440: @compilebug[]
                    441: ^a[]^#31=
                    442: 
                    443: @selectSingleoct[]
                    444: $d[^xdoc::create[doc]]
                    445: $element[^d.selectSingle[$nothing]]
                    446: 
                    447: 
                    448: @foreachform[]
                    449: <a href=index.cgihtml?one&a=1&two&b=2&three?1,2>one</a><br>
                    450: <a href=index.cgihtml?one&a=1&two&b=2&three?shit>two</a><br>
                    451: 
                    452: ^form:fields.foreach[key;value]{
                    453:         $key -- $value
                    454: }[<br>]
                    455: <hr>
                    456: $nameless[$form:tables.nameless]
                    457: ^if(def $nameless){
                    458:        nameless table -- ^nameless.menu{$nameless.field}[,]
                    459: }
                    460: ^if(def $form:imap){
                    461:        <hr>
                    462:        IMAP $form:imap.x : $form:imap.y
                    463: }
1.170     paf       464: 
                    465: @steppedfor[name;from;to;step;code]
                    466: $caller.$name($from)
                    467: ^while($caller.$name<=$to){
                    468:        $code
                    469:        ^caller.$name.inc($step)
                    470: }
1.169     paf       471: 
                    472: @bad-compiletosystem[]
                    473: ^process[$string:CLASS]{@a[]
                    474: }
1.168     paf       475: 
                    476: @junctionselftest[]
                    477: $derived[^derived::create[]]^derived.explodejunction{$tomain[tomainOK]}
                    478: ^$tomain=$tomain
1.166     paf       479: 
                    480: @junctiontest2[]
                    481: ^if($if is junction){is junction;not junction}<br>
                    482: ^if(def $if){defined;not defined}<br>
1.165     paf       483: 
                    484: @domorigint[]
                    485: $xdoc[^xdoc::create[вася]]
                    486: ^xdoc.firstChild.setAttribute[name;значение]
                    487: $var[$xdoc.firstChild.nodeName]
                    488: ^throw[paf;$var]
                    489: 
1.163     paf       490: 
                    491: @fortestsep[][i]
                    492: ^for[i](1;3){$i}[,]
1.162     paf       493: 
                    494: @includet[]
                    495: ^include[some.p]
                    496: ^included_method[2]
                    497: 
                    498: @user-foreach-test[][key;value]
                    499: ^user-foreach[key;value]{$key=$value<br>}
                    500: 
                    501: @user-foreach[key;value;code]
                    502: ^for[i](1;10){
                    503:        $caller.$key($i)
                    504:        $caller.$value($i*2)
                    505:        $code
                    506: }
                    507: 
1.161     paf       508: 
                    509: @tfor[][i]
                    510: ^for[i](1;10){
                    511: $i
                    512: }
1.160     paf       513: 
                    514: @trycontextt[]
                    515: ^try{
                    516:        ^trycontexttsub[]
                    517: }{
                    518:        $exception.handled(0)
                    519: }
                    520: 
                    521: 
                    522: @trycontexttsub[]
                    523: ^bad[]
                    524: 
                    525: 
                    526: @opauto[]
                    527: ^reada[]
1.159     paf       528: 
                    529: 
1.157     paf       530: @rusage2[]
1.77      paf       531: <hr>
1.74      paf       532: OK
1.157     paf       533: 
                    534: @rusage2[]
                    535: $s[$status:rusage]
                    536: 
                    537: ^s.tv_sec.format[%.0f].^s.tv_usec.format[%06.0f]
                    538: 
1.150     paf       539: 
1.156     paf       540: @voidconstructorpass[]
                    541: $a[$form:a]
                    542: =^form:a.int(1)=
                    543: =^a.int(1)=
                    544: 
                    545: 
1.155     paf       546: @russianindex[]
                    547: #dir with files with russian-lang names
                    548: $where[dir]
                    549: 
                    550: $dir[^file:list[$where;\.txt^$]]
                    551: ^dir.menu{
                    552:        <a href=$where/^untaint[uri]{$dir.name}>$dir.name</a><br>
                    553: }
                    554: 
1.154     paf       555: @badjunctioncall[]
                    556: ^badjunctioncallinside{code}
                    557: 
                    558: @badjunctioncallinside[code]
1.155     paf       559: xx^code[]
1.152     paf       560: 
                    561: @badxdoccreate[]
                    562: $xdoc[^xdoc::create[вася]]
                    563: #$xdoc[^xdoc::create{<?xml version="1.0" encoding="$request:charset"?><doc>вася</doc>}]
                    564: 
                    565: ^xdoc.firstChild.setAttribute[name;значение]
                    566: ^xdoc.string[]
                    567: 
                    568: 
                    569: @emptyTransformResult[]
                    570: $input[^xdoc::create[docBad]]
                    571: $sheet[^xdoc::create{<?xml version="1.0"?> 
                    572: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
                    573:        <xsl:template match="doc">
                    574:                output
                    575:        </xsl:template>
                    576: </xsl:stylesheet>
                    577: }]
                    578: $output[^input.transform[$sheet]]
                    579: $response:body[^output.file[]]
                    580: 
                    581: @hashselfmodification[]
                    582: $hash[
                    583:        $.a[1]
                    584:        $.b[2]
                    585: ]
                    586: ^hash.foreach[key;value]{
                    587: #      $hash.c[1]
                    588:        $hash.a[1]
                    589: }      
                    590: 
                    591: @touchittest[][i]
1.160     paf       592: $i[before]
                    593: ^touchit[]
                    594: $i
                    595: 
                    596: @touchittest2[]
1.158     paf       597: $i[before]
1.152     paf       598: ^touchit[]
                    599: $i
                    600: 
1.151     paf       601: 
                    602: @jspace[]
                    603: $a(1)
                    604: ^jspace_call{^eval($a*2)}
                    605: #$a(2)
                    606: #$junction
                    607: 
                    608: @jspace_call[param][a]
                    609: $a[unrelcfgdfgated]
                    610: $junction<br>
                    611: $junction.a(2)
                    612: $junction<br>
                    613: 
1.150     paf       614: @shifts[]
                    615: ^eval(1<<3)<br>
                    616: ^eval(8>>2)<br>
1.151     paf       617: #^if(1=1){y;n}<br>
1.150     paf       618: 
1.149     paf       619: 
                    620: @zeroinstdin[]
                    621: #$f[^file::exec[a.pl;$.stdin[$.shit[]]]]
                    622: $f[^file::exec[a.pl;$.stdin[^file::load[binary;1z2.txt]]]]
                    623: =$f.text=
                    624: ^f.save[binary;1z2.out]
1.148     paf       625: 
                    626: @badLangAfterCatch[]
                    627: ^try{
                    628:        $a[ 
                    629:                тут язык сменился на pass_appended
                    630:                ^throw[user;test]
                    631:                и улетело с не тем  языком
                    632:        ]
                    633: }{
                    634:        $exception.handled(1)
                    635: }
                    636: 1  2
1.145     paf       637: 
                    638: @crossopvars[]
                    639: #^one[]<hr>
                    640: ^two[]<hr>
                    641: 
                    642: @table2hash_onecolumn[]
                    643: $t[^table::create{a
                    644: 1
                    645: 1
                    646: }]
                    647: #^t.hash[a]
                    648: #^t.hash[a;b]
                    649: $h[^t.hash[a][$.distinct(1)]]
                    650: $h.1.a
1.143     paf       651: 
                    652: @longlreplace[]
1.144     paf       653: $str1[  мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла ]
1.143     paf       654: $str2[ела]
                    655: $str[Мама $str1 раму]
                    656: 
1.144     paf       657: ^str.replace[^table::create[nameless]{мыла     $str2}]
1.141     paf       658: 
                    659: @duplicatehashsqlkey[]
                    660: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                    661:        $t[^table::sql{select * from news}]
                    662:        $c[^t.columns[]]
                    663:        ^c.menu{$c.column}[,]
                    664: 
1.142     paf       665:        $h[^hash::sql{select news_type_id, name from news}[$.distinct(1)]]
1.141     paf       666: }
                    667: 
                    668: @duplicatetable2hashkey[]
                    669: $t[^table::create{a    b
                    670: 1      2
                    671: 1      3
                    672: }]
1.142     paf       673: #^t.hash[a]
                    674: #^t.hash[a;b]
                    675: ^t.hash[a][$.distinct[1]]
1.140     paf       676: 
                    677: @menudelim[]
                    678: $t[^table::create{a
                    679: 1
                    680: 2
                    681: 3
                    682: 4
                    683: 5
                    684: }]
                    685: 
                    686: ^t.menu{^if($t.a<3){}{$t.a}}[,]
                    687: 
                    688: @fordelim[]
                    689: ^for[a](0;6){^if($a<3){}{$a}}[,]
                    690: 
1.135     paf       691: 
1.139     paf       692: @passpost[]
                    693: <form method=post name="test" id="test">
                    694: <textarea name="text" cols=20 rows =6>^taint[html][1
                    695: 2
                    696: 
                    697: 3]</textarea><br>
                    698: <input type=submit>
                    699: </form>
                    700: 
                    701: ^if(def $form:text){
                    702:        $a[^file::cgi[a.pl]]
                    703:        $a.text|$a.status|$a.stderr<hr>
                    704: }
                    705: 
                    706: @exec[]
                    707: #$a[^file::exec[a.cmd]]
                    708: $a[^file::cgi[a.cmd]]
                    709: $a.text|$a.status|$a.stderr<hr>
                    710: 
                    711: 
1.137     paf       712: @newxor[]
1.138     paf       713: ^eval(1!|2 #примечание()zzz
                    714: |0x100)<br>
1.137     paf       715: #^eval(1!||2)<br>
                    716: ^if(1!|1){y}{n}
                    717: 
                    718: #@method[$bad]
1.136     paf       719: 
1.135     paf       720: @doubleliterals[]
                    721: #^eval(1e-10)
                    722: ^eval("1e-20")
1.133     paf       723: 
                    724: @xpath3[]
                    725: $constr[^xdoc::create{<?xml version="1.0" encoding="$request:charset" standalone="no"?> <constructor-data><object object_type_id="1" template_id="1" data_process_id="1" is_published="1">проверка</object> <block-list> <block name="date" type="0" label="Дата" is_hide_pub="1" data_type="1"/> <block name="content" type="0" label="Текст" is_hide_pub="1" data_type=""/> </block-list></constructor-data>}]
                    726: $objectData[^constr.selectSingle[/constructor-data/object]]
                    727: $objectData.nodeType<br>
                    728: $objectData.firstChild.nodeValue
                    729: 
                    730: @calltest[]
                    731: ^calltest2[string]
                    732: 
                    733: @calltest2[s]
                    734: $s
1.131     paf       735: 
                    736: @ttransformsep[]
                    737: $input[^xdoc::load[20020909131046.xml]]
                    738: $output[^input.transform[generated.xsl]]
                    739: ^output.string[]
1.127     paf       740: 
                    741: @okswitchtest[]
                    742: $local[local value]
                    743: ^switch[1]{
                    744:        ^case[1]{1code $local}
                    745: }
                    746: 
                    747: @badswitchtest[]
                    748: ^switch[1]{
                    749:        ^badswitchtestcase[]
                    750: }
                    751: @badswitchtestcase[][local]
                    752: $local[local value]
                    753:        ^case[1]{1code $local}
                    754: 
                    755: @badjunction[]
                    756: ^badj1[]
                    757: ^badj2[]
                    758: 
                    759: @html-почта[]
                    760: $переменная[значение]
                    761: ^mail:send[
                    762:        $.from[paf@mail]
                    763:        $.to[paf@mail]
                    764:        $.subject[htmltest1]
                    765:        $.html{тест$переменная=  !}
                    766: ]
                    767: 
1.124     paf       768:                  
                    769: @грязные-cookie[]
1.126     paf       770: $cookie:a[&]
1.125     paf       771: $cookie:a
1.124     paf       772: 
                    773: @новый-split[]
                    774: $abc[a.b.c]
                    775: #$table[^abc.split[.]]
                    776: #$table[^abc.split[.;l]]
                    777: #$table[^abc.split[.;v]]
                    778: $table[^abc.split[.;lv]]
                    779: ^table.menu{$table.piece}[,]
                    780: <hr>
                    781: #$table[^abc.split[.;h]]
                    782: $table[^abc.split[.;hr]]
                    783: $table.0,$table.1,$table.2<br>
1.123     paf       784: 
                    785: @delimiters[]
                    786: $a#1[1]<br>
                    787: $a#1=<br>
                    788: 
1.121     paf       789: 
                    790: @badcolumntest[]
                    791: $table[^table::load[ext.cfg]]
                    792: $table.b
                    793: 
1.120     paf       794: 
                    795: @virtualtest[]
                    796: $derived[^derived::create[derived create actual param]]
                    797: ^derived.test[]
                    798: 
1.119     paf       799: 
                    800: @voidpostest[]
                    801: $s[]
                    802: ^s.pos[$nothing]
1.118     paf       803: 
                    804: @postest[]
                    805: $s[$nothing]
                    806: ^s.pos[$nothing]
1.113     paf       807: 
1.115     paf       808: @cookieexpirestest[]
                    809: #$cookie:exptest[1]
                    810: #$cookie:exptest[$.value[2] $.expires(+1)]
                    811: $response:xxxx[^date::now(+10)]
                    812: $response:yyy[$.value[^date::now(+20)]]
                    813: $response:yyy[$.value[vvv] $.aaaa[^date::now(+20)]]
                    814: 
1.113     paf       815: @rbodytest[]
                    816: $request:body=
                    817: <form method=post>
                    818: <input type=submit name=paf value=123>
                    819: </form>
1.107     paf       820: 
                    821: @staticstest2[]
                    822: ^$derived:derived_var=$derived:derived_var<br>
                    823: ^$derived:a=$derived:a<br>
1.108     paf       824: $derived:a[changed] ^$derived:a=$derived:a<br>
1.107     paf       825: $derived:derived_var[changed] 
                    826: ^$derived:derived_var=$derived:derived_var<br>
                    827: 
1.105     paf       828: @staticstest[]
                    829: $derived[^derived::create[]]
                    830: ^derived.test[]
1.110     paf       831: <hr>
1.106     paf       832: ^$derived.a=$derived.a<br>
                    833: ^$derived.x=$derived.x<br>
1.110     paf       834: <hr>
                    835: ^if($derived is derived){derived is derived}{error: derived is not derived}<br>
                    836: ^if($derived is table){derived is table}{error:derived is not table}<br>
1.111     paf       837: <hr>
                    838: ^^eval(^$derived)=^eval($derived)<br>
                    839: ^^if(^$derived)=^if($derived){y}{n}<br>
1.106     paf       840: 
1.105     paf       841: 
1.104     paf       842: @xdoctypetest[]
                    843: $xdoc[^xdoc::create[x]]
                    844: ^if($xdoc is xdoc){y}{n}
                    845: 
                    846: @xtabletest[]
                    847: $xtableo[^xtable::create[]]
                    848: ^if($xtableo is table){y}{n}
1.105     paf       849: #^xtableo.columns[]
1.100     paf       850: 
1.103     paf       851: @monthdays[month]
                    852: $from[^date::create(2000;$month;1)]
                    853: $to[^date::create($from)] ^to.roll[month](+1)
                    854: $result($to-$from)
                    855: 
1.100     paf       856: @badconstructor[]
                    857: ^date::now[]
1.99      paf       858: 
                    859: @datesaving[]
                    860: $now[^date::now[]]
                    861: $now.daylightsaving<br>
                    862: $now.yearday<br>
                    863: #
                    864: $date[^date::create(2002;1;3)]
                    865: $date.daylightsaving<br>
                    866: $date.yearday
1.97      paf       867: 
1.98      paf       868: @mail4[]
                    869: ^mail:send[
                    870:        $.from[paf@mail.design.ru]
                    871:        $.to[paf@mail.design.ru]
1.156     paf       872:        $.subject[^taint[uri][москва=E0_+ ]=2]
1.98      paf       873:        $.text[^taint[uri][москва]=]
                    874:        $.html{<a href=http://there.ru/?city=^taint[uri][Москва]>link</a>}
                    875: ]
1.97      paf       876: @processtest[]
                    877:     $f[^file::load[text;piece.p]]      ^process{$f.text}
                    878:        $ORIGINS(1)
1.93      paf       879: 
                    880: 
                    881: @badpos[]
                    882: $s[123]
1.94      paf       883: ^s.mid(0;2)
1.92      paf       884: 
                    885: @wwrapperpass[]
                    886: $h[^hash::create[]]
                    887: $h.a(1)
                    888: ^my_method[^if(1){$h}]
                    889: работает. так и должно быть?
                    890: 
                    891: @my_method[p]
                    892: ^p._count[]
                    893: 
1.88      paf       894: 
                    895: @tableclonelimit[]
                    896: $source[^table::create{a
                    897: aa
                    898: bb
                    899: cc}]
                    900: ^source.offset(1)
                    901: #$dest[^table::create[$source]]
                    902: $dest[^table::create[$source;$.offset(2)]]
                    903: $dest[^table::create[$source;$.limit(2)]]
                    904: $dest[^table::create[$source;$.offset(1)$.limit(1)]]
                    905: $dest[^table::create[$source;$.offset(1)$.limit(2)]]
                    906: $dest[^table::create[$source;$.offset[cur]$.limit(2)]]
                    907: 
                    908: ^dest.menu{$dest.a}[,]<br>
                    909: 
                    910: @joinlimit[]
                    911: $source[^table::create{a
                    912: aa
                    913: bb
                    914: cc}]
                    915: ^source.offset(2)
                    916: $dest[^table::create{a
                    917: xx
                    918: }]
                    919: #^dest.join[$source]
                    920: #^dest.join[$source;$.offset(2)]
                    921: #^dest.join[$source;$.limit(2)]
                    922: #^dest.join[$source;$.offset(1)$.limit(1)]
                    923: #^dest.join[$source;$.offset(1)$.limit(2)]
1.91      paf       924: #^dest.join[$source;$.offset[cur]$.limit(1)]
                    925: ^dest.join[$source;$.limit(0)]
1.88      paf       926: 
                    927: ^dest.menu{$dest.a}[,]<br>
1.86      paf       928: 
                    929: @cgit[]
                    930: $f[^file::cgi[showenv.cmd]]
                    931: $f.HELLO=<br>
                    932: $f.CONTENT-TYPE=<br>
                    933: $f.content-type=<br>
                    934: 
1.83      paf       935: 
1.84      paf       936: @mimet[]
1.85      paf       937: $f[^file::stat[a.GIF]]
                    938: $f.content-type
1.84      paf       939: 
                    940: 
1.83      paf       941: @tfind[]
                    942: ^file:find[index.html]
                    943: 
                    944: @tstdin[]
                    945: $f[^file::exec[test.pl;$.stdin[проверка stdin потока]]]
                    946: <pre>$f.text</pre>
1.80      paf       947: 
                    948: @sergestrandef[]
                    949: $sQuantity[ ]
                    950: ^sQuantity.int(10)
1.78      paf       951: 
                    952: @xmltransformbyxdoc[]
                    953: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    954: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    955: <people>
                    956:        <man id="1" имя="word слово">
                    957:                <name>1  2</name>
                    958:        </man>
                    959: </people>
                    960: }}]
                    961: $sheet[^xdoc::create{<?xml version="1.0"?> 
1.79      paf       962: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                    963: 
                    964: >
1.78      paf       965: <!--<xsl:output doctype-public ="-//W3C//DTD XHTML" indent="yes"/>-->
                    966: 
1.79      paf       967:        <!--<xsl:import href="http://localhost/html.xsl"/>-->
                    968:        <xsl:import href="html.xsl"/>
                    969: 
1.78      paf       970: <xsl:param name="param1">defparam1</xsl:param>
                    971: <xsl:param name="param2">defparam2</xsl:param>
1.79      paf       972: 
1.78      paf       973: 
                    974:        <xsl:template match="doc">
                    975:                param1=<xsl:value-of select="^$param1"/><br/>
                    976:                param2=<xsl:value-of select="^$param2"/><br/>
                    977: 
                    978:                test return <something background=""/>
                    979:        </xsl:template>
                    980: 
                    981:        <xsl:template name="test">
1.81      paf       982:                test return3
1.78      paf       983:        </xsl:template>
                    984: 
                    985:   <xsl:template match="people">
                    986:      <html>
1.155     paf       987:      <head>
                    988: <link type='text/xml' rel='alternate' href='/Default.vsdisco'/>
                    989: z</head>
1.78      paf       990:                para1=<xsl:copy-of select="^$param1"/>
                    991:        <xsl:apply-templates/>
                    992:        <hr/>
                    993:        <xsl:call-template name="test"/>
                    994:      </html>   
                    995:   </xsl:template>
                    996: 
                    997:   <xsl:template match="name">
                    998:     <b><xsl:value-of select="."/></b>
                    999:   </xsl:template>
                   1000: </xsl:stylesheet>
                   1001: }]
                   1002: 
                   1003: 
                   1004: $xdoc[^xdoc.transform[$sheet]]
                   1005: $string[^xdoc.string[$.method[html]]]
                   1006: ^string.save[a]
                   1007: ^untaint[html]{$string}
                   1008: 
                   1009: 
1.77      paf      1010: 
                   1011: @tnormalize[]
                   1012: #s состоит из 1000 фрагментов
                   1013: $s[^for[i](0;999){фрагмент }]
                   1014: #это займет много ресурсов
                   1015: ^s.match[фраг][g]{перга}
                   1016: #это займет меньше ресурсов
                   1017: #$normalized[^s.normalize[]]
                   1018: #^normalized.match[фраг][g]{перга}
1.74      paf      1019: 
                   1020: @sendtests[]
1.89      paf      1021: ^text[]
1.74      paf      1022: #^html[]
                   1023: #^text-n-html[]
                   1024: #^file[]
                   1025: #^text-n-file[]
1.89      paf      1026: #^text-n-html-n-file[]
1.74      paf      1027: #^backwardcomp[]
                   1028: 
                   1029: @backwardcomp[]
                   1030: ^mail:send[
                   1031:        $.from[paf]
                   1032:        $.to[paf]
                   1033:        $.body[this is text value]
                   1034: ]
                   1035: 
                   1036: @text[]
                   1037: ^mail:send[
                   1038:        $.from[paf]
1.90      paf      1039:        $.to[paf]
1.74      paf      1040:        $.text[
                   1041:                $.value[this is text value]
                   1042:        ]
                   1043: ]
                   1044: 
                   1045: @html[]
                   1046: ^mail:send[
                   1047:        $.from[paf]
                   1048:        $.to[paf]
                   1049:        $.html{this is <b>html</b> value ^taint[<] 10}
                   1050: ]
                   1051: 
                   1052: @text-n-html[]
                   1053: ^mail:send[
                   1054:        $.from[paf]
                   1055:        $.to[paf]
                   1056:        $.text[
                   1057:                $.value[this is text value]
                   1058:        ]
                   1059:        $.html[
                   1060:        $.value{this is <b>html</b> value ^taint[<] 10}
                   1061:        ]
                   1062: ]
                   1063: 
                   1064: @file[]
                   1065: ^mail:send[
                   1066:        $.from[paf]
                   1067:        $.to[paf]
                   1068:        $.file[^file::load[binary;image.jpg]]
                   1069: ]
                   1070: 
                   1071: @text-n-file[]
                   1072: ^mail:send[
                   1073:        $.from[paf]
                   1074:        $.to[paf]
                   1075:        $.text[
                   1076:                $.value[this is text value]
                   1077:        ]
                   1078:        $.file[^file::load[binary;image.jpg]]
                   1079: ]
                   1080: 
                   1081: @text-n-html-n-file[]
                   1082: ^mail:send[
                   1083:        $.from[paf]
                   1084:        $.to[paf]
                   1085:        $.text[
                   1086:                $.value[this is text value]
                   1087:        ]
                   1088:        $.html[
                   1089:        $.COntent-type[$.value[text/html]$.charset[windows-1251xx]]
                   1090:        $.value{this is <b>html</b> value ^taint[<] 10}
                   1091:        ]
                   1092:        $.file[^file::load[binary;image.jpg]]
                   1093: ]
                   1094: 
                   1095: 
                   1096: 
                   1097: @md5salt[]
                   1098: 1234
                   1099: 
                   1100: @cryptdocsample[]
                   1101: $users[^table::create{name     password
                   1102: alice  ***
                   1103: bob    ***
                   1104: }]
                   1105: 
                   1106: $htpasswd[^table::create[nameless]{}]
                   1107: ^users.menu{
                   1108:        ^htpasswd.append{$users.name:^math:crypt[$users.password;^$apr1^$^md5salt[]]}
                   1109: }
                   1110: 
                   1111: ^htpasswd.save[nameless;.htpasswd-parser-test]
                   1112: 
1.73      paf      1113: 
                   1114: @tcrypt[]
1.76      paf      1115: #^math:crypt[123;^$apr1^$1234567890abcdef]<br>
                   1116: ^math:crypt[123;^$apr1^$]<br>
1.72      paf      1117: 
                   1118: @tfilespec[]
                   1119: src=$selffilespec<br>
                   1120: dirname=^file:dirname[$selffilespec]<br>
                   1121: basename=^file:basename[$selffilespec]<br>
                   1122: justname=^file:justname[$selffilespec]<br>
                   1123: justext=^file:justext[$selffilespec]<br>
1.68      paf      1124: 
                   1125: @datecreatestring3[]
                   1126: $new_after[^date::now(-3)]
                   1127: $articles[^table::create{id    title   last_update
                   1128: 1      привет  2002-07-03}]
                   1129: ^articles.menu{
                   1130:     $last_update[^date::create[$articles.last_update]]
                   1131:     <a href=${articles.id}.html>$articles.title</a>
                   1132:     ^if($last_update > $new_after){новая}
                   1133:     <br>
                   1134: }
1.67      paf      1135: 
                   1136: @div[]
                   1137: $var(5)
                   1138: ^var.inc(7)
                   1139: ^var.dec(3)
                   1140: ^var.div(4)
                   1141: ^var.mul(2)
                   1142: $var
                   1143: 
                   1144: 
                   1145: @xdocsave[]
                   1146: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                   1147: <document>
                   1148: строка1<br/>
                   1149: строка2<br/>
                   1150: </document>}]
                   1151: ^document.save[test.xml]
                   1152: 
                   1153: @xdocstring[]
                   1154: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                   1155: <document>
                   1156: строка1<br/>
                   1157: строка2<br/>
                   1158: </document>}]
                   1159: ^document.string[
                   1160:     $.method[html]
                   1161: ]
                   1162: 
                   1163: 
                   1164: @xdocload[]
                   1165: $document[^xdoc::load[article.xml]]
                   1166: $response:body[^document.file[$.media-type[text/xml]]]
                   1167: 
                   1168: 
                   1169: @xdoccreatetag[]
                   1170: $document[^xdoc::create[document]]
                   1171: $paraNode[^document.createElement[para]]
                   1172: $dummy[^document.documentElement.appendChild[$paraNode]]
                   1173: $response:body[^document.file[$.media-type[text/xml]]]
                   1174: 
                   1175: 
                   1176: @xdoccreate[]
                   1177: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                   1178: <document>
                   1179: текст
                   1180: </document>}]
                   1181: $response:body[^document.file[$.media-type[text/xml]]]
                   1182: 
                   1183: @selectBool2[]
                   1184: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1185: <t attr="привет" n="123"/>}]
                   1186: ^if(^d.selectBool[/t/@n > 10]){
                   1187:     /t/@n больше 10
                   1188: }{
                   1189:     не больше
                   1190: }
                   1191: 
                   1192: 
                   1193: @selectNumber2[]
                   1194: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1195: <t attr="привет" n="123"/>}]
                   1196: ^d.selectNumber[number(/t/@n)+1]<br>
                   1197: ^d.selectNumber[2*2]<br>
                   1198: 
                   1199: 
                   1200: @selectString2[]
                   1201: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1202: <t attr="привет" n="123"/>}]
                   1203: # результат=привет
                   1204: ^d.selectString[string(t/@attr)]
                   1205: 
                   1206: 
                   1207: @selectSingle2[]
                   1208: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1209: <t attr="привет" n="123"/>}]
                   1210: # результат=один элемент "t"
                   1211: $element[^d.selectSingle[t]]
                   1212: # результат=2 (количество атрибутов <t>)
                   1213: Количество атрибутов: ^element.attributes._count[]<br>
                   1214: # результат=не существует (нет <x>)
                   1215: ^if(^d.select[x]){
                   1216:     x существует
                   1217: }{
                   1218:     x не существует
                   1219: }
                   1220: 
                   1221: @select2[]
                   1222: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                   1223: # результат: список из одного элемента "t"
                   1224: $list[^d.select[t]]
                   1225: # результат: 2 = количество атрибутов <t>
                   1226: ^list.0.attributes._count[]<br>
                   1227: ^for[i](0;$list-1){
                   1228:     $attr[$list.$i]
                   1229:     $attr.nodeName = $attr.nodeType<br>
                   1230: }
                   1231: 
                   1232: 
                   1233: @selectt[]
                   1234: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                   1235: $list[^d.select[t]]
                   1236: ^list.0.attributes._count[]
1.65      paf      1237: 
                   1238: @envt[]
1.66      paf      1239: $f[^file::exec[showenv.cmd;
                   1240:        $.bad[value]
                   1241:        $.CGI_good[value]
                   1242: ]]
1.65      paf      1243: $f.status<br>
                   1244: $f.stderr<br>
                   1245: <pre>$f.text</pre>
                   1246: 
1.63      paf      1247: 
                   1248: @tserge[]
1.64      paf      1249: ^if(" 09 "){y}
1.61      paf      1250: 
                   1251: @datetest[]
                   1252:        $f[^file::stat[some.zip]]
                   1253: Размер в байтах: $f.size<br>
                   1254: Год создания: $f.cdate.year<br>
                   1255: $now[^date::now[]]
                   1256: $DAYS_CONSIDERED_NEW(3)
                   1257: Статус: ^if($f.mdate >= $now-$DAYS_CONSIDERED_NEW){новый;старый}
                   1258: 
1.60      paf      1259: 
                   1260: @checkList[]
                   1261: ...^oneOf[a;a,b,c]...<br>
                   1262: #...^oneOf[a;ax,b,c]...<br>
                   1263: ...^oneWord[word]...<br>
                   1264: #...^oneWord[wo rd]...<br>
                   1265: 
                   1266: 
                   1267: @oneOf[s;list][t] выдаёт строку, если строка она есть в списке(разделенном запятыми)
                   1268: $t[^list.lsplit[,]]
                   1269: ^if(!^t.locate[piece;$s]){^throw[user;$s;unknown]}
                   1270: $result[$s]
                   1271: 
                   1272: @oneWord[s]
                   1273: ^if(^s.match[\W]){^throw[user.data;$s;not word]}{$s}
1.59      paf      1274: 
                   1275: @pngsize[]
                   1276: $i[^image::measure[test.png]]
                   1277: ^i.html[]
                   1278: 
                   1279: 
                   1280: @forkeys[]
                   1281: $text[^form:fields.foreach[key;val]{$key=$val
                   1282: }]
                   1283: ^text.save[ttt.txt]
                   1284: =$text=
                   1285: 
                   1286: 
                   1287: @tstoredproc2[]
                   1288: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                   1289:        ^void:sql{exec pafvoid}
                   1290: }
                   1291: 
                   1292: @tstoredproc[]
                   1293: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                   1294:        $t[^table::sql{exec pafproc}]
                   1295: #      $t[^table::sql{{call pafproc}}]
                   1296:        $c[^t.columns[]]
                   1297:        ^c.menu{$c.column}[<br>]
                   1298: }
1.57      paf      1299: 
                   1300: @datecreatestring2[]
1.58      paf      1301: <table border=1>
                   1302: ^datecreatestring2show[2000]
                   1303: ^datecreatestring2show[2000-02]
1.59      paf      1304: ^datecreatestring2show[2000-2-03]
1.58      paf      1305: ^datecreatestring2show[2000-02-03 15]
                   1306: ^datecreatestring2show[2000-02-03 15:30] 
                   1307: ^datecreatestring2show[2000-02-03 15:30:04] 
                   1308: ^datecreatestring2show[2000-02-03 15:30:04 hren] 
                   1309: ^datecreatestring2show[15:30] 
                   1310: ^datecreatestring2show[15:30:05] 
                   1311: ^datecreatestring2show[15:30:05 hren] 
                   1312: </table>
                   1313: 
                   1314: @datecreatestring2show[s]
                   1315: $date[^date::create[$s]]
                   1316: <tr>
                   1317: <td>$s</td><td align=right>^date.sql-string[]</td>
                   1318: </tr>
                   1319: 
1.57      paf      1320: 
                   1321: @junctionprob[][l]
                   1322: $l[123]
                   1323: $a{$l}
                   1324: ^junctionprobnested[$a]
                   1325: @junctionprobnested[p]
                   1326: $p
                   1327: 
                   1328: 
                   1329: @callindirecttarget[]
                   1330: callindirecttarget called
                   1331: @callindirect[]
                   1332: $f[$callindirecttarget]
                   1333: ^f[]
                   1334: 
                   1335: @xpath2[]
                   1336: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
                   1337: <doc>
                   1338: <field-list>
                   1339: <field name="aa"/>
                   1340: <field name="bb"/>
                   1341: </field-list>
                   1342: </doc>
                   1343: }]
                   1344: 
                   1345: #^xdoc.string[]
                   1346: 
                   1347: $fieldList[^xdoc.selectSingle[/doc/field-list]]
                   1348: #^fieldList.childNodes._count[]
                   1349: $fields[^fieldList.select[field]]
                   1350: #^fields._count[]
                   1351: ^fields.foreach[k;node]{
                   1352:        $node.nodeName<br>
                   1353: }
                   1354: @counter[filespec][f;s]
                   1355: ^file:lock[$filespec]{
                   1356:        $f[^file::load[text;$filespec]]
                   1357:        $s[^eval($f.text+1)]
                   1358:        ^s.save[$filespec]      
                   1359: }
                   1360: $s
1.56      paf      1361: 
                   1362: @xmlspace[]
                   1363: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                   1364: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1365: <people>
                   1366:        <man id="1" имя="word слово">
                   1367:                <name>1  2</name>
                   1368:        </man>
                   1369: </people>
                   1370: }}]
                   1371: $xdoc[^xdoc.transform[global.xsl]]
                   1372: $string[^xdoc.string[$.method[html]]]
                   1373: ^string.save[a]
                   1374: ^untaint[html]{$string}
                   1375: 
                   1376: @badthrows[]
                   1377: #^throw[a;b;]
                   1378: ^throw[a;]
1.54      paf      1379: 
                   1380: @mssqltypes1[]
                   1381: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
1.55      paf      1382: #    ^string:sql{select { ts '1998-05-02 01:23:56.123' }}
                   1383: #    ^string:sql{select CAST({ ts '1998-05-02 01:23:56.123' }AS smalldatetime)}
                   1384: #      ^string:sql{select CAST({ts '2002-04-28 00:00:00.000'} AS smalldatetime)}
                   1385:        $t[^table::sql{select a from paf}]
                   1386:        ^t.count[]
1.54      paf      1387: }
1.51      paf      1388: 
1.53      paf      1389: @datecreatestring[]
1.54      paf      1390: $d[^date::create[2002-04-33 01:03:04]]
1.53      paf      1391: ^d.sql-string[]
1.52      paf      1392: 
                   1393: @method[hash]
                   1394: $hash.key
                   1395: @mainZ[]
                   1396: ^method[
                   1397:     $.key{code}
                   1398: ]
                   1399: 
1.51      paf      1400: @tablehasht[]
                   1401: $t[^table::create{p
                   1402: 1
                   1403: 3
                   1404: 2
                   1405: 4}]
                   1406: 
                   1407: $h[^t.hash[p]]
                   1408: 
                   1409: =^h._count[]=
                   1410: 
                   1411: 
                   1412: @sqldefaults[]
                   1413: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                   1414:        ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
                   1415:     ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
                   1416: }
1.60      paf      1417: =======
                   1418: <hr>
                   1419: OK
                   1420: >>>>>>> 1.50
1.48      paf      1421: 
                   1422: @tcrashlocaljunctionsv2[]
                   1423: $a[
                   1424:        $b{  $c[1] }
                   1425: ]
                   1426: $b
                   1427: $c
                   1428: 
                   1429: @tcrashlocaljunctions[]
                   1430: $var[aaa]
                   1431: ^if(1){
                   1432: ^tcrashlocaljunctions1[]
                   1433: }
                   1434: 
                   1435: $j
                   1436: 
1.49      paf      1437: @tcrashlocaljunctions1[][var]
                   1438: $var[varvalue]
1.48      paf      1439:        $j{
                   1440:                $var
                   1441:        }
1.49      paf      1442: $j
1.48      paf      1443: 
                   1444: @tjunctions[][tl]
                   1445: $t[^t::create[]]
                   1446: ^tjunctionsi[]
                   1447: 
                   1448: @tjunctionsi[][tl]
                   1449: $tl[12345]
                   1450: ^t.tjunctionsm[
                   1451:        $.key{
                   1452:                $tl
                   1453:        }
                   1454: ]
1.46      paf      1455: 
1.47      paf      1456: @replacetest[]
                   1457: $b[b]
                   1458: $s[
                   1459: aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1460: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1461: ]
                   1462: ^s.replace[^table::create{from to
                   1463: ba     !_}]
                   1464: 
                   1465: 
1.46      paf      1466: @matchoptionpp[]
1.47      paf      1467: #$ORIGINS(1)
1.46      paf      1468: $s[
                   1469: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.47      paf      1470: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1471: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1472: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1473: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1474: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1475: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1476: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1477: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1478: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46      paf      1479: ]
                   1480: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
                   1481: 
1.44      paf      1482: 
                   1483: @txdocxnodechild[]
                   1484: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
                   1485: $xdoc.nodeName
                   1486: ^xdoc.selectNumber[2*2]
1.45      paf      1487: $xdoc:ELEMENT_NODE
1.44      paf      1488: 
                   1489: 
                   1490: @tclasses[]
                   1491: $t[^t::create[]]
                   1492: ^t.method[]
                   1493: <hr>
                   1494: ^t.base_method[]
                   1495: 
1.40      paf      1496: 
                   1497: @errort[]
1.42      paf      1498: ^xdoc::create[a]
1.40      paf      1499: #^throw[user;here;this]
                   1500: 
                   1501: @tselectNumber[]
                   1502: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
                   1503: ^d.selectString[string(d/@attr)]<br>
                   1504: ^d.selectNumber[2*2]<br>
                   1505: ^d.selectNumber[number(/d/@n)+1]<br>
                   1506: 
1.34      paf      1507: 
1.36      paf      1508: @invaliddate2[]
                   1509: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
                   1510: 
                   1511: @process2[]
                   1512: ^^process{
                   1513:        ^process{
                   1514:                ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
                   1515:        }
                   1516: }
                   1517: 
1.35      paf      1518: @casehashtext[]
                   1519: $tt[1]
                   1520: $tmp[
                   1521:         ^switch[$tt]{
                   1522:                 ^case[1]{
                   1523:                         $.aaa[123]
                   1524:                 }
                   1525:                 ^case[DEFAULT]{
                   1526:                         $.bbb[456]
                   1527:                 }
                   1528:         }
1.36      paf      1529:         shit!
1.35      paf      1530: ]
1.36      paf      1531: #$tmp
1.35      paf      1532: $tmp.aaa
                   1533: 
                   1534: @subjvaltest[]
                   1535: $a12[val]
                   1536: $b[12]
                   1537: $a$b
                   1538: 
1.34      paf      1539: @tableselect0[]
                   1540: $person[^table::create{name    height
                   1541: paf    1.77
                   1542: шохин  2.07
                   1543: moko   1.77
                   1544: }]
                   1545: $nottoohigh[^person.select($person.height<2)]
                   1546: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32      paf      1547: 
                   1548: @transparams[]
                   1549: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
                   1550: $odoc[^idoc.transform[global.xsl;
                   1551:        $.param1['1']
                   1552:        $.param2['2']
                   1553: ]]
                   1554: <pre>^taint[^odoc.string[$.method[html]]]
                   1555: 
                   1556: @memnotest1[]
                   1557: ^for[i](0;4000){
                   1558: 
                   1559:  $xxxx[$i]
                   1560:  $xxxx
                   1561: 
                   1562: }
                   1563: 
                   1564: @memnotest1notes[]
                   1565: одна итерация цикла:
                   1566: [Mon Apr  8 20:12:02 2002] execution-------------------------|
1.35      paf      1567: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32      paf      1568: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                   1569: [Mon Apr  8 20:12:02 2002]  "|| "
                   1570: [Mon Apr  8 20:12:02 2002] 12:WITH_ROOT
                   1571: [Mon Apr  8 20:12:02 2002] 13:VALUE
                   1572: [Mon Apr  8 20:12:02 2002]  "xxxx" string
1.35      paf      1573: [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      1574: [Mon Apr  8 20:12:02 2002] 16:WITH_READ
                   1575: [Mon Apr  8 20:12:02 2002] 17:VALUE
                   1576: [Mon Apr  8 20:12:02 2002]  "i" string
                   1577: [Mon Apr  8 20:12:02 2002] 18:GET_ELEMENT
1.35      paf      1578: [Mon Apr  8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
                   1579: [Mon Apr  8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32      paf      1580: [Mon Apr  8 20:12:02 2002] 15:CONSTRUCT_VALUE
                   1581: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                   1582: [Mon Apr  8 20:12:02 2002]  "| "
                   1583: [Mon Apr  8 20:12:02 2002] 12:WITH_READ
                   1584: [Mon Apr  8 20:12:02 2002] 13:VALUE
                   1585: [Mon Apr  8 20:12:02 2002]  "xxxx" string
                   1586: [Mon Apr  8 20:12:02 2002] 14:GET_ELEMENT
                   1587: [Mon Apr  8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
                   1588: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
1.35      paf      1589: [Mon Apr  8 20:12:02 2002]  "||"'469617+=24 VString -> 0 !optimize[6]'
1.32      paf      1590: [Mon Apr  8 20:12:02 2002] <-ja returned
                   1591: [Mon Apr  8 20:12:02 2002] ja->
                   1592: 
                   1593: 201/328=0.612804878049 %%optimized
                   1594: 
                   1595: 1.
                   1596: CREATE_*POOL
                   1597:     сделать
                   1598: *POOL_POOLED+CODE
                   1599:     где
                   1600:         wwrapper
                   1601:         и(возможно) wcodeframe
                   1602:         +string
                   1603:         стековая переменная
                   1604: 
                   1605: 2.
                   1606: избавиться от обёртки при возврате результата process [см. тело _for]
                   1607: 
                   1608: 3.
                   1609: сделать callback для process, чтобы вынести invariants из _for & co.
                   1610: 
                   1611: 4.
                   1612:  @todo склеить get_element и write_value (при вставлении? write_value)
                   1613: 
                   1614: 5.
                   1615: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
                   1616: обёртка сразу выбрасывается = не нужна]
                   1617: 
                   1618: 6.
                   1619: process вариант получить именно string, без VString обёртки [часто обёртка
                   1620: сразу выбрасывается = не нужна]
                   1621: 
                   1622: 7.
                   1623: string head, убить 8 байт неправильной link
1.31      paf      1624: 
                   1625: @voidparams[]
                   1626: ^voidparamsm[$form:field]
                   1627: 
                   1628: @voidparamsm[p]
                   1629: ^p.int(123)
1.29      paf      1630: 
1.30      paf      1631: @rolls2[]
                   1632: $now[^date::now[]]
                   1633: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
                   1634: ^for[i](1;12){
                   1635:        ^d.roll[month](-1) ^d.sql-string[]<br>
                   1636: }
                   1637: 
1.29      paf      1638: @cacheexpireschanging[]
                   1639: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
                   1640:     ^cache[^date::now(+4/24/60/60)]
                   1641: #    ^cache(2)
1.30      paf      1642: #    ^cache(0)
1.29      paf      1643:        ^math:random(100)
                   1644: }
                   1645: 
                   1646: 
                   1647: 
                   1648: @cacheexpiresfixed[]
                   1649: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
                   1650:        ^math:random(100)
                   1651: }
                   1652: 
                   1653: @dateoffsets[]
                   1654: $d[^date::create(^date::now[]+1/24/60)]
                   1655: #$d[^date::now(+1/24/60)]
                   1656: ^d.sql-string[]
                   1657: #$d
1.26      paf      1658: 
1.28      paf      1659: @exceptionTypes[]
                   1660: #    parser.compile       ^test[}                компиляция (непарная скобка, ...)
                   1661: #    parser.runtime       ^if(0).                параметры (больше/меньше, чем нужно, не тех типов, ...)
                   1662: #    number.zerodivision  ^eval(1/0) ^eval(1%0)
                   1663: #    number.format        ^eval(abc*5)
                   1664: #    file.missing         ^file:delete[delme]                       not found
                   1665: #    file.access          ^table::load[.]                       no rights
                   1666: #    image.format         ^image::measure[index.html]                        not gif/jpg
                   1667: #    sql.connect          ^connect[mysql://baduser:pass@host/db]{}                       not found/timeout
                   1668: #    sql.execute          ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}}                       syntax error
                   1669: #    xml                  ^xdoc::create{<forgot?>}                       any error in xml/xslt libs
                   1670: #    smtp.connect                                not found/timeout
                   1671: #    smtp.execute                                communication error
                   1672: 
1.26      paf      1673: @roll2[]
                   1674: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27      paf      1675: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26      paf      1676: 
1.25      paf      1677: 
                   1678: @rolls[]
                   1679: $d[^date::create(2002;4;4)]
                   1680: ^d.sql-string[]<br>
                   1681: ^for[i](1;7){
                   1682: ^d.roll[day](-1)
                   1683: ^d.sql-string[]<br>
                   1684: }
                   1685: <hr>
                   1686: $d[^date::create(2002;3;28)]
                   1687: ^d.sql-string[]<br>
                   1688: ^for[i](1;7){
                   1689: ^d.roll[day](+1)
                   1690: ^d.sql-string[]<br>
                   1691: }
                   1692: <hr>
                   1693: $d[^date::create(2002;12;3)]
                   1694: ^d.sql-string[]<br>
                   1695: ^for[i](1;14){
                   1696: ^d.roll[day](-1)
                   1697: ^d.sql-string[]<br>
                   1698: }
                   1699: <hr>
                   1700: $d[^date::create(2002;10;19)]
                   1701: ^d.sql-string[]<br>
                   1702: ^for[i](1;14){
                   1703: ^d.roll[day](+1)
                   1704: ^d.sql-string[]<br>
                   1705: }
                   1706: 
                   1707: 
                   1708: 
                   1709: 
                   1710: 
1.22      paf      1711: 
                   1712: @exceptions1[]
                   1713: ^try{
                   1714:        aaa
1.24      paf      1715:        ^throw[custom1;paf;is stupid]
1.22      paf      1716: }{
1.24      paf      1717:        ^if($exception.type eq custom1){
1.28      paf      1718: #              $exception.handled(1)
                   1719:        ^throw[$exception]
1.24      paf      1720:                type=$exception.type<br>
                   1721:            source=$exception.source<br>
                   1722:            file=$exception.file<br>
                   1723:            lineno=$exception.lineno<br>
                   1724:        comment=$exception.comment<br>
                   1725:        }
1.22      paf      1726: }
1.21      paf      1727: 
                   1728: @locate_by_expr[]
                   1729: $t[^table::create{a    b
                   1730: 1      nok
                   1731: 2      ok
                   1732: 3      nok
                   1733: }]
                   1734: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf      1735: 
                   1736: @method_junction_params[param]
                   1737: ^if($param is junction){junction}{ne junction}
                   1738: 
                   1739: @verifyCookie[value] 
                   1740: ^if($cookie:dummyvote eq $value){ 
                   1741:        $result(1) 
                   1742: }{ 
                   1743:        $cookie:dummyvote[$value] 
                   1744:        $result(0) 
                   1745: }
1.16      paf      1746: 
                   1747: @execlangs[]
1.20      paf      1748: $f[^file::exec[test.pl]]
1.36      paf      1749: err:$f.stderr<br>
1.16      paf      1750: ^process{$f.text}
                   1751: #$c[^t.columns[]]
                   1752: #^c.menu{
                   1753: #* $c.column<br>
                   1754: #}
1.36      paf      1755: c:$t.c<br>
1.16      paf      1756: 
                   1757: @tobjeresult[]
                   1758: ^table::create{a
                   1759: 12}
1.15      paf      1760: 
                   1761: @xmlprobs[]
                   1762: $xmlDataType[^xdoc::load[program.xml]]
                   1763: #<pre>^taint[^xmlDataType.string[]]
                   1764: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                   1765: #=^xmlDataTypes._count[]=
                   1766: =^xmlDataTypes.0.getAttribute[type-id]=
                   1767: 
                   1768: @doubleprobs[]
                   1769: $1(^math:radians(180))
                   1770: $2($math:PI)
                   1771: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                   1772: ^if($1==$2){y;n}
                   1773: ^if(^math:radians(180)==$math:PI){y;n}
                   1774: 
                   1775: 
                   1776: @divnamestop[]
                   1777: $a(10)
                   1778: ^eval($a\3)
                   1779: 
                   1780: @arrayclone[]
                   1781: $t[^table::create{a    b
                   1782: 1      11
                   1783: 2      22
                   1784: }]
                   1785: $c[^table::create[$t]]
                   1786: ^c.append{2    33}
                   1787: ^t.count[]
                   1788: ^c.count[]
                   1789: 
                   1790: @operator_tricks[]
                   1791: ^if(1){$a[^t[]]}
                   1792: $a!
                   1793: $a($b)
                   1794: ^if(1){y}{n}
                   1795: $MAIN:a(^t[] eq OK)
                   1796: #$MAIN:a(1)
                   1797: ^if($a){y}{n}
                   1798: #^if(1){y}{n}
                   1799: $form:if
                   1800: $a[$.n[1]]
                   1801: $a.if
                   1802: 
                   1803: @xoutputrusattr[]
                   1804: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                   1805: ^show_xdoc2[$d]
                   1806: 
                   1807: @xdocset1[]
                   1808: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                   1809: ^show_xdoc2[$d]
                   1810: 
                   1811: @regexp3[]
                   1812: $s[abcАБВ]
                   1813: ^if(^s.match[][i]){y}{n}
                   1814: 
                   1815: 
                   1816: @exec2[]
                   1817: $a[^file::exec[bin/t.cmd]]
                   1818: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                   1819: 
                   1820: 
                   1821: @tlock[]
                   1822: ^file:lock[lockfile]{
                   1823:        code
                   1824: }
                   1825: 
                   1826: @xmloutattrwithoutvalue[]
                   1827: #$ORIGINS(1)
                   1828: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                   1829: $doc[^doc.transform[global.xsl]]
                   1830: =^taint[html][^doc.string[$.method[html]]]=
                   1831: 
                   1832: 
                   1833: 
                   1834: @precisionProblem[]
                   1835: $a[123456789012345678901234567890]
                   1836: $b(^a.double[])
                   1837: ^b.format{%.20E}
                   1838: <hr>
                   1839: ^eval(2*2)
                   1840: 
                   1841: @xpath[]
                   1842: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1843: <document><block><p>привет</p></block></document>
                   1844: }]
                   1845: #^show_xdoc2[$xdoc]
                   1846: $node[^xdoc.selectSingle[/document/block/p]]
                   1847: ^if(def $node){
                   1848:        ^if($node is string){
                   1849:                $node
                   1850:        }{
                   1851:        ^if($node is hash){
                   1852:                ^node._count[]
                   1853:        }{
                   1854:                $node.nodeType
                   1855:        }
                   1856:        }
                   1857: #$node.firstChild.nodeValue
                   1858: }{
                   1859:        node not found
                   1860: }
                   1861: 
                   1862: 
                   1863: @ttablesetlang[]
                   1864: $a-tab-b[a     b
                   1865: 1      2]
                   1866: 
                   1867: $t[^table::set{$a-tab-b}]
                   1868: =$t.a=
                   1869: <hr>
                   1870: 
                   1871: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                   1872: =$t.0=
                   1873: <hr>
                   1874: 
                   1875: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                   1876: =$t.a=
                   1877: 
                   1878: #^t.append{1   2}
                   1879: 
                   1880: @mail3[]
                   1881: ^mail:send[
1.98      paf      1882:        $.from[Александр Петросян <paf@mail.design.ru>]
                   1883:        $.to[Александр Петросян <paf@mail.design.ru>]
                   1884:        $.subject[проверка2]
1.15      paf      1885:        $.body[
                   1886:                $.text[
                   1887:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
1.98      paf      1888:                        $.body[проверка^taint[uri][москва]=]
1.15      paf      1889:                ]
                   1890:                $.attachment[
                   1891:                        $.value[^file::load[text;index.html]]
                   1892:                        $.file-name[привет всем.html]                   
                   1893:                ]
                   1894:        ]
                   1895: ]
                   1896: 
                   1897: 
                   1898: @ttime[]
                   1899: $now[^date::now[]]
                   1900: $now.hour:$now.minute
                   1901: 
                   1902: @tupper[]
                   1903: $t[abcABCабвАБВ]
                   1904: $t<br>
                   1905: ^t.upper[]
                   1906: 
                   1907: @treplace[]
                   1908: $copy-paste-clean[^table::set{a b
                   1909: .      _
                   1910: ,      _
                   1911: +      _
                   1912: &      _
                   1913: ?      _
                   1914: =      _}]
                   1915: 
                   1916: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                   1917: # почему-то этот replace роняет апач в 500 ошибку :(
                   1918: #^cache_key.replace[$copy-paste-clean]
                   1919: $test[abc]
                   1920: ^test.save[$cache_key]saved<br>
                   1921: $cache[^file:list[.;\.cache^$]]
                   1922: ^file:delete[$cache_key]deleted($cache.name)<br>
                   1923: 
                   1924: 
                   1925: 
                   1926: @xslt2[]
                   1927: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1928: <document><block><p>привет</p></block></document>
                   1929: }]
                   1930: ^show_xdoc2[$xdoc]
                   1931: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                   1932: <hr>
                   1933: 
                   1934: 
                   1935: @tcache2[]
                   1936: ^cache[$DB_HOME/keyключ](2){
                   1937:        ^math:random(100)
                   1938: }
                   1939: 
                   1940: @ttaintuntaint[]
                   1941: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                   1942: 
                   1943: ]zz
                   1944: <hr>
                   1945: ^untaint[html]{1^taint[  ]2  3}
                   1946: 
                   1947: 
                   1948: @tappend2[]
                   1949: $t[^table::set{a       b}]^t.append{1  2}$t.a
                   1950: 
                   1951: @badvsnprintf[]
                   1952: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                   1953: }
                   1954: 
                   1955: 
                   1956: @badoracequoting[]
                   1957: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                   1958: ^connect[$SQL.connect-string]{
                   1959: ^void:sql{delete from paf}
                   1960: ^void:sql{insert into paf values (1, '$form:text')}
                   1961: $paf[^table::sql{select * from paf}]
                   1962: ^paf.menu{
                   1963:        $paf.id: ^untaint{$paf.block}<hr>
                   1964: 
                   1965: }
                   1966: <hr>
                   1967: 
                   1968: 
                   1969: ^rem{
                   1970: $news[^table::sql{select description from news}[$.limit(3)]]
                   1971: ^news.menu{
                   1972:        ^untaint{$news.description}<hr>
                   1973: 
                   1974: }
                   1975: <hr>
                   1976: }
                   1977: 
                   1978: $tables[^table::sql{select table_name from user_tables}]
                   1979: ^tables.menu{
                   1980: $tables.table_name<br>
                   1981: }
                   1982: 
                   1983: }
                   1984: <hr>
                   1985: $env:PATH
                   1986: 
                   1987: @badconstructors[]
                   1988: $bred[^string::length[]]
                   1989: $bred[^response::clear[]]
                   1990: $bred[^int::int[]]
                   1991: 
                   1992: 
                   1993: @xloadwrongtable[]
                   1994: $constr[^xdoc::load[wrongtable.xml]]
                   1995: ^show_xdoc2[$constr]
                   1996: 
                   1997: @xsetwrongtable[]
                   1998: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                   1999: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   2000: 
                   2001: 
                   2002: @tablecolumnerror[]
                   2003: $t[^table::set{a}]
                   2004: $t.$a
                   2005: 
                   2006: @roll[]
                   2007: #$date[^date::set(1970;1;2)]
                   2008: #^date.roll[month](-1)
                   2009: $date[^date::set(2038;1;1)]
                   2010: ^date.roll[month](+1)
                   2011: $date.year  $date.month  $date.day
                   2012: 
                   2013: @cookie2[]
                   2014: #=$cookie:clientType[$.value[test]]=<br>
1.159     paf      2015: =$cookie:CLASS.clientType=<br>
1.15      paf      2016: 
                   2017: 
                   2018: @tableset[]
                   2019: $a[^table::set{a
                   2020: 1
                   2021: 2}]
                   2022: ^eval(100\$a)
                   2023: 
                   2024: 
                   2025: 
                   2026: @zzz[]
                   2027: 
                   2028: 
                   2029: $constructor[
                   2030: <block1 name="main_srvr" type="0" label="Основное тело" />
                   2031: <block2 name="main_srvr2" type="0" label="Основное тело" />
                   2032: ]
                   2033: 
                   2034: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   2035: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   2036: 
                   2037: $children[$constr.documentElement.childNodes]
                   2038: ^if($children){
                   2039: ^for[i](1;^children._count[]){
                   2040:        $node[$children.$i]
                   2041:        $node.nodeName<br>
                   2042: }
                   2043: }
                   2044:    
                   2045: 
                   2046: @thashforeach3[]
                   2047: $h[
                   2048:        $.a[1] 
                   2049:        $.b[2]
                   2050: ]
                   2051: $c[^table::set{a
                   2052: ^h.foreach[key;value]{$value
                   2053: }}]
                   2054: $c.a
                   2055: 
                   2056: @thashforeach2[]
                   2057: $h[
                   2058:        $.a[1] 
                   2059:        $.b[2]
                   2060: ]
                   2061: $c[
                   2062: ^h.foreach[key;value]{
                   2063:        $.$key[$value]
                   2064: }
                   2065: ]
                   2066: $c.b
                   2067: 
                   2068: @thashforeach[]
                   2069: $h[
                   2070:        $.a[1] 
                   2071:        $.b[2]
                   2072: ]
                   2073: ^h.foreach[key;value]{
                   2074:        $key=$value<br>
                   2075: }
                   2076: 
                   2077: @thashdelete[]
                   2078: $h[$.a[1] $.b[2]]
                   2079: was:<br>
                   2080: count=^h._count[] <br>
                   2081: b='$h.b' <br>
                   2082: 
                   2083: ^h.delete[b] 
                   2084: 
                   2085: now:<br>
                   2086: count=^h._count[] <br>
                   2087: b='$h.b' 
                   2088: 
                   2089: @sappend[]
                   2090: $test[123]
                   2091: ^test.save[test]
                   2092: ^test.save[append;test]
                   2093: 
                   2094: @tappend[]
                   2095: $test[^table::set{a    b
                   2096: a1     b1}]
                   2097: ^test.save[test]
                   2098: $test[^table::set{a    b
                   2099: a2     b2}]
                   2100: ^test.save[append;test]
                   2101: 
                   2102: 
                   2103: @tform[]
                   2104: ^if(def $form:new_file){y}{n}
                   2105: <form method="post" enctype="multipart/form-data">
                   2106: <input type="file" name="new_file" />
                   2107: <input type=submit>
                   2108: </input>
                   2109: 
                   2110: @formattest[]
                   2111: $size(15.124)
                   2112: 
                   2113: ^size.format{%.2f}
                   2114: 
                   2115: @filelist[]
                   2116: $html[^file:list[.;\.html^$]]
                   2117: ^html.menu{
                   2118:        $html.name<br>
                   2119: }
                   2120: <hr>
                   2121: 
                   2122: @безнадёжна_попытка_поправить_непоправимое[]
                   2123: $dom_from_disk[^xdoc::load[input.xml]]
                   2124: $dom_created_in_air[^xdoc::create[doc]]
                   2125: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                   2126: ^show_xdoc2[$dom_created_in_air]
                   2127: 
                   2128: 
                   2129: @tcache[]
                   2130: #^hashfile:clear[cache]
                   2131: $code[^hashfile::open[$DB_HOME;cache]]
                   2132: ^code.cache[key](2){
                   2133:        ^math:random(100)
                   2134: #      ^code.delete[]
                   2135: }
                   2136: 
                   2137: @thashfileexp[]
                   2138: $hf[^hashfile::open[$DB_HOME;hashfile]]
                   2139: $hf.paf[$.value[крут] $.expires(3)]
                   2140: paf=$hf.paf
                   2141: <hr>
                   2142: ^hf.foreach[key;value]{
                   2143:        $key=$value<br>
                   2144: }
                   2145: <hr>
                   2146: $hash[^hf.hash[]]
                   2147: =$hash.paf=
                   2148: <hr>
                   2149: 
                   2150: @tcounter[]
                   2151: ^tcounterone[$DB_HOME]
                   2152: other root:
                   2153: ^tcounterone[${DB_HOME}2]
                   2154: again, first:
                   2155: ^tcounterone[$DB_HOME]
                   2156: 
                   2157: @tcounterone[DB_HOME]
                   2158: $counter[^hashfile::open[$DB_HOME;counter]]
                   2159: #^counter.clear[]
                   2160: ^counter.transaction{
                   2161: #      $counter.value(10)
                   2162:        $counter.value($counter.value+1)
                   2163: #      ^counter.delete[value]
                   2164:        $counter.value
                   2165: }
                   2166: <hr>
                   2167: ^rem{
                   2168: $hash[^counter.hash[]]
                   2169: =$hash.value=
                   2170: <hr>
                   2171: }
                   2172: 
                   2173: @tablehash[]
                   2174: $productList[^table::set{id    name
                   2175: 1      носки
                   2176: 2      валенки
                   2177: 3      ушанка
                   2178: }]
                   2179: 
                   2180: #скажем, у первого дилера
                   2181: $firstPriceList[^table::set{id price
                   2182: 1      0.3
                   2183: 3      1000
                   2184: }]
                   2185: 
                   2186: $firstPriceHash[^firstPriceList.hash[id]]
                   2187: 
                   2188: ^productList.menu{
                   2189:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                   2190: }
                   2191: 
                   2192: 
                   2193: @hashfile[]
                   2194: $hf[^hashfile::assign[hashfile]]
                   2195: #$hf.paf[крут5]
                   2196: paf=$hf.paf
                   2197: 
                   2198: @formclass[]
                   2199: ^$form:CLASS.a=$form:CLASS.a
                   2200: 
                   2201: @domdata[]
                   2202: ^if(1){
                   2203: #      $a{^hren[]}
                   2204: }
                   2205: $a
                   2206: $xdoc[^xdoc::create[doc]]
                   2207: $doc[$xdoc.documentElement]
                   2208: $name[^doc.appendChild[^xdoc.createElement[name]]]
                   2209: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                   2210: ^untaint[as-is]{=$text.nodeValue=}
                   2211: 
                   2212: @domedit[]
                   2213: ^domdata[]
                   2214: #$paf.nodeName<br>
                   2215: #$doc.documentElement.nodeName<br>
                   2216: 
                   2217: ^show_xnode1[$xdoc.documentElement;0;1]
                   2218: <hr>
                   2219: ^show_xdoc2[$xdoc]
                   2220: <hr>
                   2221: 
                   2222: @domxslt[]
                   2223: ^domdata[]
                   2224: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                   2225: <hr>
                   2226: 
                   2227: @lsplit2[]
                   2228: $path[/optics/]
                   2229: $pathTable[^path.lsplit[/]]
                   2230: ^pathTable.menu{
                   2231:        ^if(def $pathTable.piece){
                   2232:                =$pathTable.piece=
                   2233:        }
                   2234: }
                   2235: 
                   2236: 
                   2237: @faceesize[]
                   2238: $k(2)
                   2239: $pict[^image::load[paf.gif]]
                   2240: $small[^image::create($pict.width/$k;$pict.height/$k)]
                   2241: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                   2242: $response:body[^small.gif[]]
                   2243: 
                   2244: @imageresize[]
                   2245: $k(2)
                   2246: $pict[^image::create(400*$k;200*$k)]
                   2247: $pict.line-width(2)
                   2248: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   2249: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                   2250: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   2251: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                   2252: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                   2253: $response:body[^pict.gif[]]
                   2254: 
                   2255: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                   2256: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                   2257: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                   2258: 
                   2259: #$response:body[^small.gif[]]
                   2260: 
                   2261: 
                   2262: @tintdefault[]
                   2263: #$abc[abc]
                   2264: $abc[33]
                   2265: ^abc.int[z]
                   2266: #^abc.int(123)
                   2267: 
                   2268: @ifassignhash[]
                   2269: $h[^if(1){$.a(1);$.a(2)}]
                   2270: $h.a
                   2271: 
                   2272: @ifpasshash[]
                   2273: $a[$.e[a]]
                   2274: $b[$.e[b]]
                   2275: ^ifpasshashdest[^if(1){$a;$b}]
                   2276: #$x[^if(1){$a}{$b}]
                   2277: #^ifpasshashdest[$x]
                   2278: 
                   2279: @ifpasshashdest[p]
                   2280: $p.e
                   2281: 
                   2282: @movedir[]
                   2283: ^file:move[a;deeper/a]
                   2284: 
                   2285: @replace[]
                   2286: $a[12^;3]
                   2287: ^a.replace[^table::set{from    to
                   2288: 2^;    !
                   2289: }]
                   2290: 
                   2291: 
                   2292: @set[]
                   2293: ^setdata[]
                   2294: ^a.add[$b]
                   2295: add:$a.3<br>
                   2296: 
                   2297: ^setdata[]
                   2298: ^a.sub[$b]
                   2299: sub2:$a.2<br>
                   2300: sub1:$a.1<br>
                   2301: 
                   2302: ^setdata[]
                   2303: $c[^a.union[$b]]
                   2304: union3:$c.3<br>
                   2305: union2:$c.2<br>
                   2306: 
                   2307: ^setdata[]
                   2308: $c[^a.intersection[$b]]
                   2309: intersection3:$c.3<br>
                   2310: intersection2:$c.2<br>
                   2311: 
                   2312: ^setdata[]
                   2313: intersects:^if(^a.intersects[$b]){y;n}<br>
                   2314: intersects2:^if(^a.intersects[ ]){y;n}<br>
                   2315: 
                   2316: 
                   2317: <hr>
                   2318: 
                   2319: @setdata[]
                   2320: $a[$.1[a1] $.2[a2]]
                   2321: $b[        $.2[b2] $.3[b3]]
                   2322: 
                   2323: 
                   2324: @hash[]
                   2325: $h[^hash::create[$._default[123]]]
                   2326: $h.paf[not kretin]
                   2327: $h.paf<br>
                   2328: =$h.that=<br>
                   2329: 
                   2330: @methresult[]
                   2331: $result[^table::set{1}]
                   2332: 
                   2333: @terror[]
                   2334: ^error[method z must be called with z]
                   2335: 
                   2336: @syntax1[]
                   2337: #^a[^b]
                   2338: 
                   2339: @syntax2[]
                   2340: #^a[
                   2341: 
                   2342: @ssave[]
                   2343: $abc[abc]
                   2344: ^abc.save[abc]
                   2345: 
                   2346: @calendar[]
1.103     paf      2347: $year(2002)
                   2348: $month(12)
1.84      paf      2349: ${year}-${month}:<br>
                   2350: $week_days[^date:calendar[rus]($year;$month)]
1.15      paf      2351: <pre>
1.101     paf      2352: ^week_days.menu{^for[wday](0;6){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }=$week_days.week,$week_days.year=<br>}
1.15      paf      2353: </pre>
                   2354: 
                   2355: @thash[]
                   2356: $table[^table::set{id  name    age
                   2357: 1      paf     278
                   2358: 2      пиф     234
                   2359: }]
                   2360: $hash[^table.hash[id;^table::set[nameless]{id
                   2361: name}]]
                   2362: $hash.2.id $hash.2.name $hash.2.age
                   2363: 
                   2364: @tdef[]
                   2365: $s[0]
                   2366: if 0=^if($s){}{n}<br>
                   2367: if def 0=^if(def $s){y}{}<br>
                   2368: <hr>
                   2369: 
                   2370: @ford[]
                   2371: ^for[i](0;5){$i}{($i)}
                   2372: 
                   2373: @tif[]
                   2374: ^if[def]{y;n}
                   2375: 
                   2376: @image[]
                   2377: $pict[^image::create(400;200)]
                   2378: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   2379: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                   2380: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   2381: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                   2382: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                   2383: $response:body[^pict.gif[]]
                   2384: 
                   2385: 
                   2386: 
                   2387: @mail2[]
                   2388: ^mail:send[
1.139     paf      2389:        $.message-id[<6615%1@parser.ru>]
1.15      paf      2390:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                   2391:        $.from[Александр Петросян <paf@design.ru>]
                   2392:        $.to[Александр Петросян <paf@design.ru>]
1.134     paf      2393:        $.subject[проверка проверка]
                   2394:        $.text[проверка]
1.15      paf      2395: ]
                   2396: 
                   2397: @cookie[]
1.115     paf      2398: #$env:HTTP_COOKIE<br>
1.15      paf      2399: 
                   2400: #$cookie:переменная[test тест ТЕСТ2]
                   2401: =$cookie:переменная=<br>
                   2402: #$cookie:переменная2[test тест ТЕСТ3]
                   2403: =$cookie:переменная2=<br>
                   2404: =$cookie:CLASS.переменная2=<br>
                   2405: 
                   2406: @response[]
                   2407: #^if($form:reload){
                   2408:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                   2409: #}
                   2410: 
                   2411: @xslt[]
                   2412: ^xdata[]
                   2413: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                   2414: ^show_xdoc2[$transformed]
                   2415: 
                   2416: @regexp2[]
                   2417: $s[  select]
                   2418: $s[^s.match[^^\s*][]{!}]
                   2419: $s
                   2420: 
                   2421: @header[]
                   2422: $response:refresh[
                   2423:        $.value[0]
                   2424:        $.url[http://design.ru?a=^taint[123]]
                   2425: ]
                   2426: 
                   2427: @ttablerem[]
                   2428: $table[^table::load[a.cfg]]
                   2429: ^table.menu{$table.a}
                   2430: 
                   2431: @tconnect[]
                   2432: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                   2433: $tables[^table::sql{show tables}]
                   2434: #$cols[^tables.columns[]]
                   2435: #$cols.column
                   2436: ^tables.menu{
                   2437:        $tables.[Tables_in_test]<br>
                   2438: }
                   2439: }
                   2440: 
                   2441: @pcre[]
                   2442: $s[1 2]
                   2443: ^s.match[\s;ig]{!}
                   2444: #^s.match[\d;ig]{!}
                   2445: 
                   2446: 
                   2447: @regexp[]
                   2448: $s[abcАБВ]
                   2449: ^if(^s.match[б][i]){y}{n}
                   2450: 
                   2451: @mail[]
                   2452: #$ORIGINS(1)
                   2453: ^mail:send[
                   2454:        $.from[paf@design.ru]
                   2455:        $.to[paf@design.ru]
                   2456:        $.body[1
                   2457:        
                   2458:        2
                   2459:        
                   2460:        
                   2461:                3]
                   2462: ]
                   2463: 
                   2464: @fori[][i]
                   2465: ^for[i](1;3){... =$i= ...}
                   2466: 
                   2467: @xdata0[]
                   2468: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   2469: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   2470: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   2471: <people>
                   2472:        <man id="1" имя="word слово">
                   2473:                <name>P&#171^;AF        B</name>
                   2474:        </man>
                   2475:                <man id="2">
                   2476:                        <name>ПИФ^taint[&]</name>
                   2477:                </man>
                   2478: </people>
                   2479: }]
                   2480: 
                   2481: @xdata[]
                   2482: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.156     paf      2483: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
1.15      paf      2484: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   2485: <people>
                   2486:        <man id="1" имя="word слово">
                   2487:                <name>P&#171^;AF        B</name>
                   2488:        </man>
                   2489:                <man id="2">
                   2490:             <name>ПИФ^taint[&]</name>
                   2491:                </man>
                   2492: </people>
1.156     paf      2493: }]
1.15      paf      2494: 
                   2495: @xml[]
                   2496: ^xdata[]
                   2497: 
                   2498: ^show_xdoc2[$xdoc]<hr>
                   2499: #^show_xnode1[$xdoc]<hr>
                   2500: $people[^xdoc.select[*/man]]
                   2501: #^show1[]
                   2502: ^show_xnodes1[$people]<hr>
                   2503: #^people.0.owner.hren[]
                   2504: 
                   2505: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                   2506: 
                   2507: by id:
                   2508: ^show_xnode1[^xdoc.getElementById[1];0;1]
                   2509: <hr>
                   2510: 
                   2511: @show1[array]
                   2512: ^for[i](0;^array._count[]-1){
                   2513:     $x[$array.$i]
                   2514:        $x.firstChild.nodeValue: 
                   2515:                $pattributes[$x.parentNode.attributes]
                   2516:                ^if(^pattributes._count[]){
                   2517:                        $pattributes.id.name=$pattributes.id.nodeValue
                   2518:                }
                   2519:        <br>
                   2520: }
                   2521:        
                   2522: @show_xnodes1[array][i]
                   2523: ^for[i](0;^array._count[]-1){
                   2524:        ^show_xnode1[$array.$i;0;1]
                   2525: }
                   2526: 
                   2527: @show_xnode1[x;level;single][l]
                   2528: ^if(def $x){
                   2529:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                   2530:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   2531:        &lt^;$x.nodeName
                   2532:            $pairs[$x.attributes]
                   2533:            ^if(def $pairs){
                   2534:                $names[^pairs._keys[]]
                   2535:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                   2536:            }
                   2537:            &gt^;
                   2538:     }{
                   2539:        [$x.nodeType]
                   2540:     }
                   2541:     
                   2542:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                   2543:     ^show_xnode1[$x.firstChild]($level+1)
                   2544:     ^if(!$single){
                   2545:            ^show_xnode1[$x.nextSibling]($level)
                   2546:     }
                   2547: 
                   2548:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   2549:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                   2550:     }
                   2551: }
                   2552: 
                   2553: @show_xdoc2[xdoc]
                   2554: ^xdoc.save[out/save.xml;
                   2555: #      $.encoding[utf-8]
                   2556:        $.method[xml]
                   2557: ]
                   2558: $file[^xdoc.file[
                   2559:        $.encoding[utf-8]
                   2560:        $.method[html]
                   2561: ]]
                   2562: ^file.save[text;out/save_file.html]
                   2563: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   2564: <pre>^taint[html][^xdoc.string[
                   2565:        $.method[html]
                   2566: #      $.encoding[utF-8]
                   2567: #      $.omit-xml-declaration[yes]
                   2568: #      $.standalone[no]
                   2569: #      -$.doctype-public[-//W3C//DTD XHTML]
                   2570: #      -$.doctype-system[/a/b/c/]
                   2571: #      $.indent[yes]
                   2572: #      $.media-type[text/paf]
                   2573: ]]
                   2574: </pre>

E-mail: