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

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

E-mail: