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

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

E-mail: