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

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

E-mail: