Ďî-đóńńęč
Art.Lebedev Studio presents…
parser


Recent news articlesBirdSome articles from FAQ
[November 01, 2013]  Version 3.4.3 released.

Class curl now has option $.ipresolve(0|1|2). Also, the default is changed from IPv6(2) to IPv4(1).

Method ^curl:load[] now parses incoming cookies and stores them in a field cookies that contains table with columns name, value, expires, max-age, domain, path, httponly and secure.

Now it is possible to get a list of all server's environment variables with their values using $env:fields.

The second parameter of method ^file:list[] now can be a hash. In this case a filter should be specified as $.filter[string or regex-object].

Method ^file:list[] now returns a table with columns name, dir, size, cdate, mdate and adate. Values for name and dir are always returned (dir value 1 means that the record is a directory). To get information about directory entries' sizes and dates the option $.stat(true) should be specified.

Method ^file:delete[] now accepts option $.exception(false) that can be used to suppress exception in case of file deletion is failed.

Methods ^file:delete[] and ^file:move[] how accept option $.keep-empty-dirs(true) that can be used for keeping empty directories in place after deleting or moving all files in these directories.

Constructor ^file::load[] now accepts option $.response-charset[] that can be used to force remote charset encoding. Unfortunately, in real world some servers report incorrect charset encoding in HTTP response headers so this option is a solution for such cases.

Method ^json:string[] now accepts option $.indent as a bool as well as user predefined indent's prefix string.

Method ^json:string[] now prints all characters in range 0x01-0x1F except allowed ones (\b \f \n \r \t) as \u00XX.

Method ^math:digest[md5|sha1|sha256|sha512;string or file; $.format[hex|base64] $.hmac[key]] added.

Class memcached how has method ^memcached.release[] that can be used for closing connection to a server.

Method ^reflection:method_info[] for user defined methods now also returns $.call_type, $.max_params and $.extra_param.

Class table now has method ^table.csv-string[[nameless;] $.encloser["] $.separator[,] ] that is very similar to existing method ^table.save[].

Class table how has method ^table.foreach[rownum;value]{code}[[separator]] that is similar to method ^hash.foreach[]. Note that value variable will contain the same table object with modified row postion set.

Now the exception occurs in case of loading class if the class with the same name is already loaded. It can be switched off by specifying a new $.replace(true) option in operators ^use[] and ^process{}

@SET_DEFAULT and @GET_DEFAULT now work with static classes as well.

Double numbers now printed with higher precision (16 vs 5).

An ability to receive email is restored.

Methods ^string.int[], ^string.double[] and ^string.bool[] were optimized.

Oracle SQL driver now sets environment variables prior client's library loading.

PgSQL SQL driver now accepts a new option standard_conforming_strings=1 that can be used for switching off char '\' escaping to conform SQL standards.

JSON library replaced by another one that is under GPL.

The latest versions of libraries are included: GC (7.2d), PCRE (8.33), libxml2 (2.9.1) and libxslt (1.1.28).

The process of building Parser3 under *nix is redesigned. A single “buildall” script should be used.

Under windows operation system libraries , libxml2 and libxslt now are linked statically. It means that the only one executable file and SQL drivers dll-s are needed.

A number of bugs were fixed.



What is Parser?
Parser is a simple and convenient object-oriented language, which allows creating good sites in short time. It is a little more complicated than HTML, but requires no special programming skills. Parser was started in Art. Lebedev studio in 1997. Nowadays, most of sites created by Art. Lebedev studio are made with Parser.

What is it for, anyway?
Language is designed and optimized in such a way that it would be more convenient to create good sites. Language supports working with forms, cookies, table files, databases, and XML. Support for user operators and classes allows to extend its functionality.

There is PHP, what Parser is for?
PHP is a programming language requiring appropriate training. Parser can be successfully used by non-professional programmers. Parser is especially good in that it allows mere mortals to create and maintain complex dynamic sites without spending too much time.

I programmed in other languages, in short, what is so convenient in Parser?
Parser is, among other things, a macro-language. It has no print operator; all the code in source file is, in fact, a big print operator. Parser syntax is immersed into text. That is, you do not write program that outputs text. On the contrary, you add logic to already existing text, ^if(condition){action}, and organize it by splitting HTML-code into blocks like:

@header[]

...
@footer[]
...
@navigation[]
...
@body[]
...

My browser displays Parser code, not its result. What's wrong (I am using Apache web-server)?
Parser is not assigned as a handler of your documents after all.
To test whether Parser itself works, type this in your browser's address line:
http://your_site/cgi-bin/parser3.cgi (or .exe, for Win32 version) You should see something like this:

Parser/3.x.x
If 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.



Parser 3—simple and convenient object-oriented language which allows creating good sites in short time.

  • XML, XSL, XPath and DOM support
  • Available in documented source code
  • Uniformed database support
  • Support of object-oriented programmers
  • Detailed language documentation (160 pages!)
  • UTF-8 support