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

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

E-mail: