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

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

E-mail: