| |||
![]() | |||
| Recent news articles | Bird | Some articles from FAQ |
| [February 24, 2011]
Version 3.4.1 released. Now Parser3 has native JSON support. Now Parser3 is able to load files from external HTTP/HTTPS servers using libcurl library. Now Parser3 tries to search files loaded in @USE/^use[] relatively from the file where these @USE/^use[] are written. Now user defined methods can handle variable number of parameters: @method[arg;*args] (a hash with numeric keys will be in a variable $args. Acceptable call types now can be defined for user methods. In meta-command @OPTIONS parameter dynamic or static can be specified (default — any), which will influence to all methods of the file. Particular methods can be declared as statical: @static:method[params]. A special default setter (@SET_DEFAULT[name;value]) can be defined in user classes. This setter will be called during writing to unknown fields of the class/object. Operator if now can have several «elseif» sections, for example: ^if(a>0){1}(a==0){0}{-1}. User defined classes do not inherit method @auto[] any longer. Class void now has all methods available for class string. This means that strings' methods can be called for undefined variable as well. Class hash now has a new method ^hash._at($index) (or ^hash._at[first|last]) that can be used for accessing element by its index (hashes' elements are ordered since version 3.4.0). Operator ^apply-taint[[transformation-type]][...] was added. This operator applies inplace transformation to all tainted parts of the string. Parts within undefined transformation type will be processed using specified transformation type (as-is by default). Method for converting numbers from one base to another was added. Method ^table.select(...)[options] now supports options $.limit(X) and $.reverse(true|false). Method ^string.match[...] now can supports four parameters. The value of fourth parameter is returned if nothing was found in the string. Unknown ^string.match[...] options now cause an exception. Method ^string:js-unescape[...] now also decodes \uXXXX-encoded symbols. Constructor ^file::base64[encoded] now also supports another format: ^file::base64[text|binary;file-name;enoded[;$.content-type[...]]]. An option $.content-type[...] now can be specified during creation of file's object. Method ^reflection:copy[$src;$dest] was added. Options $.encloser[#] and $.separator[#] now switch the automatics comments removing off while loading table or file. Parser3 now ignores white-space characters that are written between methods' definitions. Parser3 now ignores trailing white-space characters in @META commands (@USE, @CLASS, @BASE, @OPTIONS) and their values. Unsafe Parser3 version do not have restrictions to environment variable names passed to executed scripts any longer. The third option of method ^image.replace(color-from;color-to)[poligon] is not compulsory any longer. If not specified the color will be replaced in whole image. A text file, which is loaded without $.charset option specified, that contains a BOM code, will be transcoded from UTF-8 to $request:charset automatically. In a field $.inherited method ^reflection:method_info[class-name;method-name] now returns the name of class where the method is actually defined. In a field $.overridden method ^reflection:method_info[class-name;method-name] now returns the name of ancestor's class where the overridden method is defined. In a field $.file method ^reflection:method_info[class-name;method-name] now returns the full file specification where the method is defined. Using $request:post-body now it is possible to get POST-request body as a file. Latest versions of libraries are included: PCRE (8.12) and libxml2 (2.7.8). A number of bugs were fixed. | ![]() | What is Parser? What is it for, anyway? There is PHP, what Parser is for?
I programmed in other languages, in short, what is so convenient in Parser? @header[] ... @footer[] ... @navigation[] ... @body[] ... My browser displays Parser code, not its result. What's wrong (I am using Apache web-server)?
Parser/3.x.xIf you can see it, that means Parser is uploaded where it should have been, and its rights are set correctly. If you have uploaded parser correctly, and you have not forgotten to put directives specified in documentation to .htaccess, you may have forgotten to allow Apache to process .htaccess in httpd.conf file by directive AllowOverride (see Apache documentation). To check whether .htaccess is processed, put there some arbitrary wrong instruction, say «mytest», to the very beginning of it. If, after page reload you do NOT see 500 error (which must appear if you configured everything right), that means you have .htaccess file ignored. Change AllowOverride directive or turn to your administrator. |
|
| E-mail: mailbox@parser.ru | Copyright © 1997–2011 Art Lebedev Studio |