├── tests ├── 061.dat ├── 216_dir │ ├── 1 │ └── 2.txt ├── 270_dir │ ├── z │ ├── 270.txt │ └── subdir │ │ └── 270.txt ├── 370.dat ├── 022_dir │ ├── a.html │ ├── b.txt │ ├── b[b].txt │ └── c.htm ├── 415_dir │ ├── 24.p │ ├── 25.p │ ├── 26.p │ ├── 27.p │ ├── 20.p │ ├── 23.p │ ├── 28.p │ ├── 30.p │ ├── 31.p │ ├── 09.p │ ├── 21.p │ ├── 22.p │ ├── 29.p │ ├── 06.p │ ├── 01.p │ ├── 03.p │ ├── 13.p │ ├── 10.p │ ├── 15.p │ ├── 05.p │ ├── 14.p │ ├── 04.p │ ├── 07.p │ ├── 11.p │ ├── 12.p │ └── 08.p ├── 161_utf8.txt ├── 195_utf8.txt ├── 223_utf8.txt ├── 230_utf8.txt ├── 247_utf8.txt ├── 256.txt ├── outputs │ ├── create-dir │ └── d.cmd ├── 247_utf8_bom.txt ├── 060.html ├── 001.html ├── 004.html ├── httpd │ ├── 002.txt │ ├── site │ │ ├── test.txt │ │ ├── run_server.sh │ │ ├── index.html │ │ ├── 029.html │ │ ├── form.html │ │ └── 404.html │ ├── 008.txt │ ├── 011.txt │ ├── 010.txt │ ├── 023.txt │ ├── 024.txt │ ├── 029.txt │ ├── 038.txt │ ├── 009.txt │ ├── 013.txt │ ├── 014.txt │ ├── 028.txt │ ├── 007.txt │ ├── 012.txt │ ├── 005.txt │ ├── 015.txt │ ├── 016.txt │ ├── 017.txt │ ├── 018.txt │ ├── 001.txt │ ├── 003.txt │ ├── 019.txt │ ├── 036.txt │ ├── 021.txt │ ├── 022.txt │ ├── 040.txt │ ├── 020.txt │ ├── 004.txt │ ├── 025.txt │ ├── 033.txt │ ├── 037.txt │ ├── ok.log │ ├── 027.txt │ ├── 026.txt │ ├── 032.txt │ ├── 030.txt │ ├── 034.txt │ ├── 035.txt │ └── 031.curl ├── 077.html ├── 017.html ├── 082.html ├── 166.html ├── 034.html ├── 069.html ├── 087.html ├── 182_dir │ ├── a6.p │ ├── a5.p │ ├── a4.p │ ├── a2.p │ ├── a3.p │ └── a1.p ├── 366.p ├── 369.html ├── 048.html ├── 104.html ├── 105.html ├── 226.p ├── 419.html ├── 003.html ├── 066.html ├── 070.html ├── 080.html ├── 094.html ├── 054.html ├── 090.html ├── 050.html ├── 235_attach.txt ├── 387_dir │ ├── A.p │ └── B.p ├── 015.html ├── 021.html ├── 024.html ├── 032.html ├── 033.html ├── 047.html ├── 055.html ├── 059.html ├── 061.html ├── 064.html ├── 067.html ├── 068.html ├── 081.html ├── 085.html ├── 086.html ├── 098.html ├── 109.html ├── 119.html ├── 153.html ├── 158.html ├── 171.html ├── 201.html ├── 228.html ├── 231.html ├── 250.html ├── 251.html ├── 255.html ├── 292.html ├── 293.html ├── 304.html ├── 306.html ├── results │ ├── 012.processed │ ├── 017.processed │ ├── 028.processed │ ├── 050.processed │ ├── 060.processed │ ├── 069.processed │ ├── 072.processed │ ├── 084.processed │ ├── 104.processed │ ├── 105.processed │ ├── 114.processed │ ├── 166.processed │ ├── 001.processed │ ├── 039.processed │ ├── 046.processed │ ├── 049.processed │ ├── 080.processed │ ├── 083.processed │ ├── 086.processed │ ├── 089.processed │ ├── 095.processed │ ├── 101.processed │ ├── 127.processed │ ├── 199.processed │ ├── 203.processed │ ├── 003.processed │ ├── 004.processed │ ├── 016.processed │ ├── 018.processed │ ├── 031.processed │ ├── 037.processed │ ├── 082.processed │ ├── 090.processed │ ├── 093.processed │ ├── 257.processed │ ├── 290.processed │ ├── 355.processed │ ├── 361.processed │ ├── 002.processed │ ├── 009.processed │ ├── 047.processed │ ├── 054.processed │ ├── 087.processed │ ├── 088.processed │ ├── 094.processed │ ├── 110.processed │ ├── 118.processed │ ├── 184.processed │ ├── 189.processed │ ├── 267.processed │ ├── 285.processed │ ├── 382.processed │ ├── 391.processed │ ├── 408.processed │ ├── 029.processed │ ├── 045.processed │ ├── 048.processed │ ├── 076.processed │ ├── 079.processed │ ├── 081.processed │ ├── 115.processed │ ├── 194.processed │ ├── 248.processed │ ├── 299.processed │ ├── 007.processed │ ├── 019.processed │ ├── 021.processed │ ├── 024.processed │ ├── 026.processed │ ├── 032.processed │ ├── 033.processed │ ├── 034.processed │ ├── 041.processed │ ├── 055.processed │ ├── 056.processed │ ├── 061.processed │ ├── 062.processed │ ├── 064.processed │ ├── 067.processed │ ├── 068.processed │ ├── 070.processed │ ├── 077.processed │ ├── 085.processed │ ├── 096.processed │ ├── 098.processed │ ├── 103.processed │ ├── 109.processed │ ├── 119.processed │ ├── 121.processed │ ├── 125.processed │ ├── 126.processed │ ├── 128.processed │ ├── 130.processed │ ├── 132.processed │ ├── 133.processed │ ├── 135.processed │ ├── 136.processed │ ├── 138.processed │ ├── 139.processed │ ├── 153.processed │ ├── 158.processed │ ├── 158.processes │ ├── 171.processed │ ├── 193.processed │ ├── 201.processed │ ├── 228.processed │ ├── 231.processed │ ├── 233.processed │ ├── 234.processed │ ├── 235.processed │ ├── 237.processed │ ├── 247.processed │ ├── 255.processed │ ├── 339.processed │ ├── 343.processed │ ├── 369.processed │ ├── 401.processed │ ├── 008.processed │ ├── 020.processed │ ├── 448.processed │ ├── 006.processed │ ├── 015.processed │ ├── 023.processed │ ├── 092.processed │ ├── 113.processed │ ├── 170.processed │ ├── 339-curl.processed │ ├── 374.processed │ ├── 443.processed │ ├── 074.processed │ ├── 236.processed │ ├── 242.processed │ ├── 375.processed │ ├── 423.processed │ ├── 066.processed │ ├── 124.processed │ ├── 168.processed │ ├── 102.processed │ ├── 044.processed │ ├── 073.processed │ ├── 111.processed │ ├── 162.processed │ ├── 300.processed │ ├── 040.processed │ ├── 145.processed │ ├── 167.processed │ ├── 211.processed │ ├── 295.processed │ ├── 354.processed │ ├── 411.processed │ ├── 036.processed │ ├── 112.processed │ ├── 198.processed │ ├── 284.processed │ ├── 331.processed │ ├── 078.processed │ ├── 154.processed │ ├── 155.processed │ ├── 197.processed │ ├── 241.processed │ ├── 279.processed │ ├── 120.processed │ ├── 190.processed │ ├── 218.processed │ ├── 225.processed │ ├── 227.processed │ ├── 438.processed │ ├── 005.processed │ ├── 025.processed │ ├── 172.processed │ ├── 220.processed │ ├── 412.processed │ ├── 063.processed │ ├── 245.processed │ ├── 304.processed │ ├── 157.processed │ ├── 283.processed │ ├── 123.processed │ ├── 249.processed │ ├── 328.processed │ ├── 335.processed │ ├── 116.processed │ ├── 226.processed │ ├── 276.processed │ ├── 359.processed │ ├── 051.processed │ ├── 179.processed │ ├── 204.processed │ ├── 217.processed │ ├── 042.processed │ ├── 059.processed │ ├── 106.processed │ ├── 161.processed │ ├── 219.processed │ ├── 278.processed │ ├── 075.processed │ ├── 210.processed │ ├── 240.processed │ ├── 243.processed │ ├── 265.processed │ ├── 071.processed │ ├── 291.processed │ ├── 298.processed │ ├── 173.processed │ ├── 418.processed │ ├── 058.processed │ ├── 206.processed │ ├── 313.processed │ ├── 326.processed │ ├── 436.processed │ ├── 353.processed │ ├── 035.processed │ ├── 091.processed │ ├── 272.processed │ ├── 387.processed │ ├── 402.processed │ ├── 322.processed │ ├── 366.processed │ ├── 371.processed │ ├── 099.processed │ ├── 314.processed │ ├── 393.processed │ ├── 319.processed │ ├── 403.processed │ ├── 100.processed │ ├── 209.processed │ ├── 251.processed │ ├── 289.processed │ ├── 419.processed │ ├── 334.processed │ ├── 347-curl.processed │ ├── 156.processed │ ├── 263.processed │ ├── 426.processed │ ├── 305.processed │ ├── 367-curl.processed │ ├── 410.processed │ ├── 385.processed │ ├── 404.processed │ ├── 301.processed │ ├── 358.processed │ ├── 027.processed │ ├── 177.processed │ ├── 357.processed │ ├── 053.processed │ ├── 318.processed │ ├── 394-curl.processed │ ├── 288.processed │ ├── 306.processed │ ├── 329.processed │ ├── 340.processed │ ├── 333.processed │ ├── 396.processed │ ├── 307.processed │ ├── 013.processed │ ├── 309.processed │ ├── 213.processed │ ├── 392.processed │ ├── 214.processed │ ├── 281.processed │ ├── 360.processed │ ├── 345.processed │ ├── 216.processed │ ├── 316.processed │ ├── 221.processed │ ├── 351.processed │ ├── 400.processed │ ├── 122.processed │ ├── 205.processed │ ├── 222.processed │ ├── 010.processed │ ├── 274.processed │ ├── 445.processed │ ├── 365.processed │ ├── 187.processed │ ├── 310.processed │ ├── 363.processed │ ├── 409.processed │ ├── 215.processed │ ├── 332.processed │ ├── 117.processed │ ├── 011.processed │ ├── 270.processed │ ├── 447.processed │ ├── 200.processed │ ├── 437.processed │ ├── 338.processed │ ├── 038.processed │ └── 254.processed ├── 008.html ├── 079.html ├── 098font.gif ├── 103mark.gif ├── 018.html ├── 076.html ├── 078.html ├── 253_json.txt ├── 395_dir │ ├── 1.bmp │ ├── 4.mp4 │ ├── 2.tiff │ ├── 3_VP8.webp │ ├── 3_VP8L.webp │ └── 3_VP8X.webp ├── 019paf2001.gif ├── 045.html ├── 058_paf2000.png ├── 096_dir │ ├── 163.jpg │ └── 188.jpg ├── 103paf2001.gif ├── 223_win1251.txt ├── 309.html ├── 029.html ├── 361.html ├── 438.html ├── 026.html ├── 058.html ├── 121.html ├── 161_windows1251.txt ├── 195_windows1251.txt ├── 247_windows1251.txt ├── 366_dir │ ├── test-duplicate.p │ └── test.p ├── 403.html ├── 031.html ├── 039.html ├── 062.html ├── 092.html ├── 199.html ├── 333.html ├── 002.html ├── 005.html ├── 012.html ├── 401.html ├── 020.html ├── 023.html ├── 044.html ├── 046.html ├── 328.html ├── 340.html ├── 028.html ├── 051.html ├── 056.html ├── 083.html ├── 089.html ├── 248.html ├── 314.html ├── 095.html ├── 124.html ├── 375.html ├── 100.html ├── 189.html ├── 203.html ├── 290.html ├── 037.html ├── 072.html ├── 114.html ├── 194_dir │ └── 194.p ├── 084.html ├── 178_dir │ ├── 178d.p │ ├── 178e.p │ ├── 178b.p │ ├── 178c.p │ └── 178a.p ├── 181.ent ├── 187.html ├── 190.html ├── 101.html ├── 357.html ├── 099.html ├── 106.html ├── 197.html ├── 310.html ├── 358.html ├── 396.html ├── 102.html ├── 167.html ├── 331.html ├── 116.html ├── 448.html ├── 219.html ├── 237.html ├── 242.html ├── 408.html ├── 073.html ├── 103.html ├── 115.html ├── 240.html ├── 415.html ├── 016.html ├── 025.html ├── 036.html ├── 088.html ├── run_parser.sh ├── 006.html ├── 198.html ├── 226.html ├── 282.cfg ├── 051b.p ├── 113.html ├── 436.html ├── 443.html ├── 300.html ├── 154.html ├── 404.html ├── 184.html ├── 205.html ├── 241.html ├── 391.html ├── run_parser.cmd ├── 063.html ├── 091.html ├── 093.html ├── 111.html ├── 112.html ├── 123.html ├── 194.html ├── 279.html ├── 380.html ├── 392.html ├── 190.p ├── 204.html ├── 283.html ├── 127.html ├── 382.html ├── 445.html ├── 009.html ├── 019.html ├── 075.html ├── 176_dir │ ├── c.p │ └── d.p ├── 267.html ├── 135.html ├── 136.html ├── 168.html ├── 222.html ├── 130.html ├── 385.html ├── 138.html ├── 139.html ├── 313.html ├── 041.html ├── 387.html ├── 011.html ├── 027.html ├── 265.html ├── 074.html ├── 162.html ├── 371.html ├── 402.html ├── 179.html ├── 221.html ├── 252.html ├── 355.html ├── 374.html ├── 053.html ├── 359.html ├── 125.html ├── 213.html ├── 418.html ├── 040.html ├── 294.html ├── 386.html ├── 394-curl.html ├── 282.html ├── 298.html ├── 335.html ├── 122.html ├── 049.html ├── 170.html ├── 411.html ├── 133.html ├── 155.html ├── 156.html ├── 173.html ├── 305.html ├── 417.html ├── 211.html ├── 338.html ├── 126.html ├── 187.p ├── 206.html ├── 217.html ├── 426.html ├── 042.html ├── 120.html ├── 218.html ├── 128.html ├── 249.html ├── 307.html ├── 354.html ├── 161.html ├── 285.html ├── 118.html ├── 245.html ├── 347-curl.html ├── 132.html ├── 244.html ├── 325.html ├── 051t.p ├── 210.html ├── 243.html ├── 299.html ├── 416.html ├── 183.html ├── 437.html ├── 320.html ├── 395.html ├── 326.html ├── 214.html ├── 179.p ├── 177.html ├── 257.html ├── 110.html ├── 288.html ├── 327.html ├── 399.html ├── 007.html ├── 022.html ├── 266.p ├── 278.html └── 420.html ├── src ├── lib │ ├── gc │ │ ├── Makefile.am │ │ └── include │ │ │ └── Makefile.am │ ├── curl │ │ └── Makefile.am │ ├── cord │ │ ├── include │ │ │ ├── private │ │ │ │ └── Makefile.am │ │ │ └── Makefile.am │ │ ├── source.url │ │ └── Makefile.am │ ├── Makefile.am │ ├── smtp │ │ ├── comms.C │ │ └── Makefile.am │ ├── sdbm │ │ ├── pa-include │ │ │ └── Makefile.am │ │ └── Makefile.am │ ├── gd │ │ └── Makefile.am │ ├── json │ │ └── Makefile.am │ ├── md5 │ │ └── Makefile.am │ ├── punycode │ │ └── Makefile.am │ ├── memcached │ │ └── Makefile.am │ └── pcre │ │ └── Makefile.am ├── doc │ ├── view_chm.cmd │ ├── view_html.cmd │ ├── chm │ │ └── dir.txt │ ├── pooled.dox │ ├── ClassExample1.dox │ ├── sources2html.cmd │ ├── object.dox │ ├── html2chm.cmd │ ├── compiler.dox │ ├── class.dox │ ├── executor.dox │ ├── index.dox │ └── footer.htm ├── sql │ └── Makefile.am ├── targets │ ├── cgi │ │ └── .cvsignore │ ├── isapi │ │ ├── parser3isapi.def │ │ └── Makefile.am │ └── Makefile.am ├── Makefile.am ├── classes │ └── xnode.C ├── main │ └── helpers │ │ └── CaseFolding.txt └── include │ └── pa_version.h ├── NEWS ├── ChangeLog ├── etc ├── Makefile.am └── parser3.charsets │ └── Makefile.am ├── AUTHORS ├── README └── Makefile.am /tests/061.dat: -------------------------------------------------------------------------------- 1 | 123 -------------------------------------------------------------------------------- /tests/216_dir/1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/270_dir/z: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/370.dat: -------------------------------------------------------------------------------- 1 | 3 -------------------------------------------------------------------------------- /tests/022_dir/a.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/022_dir/b.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/022_dir/b[b].txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/022_dir/c.htm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/216_dir/2.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/270_dir/270.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/415_dir/24.p: -------------------------------------------------------------------------------- 1 | $[] -------------------------------------------------------------------------------- /tests/415_dir/25.p: -------------------------------------------------------------------------------- 1 | $ bug -------------------------------------------------------------------------------- /tests/415_dir/26.p: -------------------------------------------------------------------------------- 1 | ^bug] -------------------------------------------------------------------------------- /tests/161_utf8.txt: -------------------------------------------------------------------------------- 1 | проверка -------------------------------------------------------------------------------- /tests/195_utf8.txt: -------------------------------------------------------------------------------- 1 | проверка -------------------------------------------------------------------------------- /tests/223_utf8.txt: -------------------------------------------------------------------------------- 1 | Проверка -------------------------------------------------------------------------------- /tests/230_utf8.txt: -------------------------------------------------------------------------------- 1 | ПрОвЕрКа -------------------------------------------------------------------------------- /tests/247_utf8.txt: -------------------------------------------------------------------------------- 1 | проверка -------------------------------------------------------------------------------- /tests/256.txt: -------------------------------------------------------------------------------- 1 | file-content -------------------------------------------------------------------------------- /tests/270_dir/subdir/270.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/415_dir/27.p: -------------------------------------------------------------------------------- 1 | $z() 2 | -------------------------------------------------------------------------------- /tests/outputs/create-dir: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/247_utf8_bom.txt: -------------------------------------------------------------------------------- 1 | проверка -------------------------------------------------------------------------------- /tests/415_dir/20.p: -------------------------------------------------------------------------------- 1 | @bug[ 2 | 3 | -------------------------------------------------------------------------------- /tests/415_dir/23.p: -------------------------------------------------------------------------------- 1 | ^if(-f ){bug} -------------------------------------------------------------------------------- /tests/415_dir/28.p: -------------------------------------------------------------------------------- 1 | ^bug:[] 2 | -------------------------------------------------------------------------------- /tests/415_dir/30.p: -------------------------------------------------------------------------------- 1 | $(2+2) 2 | -------------------------------------------------------------------------------- /tests/415_dir/31.p: -------------------------------------------------------------------------------- 1 | $(2+2)[v] 2 | -------------------------------------------------------------------------------- /tests/060.html: -------------------------------------------------------------------------------- 1 | ^if('a' eq 'b'){y;n} -------------------------------------------------------------------------------- /tests/415_dir/09.p: -------------------------------------------------------------------------------- 1 | @BUG 2 | bug 3 | -------------------------------------------------------------------------------- /tests/415_dir/21.p: -------------------------------------------------------------------------------- 1 | @bug[;] 2 | 3 | -------------------------------------------------------------------------------- /tests/001.html: -------------------------------------------------------------------------------- 1 | $var[value] 2 | $var 3 | -------------------------------------------------------------------------------- /tests/004.html: -------------------------------------------------------------------------------- 1 | $env:SERVER_SOFTWARE 2 | -------------------------------------------------------------------------------- /tests/httpd/002.txt: -------------------------------------------------------------------------------- 1 | GET HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/site/test.txt: -------------------------------------------------------------------------------- 1 | test?test.test! -------------------------------------------------------------------------------- /src/lib/gc/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = include 2 | -------------------------------------------------------------------------------- /tests/077.html: -------------------------------------------------------------------------------- 1 | $a#1[1]
2 | $a#1=
3 | -------------------------------------------------------------------------------- /tests/415_dir/22.p: -------------------------------------------------------------------------------- 1 | @ok [] anything 2 | code 3 | -------------------------------------------------------------------------------- /tests/httpd/008.txt: -------------------------------------------------------------------------------- 1 | GET %2Ftest.txt HTTP/1.0 2 | -------------------------------------------------------------------------------- /tests/httpd/011.txt: -------------------------------------------------------------------------------- 1 | GET test.txt HTTP/1.0 2 | -------------------------------------------------------------------------------- /src/doc/view_chm.cmd: -------------------------------------------------------------------------------- 1 | START /max "" chm\parser3src.chm -------------------------------------------------------------------------------- /src/doc/view_html.cmd: -------------------------------------------------------------------------------- 1 | START /max "" html\index.htm -------------------------------------------------------------------------------- /tests/017.html: -------------------------------------------------------------------------------- 1 | $h[^if(1){$.a(1);$.a(2)}] 2 | $h.a 3 | -------------------------------------------------------------------------------- /tests/082.html: -------------------------------------------------------------------------------- 1 | ^for[a](0;6){^if($a<3){}{$a}}[,] 2 | -------------------------------------------------------------------------------- /tests/166.html: -------------------------------------------------------------------------------- 1 | $s[12312] 2 | ^s.match[2][gn] 3 | 4 | -------------------------------------------------------------------------------- /tests/415_dir/29.p: -------------------------------------------------------------------------------- 1 | @auto[] 2 | $x[ $.a.b[c] ] 3 | -------------------------------------------------------------------------------- /tests/httpd/010.txt: -------------------------------------------------------------------------------- 1 | GET /test%2Ftest.txt HTTP/1.0 2 | -------------------------------------------------------------------------------- /tests/httpd/023.txt: -------------------------------------------------------------------------------- 1 | GET /auto.p HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/024.txt: -------------------------------------------------------------------------------- 1 | GET /index.html HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/029.txt: -------------------------------------------------------------------------------- 1 | GET /029.html HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/038.txt: -------------------------------------------------------------------------------- 1 | GET /test/%D HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /src/doc/chm/dir.txt: -------------------------------------------------------------------------------- 1 | parser3src.chm will be created here -------------------------------------------------------------------------------- /src/lib/curl/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = curl.h 2 | 3 | -------------------------------------------------------------------------------- /src/sql/Makefile.am: -------------------------------------------------------------------------------- 1 | include_HEADERS = pa_sql_driver.h 2 | -------------------------------------------------------------------------------- /src/targets/cgi/.cvsignore: -------------------------------------------------------------------------------- 1 | p2Debug 2 | Debug* 3 | Release* -------------------------------------------------------------------------------- /tests/034.html: -------------------------------------------------------------------------------- 1 | $t[abcABC] 2 | $t
3 | ^t.upper[] 4 | -------------------------------------------------------------------------------- /tests/069.html: -------------------------------------------------------------------------------- 1 | $sQuantity[ ] 2 | ^sQuantity.int(10) 3 | -------------------------------------------------------------------------------- /tests/087.html: -------------------------------------------------------------------------------- 1 | ^eval(1<<3)
2 | ^eval(8>>2)
3 | -------------------------------------------------------------------------------- /tests/182_dir/a6.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | x 3 | 4 | @USE 5 | a3.p 6 | -------------------------------------------------------------------------------- /tests/366.p: -------------------------------------------------------------------------------- 1 | @auto[] 2 | $LOG[$LOG 366.p used 3 | ] 4 | -------------------------------------------------------------------------------- /tests/369.html: -------------------------------------------------------------------------------- 1 | $response:status[404] 2 | not found 3 | -------------------------------------------------------------------------------- /tests/415_dir/06.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test6 3 | 4 | @BASE 5 | -------------------------------------------------------------------------------- /tests/httpd/009.txt: -------------------------------------------------------------------------------- 1 | GET /.%2E/data/test.txt HTTP/1.0 2 | -------------------------------------------------------------------------------- /tests/httpd/013.txt: -------------------------------------------------------------------------------- 1 | GET /.%2E\data/test.txt HTTP/1.0 2 | -------------------------------------------------------------------------------- /tests/httpd/014.txt: -------------------------------------------------------------------------------- 1 | GET /%00test.txt HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/028.txt: -------------------------------------------------------------------------------- 1 | GET /?name=value&a=b HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Read the Parser3 news at http://www.parser.ru/en/news/ 2 | -------------------------------------------------------------------------------- /tests/048.html: -------------------------------------------------------------------------------- 1 | $a12[a12 variable value] 2 | $b[12] 3 | $a$b 4 | -------------------------------------------------------------------------------- /tests/104.html: -------------------------------------------------------------------------------- 1 | $s[123] 2 | $t[^s.match[.(.).]] 3 | $t.1 4 | -------------------------------------------------------------------------------- /tests/105.html: -------------------------------------------------------------------------------- 1 | $s[123] 2 | $t[^s.match[x(x)x]] 3 | $t.1 4 | -------------------------------------------------------------------------------- /tests/226.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test 3 | 4 | @call[] 5 | it works! 6 | -------------------------------------------------------------------------------- /tests/415_dir/01.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test1 3 | second line 4 | 5 | -------------------------------------------------------------------------------- /tests/415_dir/03.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test3 3 | 4 | @BASE 5 | bug 6 | -------------------------------------------------------------------------------- /tests/415_dir/13.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test13 3 | 4 | @bug:method[] 5 | -------------------------------------------------------------------------------- /tests/419.html: -------------------------------------------------------------------------------- 1 | $response:body[ $.file[022_dir/b[b].txt] ] 2 | -------------------------------------------------------------------------------- /tests/httpd/007.txt: -------------------------------------------------------------------------------- 1 | GET /../data/test.txt HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/012.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt?path=/../ HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/outputs/d.cmd: -------------------------------------------------------------------------------- 1 | gdiff ..\results\%1.processed %1.processed -------------------------------------------------------------------------------- /tests/003.html: -------------------------------------------------------------------------------- 1 | $s[ select] 2 | $s[^s.match[^^\s*][]{!}] 3 | $s 4 | -------------------------------------------------------------------------------- /tests/066.html: -------------------------------------------------------------------------------- 1 | ^math:crypt[123;^$apr1^$1234567890abcdef]
2 | -------------------------------------------------------------------------------- /tests/070.html: -------------------------------------------------------------------------------- 1 | $f[^file::stat[070.html]] 2 | $f.content-type 3 | -------------------------------------------------------------------------------- /tests/080.html: -------------------------------------------------------------------------------- 1 | $str[^eval("1e-20"*2)] 2 | ^str.match[-0][]{-} 3 | -------------------------------------------------------------------------------- /tests/094.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^a[]^#31= 3 | 4 | @a[] 5 | (a called) -------------------------------------------------------------------------------- /tests/httpd/005.txt: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.0 2 | :value 3 | 4 | 5 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/ChangeLog -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = include main sql types classes lib targets 2 | -------------------------------------------------------------------------------- /src/lib/cord/include/private/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = cord_pos.h 2 | -------------------------------------------------------------------------------- /src/lib/gc/include/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = gc.h gc_allocator.h 2 | -------------------------------------------------------------------------------- /tests/054.html: -------------------------------------------------------------------------------- 1 | $a[ 2 | $b{ $c[1] } 3 | ] 4 | '$c' - 5 | $b 6 | '$c' 7 | -------------------------------------------------------------------------------- /tests/090.html: -------------------------------------------------------------------------------- 1 | $a[$form:a] 2 | =^form:a.int(1)= 3 | =^a.int(1)= 4 | 5 | -------------------------------------------------------------------------------- /tests/182_dir/a5.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @a1[] 5 | another a1
6 | -------------------------------------------------------------------------------- /tests/415_dir/10.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test10 3 | 4 | @bug[] 5 | ^BASE:bug[] 6 | -------------------------------------------------------------------------------- /tests/415_dir/15.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test13 3 | 4 | @OPTIONS 5 | partial 6 | -------------------------------------------------------------------------------- /tests/httpd/015.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes=5-9 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/016.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes=? 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/017.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes= 5 - 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/018.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes=-5 3 | 4 | -------------------------------------------------------------------------------- /tests/050.html: -------------------------------------------------------------------------------- 1 | ^process{ 2 | ^$a[^^if(1){^$.k[y]}{^$.k[n]}] ^$a.k 3 | } 4 | -------------------------------------------------------------------------------- /tests/235_attach.txt: -------------------------------------------------------------------------------- 1 | text attachment 2 | with 3 | windows line-endings 4 | -------------------------------------------------------------------------------- /tests/387_dir/A.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | A 3 | 4 | @BASE 5 | B 6 | 7 | @create[] 8 | -------------------------------------------------------------------------------- /tests/415_dir/05.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test5 3 | 4 | @BASE 5 | test5 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/415_dir/14.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test14 3 | 4 | @BASE 5 | name1 6 | name2 7 | -------------------------------------------------------------------------------- /tests/httpd/001.txt: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.0 2 | Host: parser.ru 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/httpd/003.txt: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.0 2 | Content-length: 10 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/httpd/019.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes=12-11 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/036.txt: -------------------------------------------------------------------------------- 1 | GET /broken-%D0%B1%D1%83%D0%BA%D0%B2%D1 HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/015.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/015.html -------------------------------------------------------------------------------- /tests/021.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/021.html -------------------------------------------------------------------------------- /tests/024.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/024.html -------------------------------------------------------------------------------- /tests/032.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/032.html -------------------------------------------------------------------------------- /tests/033.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/033.html -------------------------------------------------------------------------------- /tests/047.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/047.html -------------------------------------------------------------------------------- /tests/055.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/055.html -------------------------------------------------------------------------------- /tests/059.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/059.html -------------------------------------------------------------------------------- /tests/061.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/061.html -------------------------------------------------------------------------------- /tests/064.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/064.html -------------------------------------------------------------------------------- /tests/067.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/067.html -------------------------------------------------------------------------------- /tests/068.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/068.html -------------------------------------------------------------------------------- /tests/081.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/081.html -------------------------------------------------------------------------------- /tests/085.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/085.html -------------------------------------------------------------------------------- /tests/086.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/086.html -------------------------------------------------------------------------------- /tests/098.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/098.html -------------------------------------------------------------------------------- /tests/109.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/109.html -------------------------------------------------------------------------------- /tests/119.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/119.html -------------------------------------------------------------------------------- /tests/153.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/153.html -------------------------------------------------------------------------------- /tests/158.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/158.html -------------------------------------------------------------------------------- /tests/171.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/171.html -------------------------------------------------------------------------------- /tests/201.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/201.html -------------------------------------------------------------------------------- /tests/228.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/228.html -------------------------------------------------------------------------------- /tests/231.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/231.html -------------------------------------------------------------------------------- /tests/250.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/250.html -------------------------------------------------------------------------------- /tests/251.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/251.html -------------------------------------------------------------------------------- /tests/255.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/255.html -------------------------------------------------------------------------------- /tests/292.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/292.html -------------------------------------------------------------------------------- /tests/293.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/293.html -------------------------------------------------------------------------------- /tests/304.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/304.html -------------------------------------------------------------------------------- /tests/306.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/306.html -------------------------------------------------------------------------------- /tests/387_dir/B.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | B 3 | 4 | @BASE 5 | A 6 | 7 | @create[] 8 | 9 | -------------------------------------------------------------------------------- /tests/httpd/021.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes=5-9,10-14 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/022.txt: -------------------------------------------------------------------------------- 1 | ZZZ /test.txt HTTP/1.0 2 | Range: bytes=5-9,10-14 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/040.txt: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.0 2 | Host: value--with-zero-byte 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/results/012.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 1 -------------------------------------------------------------------------------- /tests/results/017.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 1 -------------------------------------------------------------------------------- /tests/results/028.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 1 -------------------------------------------------------------------------------- /tests/results/050.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | y -------------------------------------------------------------------------------- /tests/results/060.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | n -------------------------------------------------------------------------------- /tests/results/069.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 0 -------------------------------------------------------------------------------- /tests/results/072.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 1 -------------------------------------------------------------------------------- /tests/results/084.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 1 -------------------------------------------------------------------------------- /tests/results/104.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 2 -------------------------------------------------------------------------------- /tests/results/105.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 0 3 | 4 | -------------------------------------------------------------------------------- /tests/results/114.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 2 -------------------------------------------------------------------------------- /tests/results/166.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 1 3 | 4 | 2 -------------------------------------------------------------------------------- /tests/008.html: -------------------------------------------------------------------------------- 1 | $s[0] 2 | if 0=^if($s){}{n}
3 | if def 0=^if(def $s){y}{}
4 | -------------------------------------------------------------------------------- /tests/079.html: -------------------------------------------------------------------------------- 1 | $local[local value] 2 | ^switch[1]{ 3 | ^case[1]{1code $local} 4 | } 5 | -------------------------------------------------------------------------------- /tests/098font.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/098font.gif -------------------------------------------------------------------------------- /tests/103mark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/103mark.gif -------------------------------------------------------------------------------- /tests/415_dir/04.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test4 3 | 4 | @BASE 5 | MAIN 6 | 7 | @BASE 8 | bug 9 | -------------------------------------------------------------------------------- /tests/httpd/020.txt: -------------------------------------------------------------------------------- 1 | GET /test.txt HTTP/1.0 2 | Range: bytes=10-30 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/results/001.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 5 3 | 4 | value -------------------------------------------------------------------------------- /tests/results/039.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 2 3 | 4 | 12 -------------------------------------------------------------------------------- /tests/results/046.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | 123 -------------------------------------------------------------------------------- /tests/results/049.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | 123 -------------------------------------------------------------------------------- /tests/results/080.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 5 3 | 4 | 2e-20 -------------------------------------------------------------------------------- /tests/results/083.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 5 3 | 4 | 3,4,5 -------------------------------------------------------------------------------- /tests/results/086.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | 1 2 -------------------------------------------------------------------------------- /tests/results/089.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 2 3 | 4 | OK -------------------------------------------------------------------------------- /tests/results/095.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | 'b' -------------------------------------------------------------------------------- /tests/results/101.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | 001 -------------------------------------------------------------------------------- /tests/results/127.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 5 3 | 4 | 3
-------------------------------------------------------------------------------- /tests/results/199.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 4 3 | 4 | zigi -------------------------------------------------------------------------------- /tests/results/203.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 4 3 | 4 | 1, 2 -------------------------------------------------------------------------------- /etc/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = parser3.charsets 2 | confdir=@sysconfdir@ 3 | conf_DATA=auto.p 4 | -------------------------------------------------------------------------------- /src/classes/xnode.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/src/classes/xnode.C -------------------------------------------------------------------------------- /src/doc/pooled.dox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/src/doc/pooled.dox -------------------------------------------------------------------------------- /src/lib/cord/include/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = private 2 | 3 | noinst_HEADERS = cord.h ec.h 4 | -------------------------------------------------------------------------------- /tests/018.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^toint[33] 3 | ^toint[abc] 4 | 5 | @toint[s] 6 | ^s.int(123) 7 | -------------------------------------------------------------------------------- /tests/076.html: -------------------------------------------------------------------------------- 1 | $s[] 2 | ^s.pos[$nothing] 3 |
4 | $s[$nothing] 5 | ^s.pos[$nothing] 6 | -------------------------------------------------------------------------------- /tests/078.html: -------------------------------------------------------------------------------- 1 | $cookie:a[$.value[&] $.expires[^date::create(2003;3;4)]] 2 | $cookie:a 3 | -------------------------------------------------------------------------------- /tests/182_dir/a4.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | c 3 | 4 | @OPTIONS 5 | partial 6 | 7 | @c2[] 8 | c2
9 | -------------------------------------------------------------------------------- /tests/253_json.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/253_json.txt -------------------------------------------------------------------------------- /tests/395_dir/1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/395_dir/1.bmp -------------------------------------------------------------------------------- /tests/395_dir/4.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/395_dir/4.mp4 -------------------------------------------------------------------------------- /tests/415_dir/07.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test7 3 | 4 | @method[] 5 | 6 | @OPTIONS 7 | partial 8 | 9 | -------------------------------------------------------------------------------- /tests/415_dir/11.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test11 3 | 4 | @OPTIONS 5 | partial 6 | 7 | @method[] 8 | -------------------------------------------------------------------------------- /tests/415_dir/12.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test11 3 | 4 | @OPTIONS 5 | partial 6 | 7 | @BASE 8 | bug 9 | -------------------------------------------------------------------------------- /tests/httpd/004.txt: -------------------------------------------------------------------------------- 1 | GET /a+b/?a=b&c=d HTTP/1.0 2 | Host: %20parser.ru 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/httpd/025.txt: -------------------------------------------------------------------------------- 1 | GET /index.html HTTP/1.0 2 | Authorization: Basic YXV0aDp0ZXN0 3 | 4 | -------------------------------------------------------------------------------- /tests/httpd/033.txt: -------------------------------------------------------------------------------- 1 | GET /%D0%BF%D0%BE-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8/ HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/httpd/037.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/httpd/037.txt -------------------------------------------------------------------------------- /tests/httpd/ok.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/httpd/ok.log -------------------------------------------------------------------------------- /tests/results/003.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 7 3 | 4 | !select -------------------------------------------------------------------------------- /tests/results/004.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 9 3 | 4 | make_test -------------------------------------------------------------------------------- /tests/results/016.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | a 5 | a -------------------------------------------------------------------------------- /tests/results/018.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 6 3 | 4 | 33 5 | 123 -------------------------------------------------------------------------------- /tests/results/031.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 9 3 | 4 | 2037 12 1 -------------------------------------------------------------------------------- /tests/results/037.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | 2 5 | 3 -------------------------------------------------------------------------------- /tests/results/082.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 7 3 | 4 | 3,4,5,6 -------------------------------------------------------------------------------- /tests/results/090.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 7 3 | 4 | =1= 5 | =1= -------------------------------------------------------------------------------- /tests/results/093.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 10 3 | 4 | 1 3 5 7 9 -------------------------------------------------------------------------------- /tests/results/257.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 3 3 | 4 | ab 5 | -------------------------------------------------------------------------------- /tests/results/290.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 7 3 | 4 | method1 -------------------------------------------------------------------------------- /tests/results/355.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 8 3 | 4 | property -------------------------------------------------------------------------------- /tests/results/361.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 8 3 | 4 | junction -------------------------------------------------------------------------------- /src/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = gd smtp cord ltdl pcre md5 gc sdbm json curl punycode memcached 2 | -------------------------------------------------------------------------------- /src/lib/smtp/comms.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/src/lib/smtp/comms.C -------------------------------------------------------------------------------- /tests/019paf2001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/019paf2001.gif -------------------------------------------------------------------------------- /tests/045.html: -------------------------------------------------------------------------------- 1 | $d[^date::create(^date::create(2003;03;04;17;30)+1/24/60)] 2 | ^d.sql-string[] 3 | -------------------------------------------------------------------------------- /tests/058_paf2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/058_paf2000.png -------------------------------------------------------------------------------- /tests/096_dir/163.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/096_dir/163.jpg -------------------------------------------------------------------------------- /tests/096_dir/188.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/096_dir/188.jpg -------------------------------------------------------------------------------- /tests/103paf2001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/103paf2001.gif -------------------------------------------------------------------------------- /tests/223_win1251.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/223_win1251.txt -------------------------------------------------------------------------------- /tests/309.html: -------------------------------------------------------------------------------- 1 | $response:body[ $.file[309.html] $.mdate[^date::unix-timestamp(121478400)] ] 2 | -------------------------------------------------------------------------------- /tests/395_dir/2.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/395_dir/2.tiff -------------------------------------------------------------------------------- /tests/httpd/site/run_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ../../../src/targets/cgi/parser3 -p 8100 4 | -------------------------------------------------------------------------------- /tests/results/002.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | 1
5 | 3
-------------------------------------------------------------------------------- /tests/results/009.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 12 3 | 4 | 1 paf 2 pif -------------------------------------------------------------------------------- /tests/results/047.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 15 3 | 4 | paf
moko
-------------------------------------------------------------------------------- /tests/results/054.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 8 3 | 4 | '' - 5 | '1' -------------------------------------------------------------------------------- /tests/results/087.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | 8
5 | 2
-------------------------------------------------------------------------------- /tests/results/088.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | 4
5 | 6
-------------------------------------------------------------------------------- /tests/results/094.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 12 3 | 4 | (a called)1= -------------------------------------------------------------------------------- /tests/results/110.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 16 3 | 4 | 1: привет 5 | -------------------------------------------------------------------------------- /tests/results/118.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html; charset=UTF-8 2 | Content-Length: 0 3 | 4 | -------------------------------------------------------------------------------- /tests/results/184.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | true 5 | =true= -------------------------------------------------------------------------------- /tests/results/189.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 15 3 | 4 | dates are equal -------------------------------------------------------------------------------- /tests/results/267.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | true 5 | answer -------------------------------------------------------------------------------- /tests/results/285.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 7 3 | 4 | no 5 | no 6 | a -------------------------------------------------------------------------------- /tests/results/382.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 15 3 | 4 | Hello check arg -------------------------------------------------------------------------------- /tests/results/391.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 9 3 | 4 | 14581458 5 | -------------------------------------------------------------------------------- /tests/results/408.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | 1. ok 5 | 2. ok -------------------------------------------------------------------------------- /tests/029.html: -------------------------------------------------------------------------------- 1 | $a[^table::create{a 2 | 1 3 | 2}] 4 | ^eval(101\$a)
5 | ^eval(101/$a)
6 | 7 | -------------------------------------------------------------------------------- /tests/361.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | 4 | $j[^untaint{$m}] 5 | $j.CLASS_NAME 6 | 7 | @m[] 8 | method 9 | -------------------------------------------------------------------------------- /tests/395_dir/3_VP8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/395_dir/3_VP8.webp -------------------------------------------------------------------------------- /tests/438.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^bug[] 3 | 4 | @unhandled_exception[exception;stack] 5 | ^another_bug[] 6 | -------------------------------------------------------------------------------- /tests/results/029.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 15 3 | 4 | 50
5 | 50.5
-------------------------------------------------------------------------------- /tests/results/045.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 19 3 | 4 | 2003-03-04 17:31:00 -------------------------------------------------------------------------------- /tests/results/048.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | a12 variable value -------------------------------------------------------------------------------- /tests/results/076.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 10 3 | 4 | -1 5 |
6 | -1 -------------------------------------------------------------------------------- /tests/results/079.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 17 3 | 4 | 1code local value -------------------------------------------------------------------------------- /tests/results/081.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | 259
5 | n 6 | y -------------------------------------------------------------------------------- /tests/results/115.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 22 3 | 4 | /t/@n больше 10 5 | -------------------------------------------------------------------------------- /tests/results/194.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 12 3 | 4 | true
5 | 3 -------------------------------------------------------------------------------- /tests/results/248.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 13 3 | 4 | 423 5 | not found -------------------------------------------------------------------------------- /tests/results/299.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 12 3 | 4 | a:m 5 | b:m2 6 | c:m -------------------------------------------------------------------------------- /src/doc/ClassExample1.dox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/src/doc/ClassExample1.dox -------------------------------------------------------------------------------- /src/doc/sources2html.cmd: -------------------------------------------------------------------------------- 1 | ATTRIB -h html\index.hh? 2 | c:\progra~1\doxygen\bin\doxygen.exe doxygen.cfg 3 | -------------------------------------------------------------------------------- /tests/026.html: -------------------------------------------------------------------------------- 1 | $h[ 2 | $.a[1] 3 | $.b[2] 4 | ] 5 | ^h.foreach[key;value]{ 6 | $key=$value
7 | } 8 | -------------------------------------------------------------------------------- /tests/058.html: -------------------------------------------------------------------------------- 1 | $i[^image::measure[058_paf2000.png]] 2 | ^i.html[] 3 | ^i.html[$.border[] $.alt[PAF]] 4 | -------------------------------------------------------------------------------- /tests/121.html: -------------------------------------------------------------------------------- 1 | ^to-1251[] 2 | 3 | москва [$form:town] 4 | -------------------------------------------------------------------------------- /tests/161_windows1251.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/161_windows1251.txt -------------------------------------------------------------------------------- /tests/182_dir/a2.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @OPTIONS 5 | partial 6 | 7 | @a3[] 8 | a3
9 | 10 | -------------------------------------------------------------------------------- /tests/195_windows1251.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/195_windows1251.txt -------------------------------------------------------------------------------- /tests/247_windows1251.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/247_windows1251.txt -------------------------------------------------------------------------------- /tests/366_dir/test-duplicate.p: -------------------------------------------------------------------------------- 1 | @USE 2 | 366.p 3 | 4 | @auto[] 5 | $LOG[$LOG test-duplicate.p used 6 | ] 7 | -------------------------------------------------------------------------------- /tests/395_dir/3_VP8L.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/395_dir/3_VP8L.webp -------------------------------------------------------------------------------- /tests/395_dir/3_VP8X.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/395_dir/3_VP8X.webp -------------------------------------------------------------------------------- /tests/403.html: -------------------------------------------------------------------------------- 1 | $response:body[ $.file[403.html] $.name[] $.mdate[^date::create[2000-01-01T00:00:00Z] ]] 2 | -------------------------------------------------------------------------------- /tests/results/007.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/007.processed -------------------------------------------------------------------------------- /tests/results/019.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/019.processed -------------------------------------------------------------------------------- /tests/results/021.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/021.processed -------------------------------------------------------------------------------- /tests/results/024.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/024.processed -------------------------------------------------------------------------------- /tests/results/026.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 16 3 | 4 | a=1
5 | b=2
6 | -------------------------------------------------------------------------------- /tests/results/032.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/032.processed -------------------------------------------------------------------------------- /tests/results/033.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/033.processed -------------------------------------------------------------------------------- /tests/results/034.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 17 3 | 4 | abcABC
5 | ABCABC -------------------------------------------------------------------------------- /tests/results/041.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 11 3 | 4 | b 5 | -n- 6 | a 7 | -n- -------------------------------------------------------------------------------- /tests/results/055.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/055.processed -------------------------------------------------------------------------------- /tests/results/056.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 25 3 | 4 | callindirecttarget called -------------------------------------------------------------------------------- /tests/results/061.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/061.processed -------------------------------------------------------------------------------- /tests/results/062.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/064.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/064.processed -------------------------------------------------------------------------------- /tests/results/067.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/067.processed -------------------------------------------------------------------------------- /tests/results/068.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/068.processed -------------------------------------------------------------------------------- /tests/results/070.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 24 3 | 4 | application/octet-stream -------------------------------------------------------------------------------- /tests/results/077.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 17 3 | 4 | #1[1]
5 | #1=
-------------------------------------------------------------------------------- /tests/results/085.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/085.processed -------------------------------------------------------------------------------- /tests/results/096.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/096.processed -------------------------------------------------------------------------------- /tests/results/098.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/098.processed -------------------------------------------------------------------------------- /tests/results/103.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/103.processed -------------------------------------------------------------------------------- /tests/results/109.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/109.processed -------------------------------------------------------------------------------- /tests/results/119.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/119.processed -------------------------------------------------------------------------------- /tests/results/121.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/121.processed -------------------------------------------------------------------------------- /tests/results/125.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/126.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/128.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/130.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/132.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/133.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/135.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/136.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/138.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/139.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 18 3 | 4 | failed, that's OK 5 | -------------------------------------------------------------------------------- /tests/results/153.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/153.processed -------------------------------------------------------------------------------- /tests/results/158.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/158.processed -------------------------------------------------------------------------------- /tests/results/158.processes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/158.processes -------------------------------------------------------------------------------- /tests/results/171.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/171.processed -------------------------------------------------------------------------------- /tests/results/193.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/193.processed -------------------------------------------------------------------------------- /tests/results/201.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/201.processed -------------------------------------------------------------------------------- /tests/results/228.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/228.processed -------------------------------------------------------------------------------- /tests/results/231.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/231.processed -------------------------------------------------------------------------------- /tests/results/233.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/233.processed -------------------------------------------------------------------------------- /tests/results/234.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/234.processed -------------------------------------------------------------------------------- /tests/results/235.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/235.processed -------------------------------------------------------------------------------- /tests/results/237.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/237.processed -------------------------------------------------------------------------------- /tests/results/247.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/247.processed -------------------------------------------------------------------------------- /tests/results/255.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/255.processed -------------------------------------------------------------------------------- /tests/results/339.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/339.processed -------------------------------------------------------------------------------- /tests/results/343.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/343.processed -------------------------------------------------------------------------------- /tests/results/369.processed: -------------------------------------------------------------------------------- 1 | Status: 404 2 | Content-Type: text/html 3 | Content-Length: 9 4 | 5 | not found -------------------------------------------------------------------------------- /tests/results/401.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 23 3 | 4 | 'te st\.'=>'te%20st.' -------------------------------------------------------------------------------- /src/targets/isapi/parser3isapi.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | HttpExtensionProc 3 | GetExtensionVersion 4 | TerminateExtension -------------------------------------------------------------------------------- /tests/031.html: -------------------------------------------------------------------------------- 1 | $date[^date::create(2038;1;1)] 2 | ^date.roll[month](-1) 3 | $date.year $date.month $date.day 4 | -------------------------------------------------------------------------------- /tests/039.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^tobjeresult[]] 3 | $t.a 4 | 5 | @tobjeresult[] 6 | ^table::create{a 7 | 12} 8 | -------------------------------------------------------------------------------- /tests/062.html: -------------------------------------------------------------------------------- 1 | ^try{ 2 | ^if(" 09 "){y;n} 3 | }{ 4 | $exception.handled(1) 5 | failed, that's OK 6 | } 7 | -------------------------------------------------------------------------------- /tests/092.html: -------------------------------------------------------------------------------- 1 | ^if($if is junction){is junction;not junction}
2 | ^if(def $if){defined;not defined}
3 | -------------------------------------------------------------------------------- /tests/199.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^m[] 3 | 4 | @m[] 5 | #should return 'zigi' 6 | ^rem{ $result[wtf?] } 7 | zigi 8 | -------------------------------------------------------------------------------- /tests/333.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | ^try-catch{$method.key} 4 | ^try-catch{$method.key[value]} 5 | 6 | @method[] 7 | -------------------------------------------------------------------------------- /tests/366_dir/test.p: -------------------------------------------------------------------------------- 1 | @USE 2 | 366.p 3 | test-duplicate.p 4 | 5 | @auto[] 6 | $LOG[$LOG test.p used 7 | ] 8 | -------------------------------------------------------------------------------- /tests/httpd/site/index.html: -------------------------------------------------------------------------------- 1 | 2+2 is ^eval(2+2) 2 | ^json:string[$env:fields] 3 | ^json:string[$form:fields] 4 | -------------------------------------------------------------------------------- /tests/results/008.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 25 3 | 4 | if 0=n
5 | if def 0=y
-------------------------------------------------------------------------------- /tests/results/020.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 20 3 | 4 | ==
5 | =optics=
6 | -------------------------------------------------------------------------------- /tests/results/448.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 23 3 | 4 | result: 5, 104857600, 4 -------------------------------------------------------------------------------- /src/main/helpers/CaseFolding.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/src/main/helpers/CaseFolding.txt -------------------------------------------------------------------------------- /tests/002.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{a b 2 | 1 2 3 | 11 22 4 | 111 333}] 5 | $table.a
6 | ^table.count[]
7 | -------------------------------------------------------------------------------- /tests/005.html: -------------------------------------------------------------------------------- 1 | $cookie:name[ 2 | $.value[value] 3 | $.expires[^date::create(2000;01;01)] 4 | ] 5 | $cookie:name! 6 | -------------------------------------------------------------------------------- /tests/012.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^method[]] 3 | $t.name 4 | 5 | @method[] 6 | $result[^table::create{name 7 | 1}] 8 | -------------------------------------------------------------------------------- /tests/401.html: -------------------------------------------------------------------------------- 1 | $s[^taint[uri;te st.]] 2 | $h[ $.$s[$s] ] 3 | ^apply-taint[regex; ^h.foreach[k;v]{'$k'=>'$v'} ] 4 | -------------------------------------------------------------------------------- /tests/results/006.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 23 3 | 4 | y
5 | y
6 | n
-------------------------------------------------------------------------------- /tests/results/015.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 35 3 | 4 | 1!3dollar4dog5grid6nbsp7bird8colon9 -------------------------------------------------------------------------------- /tests/results/023.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 24 3 | 4 | 15.12
5 | 15.13
6 |
-------------------------------------------------------------------------------- /tests/results/092.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 31 3 | 4 | is junction
5 | not defined
-------------------------------------------------------------------------------- /tests/results/113.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 30 3 | 4 | привет
5 | 4
6 | 124
-------------------------------------------------------------------------------- /tests/results/170.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 19 3 | 4 | =2= 5 | =2= 6 | =2
7 | = 8 | -------------------------------------------------------------------------------- /tests/results/339-curl.processed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artlebedev/parser3/HEAD/tests/results/339-curl.processed -------------------------------------------------------------------------------- /tests/results/374.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 25 3 | 4 | main 5 | length 6 | code 1 code 2 -------------------------------------------------------------------------------- /tests/results/443.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 21 3 | 4 | 1. value 5 | null 6 | 2. null -------------------------------------------------------------------------------- /src/lib/cord/source.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc6.1.tar.gz 3 | -------------------------------------------------------------------------------- /tests/020.html: -------------------------------------------------------------------------------- 1 | $path[/optics/] 2 | $pathTable[^path.lsplit[/]] 3 | ^pathTable.menu{ 4 | =$pathTable.piece=
5 | } 6 | -------------------------------------------------------------------------------- /tests/023.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^test(15.124) 3 | ^test(15.1250001) 4 |
5 | 6 | @test[f] 7 | ^f.format{%.2f}
8 | 9 | -------------------------------------------------------------------------------- /tests/044.html: -------------------------------------------------------------------------------- 1 | $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]
2 | ^d.roll[day](+365*3+1) ^d.sql-string[]
3 | -------------------------------------------------------------------------------- /tests/046.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^method_with_void_params[$not_defined] 3 | 4 | @method_with_void_params[p] 5 | ^p.int(123) 6 | -------------------------------------------------------------------------------- /tests/328.html: -------------------------------------------------------------------------------- 1 | ^break(false) 2 | ^try-catch{ ^break(true) } 3 | ^for[i](1;5){ 4 | ^continue($i>2) 5 | $i 6 | } 7 | -------------------------------------------------------------------------------- /tests/340.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $xdoc[^xdoc::load[http://www.parser.ru/_/tests/340.html]] 3 | ^xdoc.string[ $.indent[yes] ] 4 | -------------------------------------------------------------------------------- /tests/results/074.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 27 3 | 4 | 31
5 | 29
6 | 31
7 | 28
-------------------------------------------------------------------------------- /tests/results/236.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 24 3 | 4 | a eq 5 | b eq 6 | c eq 7 | d eq 8 | e eq -------------------------------------------------------------------------------- /tests/results/242.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 27 3 | 4 |
5 | columns: 1
6 | =a=
7 | 
-------------------------------------------------------------------------------- /tests/results/375.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 24 3 | 4 | 1. "" 5 | 2. "" 6 | 3. "failed" 7 | -------------------------------------------------------------------------------- /tests/results/423.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 23 3 | 4 | a a 5 | b once 6 | a1 a1 7 | a2 a2 8 | -------------------------------------------------------------------------------- /src/lib/sdbm/pa-include/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = pa_apr.h pa_errno.h pa_file_info.h pa_file_io.h pa_sdbm.h pa_strings.h 2 | -------------------------------------------------------------------------------- /tests/028.html: -------------------------------------------------------------------------------- 1 | $h[ 2 | $.a[1] 3 | $.b[2] 4 | ] 5 | $c[^table::create{o 6 | ^h.foreach[key;value]{$value 7 | }}] 8 | $c.o 9 | -------------------------------------------------------------------------------- /tests/051.html: -------------------------------------------------------------------------------- 1 | @USE 2 | /tests/051t.p 3 | 4 | @main[] 5 | $t[^t::create[]] 6 | ^t.method[] 7 |
8 | ^t.base_method[] 9 | -------------------------------------------------------------------------------- /tests/056.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $f[$callindirecttarget] 3 | ^f[] 4 | 5 | @callindirecttarget[] 6 | callindirecttarget called 7 | -------------------------------------------------------------------------------- /tests/083.html: -------------------------------------------------------------------------------- 1 | $t[^table::create{a 2 | 1 3 | 2 4 | 3 5 | 4 6 | 5 7 | }] 8 | 9 | ^t.menu{^if($t.a<3){}{$t.a}}[,] 10 | -------------------------------------------------------------------------------- /tests/089.html: -------------------------------------------------------------------------------- 1 | $hash[ 2 | $.a[1] 3 | $.b[2] 4 | ] 5 | ^hash.foreach[key;value]{ 6 | # $hash.c[1] 7 | $hash.a[1] 8 | } 9 | OK -------------------------------------------------------------------------------- /tests/248.html: -------------------------------------------------------------------------------- 1 | $s[123] 2 | $sNotFound[not found] 3 | 4 | ^s.match[1][]{4}{$sNotFound} 5 | 6 | ^s.match[0][]{4}{$sNotFound} 7 | -------------------------------------------------------------------------------- /tests/314.html: -------------------------------------------------------------------------------- 1 | static call test 2 | 3 | 1. ^string:base64[] 4 | 2. ^string:idna[] 5 | 3. ^try-catch{ ^string:js-escape[] } 6 | -------------------------------------------------------------------------------- /tests/httpd/027.txt: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.0 2 | Content-Length: 6 3 | Content-Type: application/x-www-form-urlencoded 4 | 5 | name=value -------------------------------------------------------------------------------- /tests/results/066.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 41 3 | 4 | $apr1$12345678$LQ3conzxSaD6Sm3kZkyGO.
-------------------------------------------------------------------------------- /tests/results/124.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 39 3 | 4 | 2003-03-29 04:00:00 5 | 2003-03-30 04:00:00 -------------------------------------------------------------------------------- /tests/results/168.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 30 3 | 4 | a, b1, zigi 5 |
6 | a, b1, zigi 7 | -------------------------------------------------------------------------------- /tests/095.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{key value 2 | 1 a 3 | 2 b 4 | }] 5 | $hash[^table.hash($table.key*2)] 6 | '$hash.4.value' 7 | -------------------------------------------------------------------------------- /tests/124.html: -------------------------------------------------------------------------------- 1 | $date[^date::create(2003;03;29;4;0)] 2 | ^date.sql-string[] 3 | ^date.roll[day](+1) 4 | ^date.sql-string[] 5 | 6 | -------------------------------------------------------------------------------- /tests/375.html: -------------------------------------------------------------------------------- 1 | ^try-catch{ 2 | 1. "$f[^file::exec[binary;./]]" 3 | 2. "^f.base64[]" 4 | 3. "^if($f.status){failed}{ok}" 5 | } 6 | -------------------------------------------------------------------------------- /tests/httpd/026.txt: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.0 2 | Content-Length: 10 3 | Content-Type: application/x-www-form-urlencoded 4 | 5 | name=value -------------------------------------------------------------------------------- /tests/httpd/032.txt: -------------------------------------------------------------------------------- 1 | GET /%D0%BF%D0%BE-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8/?name=%F2%E5%F1%F2&charset=Windows-1251 HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/results/102.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 33 3 | 4 | 1.1 == 5 | 1.2 == 6 | 2.2 =bar= 7 | 2.2 =bar= -------------------------------------------------------------------------------- /tests/100.html: -------------------------------------------------------------------------------- 1 | $f[^file::load[text;087.html]] 2 | $f[^file::create[$f; $.name[/с путем/не ASCII.html] ]] 3 | $response:download[$f] 4 | -------------------------------------------------------------------------------- /tests/189.html: -------------------------------------------------------------------------------- 1 | $d1[^date::create[2008-09-29 00:00:00]] 2 | $d2[^date::create[$d1]] 3 | 4 | dates ^if($d1==$d2){are}{are not} equal 5 | -------------------------------------------------------------------------------- /tests/203.html: -------------------------------------------------------------------------------- 1 | $h[ 2 | $.1[paf] 3 | $.2[misha] 4 | ] 5 | 6 | 7 | $t[^h._keys[k]] 8 | ^t.sort($t.k) 9 | ^t.menu{$t.k}[, ] 10 | -------------------------------------------------------------------------------- /tests/290.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $x[^if(1)[$m1][$m2]] 4 | 5 | ^x[] 6 | 7 | @m1[] 8 | method1 9 | 10 | @m2[] 11 | method2 12 | -------------------------------------------------------------------------------- /tests/results/044.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 47 3 | 4 | 2002-04-02 02:02:03
5 | 2005-04-02 02:02:03
-------------------------------------------------------------------------------- /tests/results/073.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 35 3 | 4 | 0
5 | 2
6 |
7 | 1
8 | 292
9 |
-------------------------------------------------------------------------------- /tests/results/111.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 43 3 | 4 |
<d>=&amp;=</d>
5 | 
6 | 
-------------------------------------------------------------------------------- /tests/results/162.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 32 3 | 4 |
5 | 2	22
6 | 3	33
7 | 5	22
8 | 6	33
9 | 
-------------------------------------------------------------------------------- /tests/results/300.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 15 3 | 4 | 2 5 | 1 6 | 2 7 | z 8 | 0 9 | z 10 | z 11 | z -------------------------------------------------------------------------------- /tests/037.html: -------------------------------------------------------------------------------- 1 | $t[^table::create{a b 2 | 1 11 3 | 2 22 4 | }] 5 | $c[^table::create[$t]] 6 | ^c.append{2 33} 7 | ^t.count[] 8 | ^c.count[] 9 | -------------------------------------------------------------------------------- /tests/072.html: -------------------------------------------------------------------------------- 1 | @main[] wwrapperpass 2 | $h[^hash::create[]] 3 | $h.a(0) 4 | ^my_method[^if(2){$h}] 5 | 6 | @my_method[p] 7 | ^p._count[] 8 | -------------------------------------------------------------------------------- /tests/114.html: -------------------------------------------------------------------------------- 1 | $d[^xdoc::create{}] 2 | $list[^d.select[t]] 3 | ^list.0.attributes._count[] 4 | -------------------------------------------------------------------------------- /tests/194_dir/194.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | MyObject 3 | 4 | 5 | @create[] 6 | $iDynamic(1) 7 | 8 | 9 | @GET[] 10 | $result($iDynamic) 11 | -------------------------------------------------------------------------------- /tests/415_dir/08.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test8 3 | 4 | @method[] 5 | 6 | @CLASS 7 | test81 8 | 9 | @BASE 10 | test8 11 | 12 | @method[] 13 | -------------------------------------------------------------------------------- /tests/results/040.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 51 3 | 4 | is not junction
5 | is string
6 | is not double
-------------------------------------------------------------------------------- /tests/results/145.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 48 3 | 4 | right, comment does not have children
5 | right 6 | -------------------------------------------------------------------------------- /tests/results/167.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 56 3 | 4 | untaint in SQL language failed - no connection specified -------------------------------------------------------------------------------- /tests/results/211.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 41 3 | 4 | abc
5 | d
6 | d
7 | d
8 | e
-------------------------------------------------------------------------------- /tests/results/295.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 48 3 | 4 | y 2002, m 01, d 01 5 | table 6 | 1 = v1 2 = v2 0,0,0,0,0 -------------------------------------------------------------------------------- /tests/results/354.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 46 3 | 4 | string 5 | method A dynamic 6 | string 7 | method A static -------------------------------------------------------------------------------- /tests/results/411.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 55 3 | 4 | 2014-10-26T00:00:00+03:00 vs 2014-10-26T01:00:00+03:00 5 | -------------------------------------------------------------------------------- /src/targets/Makefile.am: -------------------------------------------------------------------------------- 1 | if COMPILE_APACHE_MODULE 2 | SUBDIRS = apache cgi 3 | else 4 | #don't compile apache 5 | SUBDIRS = cgi isapi 6 | endif 7 | -------------------------------------------------------------------------------- /tests/084.html: -------------------------------------------------------------------------------- 1 | $t[^table::create{a b 2 | 1 2 3 | 1 3 4 | }] 5 | #^t.hash[a] 6 | #^t.hash[a;b] 7 | $d[^t.hash[a][$.distinct(1)]] 8 | ^d._count[] 9 | -------------------------------------------------------------------------------- /tests/178_dir/178d.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | d 3 | 4 | @BASE 5 | b 6 | 7 | @auto[] 8 | $_d[d] 9 | 10 | @create[] 11 | ^BASE:create[] 12 | $d[d] 13 | -------------------------------------------------------------------------------- /tests/178_dir/178e.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | e 3 | 4 | @BASE 5 | a 6 | 7 | @auto[] 8 | $_e[e] 9 | 10 | @create[] 11 | ^BASE:create[] 12 | $e[e] 13 | -------------------------------------------------------------------------------- /tests/181.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/187.html: -------------------------------------------------------------------------------- 1 | @USE 2 | 187.p 3 | 4 | 5 | @main[] 6 | $a[MAIN_a] 7 | ^test187:print[] 8 | ^test187:update[] 9 | ^test187:print[] 10 | -------------------------------------------------------------------------------- /tests/190.html: -------------------------------------------------------------------------------- 1 | @USE 2 | 190.p 3 | 4 | @main[] 5 | $a[MAIN_a] 6 | 7 | $test190:a
8 | $test190:b
9 | ^test190:do[] 10 | 11 | -------------------------------------------------------------------------------- /tests/results/036.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 64 3 | 4 | method param passed from main with variable var=global var value -------------------------------------------------------------------------------- /tests/results/112.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 62 3 | 4 |
<d attr="привет"></d>
5 | 
6 | 
-------------------------------------------------------------------------------- /tests/results/198.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 57 3 | 4 | '' -- should be empty string! 5 |
6 | '1' -- should be '1' -------------------------------------------------------------------------------- /tests/results/284.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 58 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/results/331.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 64 3 | 4 | 12 3 45nowhitespaceyes whitespace yes whitespace yes whitespace -------------------------------------------------------------------------------- /tests/101.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^varmethnameconflict[] 3 | 4 | @varmethnameconflict[] 5 | $varmethnameconflict[1] 6 | ^varmethnameconflict.format[%03d] 7 | -------------------------------------------------------------------------------- /tests/357.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try-catch{ ^for[1](1;100){a} } 3 | ^try-catch{ ^recursion(100) } 4 | 5 | @recursion[i] 6 | a^if($i>0){^recursion($i-1)} 7 | -------------------------------------------------------------------------------- /tests/results/078.processed: -------------------------------------------------------------------------------- 1 | Set-Cookie: a=%26; expires=Mon, 03 Mar 2003 21:00:00 GMT; path=/ 2 | Content-Type: text/html 3 | Content-Length: 1 4 | 5 | & -------------------------------------------------------------------------------- /tests/results/154.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 54 3 | 4 | 2003-11-03 14:02:03
5 | 1067857323 6 |
7 | 1067857323 -------------------------------------------------------------------------------- /tests/results/155.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 50 3 | 4 | [ 5 | {"a":"av\tav","b":"b\nv"} 6 | ] 7 | [ 8 | {"b":"av\tav"} 9 | ] -------------------------------------------------------------------------------- /tests/results/197.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 58 3 | 4 | 5 | /value/ 6 | -------------------------------------------------------------------------------- /tests/results/241.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 56 3 | 4 | Exception (OK): 5 | file.missing 6 | ./241.html/zigi.txt 7 | -------------------------------------------------------------------------------- /tests/results/279.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 63 3 | 4 | <tag with="attribute"/> 5 | -------------------------------------------------------------------------------- /tests/099.html: -------------------------------------------------------------------------------- 1 | $response:charset[windows-1251] 2 | $f[^file::load[text;087.html]] 3 | $f[^file::create[$f; $.name[не ASCII.html] ]] 4 | $response:body[$f] 5 | -------------------------------------------------------------------------------- /tests/106.html: -------------------------------------------------------------------------------- 1 | $document[^xdoc::create{ 2 | 3 | строка1
4 | строка2
5 |
}] 6 | ^document.string[] 7 | -------------------------------------------------------------------------------- /tests/197.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $x[^xdoc::load[parser://test/value/]] 3 | ^x.string[] 4 | 5 | @test[param] 6 | 7 | $param 8 | -------------------------------------------------------------------------------- /tests/310.html: -------------------------------------------------------------------------------- 1 | $response:body[ $.file[310.html] $.mdate[^date::unix-timestamp(121478400)] ] 2 | $response:last-modified[^date::unix-timestamp(113702400)] 3 | -------------------------------------------------------------------------------- /tests/358.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try-catch{ ^for[1](1;100){a} } 3 | ^try-catch{ ^recoursion(100) } 4 | 5 | @recoursion[i] 6 | a^if($i>0){^recoursion($i-1)} 7 | -------------------------------------------------------------------------------- /tests/396.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^show[395_dir/2.tiff] 3 | ^show[^file::load[binary;395_dir/2.tiff]] 4 | 5 | @show[arg] 6 | ^json:string[^image::measure[$arg]] 7 | -------------------------------------------------------------------------------- /tests/httpd/030.txt: -------------------------------------------------------------------------------- 1 | POST /form.html HTTP/1.0 2 | Content-Length: 27 3 | Content-Type: application/x-www-form-urlencoded 4 | 5 | name=v1&name=v2&a=b&a=c&one -------------------------------------------------------------------------------- /tests/results/120.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 58 3 | 4 | 5 | 6 | output there 7 | 8 | -------------------------------------------------------------------------------- /tests/results/190.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 63 3 | 4 | test190_a
5 | non-exist $test190:b was requested
6 | MAIN_a -------------------------------------------------------------------------------- /tests/results/218.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 68 3 | 4 | file was saved (EXIST)
5 | file was deleted (DOES NOT EXIST)
-------------------------------------------------------------------------------- /tests/results/225.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 35 3 | 4 | child1 5 | child2 6 | 0=1 7 | 2=2 8 | p0=1 9 | 2=2 10 | 2=2 11 | -------------------------------------------------------------------------------- /tests/results/227.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 65 3 | 4 | =404=404= 5 | =child_a=child_a= 6 | auto call count (issue #75): 403 call -------------------------------------------------------------------------------- /tests/results/438.processed: -------------------------------------------------------------------------------- 1 | Status: 500 2 | Content-Type: text/plain 3 | 4 | Exception in @unhandled_exception, details are available in Parser error log. -------------------------------------------------------------------------------- /src/lib/gd/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = gif.h mtables.h 2 | noinst_LTLIBRARIES = libgd.la 3 | libgd_la_SOURCES = gif.C gifio.C 4 | 5 | EXTRA_DIST = gd.vcproj 6 | -------------------------------------------------------------------------------- /src/lib/json/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = pa_json.h 2 | noinst_LTLIBRARIES = libjson.la 3 | libjson_la_SOURCES = pa_json.C 4 | 5 | EXTRA_DIST = json.vcproj 6 | -------------------------------------------------------------------------------- /src/lib/smtp/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = smtp.h 2 | noinst_LTLIBRARIES = libsmtp.la 3 | libsmtp_la_SOURCES = comms.C smtp.C 4 | 5 | EXTRA_DIST = smtp.vcproj 6 | -------------------------------------------------------------------------------- /src/targets/isapi/Makefile.am: -------------------------------------------------------------------------------- 1 | #do not automake, desined to be compiled with MSVC only 2 | 3 | EXTRA_DIST = parser3isapi.C parser3isapi.def parser3isapi.vcproj 4 | -------------------------------------------------------------------------------- /tests/102.html: -------------------------------------------------------------------------------- 1 | $form:fields.foo[bar] 2 | 1.1 =$form:fields.foo= 3 | 1.2 =$form:foo= 4 | $form:foo[bar] 5 | 2.2 =$form:foo= 6 | 2.2 =$form:fields.foo= 7 | -------------------------------------------------------------------------------- /tests/167.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^method[] 3 | 4 | @unhandled_exception[exception;stack] 5 | $exception.comment 6 | 7 | @method[] 8 | ^taint[sql][zi'gi] 9 | -------------------------------------------------------------------------------- /tests/331.html: -------------------------------------------------------------------------------- 1 | @main[][result] 2 | 1 2 ^if(1)[ 3 ] 4 5 3 | ^if(1){ no whitespace ^if(1)[yes whitespace] } 4 | ^if(1)[ yes whitespace ^if(1){yes whitespace} ] 5 | -------------------------------------------------------------------------------- /tests/results/005.processed: -------------------------------------------------------------------------------- 1 | Set-Cookie: name=value; expires=Fri, 31 Dec 1999 21:00:00 GMT; path=/ 2 | Content-Type: text/html 3 | Content-Length: 6 4 | 5 | value! -------------------------------------------------------------------------------- /tests/results/025.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 57 3 | 4 | was:
5 | count=2
6 | b='2'
7 | now:
8 | count=1
9 | b='' -------------------------------------------------------------------------------- /tests/results/172.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 68 3 | 4 | i0=0, i1=1
5 | j0=0, j1=1
6 | k1=1, k2=2, k3=3, k4=4, k5=5
-------------------------------------------------------------------------------- /tests/results/220.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 58 3 | 4 | 2, 3, 1
5 | 2, 1
6 | 1
7 |
8 | 4
9 | 4, 5
-------------------------------------------------------------------------------- /tests/results/412.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 59 3 | 4 | 5 | 1 is a number? yes 6 | a is a number? 7 | 2 is a number? yes 8 | 9 | -------------------------------------------------------------------------------- /tests/116.html: -------------------------------------------------------------------------------- 1 | $document[^xdoc::create{ 2 | 3 | текст 4 | }] 5 | $response:body[^document.file[$.media-type[text/paf]]] 6 | -------------------------------------------------------------------------------- /tests/448.html: -------------------------------------------------------------------------------- 1 | $status:limit-cpu(5) $status:limit-mem(100*1024*1024) $status:limit-nproc(4) 2 | result: $status:limit-cpu, $status:limit-mem, $status:limit-nproc 3 | -------------------------------------------------------------------------------- /tests/results/063.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 48 3 | 4 | 6
5 | 13
6 | 12
7 | 9
8 | 2.25
9 | 4.5
10 | 1
-------------------------------------------------------------------------------- /tests/results/245.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 76 3 | 4 | inline function value main function value 5 | test function value 6 | test function -------------------------------------------------------------------------------- /tests/results/304.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 94 3 | 4 | тест.ru : xn--e1aybc.ru (тест.ru) 5 | тест.рф : xn--e1aybc.xn--p1ai (тест.рф) 6 | -------------------------------------------------------------------------------- /tests/results/157.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 69 3 | 4 | Copying file: ok. 5 |
6 | Appending file: ok. 7 |
8 | Moving file: ok. 9 | -------------------------------------------------------------------------------- /tests/results/283.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 75 3 | 4 | = = - it should survive 5 | = 6 | = - it should not survive 7 | = = - it should survive -------------------------------------------------------------------------------- /src/lib/md5/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = pa_md5.h pa_sha2.h 2 | noinst_LTLIBRARIES = libmd5.la 3 | libmd5_la_SOURCES = pa_md5c.c pa_sha2.c 4 | 5 | EXTRA_DIST = md5.vcproj 6 | -------------------------------------------------------------------------------- /tests/219.html: -------------------------------------------------------------------------------- 1 | @main[][str] 2 | 3 | $str[^taint[^^call[]]] 4 | ^process{$str} 5 | 6 |
7 | 8 | ^try-catch{ 9 | ^process{^taint[as-is][$str]} 10 | } 11 | 12 | -------------------------------------------------------------------------------- /tests/237.html: -------------------------------------------------------------------------------- 1 | $f[^file::create[text;;буквы в utf8, которые должны преобразоваться в буквы в windows-1251; 2 | $.charset[windows-1251] 3 | ]] 4 | 5 | $response:body[$f] 6 | -------------------------------------------------------------------------------- /tests/242.html: -------------------------------------------------------------------------------- 1 | $var[] 2 | $t[^table::create{$var 3 | a 4 | b 5 | c 6 | }] 7 | 8 | $c[^t.columns[]] 9 |
10 | columns: ^c.count[]
11 | =$t.$var=
12 | 
13 | -------------------------------------------------------------------------------- /tests/408.html: -------------------------------------------------------------------------------- 1 | $s[test] 2 | ^s.save[a/test.txt] 3 | ^file:move[a;b/c/] 4 | 1. ^if(-f "b/c/test.txt"){ok}{fail} 5 | ^file:delete[b/c/test.txt] 6 | 2. ^if(-d "b"){fail}{ok} 7 | -------------------------------------------------------------------------------- /tests/results/123.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 79 3 | 4 | 2003-01-31 00:00:00 5 | 2003-02-28 00:00:00 6 | 2003-05-31 00:00:00 7 | 2003-06-30 00:00:00 -------------------------------------------------------------------------------- /tests/results/249.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 83 3 | 4 | display v1: v1 5 | display v2 (with default setter): =v2= 6 | display default getter: =v1== -------------------------------------------------------------------------------- /tests/results/328.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 72 3 | 4 | Exception type: parser.break, 5 | Source: break, 6 | Comment: without cycle 7 | 1 8 | 2 9 | -------------------------------------------------------------------------------- /tests/results/335.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 91 3 | 4 | no default 5 | default is 'z' ('z') default is 'z' ('z') default is '' ('') default is '' ('') -------------------------------------------------------------------------------- /src/lib/cord/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libcord.la 2 | libcord_la_SOURCES = cordbscs.c cordxtra.c 3 | 4 | EXTRA_DIST = cord.vcproj source.url 5 | 6 | SUBDIRS = include 7 | -------------------------------------------------------------------------------- /tests/073.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^test[^date::create(2002;1;3)] 3 | ^test[^date::create(2002;10;20)] 4 | 5 | @test[date] 6 | $date.daylightsaving
7 | $date.yearday
8 |
9 | -------------------------------------------------------------------------------- /tests/103.html: -------------------------------------------------------------------------------- 1 | $image[^image::load[103paf2001.gif]] 2 | $mark[^image::load[103mark.gif]] 3 | ^image.copy[$mark](0;0;$mark.width;$mark.height;0;0) 4 | $response:body[^image.gif[]] 5 | -------------------------------------------------------------------------------- /tests/115.html: -------------------------------------------------------------------------------- 1 | $d[^xdoc::create{ 2 | }] 3 | ^if(^d.selectBool[/t/@n > 10]){ 4 | /t/@n больше 10 5 | }{ 6 | не больше 7 | } 8 | -------------------------------------------------------------------------------- /tests/240.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $tab1[^table::create{one two three 3 | 1 2 3}] 4 | 5 | $tab2[^table::create{column 6 | two}] 7 | 8 | ^try-catch{ 9 | $tab1.$tab2 10 | } 11 | -------------------------------------------------------------------------------- /tests/415.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $list[^file:list[415_dir;.*\.p]] 3 | ^list.sort{$list.name} 4 | ^list.menu{ 5 | ${list.name}: ^try-catch-comment{ ^use[415_dir/$list.name] } 6 | } 7 | -------------------------------------------------------------------------------- /tests/results/116.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/paf; charset=UTF-8 2 | Content-Length: 73 3 | 4 | 5 | 6 | текст 7 | 8 | -------------------------------------------------------------------------------- /tests/results/226.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 84 3 | 4 | it works! 5 | Exception type: parser.runtime, 6 | Source: zigi, 7 | Comment: class is undefined 8 | -------------------------------------------------------------------------------- /tests/results/276.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 77 3 | 4 | 1. a='1', b='2' 5 | 2. a='1' 6 | 3. c='3', d='4' 7 | 4. d='4' 8 | 5. x property 9 | 6. x property -------------------------------------------------------------------------------- /tests/results/359.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 63 3 | 4 | { 5 | "key":"value", 6 | "345":"else", 7 | "1":"1", 8 | "2":"2", 9 | "_345":"yes" 10 | } -------------------------------------------------------------------------------- /tests/016.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $a[$.e[a]] 3 | $b[$.e[b]] 4 | ^ifpasshashdest[^if(1){$a;$b}] 5 | $x[^if(1){$a}{$b}] 6 | ^ifpasshashdest[$x] 7 | 8 | @ifpasshashdest[p] 9 | $p.e 10 | -------------------------------------------------------------------------------- /tests/025.html: -------------------------------------------------------------------------------- 1 | $h[$.a[1] $.b[2]] 2 | was:
3 | count=^h._count[]
4 | b='$h.b'
5 | 6 | ^h.delete[b] 7 | 8 | now:
9 | count=^h._count[]
10 | b='$h.b' 11 | -------------------------------------------------------------------------------- /tests/036.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $var[global var value] 3 | ^method{method param passed from main with variable var=$var} 4 | 5 | @method[param][var] 6 | $var[local var value] 7 | $param 8 | -------------------------------------------------------------------------------- /tests/088.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $a(2) 3 | ^jspace_call{^eval($a*2)} 4 | 5 | @jspace_call[junction][a] 6 | $a[unrelcfgdfgated] 7 | $junction
8 | $caller.a(3) 9 | $junction
10 | -------------------------------------------------------------------------------- /tests/results/051.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 67 3 | 4 | t.test=ct
5 | base.test=ct
6 | class.test=ct

7 | tm2 8 |
9 | bm 10 | cm -------------------------------------------------------------------------------- /tests/results/179.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 95 3 | 4 | =static_a===a===
5 | =static_a=static_b==a=b==
6 | =static_a=static_b=static_c=a=b=c=
-------------------------------------------------------------------------------- /tests/results/204.processed: -------------------------------------------------------------------------------- 1 | Zigi: zz 2 | Content-Type: text/html 3 | Content-Length: 50 4 | 5 | { 6 | "ZIGI1":"1", 7 | "ZIGI2":"2" 8 | } 9 | { 10 | "ZIGI":"zz" 11 | } 12 | done. -------------------------------------------------------------------------------- /tests/results/217.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 81 3 | 4 | 999: 5 | OK 6 |
7 | 1002: 8 | Exception: call canceled - endless recursion detected 9 |
-------------------------------------------------------------------------------- /tests/run_parser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SERVER_SOFTWARE=make_test \ 4 | PATH_TRANSLATED=$2 \ 5 | PATH_INFO=/tests/$2 \ 6 | SCRIPT_NAME=/tests/$2 \ 7 | CGI_PARSER_CONFIG=$3 \ 8 | $1 2>&1 9 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Konstantin Morshnev (https://moko.ru) 2 | Alexandr Petrosian (https://paf.design.ru) 3 | Michael Petrushin (http://fifonik.com/) 4 | -------------------------------------------------------------------------------- /tests/006.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^check[abc;B;i]
3 | ^check[abc;B;I]
4 | ^check[abc;B]
5 | 6 | @check[sText;sLetter;sOptions] 7 | ^if(^sText.match[$sLetter][$sOptions]){y}{n} 8 | -------------------------------------------------------------------------------- /tests/198.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $var[global] 3 | 4 | ^call[] 5 | '$z' -- should be empty string! 6 |
7 | ^call[1] 8 | '$z' -- should be '1' 9 | 10 | @call[var] 11 | $z[$var] 12 | -------------------------------------------------------------------------------- /tests/226.html: -------------------------------------------------------------------------------- 1 | # autouse checking 2 | @main[] 3 | ^try-catch{^test:call[]} 4 | ^try-catch{^zigi:call[]} 5 | 6 | @autouse[name] 7 | ^if($name eq "test"){ 8 | ^use[226.p] 9 | } 10 | -------------------------------------------------------------------------------- /tests/282.cfg: -------------------------------------------------------------------------------- 1 | "1 - column"" one","column" t"w"o,column three 2 | 2 - column one,"column, two" 3 | #comment line# 4 | empty line 5 | 6 | "3 - column one","","column, three " -------------------------------------------------------------------------------- /tests/httpd/034.txt: -------------------------------------------------------------------------------- 1 | GET /%D0%B1%D1%83%D0%BA%D0%B2%D1%8B%3F%20-%20%D0%BA%D0%BE%D0%BD%D0%B5%D1%87%D0%BD%D0%BE!%20%D0%B1%D1%83%D0%BA%D0%B2%D1%8B%25%F0%9F%98%8A/?name=%F2%E5%F1%F2 HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/results/042.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 91 3 | 4 | type=test
5 | source=this is the cause of error
6 | lineno=2
7 | comment=comment value
8 | -------------------------------------------------------------------------------- /tests/results/059.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 98 3 | 4 | ...a...
5 | ...'a' not in list 'ax,b,c'...
6 | ...Word...
7 | ...'wo rd' not a word...
-------------------------------------------------------------------------------- /tests/results/106.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 100 3 | 4 | 5 | 6 | строка1
7 | строка2
8 |
9 | -------------------------------------------------------------------------------- /tests/results/161.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 121 3 | 4 | $request:charset (UTF-8): =проверка=
5 | UTF-8: =проверка=
6 | WINDOWS-1251: =проверка=
-------------------------------------------------------------------------------- /tests/results/219.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 87 3 | 4 | ^call[] 5 |
6 | Exception type: parser.runtime, 7 | Source: call, 8 | Comment: undefined method 9 | -------------------------------------------------------------------------------- /tests/results/278.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 95 3 | 4 | set a: SET_a called with '1' 5 | get a: default 6 | set b: SET_DEFAULT called for 'b' with '2' 7 | get b: b -------------------------------------------------------------------------------- /tests/051b.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | b 3 | 4 | @auto[] 5 | $test[b] 6 | 7 | @method[] 8 | base.test=$test
9 | class.test=$CLASS.test
10 | 11 | @base_method[] 12 | bm 13 | ^child_method[] 14 | -------------------------------------------------------------------------------- /tests/113.html: -------------------------------------------------------------------------------- 1 | $d[^xdoc::create{}] 2 | ^d.selectString[string(d/@attr)]
3 | ^d.selectNumber[2*2]
4 | ^d.selectNumber[number(/d/@n)+1]
5 | -------------------------------------------------------------------------------- /tests/182_dir/a3.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @a1[] 5 | new a1
6 | 7 | 8 | @CLASS 9 | c 10 | 11 | @OPTIONS 12 | partial 13 | 14 | @USE 15 | a4.p 16 | 17 | @c1[] 18 | c1
19 | -------------------------------------------------------------------------------- /tests/436.html: -------------------------------------------------------------------------------- 1 | $cookie:test[ $.value[value] $.expires[^date::create[2020-01-01]] ] 2 | $response:header[header value] 3 | $request:document-root[/tmp] 4 | $response:download[ $.file[/bug.html] ] 5 | -------------------------------------------------------------------------------- /tests/443.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $args[main] 4 | 1. ^test[value] 5 | 2. ^test2[] 6 | 7 | @test[v;*args] 8 | $v 9 | ^json:string[$args] 10 | 11 | @test2[*args] 12 | ^json:string[$args] 13 | -------------------------------------------------------------------------------- /tests/httpd/site/029.html: -------------------------------------------------------------------------------- 1 | $response:header[header value] 2 | $request:document-root[/tmp] 3 | $response:download[ $.file[/bug.html] ] 4 | $env:REMOTE_ADDR[] ^rem{for unhandled_exception release} 5 | -------------------------------------------------------------------------------- /tests/results/075.processed: -------------------------------------------------------------------------------- 1 | Xxxx: Fri, 03 Mar 2023 21:00:00 GMT 2 | Yyy: Sun, 27 Feb 2022 21:00:00 GMT; aaaa=Mon, 30 Jun 2025 21:00:00 GMT 3 | Content-Type: text/html 4 | Content-Length: 0 5 | 6 | -------------------------------------------------------------------------------- /tests/results/210.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 94 3 | 4 | a"a: 'a"a', b"b: 'b"b' 5 |
6 | a"a
7 | a"a
8 | b"b
9 | b"b
-------------------------------------------------------------------------------- /tests/results/240.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 99 3 | 4 | Exception type: parser.runtime, 5 | Source: tab2, 6 | Comment: is 'table', it has no string representation 7 | -------------------------------------------------------------------------------- /tests/results/243.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 99 3 | 4 | file exist
5 | file exist
6 | dir exist
7 | dir exist
8 | dir doesn't exist (it's OK)
-------------------------------------------------------------------------------- /tests/results/265.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 56 3 | 4 | Total: 10 5 | =AB= 6 | =CD= 7 | == 8 | =EF= 9 | =GH= 10 | =IJ= 11 | == 12 | =KL= 13 | =MN= 14 | =OP= 15 | -------------------------------------------------------------------------------- /tests/178_dir/178b.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | b 3 | 4 | @BASE 5 | a 6 | 7 | @auto[] 8 | $_b[b] 9 | 10 | @create[] 11 | ^BASE:create[] 12 | $b[b] 13 | 14 | @GET_DEFAULT[sName] 15 | ^_default[$sName;b] 16 | -------------------------------------------------------------------------------- /tests/178_dir/178c.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | c 3 | 4 | @BASE 5 | b 6 | 7 | @auto[] 8 | $_c[c] 9 | 10 | @create[] 11 | ^BASE:create[] 12 | $c[c] 13 | 14 | @GET_DEFAULT[sName] 15 | ^_default[$sName;c] 16 | -------------------------------------------------------------------------------- /tests/300.html: -------------------------------------------------------------------------------- 1 | $h[ 2 | $.a[1] 3 | $.b[2] 4 | $._default[z] 5 | ] 6 | ^h._count[] 7 | $h.a 8 | $h.b 9 | $h.c 10 | 11 | ^h.delete[] 12 | 13 | ^h._count[] 14 | $h.a 15 | $h.b 16 | $h.c 17 | -------------------------------------------------------------------------------- /tests/results/071.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 84 3 | 4 | xx,aa,bb,cc
5 | xx,aa,bb,cc
6 | xx,aa,bb
7 | xx,bb
8 | xx,bb,cc
9 | xx,cc
10 | xx
-------------------------------------------------------------------------------- /tests/results/291.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 102 3 | 4 | a void b Local a object CLASS: a 5 | a::print:CLASS: a 6 | a void b Local a object CLASS: a 7 | a::print:CLASS: a 8 | -------------------------------------------------------------------------------- /tests/results/298.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 106 3 | 4 | testClass class is defined 5 | testClass2 class is not defined 6 | Exception: is an invalid type, must be 'class' 7 | -------------------------------------------------------------------------------- /tests/154.html: -------------------------------------------------------------------------------- 1 | $date[^date::unix-timestamp(1067857323)] 2 | ^date.sql-string[]
3 | ^date.unix-timestamp[] 4 | 5 |
6 | 7 | $now[^date::create[^date.sql-string[]]] 8 | ^now.unix-timestamp[] 9 | -------------------------------------------------------------------------------- /tests/404.html: -------------------------------------------------------------------------------- 1 | $t1[^table::create{id}] 2 | 3 | 1. whitespace string for table - OK ^t1.join[ ] 4 | 2. ^try-catch{^t1.join[ not whitespace - not OK ]} 5 | 3. $s[string] ^s.replace[$void] ^s.replace[ ] 6 | -------------------------------------------------------------------------------- /tests/184.html: -------------------------------------------------------------------------------- 1 | $v(^switch(1){ 2 | ^case(1)(true) 3 | ^case[DEFAULT](false) 4 | }) 5 | 6 | ^if($v){true}{false} 7 | 8 | 9 | ^switch(1){ 10 | ^case(1){=true=} 11 | ^case[DEFAULT]{=false=} 12 | } 13 | -------------------------------------------------------------------------------- /tests/205.html: -------------------------------------------------------------------------------- 1 | $f[^file::create[text;zigi.txt;text file content]] 2 | $response:body[$f] 3 | 4 | $f[^file::create[text;zigi.txt;text file content plus ^json:string[$response:headers] ]] 5 | $response:body[$f] 6 | -------------------------------------------------------------------------------- /tests/241.html: -------------------------------------------------------------------------------- 1 | ^try{ 2 | $f[^file::load[binary;./241.html/zigi.txt]] 3 | }{ 4 | $exception.handled(1) 5 | Exception (OK): 6 | $exception.type 7 | ^exception.source.match[^^(.+)?\./][]{./} 8 | } 9 | -------------------------------------------------------------------------------- /tests/391.html: -------------------------------------------------------------------------------- 1 | $attr[^for[i](1;111){attr-$i="$i" }] 2 | $data[^for[i](0;10000){}] 3 | ^data.length[] 4 | ^try-catch{ $x[^xdoc::create{$data}] } 5 | -------------------------------------------------------------------------------- /tests/httpd/site/form.html: -------------------------------------------------------------------------------- 1 | fields: ^json:string[$form:fields] 2 | tables: ^json:string[$form:tables] 3 | files: ^json:string[$form:files] 4 | elements: ^json:string[$form:elements] 5 | 6 | name: $form:name 7 | -------------------------------------------------------------------------------- /tests/results/173.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 119 3 | 4 | date [value: 2007-11-29 11:22:33]
5 | date [value: 2007-11-29 11:22:33]
6 | date [value: 2007-11-29 11:22:33]
-------------------------------------------------------------------------------- /tests/results/418.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 71 3 | 4 | 1. { 5 | "a":"1", 6 | "c":"3" 7 | } 8 | 2. { 9 | "c":"3", 10 | "a":"1" 11 | } 12 | 3. { 13 | "a":"1", 14 | "c":"3" 15 | } -------------------------------------------------------------------------------- /tests/run_parser.cmd: -------------------------------------------------------------------------------- 1 | set SERVER_SOFTWARE=make_test 2 | set PATH_TRANSLATED=%2 3 | set PATH_INFO=/tests/%2 4 | set SCRIPT_NAME=/tests/%2 5 | set CGI_PARSER_CONFIG=results\auto.p 6 | %1 2>>parser3.stderr 7 | -------------------------------------------------------------------------------- /src/doc/object.dox: -------------------------------------------------------------------------------- 1 | /** @page Object Object: class+fields 2 | 3 | Object[VObject], is an instance of Class. 4 | Stores fields: VObject::ffields (dynamic, not static - those are stored in Class). 5 | 6 | 7 | */ 8 | -------------------------------------------------------------------------------- /tests/063.html: -------------------------------------------------------------------------------- 1 | $var(5) 2 | ^var.inc[]$var
3 | ^var.inc(7)$var
4 | ^var.dec[]$var
5 | ^var.dec(3)$var
6 | ^var.div(4)$var
7 | ^var.mul(2)$var
8 | $var(5) 9 | ^var.mod(2)$var
10 | -------------------------------------------------------------------------------- /tests/091.html: -------------------------------------------------------------------------------- 1 | @main[][key;value] 2 | ^user-foreach[key;value]{$key=$value
} 3 | 4 | @user-foreach[key;value;code] 5 | ^for[i](1;10){ 6 | $caller.$key($i) 7 | $caller.$value($i*2) 8 | $code 9 | } 10 | -------------------------------------------------------------------------------- /tests/httpd/035.txt: -------------------------------------------------------------------------------- 1 | GET /%D0%B1%D1%83%D0%BA%D0%B2%D1%8B%3F%20-%20%D0%BA%D0%BE%D0%BD%D0%B5%D1%87%D0%BD%D0%BE!%20%D0%B1%D1%83%D0%BA%D0%B2%D1%8B%25%F0%9F%98%8A/?name=%F2%E5%F1%F2&charset=Windows-1251 HTTP/1.0 2 | 3 | -------------------------------------------------------------------------------- /tests/results/058.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 128 3 | 4 | 5 | PAF -------------------------------------------------------------------------------- /tests/results/206.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 100 3 | 4 | 2+2: 4 5 | :)
6 | 1/0: exception while executing code (number.zerodivision) 7 | :(
8 | 0/-1: 0 9 | :)
10 | -------------------------------------------------------------------------------- /tests/results/313.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 125 3 | 4 | columns: 3 5 | 3
6 | '5', '4', '3', '2', '1', '0'
'50', '40', '30', '20', '10', '00'
'', '', 'check_this', '', '', '' -------------------------------------------------------------------------------- /tests/results/326.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 100 3 | 4 | via var: "" 5 | directly: "test" 6 | deep: "test" 7 | main: "test" 8 | via self var: "" 9 | via var: "" 10 | directly: "test" -------------------------------------------------------------------------------- /tests/results/436.processed: -------------------------------------------------------------------------------- 1 | Status: 404 2 | Content-Type: text/plain 3 | 4 | /tests/436.html: '/tmp/bug.html' getting file size failed: No such file or directory (2), real filename '/tmp/bug.html' [file.missing] -------------------------------------------------------------------------------- /tests/093.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^steppedfor[i](1;10;2){$i } 3 | 4 | @steppedfor[name;from;to;step;code] 5 | $caller.$name($from) 6 | ^while($caller.$name<=$to){ 7 | $code 8 | ^caller.$name.inc($step) 9 | } 10 | 11 | -------------------------------------------------------------------------------- /tests/111.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $d[^xdoc::create{=^taint[&]=}] 3 | ^show_xdoc2[$d] 4 | 5 | @show_xdoc2[xdoc] 6 |
^taint[html][^xdoc.string[
 7 | 	$.method[html]
 8 | ]]
 9 | 
10 | -------------------------------------------------------------------------------- /tests/112.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $d[^xdoc::create{}] 3 | ^show_xdoc2[$d] 4 | 5 | @show_xdoc2[xdoc] 6 |
^taint[html][^xdoc.string[
 7 | 	$.method[html]
 8 | ]]
 9 | 
10 | -------------------------------------------------------------------------------- /tests/123.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^test[2003-01-31] 3 | ^test[2003-05-31] 4 | 5 | @test[date_str] 6 | $date[^date::create[$date_str]] 7 | ^date.sql-string[] 8 | ^date.roll[month](+1) 9 | ^date.sql-string[] 10 | 11 | -------------------------------------------------------------------------------- /tests/194.html: -------------------------------------------------------------------------------- 1 | @main[][oMyObject] 2 | $sDir[194_dir] 3 | ^use[$sDir/194.p] 4 | 5 | $oMyObject[^MyObject::create[]] 6 | 7 | ^if($oMyObject){true}{false}
8 | 9 | $i(1+$oMyObject+1) 10 | $i 11 | -------------------------------------------------------------------------------- /tests/results/353.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 127 3 | 4 | loop: 1 vs class, 2 vs class, 3 vs class, 4 vs class, 5 vs class 5 | end: class 6 | loop: 1 vs 1, 2 vs 2, 3 vs 3, 4 vs 4, 5 vs 5 7 | end: 5 -------------------------------------------------------------------------------- /tests/178_dir/178a.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @auto[] 5 | $_a[a] 6 | 7 | @create[] 8 | $a[a] 9 | 10 | @_default[sName;sFrom] 11 | Unknown field '$sName' was requested (gefault getter from class '$sFrom' executed) 12 | -------------------------------------------------------------------------------- /tests/279.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $json[{ 4 | "sql": "" 5 | }] 6 | 7 | $o[^json:parse[$json]] 8 | 9 | $o.sql 10 | 11 | $o[^json:parse[$json; $.taint[as-is]]] 12 | 13 | $o.sql 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/380.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $name[019paf2001.gif] 4 | 5 | $f[^file::load[binary;$name; $.offset(20000) $.limit(1000) ]] 6 | ^f.base64[] 7 | 8 | ^try-catch-comment{ 9 | $f[^file::load[binary;$name]] 10 | } 11 | -------------------------------------------------------------------------------- /tests/392.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $r[^regex::create[(\w+);g]] 4 | ^json:string[^match[w1 w2;$r]] 5 | ^json:string[^match[w1 w2;(\w+);g]] 6 | 7 | @match[aStr;aRegex;aOptions] 8 | ^aStr.match[^regex::create[$aRegex;$aOptions]] 9 | -------------------------------------------------------------------------------- /tests/results/035.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 69 3 | 4 | =1= 5 |
6 | =a b 7 | 1 2= 8 |
9 | =1= 10 |
11 | =1= 12 |
13 | =a,b 14 | 1,2= 15 |
16 | =1= 17 |
18 | =1= -------------------------------------------------------------------------------- /tests/results/091.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 87 3 | 4 | 1=2
5 | 2=4
6 | 3=6
7 | 4=8
8 | 5=10
9 | 6=12
10 | 7=14
11 | 8=16
12 | 9=18
13 | 10=20
14 | -------------------------------------------------------------------------------- /tests/results/272.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 101 3 | 4 |
 5 | [
 6 | 	["n","a","b","c",""],
 7 | 	["0","a1","b1",""],
 8 | 	["1","a2","","c2"],
 9 | 	["2","","b3","c3"]
10 | ]
11 | 
-------------------------------------------------------------------------------- /tests/results/387.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 125 3 | 4 | Exception type: parser.runtime, 5 | Source: use, 6 | Comment: circular class inheritance detected in class 'A' 7 | A base: void 8 | B base: A -------------------------------------------------------------------------------- /tests/results/402.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 127 3 | 4 | Unhandled Exception: parser.runtime 5 | Source: main 6 | Comment: is 'hash', it has no string representation 7 | no file 8 | no stack -------------------------------------------------------------------------------- /etc/parser3.charsets/Makefile.am: -------------------------------------------------------------------------------- 1 | charsetsdir=@datadir@/charsets 2 | charsets_DATA=cp866.cfg koi8-r.cfg koi8-u.cfg windows-1250.cfg windows-1251.cfg windows-1254.cfg windows-1257.cfg x-mac-cyrillic.cfg 3 | EXTRA_DIST=$(charsets_DATA) -------------------------------------------------------------------------------- /tests/190.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test190 3 | 4 | 5 | @auto[] 6 | $a[test190_a] 7 | 8 | 9 | @do[] 10 | $result[$caller.self.a] 11 | 12 | 13 | @GET_DEFAULT[sName] 14 | $result[non-exist ^$test190:$sName was requested] 15 | 16 | -------------------------------------------------------------------------------- /tests/results/322.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 102 3 | 4 | code: yes 5 | method: no 6 | juction: yes 7 | code: no 8 | method: yes 9 | juction: yes 10 | void: yes 11 | string: yes 12 | context: yes -------------------------------------------------------------------------------- /tests/results/366.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 114 3 | 4 | native LOG: 366.p used 5 | test-duplicate.p used 6 | test.p used 7 | parser LOG: 366.p used 8 | test-duplicate.p used 9 | test.p used 10 | -------------------------------------------------------------------------------- /tests/results/371.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 91 3 | 4 | { 5 | "test":{ 6 | "key":"value", 7 | "key2":"value2" 8 | } 9 | } 10 | { 11 | "test":{ 12 | "key":"value", 13 | "key2":"value2" 14 | } 15 | } -------------------------------------------------------------------------------- /src/lib/punycode/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = pa_idna.h pa_punycode.h pa_convert_utf.h 2 | noinst_LTLIBRARIES = libpunycode.la 3 | libpunycode_la_SOURCES = pa_idna.c pa_punycode.c pa_convert_utf.c 4 | 5 | EXTRA_DIST = punycode.vcproj 6 | -------------------------------------------------------------------------------- /tests/204.html: -------------------------------------------------------------------------------- 1 | $response:zigi1[1] 2 | $response:zigi2[2] 3 | ^json:string[$response:headers] 4 | 5 | ^response:clear[] 6 | 7 | $response:zigi[z] 8 | $response:Zigi[zz] 9 | ^json:string[$response:headers] 10 | 11 | done. 12 | -------------------------------------------------------------------------------- /tests/283.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $s[=^#0D=] 4 | $s - it should survive 5 | 6 | $f[^file::create[text;;$s]] 7 | $f.text - it should not survive 8 | 9 | $f[^file::create[binary;;$s]] 10 | $f.text - it should survive 11 | 12 | -------------------------------------------------------------------------------- /tests/httpd/031.curl: -------------------------------------------------------------------------------- 1 | request="POST" 2 | form="file=@site/test.txt" 3 | form="file=just text" 4 | form="file=@site/index.html" 5 | form="another-file=@site/test.txt" 6 | form="name=value" 7 | form="name=value2" 8 | form="name=value3" 9 | -------------------------------------------------------------------------------- /tests/127.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{group name 2 | first a 3 | first b 4 | second c 5 | third d 6 | third e 7 | }] 8 | 9 | $distinct_hash[^table.hash[group;name][ 10 | $.distinct(1) 11 | ]] 12 | ^distinct_hash._count[]
13 | -------------------------------------------------------------------------------- /tests/382.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $o[^O::create[]] 4 | ^o.try_it[arg] 5 | 6 | @CLASS 7 | O 8 | 9 | @create[] 10 | $check[check] 11 | 12 | @GET_DEFAULT[] 13 | $result[$method] 14 | 15 | @method[suffix] 16 | Hello $check $suffix 17 | -------------------------------------------------------------------------------- /tests/445.html: -------------------------------------------------------------------------------- 1 | $h[ $.0[v0] $.1[v1] $.3[v3]] 2 | 1. ^json:string[^h.array[]; $.array[object] ] 3 | 2. ^json:string[^h.array[keys]; $.array[object] ] 4 | 3. ^json:string[^h.array[values]; $.array[object] ] 5 | 4. ^try-catch{ ^h.array[bug] } 6 | -------------------------------------------------------------------------------- /src/lib/memcached/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = $(INCLTDL) 2 | 3 | noinst_HEADERS = constants.h types.h pa_memcached.h 4 | noinst_LTLIBRARIES = libmemcached.la 5 | libmemcached_la_SOURCES = pa_memcached.C 6 | 7 | EXTRA_DIST = memcached.vcproj 8 | -------------------------------------------------------------------------------- /tests/009.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{id name age 2 | 1 paf 278 3 | 2 pif 234 4 | }] 5 | $hash[^table.hash[id;^table::create[nameless]{id 6 | name}]] 7 | 8 | $hash.1.id $hash.1.name $hash.1.age 9 | $hash.2.id $hash.2.name $hash.2.age 10 | -------------------------------------------------------------------------------- /tests/019.html: -------------------------------------------------------------------------------- 1 | $k(2) 2 | $pict[^image::load[019paf2001.gif]] 3 | $small[^image::create($pict.width/$k;$pict.height/$k)] 4 | ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;500) 5 | $response:body[^small.gif[]] 6 | -------------------------------------------------------------------------------- /tests/075.html: -------------------------------------------------------------------------------- 1 | $response:xxxx[^date::create(2023;3;4)] 2 | $response:yyy[ 3 | $.value[^date::create(2022;2;28)] 4 | $.aaaa[^date::create(2025;7;1)] 5 | ] 6 | 7 | $response:zzz[value] 8 | # delete header 9 | $response:zzz[] 10 | 11 | -------------------------------------------------------------------------------- /tests/176_dir/c.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | c 3 | 4 | @BASE 5 | a 6 | 7 | @create[] 8 | ^BASE:create[] 9 | 10 | @two[][two_1] 11 | $two_1[two_1] ^rem{ local } 12 | $two_2[two_2] ^rem{ not local } 13 | $self.two_3[two_3] ^rem{ not local } 14 | 15 | -------------------------------------------------------------------------------- /tests/267.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^switch(42){ 3 | ^case(true){true} 4 | ^case(false){false} 5 | ^case[DEFAULT]{!true && !false} 6 | } 7 | 8 | ^switch(true){ 9 | ^case(0){zero} 10 | ^case(42){answer} 11 | ^case[DEFAULT]{hm...} 12 | } 13 | -------------------------------------------------------------------------------- /tests/results/099.processed: -------------------------------------------------------------------------------- 1 | Content-Disposition: inline; filename="%ED%E5%20ASCII.html"; filename*=WINDOWS-1251''%ED%E5%20ASCII.html 2 | Content-Type: application/octet-stream 3 | Content-Length: 32 4 | 5 | ^eval(1<<3)
6 | ^eval(8>>2)
7 | -------------------------------------------------------------------------------- /tests/results/314.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 144 3 | 4 | static call test 5 | 1. 2. 3. Exception type: parser.runtime, 6 | Source: js-escape, 7 | Comment: method of 'string' is not allowed to be called statically 8 | -------------------------------------------------------------------------------- /tests/results/393.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 148 3 | 4 | base field replaced with property: property 5 | self field replaced with property: child property 6 | base untached: base field 7 | just in case: child property -------------------------------------------------------------------------------- /tests/135.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq parser.runtime){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | ^process[$string:CLASS]{@a[] 13 | } 14 | 15 | -------------------------------------------------------------------------------- /tests/136.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq parser.runtime){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | $hash[ 13 | $.ok[1] 14 | ] 15 | $.bad[1] 16 | -------------------------------------------------------------------------------- /tests/168.html: -------------------------------------------------------------------------------- 1 | @main[][tData;tColumn] 2 | $tData[^table::create{a b1 zigi}] 3 | 4 | $tColumn[^tData.columns[]] 5 | ^tColumn.menu{$tColumn.column}[, ] 6 |
7 | 8 | $tColumn[^tData.columns[zzz]] 9 | ^tColumn.menu{$tColumn.zzz}[, ] 10 | -------------------------------------------------------------------------------- /tests/182_dir/a1.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @OPTIONS 5 | partial 6 | 7 | @a1[] 8 | a1
9 | 10 | 11 | @CLASS 12 | a 13 | 14 | @OPTIONS 15 | partial 16 | 17 | @a2[] 18 | a2
19 | 20 | @CLASS 21 | b 22 | 23 | @b1[] 24 | b1
25 | -------------------------------------------------------------------------------- /tests/222.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^table::create[nameless]{11 12 13 3 | 21 22 4 | 31 5 | 41 43 6 | 52 53 7 | 62 8 | 73}] 9 | 10 | ^t.menu{ 11 | ^for[i](0;2){${i}: ^if($t.fields.[$i] is "void"){void}{'$t.fields.[$i]'}}[, ] 12 | }[
] 13 | -------------------------------------------------------------------------------- /tests/results/319.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 126 3 | 4 | Unhandled Exception: a 5 | Source: b 6 | Comment: c 7 | File: 319.html(10:2) 8 | throw 319.html(10:2) 9 | method 319.html(14:6) 10 | if 319.html(13:2) 11 | -------------------------------------------------------------------------------- /tests/results/403.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Accept-Ranges: bytes 3 | Content-Length: 89 4 | Last-Modified: Sat, 01 Jan 2000 00:00:00 GMT 5 | 6 | $response:body[ $.file[403.html] $.name[] $.mdate[^date::create[2000-01-01T00:00:00Z] ]] 7 | -------------------------------------------------------------------------------- /tests/130.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq 'parser.runtime'){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | $s[abc] 13 | ^if(^s.match[][i]){y}{n} 14 | 15 | -------------------------------------------------------------------------------- /tests/385.html: -------------------------------------------------------------------------------- 1 | # autouse checking 2 | @main[] 3 | ^try-catch{^test:call[]} 4 | $autouse[$autouse_method] 5 | ^try-catch{^test:call[]} 6 | ^try-catch{^zigi:call[]} 7 | 8 | @autouse_method[name] 9 | ^if($name eq "test"){ 10 | ^use[226.p] 11 | } 12 | -------------------------------------------------------------------------------- /tests/results/100.processed: -------------------------------------------------------------------------------- 1 | Content-Disposition: attachment; filename="%D0%BD%D0%B5%20ASCII.html"; filename*=UTF-8''%D0%BD%D0%B5%20ASCII.html 2 | Content-Type: application/octet-stream 3 | Content-Length: 32 4 | 5 | ^eval(1<<3)
6 | ^eval(8>>2)
7 | -------------------------------------------------------------------------------- /tests/138.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq xml){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | ^xdoc::create{} 13 | -------------------------------------------------------------------------------- /tests/139.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq xml){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | $d[^xdoc::create[doc]] 13 | $element[^d.selectSingle[$nothing]] 14 | -------------------------------------------------------------------------------- /tests/313.html: -------------------------------------------------------------------------------- 1 | $t[^table::create[nameless]{5 50 2 | 4 40 3 | 3 30 check_this 4 | 2 20 5 | 1 10 6 | 0 00 7 | }] 8 | 9 | columns: ^t.count[columns] 10 | 11 | $tf[^t.flip[]] 12 | ^tf.count[]
13 | ^tf.menu{^for[i](0;5){'$tf.$i'}[, ]}[
] 14 | -------------------------------------------------------------------------------- /tests/results/209.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 157 3 | 4 | 1='a1', 2='a2'
5 | 1='a1', 2='a2'
6 | 1='a1', 2='a2'
7 | 1='a1', 2='a2', 3='a3', 4='a4'
8 | 1='a1', 2='a2', 3='a3', 4='a4'
9 | 1='a1', 2='a2'
-------------------------------------------------------------------------------- /tests/results/251.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 241 3 | 4 | abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ\n0123456789\n`+-=~!@#$%^&*()_\n[]{}<>;:'\",.\\\/?\n\nабвгдеёжзийклмнопрстуфхцчшщъыьэюя\tАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ -------------------------------------------------------------------------------- /tests/results/289.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 157 3 | 4 | auto v 2 5 | auto log default 6 | set a: SET_DEFAULT called for 'log' with 'SET_a called with '1'' 7 | get a: default 8 | set b: SET_DEFAULT called for 'b' with '2' 9 | get b: b -------------------------------------------------------------------------------- /tests/results/419.processed: -------------------------------------------------------------------------------- 1 | Content-Disposition: inline; filename="b%5Bb%5D.txt"; filename*=UTF-8''b%5Bb%5D.txt 2 | Content-Type: application/octet-stream 3 | Accept-Ranges: bytes 4 | Content-Length: 0 5 | Last-Modified: Fri, 29 Aug 2008 09:48:53 GMT 6 | 7 | -------------------------------------------------------------------------------- /src/lib/pcre/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = @PCRE_INCLUDES@ 2 | 3 | noinst_HEADERS = pa_pcre_internal.h 4 | noinst_LTLIBRARIES = libpcre_internal.la 5 | libpcre_internal_la_SOURCES = pa_pcre_chartables.c pa_pcre_valid_utf8.c 6 | 7 | EXTRA_DIST = pcre_internal.vcproj 8 | -------------------------------------------------------------------------------- /tests/041.html: -------------------------------------------------------------------------------- 1 | $t[^table::create{a b 2 | 1 a 3 | 2 b 4 | 3 c 5 | }] 6 | 7 | ^if(^t.locate($t.a==2)){$t.b}{-n-} 8 | ^if(^t.locate($t.a==2)[$.offset(2)]){$t.b}{-n-} 9 | ^if(^t.locate[a;1]){$t.b}{-n-} 10 | ^if(^t.locate[a;1;$.offset(1)]){$t.b}{-n-} 11 | 12 | -------------------------------------------------------------------------------- /tests/387.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | ^try-catch{$o[^A::create[]]} 4 | 5 | $a_base[^reflection:base[$A:CLASS]] A base: $a_base.CLASS_NAME 6 | $b_base[^reflection:base[$B:CLASS]] B base: $b_base.CLASS_NAME 7 | 8 | @autouse[class] 9 | ^use[387_dir/${class}.p] 10 | -------------------------------------------------------------------------------- /tests/results/334.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 146 3 | 4 | Unhandled Exception: parser.runtime 5 | Source: no-such-method2 6 | Comment: undefined method 7 | File: 334.html(10:2) 8 | method 334.html(6:6) 9 | try 334.html(3:2) 10 | -------------------------------------------------------------------------------- /tests/results/347-curl.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 138 3 | 4 | 1. 2. Exception type: curl, 5 | Source: session 6 | 3. Exception type: curl, 7 | Source: session 8 | 4. 5. Exception type: curl, 9 | Source: session 10 | 6. 7. OK -------------------------------------------------------------------------------- /src/doc/html2chm.cmd: -------------------------------------------------------------------------------- 1 | CD html 2 | DEL graph_legend.dot 3 | perl ..\chmhelper.pl 4 | SET dest=..\chm 5 | "C:\Program Files\HTML Help Workshop\hhc.exe" index.hhp 6 | DEL %dest%\*.ch? 7 | COPY *.ch? %dest%\parser3src.* 8 | DEL *.ch? 9 | REM DEL index.hh? 10 | EXIT -------------------------------------------------------------------------------- /tests/011.html: -------------------------------------------------------------------------------- 1 | $year(2002) 2 | $month(12) 3 | ${year}-${month}:
4 | $week_days[^date:calendar[rus]($year;$month)] 5 |
6 | ^week_days.menu{^for[wday](0;6){^if($week_days.$wday){$week_days.$wday; ^; ^;} }=$week_days.week,$week_days.year=
} 7 |
8 | -------------------------------------------------------------------------------- /tests/027.html: -------------------------------------------------------------------------------- 1 | $h[ 2 | $.d[1] 3 | $.a[2] 4 | $.c[3] 5 | $.b[4] 6 | ] 7 | $c[ 8 | ^h.foreach[key;value]{ 9 | $.$key[$value] 10 | } 11 | ] 12 | ^h.sort[k;]{$k} 13 | ^json:string[$h] 14 | ^json:string[$c] 15 | ^c.sort[;v]($v)[desc] 16 | ^json:string[$c] 17 | -------------------------------------------------------------------------------- /tests/results/156.processed: -------------------------------------------------------------------------------- 1 | Set-Cookie: name=zigi; httponly; expires=Tue, 25 Feb 2003 21:00:00 GMT; path=/ 2 | Set-Cookie: name1=zigi; expires=Tue, 25 Feb 2003 21:00:00 GMT; path=/ 3 | Content-Type: text/html 4 | Content-Length: 19 5 | 6 | == 7 | =zigi= 8 | == 9 | =zigi= -------------------------------------------------------------------------------- /tests/results/263.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 86 3 | 4 | 1. 5 | a1=1 6 | a2=2 7 | 0=3 8 | 1=4 9 | 2=5 10 | 3=6 11 | 2. 12 | 0=1 13 | 1=2 14 | 2=3 15 | 3=4 16 | 4=5 17 | 5=6 18 | 3. 19 | void 20 | hash 21 | 4. 22 | void 23 | void 24 | hash -------------------------------------------------------------------------------- /tests/results/426.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 139 3 | 4 | negative limit: [] 5 | negative offset: [ 6 | {"data":"data1"}, 7 | {"data":"data2"}, 8 | {"data":"data3"}, 9 | {"data":"data4"} 10 | ] 11 | normal: [ 12 | {"data":"data2"} 13 | ] -------------------------------------------------------------------------------- /tests/176_dir/d.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | d 3 | 4 | @BASE 5 | a 6 | 7 | @OPTIONS 8 | locals 9 | 10 | @create[] 11 | ^BASE:create[] 12 | 13 | @two[][two_1] 14 | $two_1[two_1] ^rem{ local } 15 | $two_2[two_2] ^rem{ not local } 16 | $self.two_3[two_3] ^rem{ not local } 17 | 18 | -------------------------------------------------------------------------------- /tests/265.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $source[AB 4 | CD 5 | 6 | EF 7 | GH 8 | IJ 9 | 10 | KL 11 | MN 12 | OP] 13 | 14 | $parts[^source.match[^^(.*)^$][gm]] 15 | 16 | Total: ^parts.count[] 17 | 18 | ^if($parts){ 19 | ^parts.menu{ 20 | =$parts.1= 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/results/305.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 149 3 | 4 | test.артлебедев.рф 5 | ipv4 6 | ip: 91.197.112.64 4 7 | ip: 91.197.112.65 4 8 | ipv-any 9 | ip: 91.197.112.64 4 10 | ip: 91.197.112.65 4 11 | ip: ::1 6 12 | ipv6 13 | ip: ::1 6 14 | -------------------------------------------------------------------------------- /tests/results/367-curl.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 167 3 | 4 | text: 200 (3 bytes) 5 | name: 367.html 6 | charset: text/html; charset=UTF-8 7 | max identical headers: 1 8 | url: http://www.parser.ru/_/tests/367.html after 2 requests (1 redirect) 9 | -------------------------------------------------------------------------------- /tests/results/410.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 155 3 | 4 | o1: some code result 5 | o2: some code result 6 | o3: some code result 7 | calls count: 1 8 | c1: some code result 9 | c2: some code result 10 | c3: some code result 11 | calls count: 1 -------------------------------------------------------------------------------- /tests/074.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^monthdays(2000;1) 3 | ^monthdays(2000;2) 4 | ^monthdays(2003;1) 5 | ^monthdays(2003;2) 6 | 7 | @monthdays[year;month] 8 | $from[^date::create($year;$month;1)] 9 | $to[^date::create($from)] ^to.roll[month](+1) 10 | ^eval($to-$from)
11 | 12 | -------------------------------------------------------------------------------- /tests/162.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^table::create{a b 3 | 1 11 4 | 2 22 5 | 3 33 6 | 4 11 7 | 5 22 8 | 6 33 9 | }] 10 | 11 | $t1[^t.select(^condition[$t])] 12 |
13 | ^t1.menu{
14 | $t1.a	$t1.b
15 | }[^#0A]
16 | 
17 | 18 | @condition[t] 19 | $result($t.b != 11) 20 | -------------------------------------------------------------------------------- /tests/371.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | #WWrapper.get_element used here 4 | 5 | $hTemplate[ $.test[ $.key[value] ] ] 6 | 7 | ^json:string[ 8 | $hTemplate 9 | $.test.key2[value2] 10 | ] 11 | 12 | ^json:string[ 13 | $.test[ $.key[value] ] 14 | $.test.key2[value2] 15 | ] 16 | -------------------------------------------------------------------------------- /tests/results/385.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 158 3 | 4 | Exception type: parser.runtime, 5 | Source: test, 6 | Comment: class is undefined 7 | it works! 8 | Exception type: parser.runtime, 9 | Source: zigi, 10 | Comment: class is undefined 11 | -------------------------------------------------------------------------------- /tests/results/404.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 181 3 | 4 | 1. whitespace string for table - OK 2. Exception type: parser.runtime, 5 | Source: join, 6 | Comment: source param must have table representation (parameter #1 is 'string') 7 | 3. string string -------------------------------------------------------------------------------- /tests/402.html: -------------------------------------------------------------------------------- 1 | @unhandled_exception[exception;stack] 2 | Unhandled Exception: $exception.type 3 | Source: $exception.source 4 | Comment: $exception.comment 5 | ^if(!def $exception.file){no file} 6 | ^if(!def $stack){no stack} 7 | 8 | @main[] 9 | $result[^hash::create[]] 10 | -------------------------------------------------------------------------------- /tests/results/301.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 170 3 | 4 | $h.double: 1.2
5 | $h.int: 1
6 | $h.code: "code with string and ^eval(2+2)=4"
7 | $h.date: "2001-02-03 04:05:06"
8 | $h.table: [ 9 | {"0":"a","1":"b","2":"c"} 10 | ]
-------------------------------------------------------------------------------- /tests/results/358.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 203 3 | 4 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -------------------------------------------------------------------------------- /tests/179.html: -------------------------------------------------------------------------------- 1 | @USE 2 | 179.p 3 | 4 | @main[] 5 | $oa[^a::create[]] 6 | $ob[^b::create[]] 7 | $oc[^c::create[]] 8 | 9 | =$oa._a=$oa._b=$oa._c=$oa.a=$oa.b=$oa.c=
10 | =$ob._a=$ob._b=$ob._c=$ob.a=$ob.b=$ob.c=
11 | =$oc._a=$oc._b=$oc._c=$oc.a=$oc.b=$oc.c=
12 | 13 | -------------------------------------------------------------------------------- /tests/221.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^table::create{a b c 3 | 11 12 13 4 | 21 22 5 | 31 6 | 41 43 7 | 52 53 8 | 62 9 | 73}] 10 | 11 | $c[^t.columns[]] 12 | ^t.menu{ 13 | ^c.menu{${c.column}: ^if($t.fields.[$c.column] is "void"){void}{'$t.fields.[$c.column]'}}[, ] 14 | }[
] 15 | -------------------------------------------------------------------------------- /tests/252.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^to-1251[] 3 | 4 | $value[abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 5 | 0123456789 6 | `+-=~!@#^$%^^&*()_ 7 | []{}<>^;:'",.\/? 8 | 9 | абвгдеёжзийклмнопрстуфхцчшщъыьэюя АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ] 10 | 11 | ^taint[json][$value] 12 | -------------------------------------------------------------------------------- /tests/results/027.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 116 3 | 4 | { 5 | "a":"2", 6 | "b":"4", 7 | "c":"3", 8 | "d":"1" 9 | } 10 | { 11 | "d":"1", 12 | "a":"2", 13 | "c":"3", 14 | "b":"4" 15 | } 16 | { 17 | "b":"4", 18 | "c":"3", 19 | "a":"2", 20 | "d":"1" 21 | } -------------------------------------------------------------------------------- /tests/results/177.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 172 3 | 4 | $f.name: 177.html
5 | $f.content-type: application/octet-stream
6 | $f.size: !=0
7 | $f.cdate: date
8 | $f.mdate: date
9 | $f.adate: date
10 | $f.text: def
-------------------------------------------------------------------------------- /tests/results/357.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 171 3 | 4 | Exception type: parser.runtime, 5 | Source: for, 6 | Comment: endless loop detected 7 | Exception type: parser.runtime, 8 | Source: i, 9 | Comment: call canceled - endless recursion detected 10 | -------------------------------------------------------------------------------- /src/include/pa_version.h: -------------------------------------------------------------------------------- 1 | /* specified manually on Windows [automaticaly set on Unix] */ 2 | #ifndef PARSER_VERSION 3 | #ifdef _WIN64 4 | #define PARSER_VERSION "3.5.2b (compiled on amd64-pc-win64)" 5 | #else 6 | #define PARSER_VERSION "3.5.2b (compiled on i386-pc-win32)" 7 | #endif 8 | #endif 9 | -------------------------------------------------------------------------------- /tests/355.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $o[^B::create[]] 3 | $o.prop 4 | 5 | @CLASS 6 | A 7 | 8 | @OPTIONS 9 | partial 10 | 11 | @create[] 12 | 13 | 14 | @CLASS 15 | B 16 | 17 | @BASE 18 | A 19 | 20 | 21 | @CLASS 22 | A 23 | 24 | @OPTIONS 25 | partial 26 | 27 | @GET_prop[] 28 | property 29 | -------------------------------------------------------------------------------- /tests/374.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | ^test[$main] 4 | ^test[$string:length] 5 | ^method-returns-valid-junction-test[] 6 | 7 | @test[m] 8 | $m.name 9 | 10 | @method-returns-valid-junction-test[] 11 | $j[^test-code{code $i($i+1) $i}] 12 | $j $j 13 | 14 | @test-code[result] 15 | empty 16 | -------------------------------------------------------------------------------- /tests/results/053.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 200 3 | 4 |
5 | aaaaaaaaaa!_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
6 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
7 | 
-------------------------------------------------------------------------------- /tests/results/318.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 171 3 | 4 | Unhandled Exception: parser.compile 5 | Source: Comment: a - class is already defined 6 | File: a3.p(4:6) 7 | USE a6.p(5:1) 8 | use 318.html(12:2) 9 | method 318.html(16:6) 10 | if 318.html(15:2) 11 | -------------------------------------------------------------------------------- /tests/results/394-curl.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 188 3 | 4 | Exception type: parser.runtime, 5 | Source: http://www.parser.ru/_/tests/394.dat, 6 | Comment: content size of 10240 bytes exceeds the limit (10000 bytes) 7 | file size: 0 vs 10240 8 | file size: 61 vs 63 -------------------------------------------------------------------------------- /tests/053.html: -------------------------------------------------------------------------------- 1 | $b[b] 2 | $s[ 3 | aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 4 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 5 | ] 6 |
^s.replace[^table::create{from	to
7 | ba	!_}]
8 | -------------------------------------------------------------------------------- /tests/359.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | ^json:string[ 4 | ^if{0 $.key[value]}{ $.344[then] }{ $.345[else] } 5 | 6 | ^rem{VCodeFrame usage test, bug if WWrapper used} 7 | ^m{$.1[1]} 8 | ^m{$.2[2]} 9 | 10 | ^while{0 $._345[yes]}{ $._344[yes] ^break[] } 11 | ] 12 | 13 | @m[code] 14 | $code 15 | -------------------------------------------------------------------------------- /tests/results/288.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 185 3 | 4 | prop1: prop1 5 | prop2: set_prop2 6 | prop1 modified: set_prop1 - via SET_DEFAULT 7 | Exception type: parser.runtime, 8 | Source: prop1, 9 | Comment: this property has no setter method (@SET_prop1[value]) 10 | -------------------------------------------------------------------------------- /tests/results/306.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 210 3 | 4 | Exception type: parser.runtime, 5 | Source: no-such-element, 6 | Comment: element cannot be stored into xnode 7 | 8 | даже&интересно<br/> 9 | -------------------------------------------------------------------------------- /tests/results/329.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 183 3 | 4 | broken ^break[] demos (code worked until first method call returns): 5 | 1. in STRING_POOL 6 | first break demo: "" 7 | 2. in CONSTRUCT_OBJECT 8 | first break demo: "yes" 9 | 3. code in variable bug: 10 | yes -------------------------------------------------------------------------------- /tests/results/340.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 173 3 | 4 | 5 | 6 | 7 | 8 | ПИФ 9 | 10 | 11 | PAF 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/125.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{group name 2 | first a 3 | first b 4 | second c 5 | third d 6 | third e 7 | }] 8 | 9 | ^try{ 10 | $bad1[^table.hash[group;name]] 11 | }{ 12 | ^if($exception.type eq parser.runtime){ 13 | failed, that's OK 14 | $exception.handled(1) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/213.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $s[a12312312b] 3 | 4 | ^do{^s.match[(\d);g]{$match.1}} 5 | ^do{^s.match[\d;g;]} 6 | ^do{^s.match[\d;g]{}} 7 | ^do{^s.match[\d;g;!]} 8 | ^do{^s.match[\d;g]{!}} 9 | ^do{^s.match[\d;g;^date::now[]]} 10 | 11 | @do[jCode] 12 | ^try-catch{ 13 | $jCode 14 | } 15 |
16 | -------------------------------------------------------------------------------- /tests/418.html: -------------------------------------------------------------------------------- 1 | $h_a[ 2 | $.a[1] 3 | $.b[2] 4 | $.c[3] 5 | ] 6 | $h_b[ 7 | $.c[] 8 | $.a[] 9 | ] 10 | 11 | 1. ^json:string[^h_a.intersection[$h_b]] 12 | 2. ^json:string[^h_a.intersection[$h_b; $.order[arg] ]] 13 | 3. ^json:string[^h_a.intersection[$h_b; $.order[self] ]] 14 | -------------------------------------------------------------------------------- /tests/httpd/site/404.html: -------------------------------------------------------------------------------- 1 | ^if(def $form:charset){ 2 | $request:charset[$form:charset] 3 | $response:charset[$form:charset] 4 | $response:content-type.charset[$form:charset] 5 | } 6 | 7 | uri: "$request:uri" 8 | path: "$request:path" 9 | 10 | ^form:fields.foreach[k;v]{"$k"="$v"}[ 11 | ] 12 | -------------------------------------------------------------------------------- /tests/results/333.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 187 3 | 4 | Exception type: parser.runtime, 5 | Source: key, 6 | Comment: element cannot be fetched from junction 7 | Exception type: parser.runtime, 8 | Source: key, 9 | Comment: element cannot be stored into junction 10 | -------------------------------------------------------------------------------- /tests/results/396.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 152 3 | 4 | { 5 | "src":"395_dir\/2.tiff", 6 | "width":16, 7 | "height":16, 8 | "border":0, 9 | "line-width":1 10 | } 11 | { 12 | "src":"2.tiff", 13 | "width":16, 14 | "height":16, 15 | "border":0, 16 | "line-width":1 17 | } -------------------------------------------------------------------------------- /tests/040.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^method_junction_params{...} 3 | 4 | @method_junction_params[param] 5 | #should be string 6 | ^if($param is junction){is junction}{is not junction}
7 | ^if($param is string){is string}{is not string}
8 | ^if($param is double){is double}{is not double}
9 | 10 | -------------------------------------------------------------------------------- /tests/294.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $exception[^try-catch{ 4 | 5 | $document[^xdoc::create{ 6 | 7 | текст текст текст текст текст текст текст текст текст 8 | }] 9 | 10 | }] 11 | 12 | ^if(^exception.match[b]){valid encoding for match} 13 | $exception 14 | -------------------------------------------------------------------------------- /tests/386.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^table::create{c1 c2 c3}] 3 | ^t.insert[ $.c2(1) ] 4 | ^try-catch{ $t.c3[^hash::create[]] } 5 | 6 | ^json:string[$t] 7 | 8 | $t[^table::create[nameless]{}] 9 | ^t.insert[ $.10(10) $.12[12] ] 10 | ^try-catch{ ^t.insert[ $.1[ok] $.2{bad} ] } 11 | 12 | ^json:string[$t] 13 | -------------------------------------------------------------------------------- /tests/394-curl.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try-catch{ ^load[394.dat] } 3 | ^load[394.dat; $.nobody(true) ] 4 | ^load[readme] 5 | 6 | @load[url;options] 7 | ^show[^curl:load[ ^hash::create[$options] $.url[http://www.parser.ru/_/tests/$url] ]] 8 | 9 | @show[f] 10 | file size: $f.size vs $f.CONTENT-LENGTH 11 | -------------------------------------------------------------------------------- /tests/282.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $cfg[^table::load[nameless;282.cfg; 4 | $.separator[,] 5 | $.encloser["] 6 | ]] 7 | 8 | ^json:string[$cfg; $.table[array] ] 9 | 10 | $cfg[^table::load[nameless;282.cfg; 11 | $.separator[,] 12 | $.encloser[#] 13 | ]] 14 | 15 | ^json:string[$cfg; $.table[array] ] 16 | -------------------------------------------------------------------------------- /tests/298.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^testClass[testClass] 3 | ^testClass[testClass2] 4 | ^try-catch-comment{ 5 | ^reflection:def[zigi;name] 6 | } 7 | 8 | 9 | @testClass[name] 10 | $name class is ^if(^reflection:def[class;$name]){defined}{not defined} 11 | 12 | 13 | @CLASS 14 | testClass 15 | 16 | @auto[] 17 | -------------------------------------------------------------------------------- /tests/335.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^test[ $.k[v] ] 3 | $h[ $.k[v] $._default[z] ] 4 | ^test[$h] 5 | ^test[^hash::create[$h]] 6 | 7 | $h[ $.k[v] $._default[] ] 8 | ^test[$h] 9 | ^test[^hash::create[$h]] 10 | 11 | @test[h] 12 | ^if(^h.contains[_default]){default is '$h._default' ('$h.anything') }{no default} 13 | -------------------------------------------------------------------------------- /tests/results/307.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 191 3 | 4 | Exception type: parser.runtime, 5 | Source: test, 6 | Comment: junction used outside of context 7 | Exception type: parser.runtime, 8 | Source: Test, 9 | Comment: junction used outside of context 10 | Hello 1 11 | Hello 2 -------------------------------------------------------------------------------- /tests/122.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $cd[^date::create[2023-03-21]] 3 | $td[^date::create[2023-03-31]] 4 | ^while($cd < $td){ 5 | $cdstr[^cd.sql-string[]] 6 | ^cdstr.left(10)
7 | ^cd.roll[day](+1) 8 | } 9 |

10 | '^cd.sql-string[] (^eval($cd))' ^if($cd == $td){==}{!=} '^td.sql-string[] (^eval($td))' 11 | -------------------------------------------------------------------------------- /tests/049.html: -------------------------------------------------------------------------------- 1 | $tt[1] 2 | $tmp[ 3 | ^switch[$tt]{ 4 | ^case[1]{ 5 | $.aaa[123] 6 | } 7 | ^case[DEFAULT]{ 8 | $.bbb[456] 9 | } 10 | } 11 | shit! 12 | ] 13 | #$tmp 14 | $tmp.aaa 15 | -------------------------------------------------------------------------------- /tests/170.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | =^m1[1;2]= 3 | =^m2[1;2]= 4 | =^m3[1;2]= 5 | #=^try{^m4[1;2]}{$exception.handled(1)failed. it's ok}= 6 | 7 | @m1[a;b] 8 | ^if(0){$a}{$b} 9 | 10 | @m2[a;b][result] 11 | ^if(0){$a}{$b} 12 | 13 | @m3[a;b] 14 | ^if(0){$a}{$b}
15 | 16 | #@m4[a;b][result] 17 | #^if(0){$a}{$b}
18 | -------------------------------------------------------------------------------- /tests/411.html: -------------------------------------------------------------------------------- 1 | $result[] 2 | ^date:roll[TZ;Europe/Moscow] 3 | 4 | ^for[i](0;10000){ 5 | 6 | $dt[^date::today(-$i)] 7 | $dt2[^date::today[]] 8 | 9 | $dt2[^date::create($dt2-$i)] 10 | ^if(^dt.iso-string[] ne ^dt2.iso-string[]){ $result[^dt.iso-string[] vs ^dt2.iso-string[]^#0A] ^break[] } 11 | } 12 | -------------------------------------------------------------------------------- /src/lib/sdbm/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = pa-include 2 | 3 | AM_CPPFLAGS = -Ipa-include 4 | 5 | noinst_HEADERS = sdbm_pair.h sdbm_private.h sdbm_tune.h 6 | noinst_LTLIBRARIES = libsdbm.la 7 | libsdbm_la_SOURCES = sdbm.c sdbm_hash.c sdbm_lock.c sdbm_pair.c pa_file_io.C pa_strings.C 8 | 9 | EXTRA_DIST = sdbm.vcproj 10 | 11 | -------------------------------------------------------------------------------- /tests/results/013.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 179 3 | 4 | not kretin
5 | =123=
6 |


7 | =1=
8 | =default value=
9 |
10 | =1=
11 | =2=
12 | =default value=
13 |
14 | =1=
15 | =2=
16 | =3=
17 | =new default value=
-------------------------------------------------------------------------------- /tests/results/309.processed: -------------------------------------------------------------------------------- 1 | Content-Disposition: inline; filename="309.html"; filename*=UTF-8''309.html 2 | Content-Type: application/octet-stream 3 | Accept-Ranges: bytes 4 | Content-Length: 77 5 | Last-Modified: Wed, 07 Nov 1973 00:00:00 GMT 6 | 7 | $response:body[ $.file[309.html] $.mdate[^date::unix-timestamp(121478400)] ] 8 | -------------------------------------------------------------------------------- /tests/results/213.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 184 3 | 4 | a12312312b 5 |
6 | ab 7 |
8 | ab 9 |
10 | a!!!!!!!!b 11 |
12 | a!!!!!!!!b 13 |
14 | Exception type: parser.runtime, 15 | Source: match, 16 | Comment: replacement option should be junction or string 17 |
-------------------------------------------------------------------------------- /tests/results/392.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 213 3 | 4 | [ 5 | {"prematch":"","match":"","postmatch":"","1":"w1"}, 6 | {"prematch":"","match":"","postmatch":"","1":"w2"} 7 | ] 8 | [ 9 | {"prematch":"","match":"","postmatch":"","1":"w1"}, 10 | {"prematch":"","match":"","postmatch":"","1":"w2"} 11 | ] -------------------------------------------------------------------------------- /tests/133.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq parser.runtime){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | ^switch[1]{ 13 | ^badswitchtestcase[] 14 | } 15 | @badswitchtestcase[][local] 16 | $local[local value] 17 | ^case[1]{1code $local} 18 | -------------------------------------------------------------------------------- /tests/155.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^table::create{a b 3 | ^taint[av av] ^taint[b 4 | v]}] 5 | 6 | ^t.save[155.cfg; 7 | $.encloser["] 8 | ] 9 | 10 | ^show[^table::load[155.cfg;$.encloser["]]] 11 | 12 | ^show[^table::load[155.cfg;$.encloser["] $.offset(4) $.limit(11) ]] 13 | 14 | @show[t] 15 | ^json:string[$t; $.indent(true) ] 16 | -------------------------------------------------------------------------------- /tests/156.html: -------------------------------------------------------------------------------- 1 | =$cookie:name= 2 | $cookie:name[ 3 | $.value[zigi] 4 | $.httponly(true) 5 | $.expires[^date::create(2003;2;26)] 6 | ] 7 | =$cookie:name= 8 | 9 | =$cookie:name1= 10 | $cookie:name1[ 11 | $.value[zigi] 12 | $.httponly(false) 13 | $.expires[^date::create(2003;2;26)] 14 | ] 15 | =$cookie:name1= 16 | -------------------------------------------------------------------------------- /tests/173.html: -------------------------------------------------------------------------------- 1 | @main[][d] 2 | $d[^date::create(2007;11;29;11;22;33)] 3 | 4 | ^do{$d} 5 | 6 | $j{$d} 7 | ^check[$j] 8 | 9 | $r[$j] 10 | ^check[$r] 11 | 12 | @do[jCode][uLocalVar] 13 | $uLocalVar[$jCode] 14 | ^check[$uLocalVar] 15 | 16 | @check[uVar] 17 | ^if($uVar is "date"){date [value: ^uVar.sql-string[]]}{not date}
18 | -------------------------------------------------------------------------------- /tests/305.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^inet:ip2name[91.197.112.64; $.ipv[any] ] 3 | 4 | ipv4 5 | ^test[] 6 | ipv-any 7 | ^test[ $.ipv[any] ] 8 | ipv6 9 | ^test[ $.ipv[6] ] 10 | 11 | @test[options] 12 | ^try-catch{$t[^inet:name2ip[test.артлебедев.рф; $options $.table(true)]] 13 | ^t.sort{$t.ip} 14 | ^t.menu{ip: $t.ip $t.version 15 | }} 16 | -------------------------------------------------------------------------------- /tests/417.html: -------------------------------------------------------------------------------- 1 | $s[abbbbbb] 2 | $s 3 | ^s.match[(?=b);g][D] 4 | 5 | $s[a 6 | a 7 | a 8 | b 9 | b 10 | bbb] 11 | ^s.match[(?=[\nb]);g][D] 12 | 13 | $s[bcbcabc] 14 | $s 15 | ^s.match[(?=[bc]);g][D] 16 | 17 | #empty match after last char test 18 | 19 | $title[word1 word2] 20 | $m[^title.match[\b()\b;g']] 21 | ^json:string[$m] 22 | -------------------------------------------------------------------------------- /tests/results/214.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 248 3 | 4 | 1=1, 10=10, 11=11, 12=12, 13=13, 14=14, 15=15, 16=16, 17=17, 18=18, 19=19, 2=2, 20=20, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9 5 |
6 | 1=1, 10=10, 11=11, 12=12, 13=13, 14=14, 15=15, 16=16, 17=17, 18=18, 19=19, 2=2, 20=20, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9 -------------------------------------------------------------------------------- /tests/results/281.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 175 3 | 4 | non-blocking hash operations: 5 | 1 6 | key=>value 7 | value 8 | hash no longer hash blocking operations: 9 | { 10 | "key":"value", 11 | "k":"v", 12 | "k2":"v2" 13 | } 14 | { 15 | "key":"value", 16 | "k2":"v2" 17 | } 18 | { 19 | "key":"value" 20 | } -------------------------------------------------------------------------------- /tests/results/360.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 209 3 | 4 | code junctions ignore in expression flag, this it works: 5 | 11 6 | this code works after #1211: 7 | 11 8 | this code does not work in 3.4.4: 9 | 11 10 | string and number: -1 double 11 | string and object[]: hash 12 | string and object(): int 13 | -------------------------------------------------------------------------------- /tests/211.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $k[d] 3 | $kk[ 4 | $.name[e] 5 | ] 6 | $h[ 7 | $.[a^taint[b]c][ 8 | $.value[abc] 9 | ] 10 | $.d[d] 11 | $.e[ 12 | $.value[e] 13 | ] 14 | ] 15 | 16 | $h.[^m[]].value
17 | $h.d
18 | $h.$k
19 | $h.[$k]
20 | $h.[$kk.name].value
21 | 22 | @m[] 23 | $result[abc] 24 | 25 | -------------------------------------------------------------------------------- /tests/338.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $d[^date::create[2050-01-01]] 3 | 4 | $d.year($d.year-1) 5 | $d.month[-1] 6 | $d.day(1) 7 | $d.hour(25) 8 | $d.minute(7e01) 9 | $d.second(70.999) 10 | 11 | ^d.sql-string[] 12 | 13 | should be 0: ^eval($d - $d) 14 | 15 | ^try-catch{$d.year(1e6)} 16 | ^try-catch{$d.ups[2]} 17 | ^try-catch{$d.year{2000}} 18 | -------------------------------------------------------------------------------- /tests/results/345.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 202 3 | 4 | 1. ok 5 | 2. ok 6 | 3. ok 7 | 4. ok 8 | 5. ok 9 | 6. Exception type: parser.runtime, 10 | Source: delete, 11 | Comment: called with invalid option 12 | 7. Exception type: parser.runtime, 13 | Source: move, 14 | Comment: called with invalid option 15 | -------------------------------------------------------------------------------- /tests/126.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{group name 2 | first a 3 | first b 4 | second c 5 | third d 6 | third e 7 | }] 8 | 9 | ^try{ 10 | $bad2[^table.hash[group;name][ 11 | $.distinct[bad2] 12 | ]] 13 | }{ 14 | ^if($exception.type eq parser.runtime){ 15 | failed, that's OK 16 | $exception.handled(1) 17 | } 18 | } -------------------------------------------------------------------------------- /tests/187.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | test187 3 | 4 | 5 | @auto[] 6 | $a[test187_a] 7 | 8 | 9 | @update[] 10 | $caller.self.a[$a] 11 | 12 | 13 | @print[] 14 |
15 | ^$a: '$a'
16 | ^$caller.self.a: '$caller.self.a'
17 | ^$caller.CLASS_NAME: '$caller.CLASS_NAME'
18 | ^$caller.self.CLASS_NAME: '$caller.self.CLASS_NAME'
19 | -------------------------------------------------------------------------------- /tests/206.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 2+2: ^do{^eval(2+2)}{ :)
} 3 | 1/0: ^do{^eval(1/0)}{ :(
} 4 | 5 | #negative zero check 6 | 0/-1: ^do{^eval(0/-1)}{ :)
} 7 | 8 | 9 | @do[jCode;jFinally] 10 | ^try{ 11 | $jCode 12 | }{ 13 | $exception.handled(1) 14 | exception while executing code ($exception.type) 15 | }{ 16 | $jFinally 17 | } -------------------------------------------------------------------------------- /tests/217.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^do(999) 3 | ^do(1002) 4 | 5 | @do[iCount] 6 | ${iCount}: 7 | ^try-catch-comment{ 8 | ^rem{ '\2' because of if+call on every iteration, '-2' because of do+try } 9 | ^call($iCount\2-2) 10 | OK 11 | } 12 |
13 | 14 | @call[iLevel] 15 | $iLevel($iLevel-1) 16 | ^if($iLevel>0){ 17 | ^call[$iLevel] 18 | } 19 | -------------------------------------------------------------------------------- /tests/426.html: -------------------------------------------------------------------------------- 1 | $t[^table::create{data 2 | data1 3 | data2 4 | data3 5 | data4}] 6 | 7 | negative limit: $b[^table::create[$t; $.limit(-1) ]] 8 | ^json:string[$b] 9 | 10 | negative offset: $b[^table::create[$t; $.offset(-1) ]] 11 | ^json:string[$b] 12 | 13 | normal: $b[^table::create[$t; $.limit(1) $.offset(1) ]] 14 | ^json:string[$b] 15 | -------------------------------------------------------------------------------- /tests/results/216.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 249 3 | 4 | Total files (no pattern): 3
5 | Total files (clean '.' pattern): 3
6 | Files with dot (tainted '.' in pattern): 1
7 | Files with dot (tainted '.' in pattern): 1
8 | Files with dot (clean '\.' pattern): 1
9 | Files with '3' in name: 0
-------------------------------------------------------------------------------- /src/doc/compiler.dox: -------------------------------------------------------------------------------- 1 | /** @page Compiler Compiler 2 | 3 | Source code is compiled to internal form. 4 | This happens with each request, result of compilation is not cached. 5 | After compilation we have \b class, which got registered in Hash Request::classes(). 6 | 7 | @see compile.y, compile.C, compile_tools.h, compile_tools.C 8 | 9 | */ 10 | -------------------------------------------------------------------------------- /tests/042.html: -------------------------------------------------------------------------------- 1 | ^try{ 2 | ^throw[test;this is the cause of error;comment value] 3 | }{ 4 | ^if($exception.type eq test){ 5 | $exception.handled(1) 6 | 7 | type=$exception.type
8 | source=$exception.source
9 | # file=$exception.file
10 | lineno=$exception.lineno
11 | comment=$exception.comment
12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/120.html: -------------------------------------------------------------------------------- 1 | $input[^xdoc::create[doc]] 2 | $sheet[^xdoc::create{ 3 | 4 | 5 | output ^;there 6 | 7 | 8 | }] 9 | $output[^input.transform[$sheet]] 10 | ^output.string[] 11 | -------------------------------------------------------------------------------- /tests/218.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $sText[zigi] 3 | $sFileName[218-?-.txt] 4 | 5 | ^sText.save[$sFileName] 6 | file was saved (^check[])
7 | 8 | ^file:delete[$sFileName] 9 | 10 | file was deleted (^check[])
11 | 12 | @check[] 13 | $t[^file:list[./;-\.txt^$]] 14 | $result[^if($t==1 && $t.name eq "218-_3F-.txt"){EXIST}{DOES NOT EXIST}] 15 | -------------------------------------------------------------------------------- /tests/results/316.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 234 3 | 4 | handled0 Exception type: parser.runtime, 5 | Source: cache, 6 | Comment: is 'void', it does not have logical value 7 | test 8 | Exception type: parser.runtime, 9 | Source: error, 10 | Comment: $exception.handled value must be either boolean or string 'cache' 11 | -------------------------------------------------------------------------------- /tests/128.html: -------------------------------------------------------------------------------- 1 | $table[^table::create{group name 2 | first a 3 | first b 4 | second c 5 | third d 6 | third e 7 | }] 8 | 9 | ^try{ 10 | $bad3[^table.hash[group;name][ 11 | $.distinct[tables] 12 | ]] 13 | }{ 14 | ^if($exception.type eq parser.runtime){ 15 | failed, that's OK 16 | $exception.handled(1) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/249.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $o[^object::create[]] 4 | $o.k2[v2] 5 | 6 | display v1: $o.k1 7 | display v2 (with default setter): $o.k2 8 | display default getter: $o.test 9 | 10 | @CLASS 11 | object 12 | 13 | @create[] 14 | $k1[v1] 15 | 16 | @SET_DEFAULT[name;value] 17 | $self.$name[=$value=] 18 | 19 | @GET_DEFAULT[name] 20 | =$k1=$k3= 21 | -------------------------------------------------------------------------------- /tests/307.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try-catch{^My:test[]} 3 | ^try-catch{^My:Test[]} 4 | 5 | $x[$My:AnotherTest] 6 | ^My:AnotherTest[1] 7 | ^x[2] 8 | 9 | @CLASS 10 | My 11 | 12 | @GET_DEFAULT[] 13 | $result{Byaka} 14 | 15 | @GET_Test[] 16 | $result{Byaka} 17 | 18 | @GET_AnotherTest[] 19 | $result[$Method] 20 | 21 | @Method[suffix] 22 | Hello $suffix 23 | -------------------------------------------------------------------------------- /tests/354.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $o[^A::create[]] 4 | 5 | $o.m 6 | $m[^reflection:method[$o;m]] 7 | ^m[] 8 | 9 | $A:m 10 | $m[^reflection:method[$A:CLASS;m]] 11 | ^m[] 12 | 13 | 14 | @CLASS 15 | A 16 | 17 | @auto[] 18 | $m[string] 19 | 20 | @create[] 21 | 22 | @m[] 23 | method $self.CLASS_NAME ^if(^reflection:dynamical[]){dynamic}{static} 24 | -------------------------------------------------------------------------------- /tests/results/221.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 206 3 | 4 | a: '11', b: '12', c: '13' 5 |
6 | a: '21', b: '22', c: '' 7 |
8 | a: '31', b: '', c: '' 9 |
10 | a: '41', b: '', c: '43' 11 |
12 | a: '', b: '52', c: '53' 13 |
14 | a: '', b: '62', c: '' 15 |
16 | a: '', b: '', c: '73' 17 | -------------------------------------------------------------------------------- /tests/results/351.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 214 3 | 4 | defined class property1
5 | included base property1
6 | real: 7 | base auto base 8 | process auto base 9 | class auto c2 10 | checking auto is kept: 11 | base auto base 12 | process auto base 13 | class auto c2 14 | base auto base 15 | process auto base 16 | -------------------------------------------------------------------------------- /tests/results/400.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 209 3 | 4 | 1: result 5 | 2: result 6 | X: 4: result 7 | 5: result 8 | 1: result 9 | 2: result 10 | X: 4: result 11 | 5: result 12 | X: no result 13 | Y: no result 14 | Z: code 15 | first call wcontext: "w W" "w W" "w W" "w W" 16 | first call result: "R" null "R" null -------------------------------------------------------------------------------- /tests/161.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^load[161_utf8.txt] 3 | ^load[161_utf8.txt;UTF-8] 4 | ^load[161_windows1251.txt;WINDOWS-1251] 5 | 6 | @load[sFile;sCharset][f] 7 | $f[^file::load[text;$sFile; 8 | ^if(def $sCharset){ 9 | $.charset[$sCharset] 10 | } 11 | ]] 12 | 13 | ^if(def $sCharset){$sCharset}{^$request:charset ($request:charset)}: =$f.text=
14 | -------------------------------------------------------------------------------- /tests/285.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $h[$.1{code}] 4 | ^if(def ^h._at[first]){yes}{no} 5 | 6 | $o[^a::create[]] 7 | ^if(def ^reflection:method[$o.CLASS;test]){yes}{no} 8 | 9 | $o[^b::create[]] 10 | $o.CLASS_NAME 11 | 12 | @CLASS 13 | b 14 | 15 | @create[] 16 | $result[^a::create[]] 17 | 18 | @CLASS 19 | a 20 | 21 | @create[] 22 | 23 | @test[] 24 | 25 | -------------------------------------------------------------------------------- /tests/results/122.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 224 3 | 4 | 2023-03-21
5 | 2023-03-22
6 | 2023-03-23
7 | 2023-03-24
8 | 2023-03-25
9 | 2023-03-26
10 | 2023-03-27
11 | 2023-03-28
12 | 2023-03-29
13 | 2023-03-30
14 |

15 | '2023-03-31 00:00:00 (19446.875)' == '2023-03-31 00:00:00 (19446.875)' -------------------------------------------------------------------------------- /tests/results/205.processed: -------------------------------------------------------------------------------- 1 | Content-Disposition: inline; filename="zigi.txt"; filename*=UTF-8''zigi.txt 2 | Content-Type: application/octet-stream 3 | Content-Length: 142 4 | 5 | text file content plus { 6 | "BODY":{ 7 | "class":"file", 8 | "name":"zigi.txt", 9 | "size":17, 10 | "mode":"text", 11 | "content-type":"application\/octet-stream" 12 | } 13 | } -------------------------------------------------------------------------------- /tests/results/222.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 214 3 | 4 | 0: '11', 1: '12', 2: '13' 5 |
6 | 0: '21', 1: '22', 2: void 7 |
8 | 0: '31', 1: void, 2: void 9 |
10 | 0: '41', 1: '', 2: '43' 11 |
12 | 0: '', 1: '52', 2: '53' 13 |
14 | 0: '', 1: '62', 2: void 15 |
16 | 0: '', 1: '', 2: '73' 17 | -------------------------------------------------------------------------------- /src/doc/class.dox: -------------------------------------------------------------------------------- 1 | /** @page Class Class: parent+methods+fields 2 | 3 | Class holds 4 | - parent: VStateless_class::base(); 5 | - bunch of methods: VStateless_class::fmethods, Method. 6 | - fields: VClass::ffields 7 | 8 | VStateless_class::get_element returns method+self[VJunction]. 9 | VClass_class::get_element returns static fields 10 | 11 | 12 | */ 13 | -------------------------------------------------------------------------------- /tests/118.html: -------------------------------------------------------------------------------- 1 | $input[^xdoc::create[docBad]] 2 | $sheet[^xdoc::create{ 3 | 4 | 5 | output 6 | 7 | 8 | }] 9 | $output[^input.transform[$sheet]] 10 | $response:body[^output.file[$.method[html]]] 11 | -------------------------------------------------------------------------------- /tests/245.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $o[^object::create[]] 4 | 5 | ^process[$o]{ inline function ^$value } 6 | 7 | ^process[$o]{@main[] 8 | if you see this - it's bug 9 | ^$result[main function ^$value] 10 | 11 | ^@test[] 12 | test function ^$value 13 | } 14 | 15 | ^o.test[] 16 | ^object:test[] 17 | 18 | @CLASS 19 | object 20 | 21 | @create[] 22 | $value[value] 23 | -------------------------------------------------------------------------------- /tests/347-curl.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | 1. ^curl:options[ $.library[no-such-library.ext] ] 4 | 2. ^try-catch-filtered{ ^curl:session{ } } 5 | 3. ^try-catch-filtered{ ^curl:session{ } } 6 | 4. ^curl:options[ $.library[another-library.ext] ] 7 | 5. ^try-catch-filtered{ ^curl:session{ } } 8 | 6. ^curl:options[ $.library[] ] 9 | 7. ^try-catch{ ^curl:session{ OK } } 10 | -------------------------------------------------------------------------------- /tests/results/010.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 189 3 | 4 | 1. 2. value.something 5 | value[something] 6 | 3. finally works! 7 | 4. y 8 | 5. y 9 | 6. y 10 | 7. y.extra 11 | 8. arg 12 | 9. { 13 | "1":"1", 14 | "5":"5", 15 | "1.b":"1", 16 | "2 2":"2 2", 17 | "4":4 18 | } 19 | 10. 4.extra 20 | 11. arg 21 | 12. 4 22 | 13. 4 23 | 14. (2+2)[1] -------------------------------------------------------------------------------- /tests/results/274.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 225 3 | 4 | OK 5 |


6 | 2000-02-29 01:23:45
7 | 2000-02-29 01:23:45
8 | 2000-02-29
9 | 01:23:45
10 |
11 | 11015.9331597222 12 | 11015 13 | 1 14 | Exception type: parser.runtime, 15 | Source: hren, 16 | Comment: 'type' must be 'date', 'time' or 'datetime' 17 | -------------------------------------------------------------------------------- /tests/results/445.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 194 3 | 4 | 1. { 5 | "0":"v0", 6 | "1":"v1", 7 | "3":"v3" 8 | } 9 | 2. { 10 | "0":"0", 11 | "1":"1", 12 | "2":"3" 13 | } 14 | 3. { 15 | "0":"v0", 16 | "1":"v1", 17 | "2":"v3" 18 | } 19 | 4. Exception type: parser.runtime, 20 | Source: bug, 21 | Comment: mode must be 'keys' or 'values' 22 | -------------------------------------------------------------------------------- /src/doc/executor.dox: -------------------------------------------------------------------------------- 1 | /** @page Executor Executor 2 | 3 | Code in internal form then got executed. 4 | 5 | Methods[Method] can be 6 | - native: registered by VStateless_class::add_native_method, and nave nonempty Method::native_code 7 | - parser: registered by VStateless_class::add_method, and nave nonempty Method::parser_code 8 | 9 | @see execute.C 10 | 11 | */ 12 | -------------------------------------------------------------------------------- /tests/132.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^try{ 3 | ^mustfail[] 4 | }{ 5 | ^if($exception.type eq parser.runtime){ 6 | failed, that's OK 7 | $exception.handled(1) 8 | } 9 | } 10 | 11 | @mustfail[] 12 | $var[aaa] 13 | ^if(1){ 14 | ^tcrashlocaljunctions1[] 15 | } 16 | 17 | $j 18 | 19 | @tcrashlocaljunctions1[][var] 20 | $var[varvalue] 21 | $j{ 22 | $var 23 | } 24 | $j 25 | -------------------------------------------------------------------------------- /tests/244.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | ^try-catch{ 4 | ^classname::create[] 5 | } 6 | ^try-catch{ 7 | ^reflection:create[classname;create] 8 | } 9 | 10 | compare exceptions: 11 | ^try-catch{ 12 | ^hash::create[;] 13 | } 14 | 15 | $h[$.key[value]] 16 | ^try-catch{ 17 | ^h._count[ ] 18 | } 19 | 20 | 21 | @CLASS 22 | classname 23 | 24 | @create[] 25 | ^hash::create[] 26 | -------------------------------------------------------------------------------- /tests/325.html: -------------------------------------------------------------------------------- 1 | $s[NaN] 2 | NaN:^try-catch{^s.double[]} 3 | NaN:^try-catch{^s.double(0)} 4 | $s[INFINITY] 5 | Inf:^try-catch{^s.double[]} 6 | Inf:^try-catch{^s.double(0)} 7 | 8 | SQRT(-1):^try-catch{^math:sqrt(-1)} 9 | POW(0;-1):^try-catch{^math:pow(0;-1)} 10 | 11 | $x[^xdoc::create{}] 12 | ^try-catch{^x.selectNumber[number(/x/@n)]} 13 | -------------------------------------------------------------------------------- /tests/results/365.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 265 3 | 4 | 3.4.4 endless recoursion bug test: ; 5 | caller local: local; 6 | caller class name: string MAIN; 7 | caller backup: string ; 8 | 3.4.5 has $caller.method: proxy; 9 | 3.4.4 saved caller bug test: string; 10 | 3.4.4 uncatchable exception "'local' element can not be fetched from wcontext": ; -------------------------------------------------------------------------------- /tests/051t.p: -------------------------------------------------------------------------------- 1 | @USE 2 | /tests/051b.p 3 | 4 | @CLASS 5 | t 6 | 7 | @BASE 8 | b 9 | 10 | @auto[] 11 | $test[t] 12 | 13 | @create[] 14 | $test[ct] 15 | 16 | @method[] 17 | t.test=$test
18 | ^b:method[]
19 | ^method2[] 20 | 21 | @child_method[] 22 | cm 23 | 24 | @method2[] 25 | tm2 26 | 27 | @tjunctionsm[hash][tl] 28 | $tl[local-to-tjunctionsm] 29 | $hash.key 30 | -------------------------------------------------------------------------------- /tests/210.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $a[a"a] 3 | $b[^taint[b"b]] 4 | $h[ 5 | $.[$a][$a] 6 | $.[$b][$b] 7 | ] 8 | 9 | #^h.foreach[k;v]{${k}: '$v'}[, ] 10 | 11 | $t[^h._keys[]] 12 | ^t.sort{$t.key} 13 | ^t.menu{${t.key}: '$h.[$t.key]'}[, ] 14 |
15 | 16 | $h.[^taint[as-is][$a]]
17 | $h.[^taint[$a]]
18 | $h.[^taint[as-is][$b]]
19 | $h.[^taint[$b]]
20 | -------------------------------------------------------------------------------- /tests/243.html: -------------------------------------------------------------------------------- 1 | $filespec[./243/a//b///c////d.txt] 2 | $s[dummy] 3 | ^s.save[$filespec] 4 | 5 | ^if(-f $filespec){file exist
} 6 | ^if(-f "./243/a/b/c/d.txt"){file exist
} 7 | ^if(-d ^file:dirname[$filespec]){dir exist
} 8 | ^if(-d "./243/a/b/c"){dir exist
} 9 | 10 | ^file:delete[$filespec] 11 | ^if(!(-d "./243")){dir doesn't exist (it's OK)
} 12 | -------------------------------------------------------------------------------- /tests/299.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^a:m[] 3 | ^b:m[] 4 | ^c:m[] 5 | 6 | 7 | @CLASS 8 | a 9 | 10 | @m[] 11 | a:m 12 | 13 | 14 | @CLASS 15 | b 16 | 17 | @OPTIONS 18 | partial 19 | 20 | @m[] 21 | b:m1 22 | 23 | 24 | @CLASS 25 | b 26 | 27 | @OPTIONS 28 | partial 29 | 30 | @m[] 31 | b:m2 32 | 33 | 34 | 35 | @CLASS 36 | c 37 | 38 | @BASE 39 | a 40 | 41 | @m[] 42 | c:m 43 | -------------------------------------------------------------------------------- /tests/416.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $h[ 3 | $.1[1] 4 | $.2[2] 5 | $.3[3] 6 | $.4[4] 7 | $.5[5] 8 | ] 9 | 10 | $t[^table::create{v 11 | 1 12 | 2 13 | 3 14 | 4 15 | 5 16 | }] 17 | 18 | ^for[limit](0;5){ 19 | $limit 20 | ^json:string[^h.select[k;v]($v<=$limit || ^break[])[ $.limit[4] ]] 21 | ^json:string[^t.select($t.v<=$limit || !^break[])[ $.limit[4] ]] 22 | } 23 | -------------------------------------------------------------------------------- /tests/183.html: -------------------------------------------------------------------------------- 1 | $request:charset[utf-8] 2 | 3 | $value[abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 4 | 0123456789 5 | `+-=~!@#^$%^^&*()_ 6 | []{}<>^;:'",./? 7 | 8 | абвгдеёжзийклмнопрстуфхцчшщъыьэюя АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ] 9 | 10 | $cookie:имя[ 11 | $.value[$value] 12 | $.expires[^date::create(2003;01;01)] 13 | ] 14 | 15 | =^taint[as-is][$cookie:имя]= 16 | -------------------------------------------------------------------------------- /tests/437.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $response:status[500] 3 | ^method[] 4 | 5 | @method[] 6 | ^deeper[] 7 | 8 | @deeper[] 9 | ^bug[] 10 | 11 | @unhandled_exception[exception;stack] 12 | 13 | $exception.file[-cleared-] 14 | $exception.handled(1) 15 | ^stack.menu{ $stack.file[-cleared-] } 16 | 17 | Everything is fine! details: 18 | ^json:string[$exception] 19 | ^json:string[$stack] 20 | -------------------------------------------------------------------------------- /tests/320.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $main[^reflection:class_by_name[MAIN]] 3 | MAIN: $main.CLASS_NAME 4 | MAIN methods reversed: ^json:string[^reflection:methods[MAIN]] 5 | MAIN methods: ^json:string[^reflection:methods[MAIN; $.reverse(false) ]] 6 | xnode methods: ^json:string[^reflection:methods[xnode; $.reverse(false) ]] 7 | xdoc methods: ^json:string[^reflection:methods[xdoc; $.reverse(false) ]] 8 | -------------------------------------------------------------------------------- /tests/395.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^show[1.bmp] 3 | ^show[^file::load[binary;395_dir/1.bmp]] 4 | 5 | ^show[3_VP8.webp] 6 | ^show[3_VP8L.webp] 7 | ^show[3_VP8X.webp] 8 | 9 | $s[^try-catch{ 10 | ^show[4.mp4] 11 | }] ^s.match[[^^ ]+/][]{/-real-path-was-here-/} 12 | 13 | ^show[4.mp4; $.video(true) ] 14 | 15 | @show[arg;options] 16 | ^json:string[^image::measure[395_dir/$arg;$options]] 17 | -------------------------------------------------------------------------------- /tests/results/187.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 264 3 | 4 |
5 | $a: 'test187_a'
6 | $caller.self.a: 'MAIN_a'
7 | $caller.CLASS_NAME: 'MAIN'
8 | $caller.self.CLASS_NAME: 'MAIN'
9 |
10 | $a: 'test187_a'
11 | $caller.self.a: 'test187_a'
12 | $caller.CLASS_NAME: 'MAIN'
13 | $caller.self.CLASS_NAME: 'MAIN'
-------------------------------------------------------------------------------- /tests/results/310.processed: -------------------------------------------------------------------------------- 1 | Last-Modified: Thu, 09 Aug 1973 00:00:00 GMT 2 | Content-Disposition: inline; filename="310.html"; filename*=UTF-8''310.html 3 | Content-Type: application/octet-stream 4 | Accept-Ranges: bytes 5 | Content-Length: 135 6 | 7 | $response:body[ $.file[310.html] $.mdate[^date::unix-timestamp(121478400)] ] 8 | $response:last-modified[^date::unix-timestamp(113702400)] 9 | -------------------------------------------------------------------------------- /tests/results/363.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 219 3 | 4 | test1 : Exception type: parser.runtime, 5 | Source: test1, 6 | Comment: undefined method 7 | 8 | test2 : 9 | test3 : 10 | test4 : 11 | test5 : 12 | test6 : 13 | test7 : 14 | test8 : 15 | test9 : 16 | test10 : 17 | test11 : 18 | 19 | test12 : 23145 20 | test13 : 23145 21 | test14 : 0 22 | -------------------------------------------------------------------------------- /tests/results/409.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 258 3 | 4 | name: value - visible without $self 5 | localy modified name: another value - local var shadows class var 6 | localy defined name1: value1 7 | 1. name not modified: value 8 | 2. local var disappear: - OK 9 | another class test: 10 | a: 11 | b:bb - visible without $self 12 | self: { 13 | "b":"bb" 14 | } -------------------------------------------------------------------------------- /tests/326.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $t[^test::create[]] 3 | $v[CLASS_NAME] 4 | via var: "$t.$v" 5 | directly: "$t.CLASS_NAME" 6 | 7 | $h[ $.t[$t] ] 8 | deep: "$h.t.CLASS_NAME" 9 | main: "$MAIN:t.CLASS_NAME" 10 | 11 | ^t.m[] 12 | 13 | @CLASS 14 | test 15 | 16 | @create[] 17 | 18 | @m[] 19 | $v[CLASS_NAME] 20 | via self var: "$self.$v" 21 | via var: "$$v" 22 | directly: "$self.CLASS_NAME" 23 | -------------------------------------------------------------------------------- /tests/results/215.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 284 3 | 4 | ^file::load[text;filespec]: 'text'
5 | ^file::load[binary;filespec]: 'binary'
6 | ^file::create[text;...]: 'text'
7 | ^file::create[binary;...]: 'binary'
8 | ^file::stat[filespec]: ''
9 | ^file::base64[...]: 'binary'
10 | $img[^image::create(...)]^img.gif[]: 'binary'
-------------------------------------------------------------------------------- /tests/214.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $h[^hash::create[]] 3 | ^for[i](1;20){ 4 | $h.[$i][$.id[$i]] 5 | } 6 | 7 | ^print[$h] 8 | 9 |
10 | 11 | $h2[^copy[$h]] 12 | ^print[$h2] 13 | 14 | @copy[h][k;v] 15 | $result[^hash::create[]] 16 | ^h.foreach[k;]{ 17 | $result.[$k][$.id[$k]] 18 | } 19 | 20 | @print[h;field][t] 21 | $t[^h._keys[]] 22 | ^t.sort{$t.key} 23 | ^t.menu{${t.key}=$h.[$t.key].id}[, ] -------------------------------------------------------------------------------- /tests/results/332.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 226 3 | 4 | t.fields:{ 5 | "c1":"v1", 6 | "c2":"v2" 7 | } 8 | h.fields:{ 9 | "a":"a" 10 | } 11 | t.fields: 12 | Exception type: parser.runtime, 13 | Source: fields, 14 | Comment: column not found 15 | h.fields:"empty" 16 | 404:empty 17 | 404: 18 | local: 19 | caller local:local 20 | test:test 21 | caller local: 22 | test: -------------------------------------------------------------------------------- /src/doc/index.dox: -------------------------------------------------------------------------------- 1 | /** @mainpage 2 | 3 | @section Part1 Part I 4 | 5 | - @ref Targets 6 | - @ref Memory 7 | - @ref Exceptions 8 | - @ref String 9 | - @ref Compiler 10 | - @ref Executor 11 | - @ref Value 12 | - @ref Class 13 | - @ref Object 14 | - @ref Methoded 15 | 16 | @section Part2 Part II 17 | 18 | - @ref ClassExample1 19 | - @ref ClassExample2 20 | - @ref ClassExample3 21 | 22 | */ 23 | -------------------------------------------------------------------------------- /tests/179.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @auto[] 5 | $_a[static_a] 6 | 7 | @create[] 8 | $a[a] 9 | 10 | 11 | 12 | @CLASS 13 | b 14 | 15 | @BASE 16 | a 17 | 18 | @auto[] 19 | $_b[static_b] 20 | 21 | @create[] 22 | ^BASE:create[] 23 | $b[b] 24 | 25 | 26 | 27 | 28 | @CLASS 29 | c 30 | 31 | @BASE 32 | b 33 | 34 | @auto[] 35 | $_c[static_c] 36 | 37 | @create[] 38 | ^BASE:create[] 39 | $c[c] 40 | -------------------------------------------------------------------------------- /tests/177.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | $f[^file::load[binary;177.html]] 3 | 4 | ^$f.name: $f.name
5 | ^$f.content-type: $f.content-type
6 | ^$f.size: ^if($f.size){!=0}{==0}
7 | ^$f.cdate: ^if($f.cdate is "date"){date}{undef}
8 | ^$f.mdate: ^if($f.mdate is "date"){date}{undef}
9 | ^$f.adate: ^if($f.adate is "date"){date}{undef}
10 | ^$f.text: ^if(def $f.text){def}{undef}
11 | -------------------------------------------------------------------------------- /src/doc/footer.htm: -------------------------------------------------------------------------------- 1 | 5 | Copyright © 2001–2012 Art. Lebedev Studio | http://www.artlebedev.com 6 | Last updated: $date 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/257.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^b:m[] 3 | 4 | 5 | # The whitespaces after @METACOMMANDS and their options are typed intentionally. 6 | # Also, they should not cause a compilers' exceptions. 7 | @CLASS 8 | a 9 | 10 | @OPTIONS 11 | partial 12 | locals 13 | 14 | @m[] 15 | a 16 | 17 | @CLASS 18 | b 19 | 20 | @OPTIONS 21 | locals 22 | 23 | @BASE 24 | a 25 | 26 | @m[] 27 | ^BASE:m[]b 28 | -------------------------------------------------------------------------------- /tests/results/117.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 270 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | para1=defparam1
11 | para2=значение param2
12 | 13 | 1 2 14 | 15 |
16 | test return3 17 | 18 | -------------------------------------------------------------------------------- /tests/110.html: -------------------------------------------------------------------------------- 1 | $xdoc[^xdoc::create{ 2 |

привет

3 | }] 4 | $node[^xdoc.selectSingle[/document/block/p]] 5 | ^if(def $node){ 6 | ^if($node is string){ 7 | $node 8 | }{ 9 | ^if($node is hash){ 10 | ^node._count[] 11 | }{ 12 | $node.nodeType: $node.firstChild.nodeValue 13 | } 14 | } 15 | }{ 16 | node not found 17 | } 18 | -------------------------------------------------------------------------------- /tests/288.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $o[^O::create[]] 4 | 5 | prop1: $o.prop1 6 | prop2: $o.prop2 7 | $o.prop1[set_prop1] 8 | prop1 modified: $o.prop1 9 | 10 | ^try-catch{ 11 | $O:prop1[value] 12 | } 13 | 14 | @CLASS 15 | O 16 | 17 | @create[] 18 | $prop2[set_prop2] 19 | 20 | @GET_prop1[] 21 | prop1 22 | 23 | @GET_prop2[] 24 | prop2 25 | 26 | @SET_DEFAULT[name;value] 27 | $$name[$value - via SET_DEFAULT] 28 | -------------------------------------------------------------------------------- /tests/327.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $dt[^date::create(2100;01;01;10;10;10)[EST5]] 4 | ^show[EST5;$dt] 5 | $copy[^date::create[$dt]] 6 | ^show[copy;$copy] 7 | ^copy.roll[TZ;UTC] 8 | ^show[UTC;$copy] 9 | ^dt.roll[TZ;] 10 | $msk[^date::create[$dt]] 11 | ^show[msk;$msk] 12 | 13 | @show[s;dt] 14 | [$s] timestamp: ^dt.unix-timestamp[] 15 | [$s] sql-string: ^dt.sql-string[] $dt.TZ 16 | [$s] iso-string: ^dt.iso-string[] 17 | -------------------------------------------------------------------------------- /tests/399.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | 1. ^try-catch{^file:base64[;;bug]} 4 | 5 | 2. ^file:base64[001.html; ] 6 | 3. ^file:base64[001.html; $.pad(false) ] 7 | 8 | 4. ^file:base64[395_dir/2.tiff; $.wrap(false) ] 9 | 5. $f[^file::load[binary;395_dir/2.tiff]] ^f.base64[ $.wrap(false) $.pad(false) $.url-safe(true) ] 10 | 11 | $s[xxxxxxxxxxxxxxxxxxxxxx] 12 | 13 | 6. ^s.base64[ $.pad(1) ] 14 | 7. ^s.base64[ $.pad(0) ] 15 | -------------------------------------------------------------------------------- /tests/007.html: -------------------------------------------------------------------------------- 1 | $pict[^image::create(400;200)] 2 | ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000) 3 | ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000) 4 | ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff) 5 | ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000) 6 | $response:body[^pict.gif[]] 7 | -------------------------------------------------------------------------------- /tests/022.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | ^print[^file:list[022_dir]] 3 | 4 | ^print[^file:list[022_dir;]] 5 | 6 | ^print[^file:list[022_dir; ]] 7 | 8 | ^print[^file:list[022_dir;\.html^$]] 9 | 10 | ^print[^file:list[022_dir;b[b].txt^$]] 11 | 12 | ^print[^file:list[022_dir;^taint[regex][b[b].txt]^$]] 13 | 14 | @print[tList] 15 | ^tList.sort{$tList.name} 16 | ^tList.menu{ 17 | $tList.name $tList.dir 18 | }[
] 19 |
20 | -------------------------------------------------------------------------------- /tests/results/011.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 340 3 | 4 | 2002-12:
5 |
6 |                   01 =48,2002=
02 03 04 05 06 07 08 =49,2002=
09 10 11 12 13 14 15 =50,2002=
16 17 18 19 20 21 22 =51,2002=
23 24 25 26 27 28 29 =52,2002=
30 31                =01,2003=
7 |
-------------------------------------------------------------------------------- /tests/results/270.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 292 3 | 4 | /tests/270_dir///subdir/270.txt
5 | /tests/270_dir/270.txt
6 | /tests/270.html
7 |
8 | file not found (OK)
9 | file not found (OK)
10 | /Makefile.in
11 | /tests/Makefile
12 | file not found (OK)
13 | file not found (OK)
14 | file not found (OK)
15 | file not found (OK)
-------------------------------------------------------------------------------- /tests/results/447.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 305 3 | 4 | my for 5 | 1. new test for "MAIN" from "MAIN" 6 | 1. new test for "MAIN" from "MAIN" 7 | 3. static: test for "A" 8 | 4. dynamic: test for "A" 9 | 5. static: new test for "A" from "MAIN" 10 | 6. dynamic: new test for "A" from "MAIN" 11 | 7. extra static: extra new test for "A" from "A" 12 | 8. extra dynamic: extra new test for "A" from "A" -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Parser3 website is http://www.parser.ru/en/ 2 | 3 | Read the documentation at http://www.parser.ru/en/docs/ 4 | 5 | Check the ChangeLog to keep track of progresses. 6 | Check the INSTALL to find out how to compile and install Parser3. 7 | 8 | SQL drivers are in separate modules. 9 | 10 | Report bugs to mailbox@parser.ru or on http://www.parser.ru/forum/ 11 | 12 | $Id: README,v 1.6 2017/02/08 19:05:13 moko Exp $ 13 | -------------------------------------------------------------------------------- /tests/results/200.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 291 3 | 4 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
5 | 3: 7
6 | 6: 4
7 | 3: 7
8 | 5: 5
9 | 4: 6
10 | 10: 0
11 | 9: 1
12 | 0, 1, 10, 2, 3, 4, 5, 6, 7, 8, 9
13 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
14 |
15 | 2
16 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
00, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 -------------------------------------------------------------------------------- /tests/results/437.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 287 3 | 4 | Everything is fine! details: 5 | { 6 | "type":"parser.runtime", 7 | "source":"bug", 8 | "file":"-cleared-", 9 | "lineno":9, 10 | "colno":2, 11 | "comment":"undefined method", 12 | "handled":1 13 | } 14 | [ 15 | {"name":"deeper","file":"-cleared-","lineno":"6","colno":"2"}, 16 | {"name":"method","file":"-cleared-","lineno":"3","colno":"2"} 17 | ] -------------------------------------------------------------------------------- /tests/266.p: -------------------------------------------------------------------------------- 1 | @CLASS 2 | a 3 | 4 | @_create[] 5 | 6 | @a[] 7 | aa 8 | 9 | @d[] 10 | ad 11 | 12 | @e[] 13 | ae 14 | 15 | @g[] 16 | ag 17 | 18 | 19 | @CLASS 20 | b 21 | 22 | @BASE 23 | a 24 | 25 | @b[] 26 | bb 27 | 28 | @d[] 29 | bd 30 | 31 | @f[] 32 | bf 33 | 34 | @g[] 35 | bg 36 | 37 | 38 | @CLASS 39 | c 40 | 41 | @BASE 42 | b 43 | 44 | @c[] 45 | cc 46 | 47 | @d[] 48 | cd 49 | 50 | @e[] 51 | ce 52 | 53 | @f[] 54 | cf 55 | -------------------------------------------------------------------------------- /tests/278.html: -------------------------------------------------------------------------------- 1 | @main[] 2 | 3 | $o[^test::create[]] 4 | 5 | $o.a[1] 6 | set a: $o.log 7 | get a: $o.a 8 | 9 | $o.b[2] 10 | set b: $o.log 11 | get b: $o.b 12 | 13 | @CLASS 14 | test 15 | 16 | @create[] 17 | $log[] 18 | 19 | @GET_DEFAULT[] 20 | default 21 | 22 | @SET_a[value] 23 | $log[SET_a called with '$value'] 24 | 25 | @GET_b[] 26 | b 27 | 28 | @SET_DEFAULT[name;value] 29 | $log[SET_DEFAULT called for '$name' with '$value'] 30 | -------------------------------------------------------------------------------- /tests/420.html: -------------------------------------------------------------------------------- 1 | 1. $s[123] 2 | 3 | string methods hidden: ^try-catch{ $hide[$s.length] $hide.CLASS_NAME } 4 | 5 | $d(^s.double[]) 6 | $i(^s.int[]) 7 | 8 | 2. $d 9 | 10 | double methods available: $m[$d.inc] ^m[] $d 11 | 12 | 3. $i 13 | 14 | int methods available: $m[$i.inc] ^m[]^m[] $i 15 | 16 | 4. ^try-catch{ $i.nothing } 17 | 5. ^try-catch{ ^i.something[] } 18 | 6. ^try-catch{ $d.nothing } 19 | 7. ^try-catch{ ^d.something[] } 20 | -------------------------------------------------------------------------------- /tests/results/338.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 309 3 | 4 | 2048-11-02 02:11:10 5 | should be 0: 0 6 | Exception type: date.range, 7 | Source: year, 8 | Comment: year '1000000' is out of range 0..9999 9 | Exception type: parser.runtime, 10 | Source: ups, 11 | Comment: date field not found 12 | Exception type: parser.runtime, 13 | Source: year, 14 | Comment: is 'junction', it does not have numerical (int) value 15 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src etc 2 | ACLOCAL_AMFLAGS = -I src/lib/ltdl/m4 3 | 4 | EXTRA_DIST = operators.txt operators.ru.txt parser3.sln gnu.vcproj buildall acsite.m4 5 | 6 | commit: 7 | # trick to make 'make' happy at check out time 8 | # and avoid redundant remaking: aclocal+autoconf+automake 9 | 10 | cvs commit -m "no message" -f configure.ac acsite.m4 aclocal.m4 Makefile.am Makefile.in configure src/include/pa_config_auto.h.in 11 | -------------------------------------------------------------------------------- /tests/results/038.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 308 3 | 4 | y 5 | y 6 | y 7 |
8 | 3.1416
9 | ^math:radians(180): 3.1416
10 | ^math:degrees($math:PI/2): 90
11 | ^math:sin($math:PI/2): 1.00
12 | ^math:asin(-1): -1.57
13 | ^math:cos($math:PI): -1.00
14 | ^math:acos(0): 1.57
15 | ^math:tan($math:PI/4): 1.00
16 | ^math:atan(-1): -0.79
17 | ^math:atan2(-1;0): -90°
-------------------------------------------------------------------------------- /tests/results/254.processed: -------------------------------------------------------------------------------- 1 | Content-Type: text/html 2 | Content-Length: 286 3 | 4 | Same uid 5 | Same string 6 | Object b: 7 | v2 = 2 8 | v1 = 1 9 | another3 = =3= 10 | Hash a: 11 | v1 = 1 12 | v2 = 2 13 | v3 = 3 14 | another3 = =3= 15 | Exception type: parser.runtime, 16 | Source: copy, 17 | Comment: source must have hash representation 18 | Exception type: parser.runtime, 19 | Source: v1, 20 | Comment: element cannot be stored into string 21 | --------------------------------------------------------------------------------