Annotation of parser3/INSTALL, revision 1.59
1.59 ! moko 1: $Id: INSTALL,v 1.58 2024/11/04 04:37:43 moko Exp $
1.1 paf 2:
1.58 moko 3: 1. What is the process to compile Parser3?
1.33 paf 4:
1.57 moko 5: Just start ./buildall script and you would get $HOME/parser3install/bin/parser3 binary.
1.33 paf 6:
1.57 moko 7: NOTE:
8: In case you do not need XML support, use ./buildall --without-xml
1.33 paf 9:
1.49 paf 10: NOTE:
1.58 moko 11: In case you need apache parser module (DSO), use ./buildall --with-apache
1.1 paf 12:
1.49 paf 13: NOTE:
1.57 moko 14: If you have gc, prce, libxml and libxslt installed, you can use ./configure --with-xml
1.3 paf 15:
1.10 paf 16: NOTE:
1.49 paf 17: On some systems there are no "make" and you should run 'gmake', change buildall script accordingly then.
1.1 paf 18:
1.58 moko 19: 2. What is the process to install Parser3?
1.17 paf 20:
1.49 paf 21: Copy files from $HOME/parser3install directory into your cgi-bin directory.
1.2 paf 22:
1.58 moko 23: Then install Parser3 to handle documents, step-by-step instructions:
1.49 paf 24: http://www.parser.ru/en/docs/lang/install4apachecgi.htm" in English
25: http://www.parser.ru/docs/lang/install4apachecgi.htm" in Russian
1.2 paf 26:
1.49 paf 27: Directory layout:
28: bin/
1.57 moko 29: parser3 -- CGI and command line Parser3 interpreter
30: auto.p.dist -- configuration file sample,
31: copy it to auto.p and adjust to your needs
32: share/
33: charsets/
34: parser3.charsets/ -- charset definition files
35: koi8-r.cfg -- cyrillic charset [KOI8-R encoding]
36: windows-1251.cfg -- cyrillic charset [windows-1251 encoding]
37: ...
1.2 paf 38:
1.59 ! moko 39: 3. I have heard about $mail:receive support, how do I use it?
1.57 moko 40:
41: Just start ./buildall --with-mailreceive.
42: If you have glib and gmime installed, you can run ./configure --with-mailreceive.
1.9 paf 43:
1.58 moko 44: 4. Safety features
1.57 moko 45: You can disable any exec operations by setting --disable-execs option.
1.18 paf 46: file::exec, file::cgi and mail:send (unix version) methods would be disabled.
47:
1.29 paf 48: You can enable reading and executing files, not belonging to group+user
1.58 moko 49: other than effective by setting --disable-safe-mode option.
1.57 moko 50:
1.18 paf 51: You can disable user-configured sendmail commands by forcing it, setting
1.57 moko 52: "--with=sendmail=COMMAND" option.
53:
1.58 moko 54: 5. Since Parser 3.4.0 several optimizations were implemented.
55: If you experience problems you can try to disable them by commenting corresponding
1.57 moko 56: defines and recompiling parser3.
1.50 misha 57:
58: src/include/pa_opcode.h
59: #define OPTIMIZE_BYTECODE_GET_CLASS -- $a:
60: #define OPTIMIZE_BYTECODE_GET_ELEMENT -- $a ^a
61: #define OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT -- $a.b ^a.b
62: #define OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT -- $a.$b ^a.$b
1.52 misha 63: #define OPTIMIZE_BYTECODE_GET_SELF_ELEMENT -- $self.a ^self.a
64: #define OPTIMIZE_BYTECODE_CONSTRUCT -- $a(expr), $a[value]
65: $.a(expr), $.a[value]
66: $self.a(expr), $self.a[value]
67: #define OPTIMIZE_BYTECODE_CUT_REM_OPERATOR -- cut rem operator with any number of params during compilation
68: #define OPTIMIZE_BYTECODE_STRING_POOL -- simplifying string's bytecode into expression
1.58 moko 69: #define OPTIMIZE_BYTECODE_GET_SELF_ELEMENT -- bytecode for $self.a ^self.a
70: #define OPTIMIZE_BYTECODE_GET_ELEMENT__SPECIAL -- bytecode for .CLASS, .CLASS_NAME
71: #define FEATURE_GET_ELEMENT4CALL -- ^o.m[] calls get_element4call("m"), not get_element("m")
1.50 misha 72:
73: src/include/pa_string.h
74: #define HASH_CODE_CACHING -- calculated hash codes are cached and used for sequential hash lookups
75:
76: src/include/pa_memory.h
77: #define USE_DESTRUCTORS -- destructors are used to decrease memory consumption during code
78: processing and make ^memory:compact[] calls non-essential.
79:
80: src/types/pa_method.h
81: #define OPTIMIZE_CALL -- allows faster operators execution by eliminating method frame
82: with local variables creation and extra write context switches.
83: #define OPTIMIZE_RESULT -- parser methods are marked when the $result variable was used.
84: This allows write operations and context switching optimization.
85:
1.52 misha 86: src/types/pa_wwrapper.h
87: #define OPTIMIZE_SINGLE_STRING_WRITE -- reuse original VString in single string assignments.
88:
1.51 misha 89: src/lib/cord/include/cord.h
1.50 misha 90: #define CORD_CAT_OPTIMIZATION -- CORD library never modifies source concatenations. But in parser
91: write operations it is safe to modify them and save some memory.
1.51 misha 92: #define CORD_CHARS_CACHE -- language cords with same language and length are cached and reused.
1.50 misha 93:
1.53 misha 94: src/include/pa_string.h
95: #define STRING_LENGTH_CACHING -- cache String::Body.length() for char* strings
96:
97: src/include/pa_hash.h
98: #define HASH_ORDER -- hash keys are iterated in the order of insertion
E-mail: