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

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

E-mail: