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

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

E-mail: