Annotation of parser3/www/htdocs/index.html, revision 1.28
1.15 paf 1: #@USE
2: #z/t.p
3:
4: @autoz[]
5: $request:charset[windows-1251]
6: $response:charset[windows-1251]
7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
8:
9: @main[]
1.28 ! paf 10: ^exceptionTypes[]
! 11: #^roll2[]
1.27 paf 12: #^rolls[]
1.25 paf 13: #^exceptions1[]
1.22 paf 14: #^locate_by_expr[]
1.18 paf 15: #^method_junction_params{...}
1.17 paf 16: #^verifyCookie[paf]
1.21 paf 17: #^execlangs[]
1.16 paf 18: #$t[^tobjeresult[]]$t.a
19: #^xmlprobs[]
1.15 paf 20: #^doubleprobs[]
21: #^math:random(-10)
22: #^divnamestop[]
23: #^arrayclone[]
24: #^operator_tricks[]
25: #^xoutputrusattr[]
26: #^xdocset1[]
27: #^regexp3[]
28: #^exec2[]
29: #^tlock[]
30: #^xmloutattrwithoutvalue[]
31: #^precisionProblem[]
32: #^xpath[]
33: #^ttablesetlang[]
34: #^mail3[]
35: #^ttime[]
36: #^tupper[]
37: #^treplace[]
38: #^xslt2[]
39: #^tcache2[]
40: #$ORIGINS(1)
41: #$t[^table::set{a b} ^table::set{c d}]
42: #^ttaintuntaint[]
43: #^tappend2[]
44: #^badvsnprintf[]
45: #^badoracequoting[]
46: #^badconstructors[]
47: #^xloadwrongtable[]
48: #^xsetwrongtable[]
49: #^if($form:test){y}{n}
50: #^tablecolumnerror[]
51: #^roll[]
52: #^cookie2[]
53: #^tableset[]
54: #^math:PI.format{%.30f}
55: #^xchildren[]
56: #^thashforeach3[]
57: #^thashforeach2[]
58: #^thashforeach[]
59: #^thashdelete[]
60: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
61: #^tappend[]
62: #^sappend[]
63: #^eval(10\3)<br>
64: #^tform[]
65: #^formattest[]
66: #^filelist[]
67: #^connect[mysql://user:pass@host]{ }
68: #^безнадёжна_попытка_поправить_непоправимое[]
69: #^tcache[]
70: #^thashfileexp[]
71: #^tcounter[]
72: #^tablehash[]
73: #j^hashfile[]
74: #^formclass[]
75: #^hren[]
76: #^domedit[]
77: #^domxslt[]
78: #^lsplit2[]
79: #^faceesize[]
80: #^imageresize[]
81: #^ifassignhash[]
82: #^tintdefault[]
83: #$response:status[404]
84: #^ifpasshash[]
85: #^movedir[]
86: #^replace[]
87: #^set[]
88: #^hash[]<hr>
89: #$t[^methresult[]] ->$t
90: #^terror[]
91: #^ssave[]
92: #^calendar[]
93: #^thash[]
94: #^tdef[]
95: #^ford[]
96: #^tif[]
97: #^image[]
98: #^mail2[]
99: #^cookie[]
100: #^response[]
101: #^regexp2[]
102: #^ttablerem[]
103: #^pcre[]
104: #^regexp[]<hr>
105: #^mail[]
106: #^exec[]
107: #^fori[]
108: #^tconnect[]
109: #^xslt[]
110: #^xml[]
111: #^header[]
112: <hr>
113: OK
1.26 paf 114:
1.28 ! paf 115: @exceptionTypes[]
! 116: # parser.compile ^test[} компиляция (непарная скобка, ...)
! 117: # parser.runtime ^if(0). параметры (больше/меньше, чем нужно, не тех типов, ...)
! 118: # number.zerodivision ^eval(1/0) ^eval(1%0)
! 119: # number.format ^eval(abc*5)
! 120: # file.missing ^file:delete[delme] not found
! 121: # file.access ^table::load[.] no rights
! 122: # image.format ^image::measure[index.html] not gif/jpg
! 123: # sql.connect ^connect[mysql://baduser:pass@host/db]{} not found/timeout
! 124: # sql.execute ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}} syntax error
! 125: # xml ^xdoc::create{<forgot?>} any error in xml/xslt libs
! 126: # smtp.connect not found/timeout
! 127: # smtp.execute communication error
! 128:
1.26 paf 129: @roll2[]
130: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27 paf 131: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26 paf 132:
1.25 paf 133:
134: @rolls[]
135: $d[^date::create(2002;4;4)]
136: ^d.sql-string[]<br>
137: ^for[i](1;7){
138: ^d.roll[day](-1)
139: ^d.sql-string[]<br>
140: }
141: <hr>
142: $d[^date::create(2002;3;28)]
143: ^d.sql-string[]<br>
144: ^for[i](1;7){
145: ^d.roll[day](+1)
146: ^d.sql-string[]<br>
147: }
148: <hr>
149: $d[^date::create(2002;12;3)]
150: ^d.sql-string[]<br>
151: ^for[i](1;14){
152: ^d.roll[day](-1)
153: ^d.sql-string[]<br>
154: }
155: <hr>
156: $d[^date::create(2002;10;19)]
157: ^d.sql-string[]<br>
158: ^for[i](1;14){
159: ^d.roll[day](+1)
160: ^d.sql-string[]<br>
161: }
162:
163:
164:
165:
166:
1.22 paf 167:
168: @exceptions1[]
169: ^try{
170: aaa
1.24 paf 171: ^throw[custom1;paf;is stupid]
1.22 paf 172: }{
1.24 paf 173: ^if($exception.type eq custom1){
1.28 ! paf 174: # $exception.handled(1)
! 175: ^throw[$exception]
1.24 paf 176: type=$exception.type<br>
177: source=$exception.source<br>
178: file=$exception.file<br>
179: lineno=$exception.lineno<br>
180: comment=$exception.comment<br>
181: }
1.22 paf 182: }
1.21 paf 183:
184: @locate_by_expr[]
185: $t[^table::create{a b
186: 1 nok
187: 2 ok
188: 3 nok
189: }]
190: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17 paf 191:
192: @method_junction_params[param]
193: ^if($param is junction){junction}{ne junction}
194:
195: @verifyCookie[value]
196: ^if($cookie:dummyvote eq $value){
197: $result(1)
198: }{
199: $cookie:dummyvote[$value]
200: $result(0)
201: }
1.16 paf 202:
203: @execlangs[]
1.20 paf 204: $f[^file::exec[test.pl]]
1.16 paf 205: ^process{$f.text}
206: #$c[^t.columns[]]
207: #^c.menu{
208: #* $c.column<br>
209: #}
210: =$t.c=
211:
212: @tobjeresult[]
213: ^table::create{a
214: 12}
1.15 paf 215:
216: @xmlprobs[]
217: $xmlDataType[^xdoc::load[program.xml]]
218: #<pre>^taint[^xmlDataType.string[]]
219: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
220: #=^xmlDataTypes._count[]=
221: =^xmlDataTypes.0.getAttribute[type-id]=
222:
223: @doubleprobs[]
224: $1(^math:radians(180))
225: $2($math:PI)
226: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
227: ^if($1==$2){y;n}
228: ^if(^math:radians(180)==$math:PI){y;n}
229:
230:
231: @divnamestop[]
232: $a(10)
233: ^eval($a\3)
234:
235: @arrayclone[]
236: $t[^table::create{a b
237: 1 11
238: 2 22
239: }]
240: $c[^table::create[$t]]
241: ^c.append{2 33}
242: ^t.count[]
243: ^c.count[]
244:
245: @operator_tricks[]
246: ^if(1){$a[^t[]]}
247: $a!
248: $a($b)
249: ^if(1){y}{n}
250: $MAIN:a(^t[] eq OK)
251: #$MAIN:a(1)
252: ^if($a){y}{n}
253: #^if(1){y}{n}
254: $form:if
255: $a[$.n[1]]
256: $a.if
257:
258: @xoutputrusattr[]
259: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
260: ^show_xdoc2[$d]
261:
262: @xdocset1[]
263: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
264: ^show_xdoc2[$d]
265:
266: @regexp3[]
267: $s[abcАБВ]
268: ^if(^s.match[][i]){y}{n}
269:
270:
271: @exec2[]
272: $a[^file::exec[bin/t.cmd]]
273: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
274:
275:
276: @tlock[]
277: ^file:lock[lockfile]{
278: code
279: }
280:
281: @xmloutattrwithoutvalue[]
282: #$ORIGINS(1)
283: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
284: $doc[^doc.transform[global.xsl]]
285: =^taint[html][^doc.string[$.method[html]]]=
286:
287:
288:
289: @precisionProblem[]
290: $a[123456789012345678901234567890]
291: $b(^a.double[])
292: ^b.format{%.20E}
293: <hr>
294: ^eval(2*2)
295:
296: @xpath[]
297: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
298: <document><block><p>привет</p></block></document>
299: }]
300: #^show_xdoc2[$xdoc]
301: $node[^xdoc.selectSingle[/document/block/p]]
302: ^if(def $node){
303: ^if($node is string){
304: $node
305: }{
306: ^if($node is hash){
307: ^node._count[]
308: }{
309: $node.nodeType
310: }
311: }
312: #$node.firstChild.nodeValue
313: }{
314: node not found
315: }
316:
317:
318: @ttablesetlang[]
319: $a-tab-b[a b
320: 1 2]
321:
322: $t[^table::set{$a-tab-b}]
323: =$t.a=
324: <hr>
325:
326: $t[^table::set[nameless]{^taint[$a-tab-b]}]
327: =$t.0=
328: <hr>
329:
330: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
331: =$t.a=
332:
333: #^t.append{1 2}
334:
335: @mail3[]
336: ^mail:send[
337: $.from[Александр Петросян <paf@design.ru>]
338: $.to[Александр Петросян <paf@design.ru>]
339: $.subject[проверка4]
340: $.body[
341: $.text[
342: $.content-type[$.value[text/plain] $.charset[windows-1251]]
343: $.body[проверка]
344: ]
345: $.attachment[
346: $.value[^file::load[text;index.html]]
347: $.file-name[привет всем.html]
348: ]
349: ]
350: ]
351:
352:
353: @ttime[]
354: $now[^date::now[]]
355: $now.hour:$now.minute
356:
357: @tupper[]
358: $t[abcABCабвАБВ]
359: $t<br>
360: ^t.upper[]
361:
362: @treplace[]
363: $copy-paste-clean[^table::set{a b
364: . _
365: , _
366: + _
367: & _
368: ? _
369: = _}]
370:
371: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
372: # почему-то этот replace роняет апач в 500 ошибку :(
373: #^cache_key.replace[$copy-paste-clean]
374: $test[abc]
375: ^test.save[$cache_key]saved<br>
376: $cache[^file:list[.;\.cache^$]]
377: ^file:delete[$cache_key]deleted($cache.name)<br>
378:
379:
380:
381: @xslt2[]
382: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
383: <document><block><p>привет</p></block></document>
384: }]
385: ^show_xdoc2[$xdoc]
386: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
387: <hr>
388:
389:
390: @tcache2[]
391: ^cache[$DB_HOME/keyключ](2){
392: ^math:random(100)
393: }
394:
395: @ttaintuntaint[]
396: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
397:
398: ]zz
399: <hr>
400: ^untaint[html]{1^taint[ ]2 3}
401:
402:
403: @tappend2[]
404: $t[^table::set{a b}]^t.append{1 2}$t.a
405:
406: @badvsnprintf[]
407: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
408: }
409:
410:
411: @badoracequoting[]
412: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
413: ^connect[$SQL.connect-string]{
414: ^void:sql{delete from paf}
415: ^void:sql{insert into paf values (1, '$form:text')}
416: $paf[^table::sql{select * from paf}]
417: ^paf.menu{
418: $paf.id: ^untaint{$paf.block}<hr>
419:
420: }
421: <hr>
422:
423:
424: ^rem{
425: $news[^table::sql{select description from news}[$.limit(3)]]
426: ^news.menu{
427: ^untaint{$news.description}<hr>
428:
429: }
430: <hr>
431: }
432:
433: $tables[^table::sql{select table_name from user_tables}]
434: ^tables.menu{
435: $tables.table_name<br>
436: }
437:
438: }
439: <hr>
440: $env:PATH
441:
442: @badconstructors[]
443: $bred[^string::length[]]
444: $bred[^response::clear[]]
445: $bred[^int::int[]]
446:
447:
448: @xloadwrongtable[]
449: $constr[^xdoc::load[wrongtable.xml]]
450: ^show_xdoc2[$constr]
451:
452: @xsetwrongtable[]
453: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
454: <block-list>^untaint[as-is]{$constructor}</block-list>}]
455:
456:
457: @tablecolumnerror[]
458: $t[^table::set{a}]
459: $t.$a
460:
461: @roll[]
462: #$date[^date::set(1970;1;2)]
463: #^date.roll[month](-1)
464: $date[^date::set(2038;1;1)]
465: ^date.roll[month](+1)
466: $date.year $date.month $date.day
467:
468: @cookie2[]
469: #=$cookie:clientType[$.value[test]]=<br>
470: =$cookie:clientType=<br>
471:
472:
473: @tableset[]
474: $a[^table::set{a
475: 1
476: 2}]
477: ^eval(100\$a)
478:
479:
480:
481: @zzz[]
482:
483:
484: $constructor[
485: <block1 name="main_srvr" type="0" label="Основное тело" />
486: <block2 name="main_srvr2" type="0" label="Основное тело" />
487: ]
488:
489: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
490: <block-list>^untaint[as-is]{$constructor}</block-list>}]
491:
492: $children[$constr.documentElement.childNodes]
493: ^if($children){
494: ^for[i](1;^children._count[]){
495: $node[$children.$i]
496: $node.nodeName<br>
497: }
498: }
499:
500:
501: @thashforeach3[]
502: $h[
503: $.a[1]
504: $.b[2]
505: ]
506: $c[^table::set{a
507: ^h.foreach[key;value]{$value
508: }}]
509: $c.a
510:
511: @thashforeach2[]
512: $h[
513: $.a[1]
514: $.b[2]
515: ]
516: $c[
517: ^h.foreach[key;value]{
518: $.$key[$value]
519: }
520: ]
521: $c.b
522:
523: @thashforeach[]
524: $h[
525: $.a[1]
526: $.b[2]
527: ]
528: ^h.foreach[key;value]{
529: $key=$value<br>
530: }
531:
532: @thashdelete[]
533: $h[$.a[1] $.b[2]]
534: was:<br>
535: count=^h._count[] <br>
536: b='$h.b' <br>
537:
538: ^h.delete[b]
539:
540: now:<br>
541: count=^h._count[] <br>
542: b='$h.b'
543:
544: @sappend[]
545: $test[123]
546: ^test.save[test]
547: ^test.save[append;test]
548:
549: @tappend[]
550: $test[^table::set{a b
551: a1 b1}]
552: ^test.save[test]
553: $test[^table::set{a b
554: a2 b2}]
555: ^test.save[append;test]
556:
557:
558: @tform[]
559: ^if(def $form:new_file){y}{n}
560: <form method="post" enctype="multipart/form-data">
561: <input type="file" name="new_file" />
562: <input type=submit>
563: </input>
564:
565: @formattest[]
566: $size(15.124)
567:
568: ^size.format{%.2f}
569:
570: @filelist[]
571: $html[^file:list[.;\.html^$]]
572: ^html.menu{
573: $html.name<br>
574: }
575: <hr>
576:
577: @безнадёжна_попытка_поправить_непоправимое[]
578: $dom_from_disk[^xdoc::load[input.xml]]
579: $dom_created_in_air[^xdoc::create[doc]]
580: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
581: ^show_xdoc2[$dom_created_in_air]
582:
583:
584: @tcache[]
585: #^hashfile:clear[cache]
586: $code[^hashfile::open[$DB_HOME;cache]]
587: ^code.cache[key](2){
588: ^math:random(100)
589: # ^code.delete[]
590: }
591:
592: @thashfileexp[]
593: $hf[^hashfile::open[$DB_HOME;hashfile]]
594: $hf.paf[$.value[крут] $.expires(3)]
595: paf=$hf.paf
596: <hr>
597: ^hf.foreach[key;value]{
598: $key=$value<br>
599: }
600: <hr>
601: $hash[^hf.hash[]]
602: =$hash.paf=
603: <hr>
604:
605: @tcounter[]
606: ^tcounterone[$DB_HOME]
607: other root:
608: ^tcounterone[${DB_HOME}2]
609: again, first:
610: ^tcounterone[$DB_HOME]
611:
612: @tcounterone[DB_HOME]
613: $counter[^hashfile::open[$DB_HOME;counter]]
614: #^counter.clear[]
615: ^counter.transaction{
616: # $counter.value(10)
617: $counter.value($counter.value+1)
618: # ^counter.delete[value]
619: $counter.value
620: }
621: <hr>
622: ^rem{
623: $hash[^counter.hash[]]
624: =$hash.value=
625: <hr>
626: }
627:
628: @tablehash[]
629: $productList[^table::set{id name
630: 1 носки
631: 2 валенки
632: 3 ушанка
633: }]
634:
635: #скажем, у первого дилера
636: $firstPriceList[^table::set{id price
637: 1 0.3
638: 3 1000
639: }]
640:
641: $firstPriceHash[^firstPriceList.hash[id]]
642:
643: ^productList.menu{
644: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
645: }
646:
647:
648: @hashfile[]
649: $hf[^hashfile::assign[hashfile]]
650: #$hf.paf[крут5]
651: paf=$hf.paf
652:
653: @formclass[]
654: ^$form:CLASS.a=$form:CLASS.a
655:
656: @domdata[]
657: ^if(1){
658: # $a{^hren[]}
659: }
660: $a
661: $xdoc[^xdoc::create[doc]]
662: $doc[$xdoc.documentElement]
663: $name[^doc.appendChild[^xdoc.createElement[name]]]
664: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
665: ^untaint[as-is]{=$text.nodeValue=}
666:
667: @domedit[]
668: ^domdata[]
669: #$paf.nodeName<br>
670: #$doc.documentElement.nodeName<br>
671:
672: ^show_xnode1[$xdoc.documentElement;0;1]
673: <hr>
674: ^show_xdoc2[$xdoc]
675: <hr>
676:
677: @domxslt[]
678: ^domdata[]
679: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
680: <hr>
681:
682: @lsplit2[]
683: $path[/optics/]
684: $pathTable[^path.lsplit[/]]
685: ^pathTable.menu{
686: ^if(def $pathTable.piece){
687: =$pathTable.piece=
688: }
689: }
690:
691:
692: @faceesize[]
693: $k(2)
694: $pict[^image::load[paf.gif]]
695: $small[^image::create($pict.width/$k;$pict.height/$k)]
696: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
697: $response:body[^small.gif[]]
698:
699: @imageresize[]
700: $k(2)
701: $pict[^image::create(400*$k;200*$k)]
702: $pict.line-width(2)
703: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
704: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
705: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
706: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
707: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
708: $response:body[^pict.gif[]]
709:
710: #$small[^image::create($pict.width/$k;$pict.height/$k)]
711: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
712: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
713:
714: #$response:body[^small.gif[]]
715:
716:
717: @tintdefault[]
718: #$abc[abc]
719: $abc[33]
720: ^abc.int[z]
721: #^abc.int(123)
722:
723: @ifassignhash[]
724: $h[^if(1){$.a(1);$.a(2)}]
725: $h.a
726:
727: @ifpasshash[]
728: $a[$.e[a]]
729: $b[$.e[b]]
730: ^ifpasshashdest[^if(1){$a;$b}]
731: #$x[^if(1){$a}{$b}]
732: #^ifpasshashdest[$x]
733:
734: @ifpasshashdest[p]
735: $p.e
736:
737: @movedir[]
738: ^file:move[a;deeper/a]
739:
740: @replace[]
741: $a[12^;3]
742: ^a.replace[^table::set{from to
743: 2^; !
744: }]
745:
746:
747: @set[]
748: ^setdata[]
749: ^a.add[$b]
750: add:$a.3<br>
751:
752: ^setdata[]
753: ^a.sub[$b]
754: sub2:$a.2<br>
755: sub1:$a.1<br>
756:
757: ^setdata[]
758: $c[^a.union[$b]]
759: union3:$c.3<br>
760: union2:$c.2<br>
761:
762: ^setdata[]
763: $c[^a.intersection[$b]]
764: intersection3:$c.3<br>
765: intersection2:$c.2<br>
766:
767: ^setdata[]
768: intersects:^if(^a.intersects[$b]){y;n}<br>
769: intersects2:^if(^a.intersects[ ]){y;n}<br>
770:
771:
772: <hr>
773:
774: @setdata[]
775: $a[$.1[a1] $.2[a2]]
776: $b[ $.2[b2] $.3[b3]]
777:
778:
779: @hash[]
780: $h[^hash::create[$._default[123]]]
781: $h.paf[not kretin]
782: $h.paf<br>
783: =$h.that=<br>
784:
785: @methresult[]
786: $result[^table::set{1}]
787:
788: @terror[]
789: ^error[method z must be called with z]
790:
791: @syntax1[]
792: #^a[^b]
793:
794: @syntax2[]
795: #^a[
796:
797: @ssave[]
798: $abc[abc]
799: ^abc.save[abc]
800:
801: @calendar[]
802: 2001;11:<br>
803: $week_days[^date:calendar[rus](2001;11)]
804: <pre>
805: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
806: </pre>
807:
808: @thash[]
809: $table[^table::set{id name age
810: 1 paf 278
811: 2 пиф 234
812: }]
813: $hash[^table.hash[id;^table::set[nameless]{id
814: name}]]
815: $hash.2.id $hash.2.name $hash.2.age
816:
817: @tdef[]
818: $s[0]
819: if 0=^if($s){}{n}<br>
820: if def 0=^if(def $s){y}{}<br>
821: <hr>
822:
823: @ford[]
824: ^for[i](0;5){$i}{($i)}
825:
826: @tif[]
827: ^if[def]{y;n}
828:
829: @image[]
830: $pict[^image::create(400;200)]
831: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
832: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
833: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
834: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
835: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
836: $response:body[^pict.gif[]]
837:
838:
839:
840: @mail2[]
841: ^mail:send[
842: $.content-type[$.value[text/plain] $.charset[windows-1251]]
843: $.from[Александр Петросян <paf@design.ru>]
844: $.to[Александр Петросян <paf@design.ru>]
845: $.subject[проверка]
846: $.body[проверка]
847: ]
848:
849: @cookie[]
850: $env:HTTP_COOKIE<br>
851:
852: #$cookie:переменная[test тест ТЕСТ2]
853: =$cookie:переменная=<br>
854: #$cookie:переменная2[test тест ТЕСТ3]
855: =$cookie:переменная2=<br>
856: =$cookie:CLASS.переменная2=<br>
857:
858: @response[]
859: #^if($form:reload){
860: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
861: #}
862:
863: @xslt[]
864: ^xdata[]
865: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
866: ^show_xdoc2[$transformed]
867:
868: @regexp2[]
869: $s[ select]
870: $s[^s.match[^^\s*][]{!}]
871: $s
872:
873: @header[]
874: $response:refresh[
875: $.value[0]
876: $.url[http://design.ru?a=^taint[123]]
877: ]
878:
879: @ttablerem[]
880: $table[^table::load[a.cfg]]
881: ^table.menu{$table.a}
882:
883: @tconnect[]
884: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
885: $tables[^table::sql{show tables}]
886: #$cols[^tables.columns[]]
887: #$cols.column
888: ^tables.menu{
889: $tables.[Tables_in_test]<br>
890: }
891: }
892:
893: @pcre[]
894: $s[1 2]
895: ^s.match[\s;ig]{!}
896: #^s.match[\d;ig]{!}
897:
898:
899: @regexp[]
900: $s[abcАБВ]
901: ^if(^s.match[б][i]){y}{n}
902:
903: @mail[]
904: #$ORIGINS(1)
905: ^mail:send[
906: $.from[paf@design.ru]
907: $.to[paf@design.ru]
908: $.body[1
909:
910: 2
911:
912:
913: 3]
914: ]
915:
916: @exec[]
917: $a[^file::exec[fc.exe;;a;b]]
918: $a.status|$a.stderr<hr>
919:
920: @fori[][i]
921: ^for[i](1;3){... =$i= ...}
922:
923: @xdata0[]
924: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
925: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
926: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
927: <people>
928: <man id="1" имя="word слово">
929: <name>P«^;AF B</name>
930: </man>
931: <man id="2">
932: <name>ПИФ^taint[&]</name>
933: </man>
934: </people>
935: }]
936:
937: @xdata[]
938: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
939: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
940: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
941: <people>
942: <man id="1" имя="word слово">
943: <name>P«^;AF B</name>
944: </man>
945: <man id="2">
946: <name>ПИФ^taint[&]</name>
947: </man>
948: </people>
949: }}]
950:
951: @xml[]
952: ^xdata[]
953:
954: ^show_xdoc2[$xdoc]<hr>
955: #^show_xnode1[$xdoc]<hr>
956: $people[^xdoc.select[*/man]]
957: #^show1[]
958: ^show_xnodes1[$people]<hr>
959: #^people.0.owner.hren[]
960:
961: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
962:
963: by id:
964: ^show_xnode1[^xdoc.getElementById[1];0;1]
965: <hr>
966:
967: @show1[array]
968: ^for[i](0;^array._count[]-1){
969: $x[$array.$i]
970: $x.firstChild.nodeValue:
971: $pattributes[$x.parentNode.attributes]
972: ^if(^pattributes._count[]){
973: $pattributes.id.name=$pattributes.id.nodeValue
974: }
975: <br>
976: }
977:
978: @show_xnodes1[array][i]
979: ^for[i](0;^array._count[]-1){
980: ^show_xnode1[$array.$i;0;1]
981: }
982:
983: @show_xnode1[x;level;single][l]
984: ^if(def $x){
985: ^for[l](0;$level-1){ ^; ^; ^; ^;}
986: ^if($x.nodeType == $xnode:ELEMENT_NODE){
987: <^;$x.nodeName
988: $pairs[$x.attributes]
989: ^if(def $pairs){
990: $names[^pairs._keys[]]
991: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
992: }
993: >^;
994: }{
995: [$x.nodeType]
996: }
997:
998: ^if(def $x.nodeValue){$x.nodeValue}<br>
999: ^show_xnode1[$x.firstChild]($level+1)
1000: ^if(!$single){
1001: ^show_xnode1[$x.nextSibling]($level)
1002: }
1003:
1004: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1005: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
1006: }
1007: }
1008:
1009: @show_xdoc2[xdoc]
1010: ^xdoc.save[out/save.xml;
1011: # $.encoding[utf-8]
1012: $.method[xml]
1013: ]
1014: $file[^xdoc.file[
1015: $.encoding[utf-8]
1016: $.method[html]
1017: ]]
1018: ^file.save[text;out/save_file.html]
1019: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
1020: <pre>^taint[html][^xdoc.string[
1021: $.method[html]
1022: # $.encoding[utF-8]
1023: # $.omit-xml-declaration[yes]
1024: # $.standalone[no]
1025: # -$.doctype-public[-//W3C//DTD XHTML]
1026: # -$.doctype-system[/a/b/c/]
1027: # $.indent[yes]
1028: # $.media-type[text/paf]
1029: ]]
1030: </pre>
E-mail: