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