debian/0000755000000000000000000000000012263211305007161 5ustar debian/operators.ru.txt0000644000000000000000000023120412263210727012376 0ustar !сделано Xне сделано, видимо, не будет сделано без значка - будет сделано операторы !^eval(выражение)[формат] выражение, кроме обычных функций:: !допустимы #комментарии работают до конца строки или закрывающейся круглой скобки внутри комментария допустимы вложенные круглые скобки !из неочевидных операторов: !| побитный xor !|| логический xor ~ побитное отрицание \ целочисленное деление 10\3=3 !def для проверки defined, пустая строка не defined пустая таблица не defined пустой hash не defined ^if(method $hash.delete){yes} !eq ne lt gt le ge для сравнения строк, !in "/dir/" для проверки ["внутри не допустимы, если надо сравнить со сложным, пусть это будет переменная]. !is 'type' для проверки типа левого операнда, скажем, можно проверить, "не hash ли параметр метода?" !-f для проверки существования файла на диске, !-d для проверки существования каталога на диске, !строка в кавычках|апострофах - строка, без кавычек|апострофов строка до ближайшего whitespace !числовой литерал бывает 0xABC !приоритеты: /* logical */ %left "!||" %left "||" %left "&&" %left '<' '>' "<=" ">=" "lt" "gt" "le" "ge" %left "==" "!=" "eq" "ne" %left "is" "def" "in" "-f" "-d" %left '!' условие ? когдаДа: когдаНет /* bitwise */ %left '!|' %left '|' %left '&' %left '~' /* numerical */ %left '-' '+' %left '*' '/' '%' '\\' %left NEG /* negation: unary - */ !литералы true false !^if(условие){когда да}{когда нет} !^if(условие1){да}[(условие2){да}[(условие2){да}[...]]]{нет} -- количество доп. условий не ограничено (в общем elseif это :) !^switch[значение]{^case[вариант1[;вариант2...]]{действие}^case[DEFAULT]{действие по умолчанию}} !^while(условие){тело}[[разделитель]|{разделитель который выполняется перед непустым очередным не первым телом}] !^for[i](0;4){тело}[[разделитель]|{разделитель который выполняется перед непустым очередным не первым телом}] !^use[модуль] !^try{ ... !^throw[sql.connect[;вася[;болван]]] // был ^error[текст] !^throw[ $.type[sql.connect] $.source[вася] $.comment[болван] ] ... }{ ^if($exception.type eq "sql"){ $exception.handled(1|true) ^rem{флаг, что exception обработан} .... } ^switch[$exception.type]{ ^case[sql;mail]{ $exception.handled(1) код, обрабатывающий sql ошибку $exception.type = sql.connect $exception.file $exception.lineno $exception.colno [если не запрещены при компиляции] $exception.source = вася $exception.comment = болван } ^case[DEFAULT]{ код, обрабатывающий другую ошибку ^throw[$exception] << re-throw // DON'T! It's default behaviour! } } } ^exit[] + - прекращяет обработку запроса. удобно сделать после выставления 401 ошибки ^return[результат] + - отваливает из выполнения метода, выдавая нестандартный результат !^break[] + - обрывает цикл !^continue[] + - обрывает итерацию цикла !^untaint[[as-is|file-spec|http-header|mail-header|uri|sql|js|xml|html|optimized-html|regex|parser-code]]{код} default as-is !^taint[[lang]][код] default "just tainted, language unknown" !^process[[$caller.CLASS|$object|$КЛАСС:CLASS]]{строка, которая будет process-ed, как код}[ $.main[во что переименовать @main] $.file[имя файла из которого, якобы, данный текст] $.lineno(номер строки в файле, откуда данный текст. можно отрицательный) ] !^process..[путь][во что переименовать @main] по умолчанию, методы компилируются в $self [в случае оператора, $self=$MAIN:CLASS] !^connect[protocol://строка соединения]]{код с ^sql[...]-ями} !mysql://user:pass@{host[:port]|[/unix/socket]}/database? ClientCharset=parser-charset << charset in which parser thinks client works charset=cp1251_koi8& timeout=3& compress=0& named_pipe=1& multi_statements=1& allow execute more then one query in one parser :sql{} request autocommit=1 autocommit если выставить в 0, будет делать commit/rollback !pgsql://user:pass@{host[:port]|[local]}/database? client_encoding=win,[to-find-out] &datestyle=ISO,SQL,Postgres,European,NonEuropean=US,German,DEFAULT=ISO &ClientCharset=parser-charset << charset in which parser thinks client works !oracle://user:pass@service? NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251& NLS_LANGUAGE language-dependent conventions NLS_TERRITORY territory-dependent conventions NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS NLS_DATE_LANGUAGE language for day and month names NLS_NUMERIC_CHARACTERS decimal character and group separator NLS_CURRENCY local currency symbol NLS_ISO_CURRENCY ISO currency symbol NLS_SORT sort sequence ORA_ENCRYPT_LOGIN=TRUE ClientCharset=parser-charset << charset in which parser thinks client works !odbc://DSN=dsn^;UID=user^;PWD=password^;ClientCharset=parser-charset ClientCharset << charset in which parser thinks client works !sqlite://DBfile? ClientCharset=parser-charset& << charset in which parser thinks client works autocommit=1 для работы connect нужно, чтобы заранее(рекомендуется в системном конфигурационном auto.p) была определена таблица #sql drivers $SQL[ $.drivers[^table::create{protocol driver client mysql /www/parser3/libparser3mysql.so /usr/local/lib/mysql/libmysqlclient.so pgsql /www/parser3/libparser3pgsql.so /usr/local/pgsql/lib/libpq.so oracle /www/parser3/libparser3oracle.so /u01/app/oracle/product/8.1.5/lib/libclntsh.so?ORACLE_HOME=/u01/app/oracle/product/8.1.5&ORA_NLS33=/u01/app/oracle/product/8.1.5/ocommon/nls/admin/data sqlite /www/parser3/libparser3sqlite.so /usr/local/sqlite/lib/sqlite3.so odbc c:\drives\y\parser3project\odbc\debug\parser3odbc.dll }] ] !в таблице у oracle в столбце клиентской библиотеки допустимо задать environment параметры инициализации(если они не заданы иначе заранее), допустимы имена, начинающиеся на NLS_ ORA_ и ORACLE_, или оканчивающиеся на + под win32 необходим PATH+=^;C:\Oracle\Ora81\bin к сведению: ORA_NLS33 нужен для считывания файлика с клиентской кодировкой(задаваемой NLS_LANG) если кодировка не по-умолчанию, обязательно указать в .drivers, иначе будет сообщение про неправильный NLS параметр (имеют в виду, что не нашли кодировку из NLS_LANG) ORACLE_HOME нужен для считывания текстов сообщений об ошибках, можно указывать и в строке соединения, но глобален, и лучше вынести за скобки, в отличие от клиентской кодировки NLS_LANG, и прочего. ВНИМАНИЕ: при работе с большими текстовыми блоками в oracle&pgsql[а лучше всегда], ставить такой префикс перед открывающим апострофом, впритык, везде без проблелов /**имя_поля**/'literal' !^rem{} !^cache[файл](секунд){код}[{catch код}] !относительное задание времени !скэшировать строку, которая получается при выполнении кода на 'секунд' секунд !если 0секунд, значит не кэшировать, а старый такой стереть !в catch коде $exception.handled[cache] ^rem{флаг, что exception обработан} !^cache[файл][expires date]{код}[{catch код}] !абсолютное задание времени !^cache[файл] удалить файл [не ругает, если его нет] !^cache(секунд) !^cache[expires date] !сигнализирует вышестоящему ^cache "уменьши до стольких-то 'секунд'/'expires'" !в пределе: ^cache(0) отменить кэширование !^cache[] выдаёт текущую expires date X^cache[read] сигнализирует вышестоящему ^cache "взять скэшированное насильно, игнорируя expires", выдаёт bool "получилось/нет" !^sleep(seconds) Xесть глобальный флажок в свойствах/командной строке "не оптимизировать" !и есть исключение: ^untaint[html]{код} не оптимизируется Xбезотностительно флажка !у всех методов есть локальная переменная $result, если в неё что положить, !то _это_ будет результатом макроса, а не его тело !у всех методов есть локальная переменная $caller, в ней лежит родительский stack frame, !если туда записать !use(^use или @USE) ищет файл... !1. ...если путь начинается с /, то считается, что это путь от корня веб пространства !есть глобальная строка/таблица $MAIN:CLASS_PATH с путём/путями к каталогу с классами. !корень путя/путей считается от корня веб пространства. !2. ...относительно строчки из table $MAIN:CLASS_PATH, снизу вверх задавайте её в конфигурационном auto.p вашего сайта !глобальная табличка $CHARSETS[$.название[имя файла]] !задаёт какие буквы считаются какими(whitespace, letter, etc), а также их unicode !формат: tab delimited файл, с заголовком: ! char white-space digit hex-digit letter word lowercase unicode1 unicode2 ! A x x x a 0x0041 0xFF21 ! где char и lowercase могут быть буквами, а могут быть и 0xКОДАМИ ! если символ имеет единственное unicode представление, равное самому символу, ! можно не указывать unicode !всегда есть кодировка UTF-8, !она является кодировкой по-умолчанию для request и response !ВНИМАНИЕ: имя кодировки case sensitive синтаксис !$имя[новое значение] !$имя(математическое выражение нового значения) !$имя{код нового значения} !$имя whitespace или ${имя}неважно подстановка значения !^имя параметры вызов !$имя.CLASS класс значения !$имя.CLASS_NAME имя класса !$имя[$.key[] () {}] конструктор элемента переменной-хэша $имя.key !^method[$.key[] () {}] конструктор элемента параметра-хеша $parameter.key $CLASS.имя обращение к переменной класса имя заканчивается перед: пробел tab linefeed ; ] } ) " < > + * / % & | = ! ' , ? {уточнить} т.е. можно $имя,aaaa но если нужно после имени букву, скажем -, то ${имя}- в выражениях + и - являются дополнительными концами имени !можно обращаться к составным объектам так: $name.subname !где subname бывает: ! строка ! $переменная ! строка$переменная ! [код, вычисляющий строку] например: $хэш[$.возраст(88)] $достать[$.поле[возраст]] ^хэш.[$достать.поле].format{%05d} параметры:=один или много параметров параметр:= !(математическое выражение) вычисляется много раз внутри вызова, | ![код] вычисляется один раз перед вызовом, | !{код} вычисляется 0 или много раз внутри вызова, !везде допустимы ; внутри - делает много параметров в одних скобках !void !^имя.length[] 0 !^имя.pos[...] -1 !^имя.left(n) ничего не выдаёт !^имя.right(n) ничего не выдаёт !^имя.mid(p[;n]) ничего не выдаёт !^имя.int[] (default) 0 или default !^имя.double[] (default) 0 или default !^имя.bool[] (default) false или default !^void:sql{запрос без результата}{$.bind[см. table::sql]} !int,double !^имя.int[] целочисленное значение !^имя.double[]+ double значение !^имя.bool[] + .bool(true|false) bool значение !^имя.inc(на сколько +) !^имя.dec(на сколько -) !^имя.mul(на сколько *) !^имя.div(на сколько /) !^имя.mod(на сколько %) !^имя.format[формат] !^int/double:sql{query}[[$.limit(2) $.offset(4) $.default{0} $.bind[см. table::sql]]] запрос, результат которого должен быть один столбец/одна строка !string !в выражении !def значение равно "не пуста?" !логическое/числовое значение равно попытке преобразовывания к double, пустая строка тихо преобразуется к 0 пример: ^if(def $form:name) не пуста? ^if($user.isAlive) истина? [автопреобразование к числу, не ноль?] !^string:sql{query}[[$.limit(1) $.offset(4) $.default{n/a} $.bind[см. table::sql]]] результат запроса должен быть один столбец/одна строка !^строка.int[] .int(default) целочисленное значение строки. если ломается преобразование, берётся default !^строка.double[]+ .double(default) double значение строки !^строка.bool[] + .bool(default) bool значение строки если ломается преобразование, берётся default !^строка.format[формат] %d %.2f %02d... !^строка.match[шаблон-строка|шаблон-regex][[опции поиска]] $prematch $match $postmatch $1 $2... опции поиска= i CASELESS x whitespace in regex ignored s singleline = $ считается концом всего текста m multiline = $ считается концом строки[\n], не концом всего текста g найти все вхождения, а не одно ' создавать столбцы prematch, match, postmatch n вернуть цисло с количеством найденных совпадений, а не таблицу с результатами U инвертировать смысл модификатора '?' !^строка.match[шаблон-строка|шаблон-regex][опции поиска]{замена} опции поиска+= g заменить все вхождения, а не одно !^строка.split[разделитель][[lrhv]][[название столбца для вертикального разбиения]] l слева направо [default] r справа налево h nameless таблица с ключами 0, 1, 2, ... v таблица из 1 столбца 'piece' или как передадут [default] !^строка.{l|r}split[разделитель] таблица из столбца $piece оставлен для совместимости !^строка.upper|lower[] X^строка.truncate(предел терпенья) стиль :( !^строка.length[] !^строка.mid(P[;N]) без N - "до конца строки" !^строка.left(N) !^строка.right(N) !^строка.pos[подстрока] !^строка.pos[подстрока](позиция, с которой ищем) <0 = не найдено !^строка.replace[$таблица_подстановок_строка_на_строку] !^строка.replace[$что;$на-что] !^строка.save[[append;]путь] !^строка.save[путь[;$.charset[в какой кодировке сохраняем] $.append(true)]] !^строка.normalize[] выдает другую строку, в которой фрагменты на одном языке объединены полезно делать перед сложными match операциями, если вы знаете, что входная строка состоит из большого числа фрагментов !^строка.trim[start|both|end|left|right[;chars]] выкидывает chars из начала/конца/и начала и конца default 'chars' -- whitespace chars !^строка.append[string] !^строка.base64[] encode !^string:base64[encoded[;$.strict(true)]] decode !table в выражении логическое значение равно "не пуста?" числовое значение равно count[] !^table::create[[nameless]]{данные}[[$.separator[^#09]]] старое имя "set" !^table::create[table][[$.limit(1) $.offset(5) $.offset[cur] $.reverse(1)]] клонирует таблицу reverse << сзаду на перёд (работает пока только в locate, в table::create НЕ работает) !^table::load[[nameless;]путь[;опции]] !если не nameless, названия колонок берутся из первой строки !пустые строки, и строки в первой колонке содержащие '#', игнорируются !$.separator[^#09] !$.encloser["] по-умолчанию, нет. !^table::sql{query}[[$.limit(2) $.offset(4) $.bind[hash] todo:$.default{ ^table::create[...] }]] bind привязывает переменные в запросе к их значениям пока реализован только для oracle в запросе надо написать ":имя" в параметре bind передать hash, из которого возьмётся(или куда запишется) значение !^таблица.save[[nameless|append;]путь[;опции, см. load]] !$таблица.поле !$таблица.fields из named таблицы выдаёт текущую запись как Hash !^таблица.menu{тело}[[разделитель]] !^таблица.offset[] печатает offset !^таблица.offset[[whence]](5) сдвигает !whence=cur|set !без whence - это cur !^таблица.count[], ^таблица.count[rows] - количество строк в таблице !^таблица.count[columns] - для named таблицы количество столбцов (сокращение от $c[^таблица.columns[]]^c.count[]) !^таблица.count[cells] - количество ячеек в текущей строке таблицы !^таблица.line[] 1-based offset !^таблица.sort{{ключеделатель строка}|(ключеделатель число)}[{desc|asc}] default=asc !^таблица.append{данные} X^таблица.insert{данные}[(n)] добавить запись на текущую позицию [добавить запись на позицию n] X^таблица.remove(position[;count]) - стирает запись из текущей позиции [стирает запись из конкретной позиции] [стирает count записей] !^таблица.join[таблица][$.limit(1) $.offset(5) $.offset[cur]] - добавляет записи из таблицы. таблицы должны иметь одинаковую структуру. !^таблица.flip[] выдаёт транспонированную, надо куда-то сложить, потом пользовать !^таблица.locate[поле;значение][[$.limit(1) $.offset(5) $.offset[cur] $.reverse(1)]] передвигает текущую строку, если найдёт. выдаёт bool !^таблица.locate(логическое выражение)[[$.limit(1) $.offset(5) $.offset[cur] $.reverse(1)]] передвигает текущую строку, если найдёт. выдаёт bool !^таблица.hash{[поле]|{код}|(выражение)}[[поле значений|table поля значений]][[$.distinct(1) $.distinct[tables]]] значением $hash.ключ будет hash в котором поля значений будут ключами поля значений могут быть не указаны, тогда ими будут все столбцы, включая ключевой если distinct содержит true, то не будет ошибки при повторяющихся ключах если distinct содержит tables, то будет создан hash из таблиц, содержащих строки с ключом !^таблица.columns[[название столбца]]+ таблица из одного столбца 'column' или как передадут !$отобранное[^таблица.select(выражение)] = таблица из тех же столбцов и строк, у которых условие совпало $adults[^man.select($man.age>=18)] ^таблица.color[цвет1;цвет2] !hash !в выражении !логическое значение равно "не пуста?" !числовое значение равно _count[] !$хеш.ключ !_default - специальный ключ, если задан, то при обращении по ключу, которому нет соответствия, выдаётся _default значение !$хеш.fields выдает $hash. чтобы класс hash был чуть больше похож на класс table !^hash::create[[!copy_from_hash|copy_from_hashfile]] создаёт новый hash, копию старого !^хеш.add[слагаемое] перезаписывает одноимённые !^хеш.sub[вычитаемое] !^хеш.union[b] = объединение одноимённые остаются !^хеш.intersection[b] = пересечение значения хеш !^хеш.intersects[b] = bool !^hash::sql{запрос}[[$.distinct(1) $.limit(2) $.offset(4) todo:$.default{$.field[]...}]] получается hash(ключи=значения первая колонка ответа) of hash(ключи=названия остальных колонкок ответа) !^хеш._keys[[название колонки с ключами]]+ таблица из одного столбца $key или как передадут !^хеш._count[] !^хеш.foreach[key;value]{тело}[[разделитель]|{разделитель который выполняется перед непустым очередным не первым телом}] !^хеш.delete[ключ] удалить ключ !^хеш.contain[ключ] - существует ли в хеше ключ (bool) !^хэш._at[first|last] !^хэш._at([-]N) доступ к заданным элементам упорядоченного хеша !hashfile !^hashfile::open[filename] !^хешфайл.clear[] забыть всё !$хешфайл.ключ[значение] положить значение !$хешфайл.ключ[$.value[значение] $.expires[ЗНАЧЕНИЕ]} положить значение до expires значение поля expires может быть date, или число дней(0дней=на вечно) !$хешфайл.ключ достать !^хешфайл.delete[ключ] удалить ключ !^хешфайл.delete[] удалить файлы, содержащие данные !^хешфайл.hash[] преобразовать в обычный hash попутно стирает устаревшие пары !^хешфайл.foreach[key;value]{тело}[[разделитель]|{разделитель который выполняется перед непустым очередным не первым телом}] !^хешфайл.release[] записать данные и снять блокировки. при повторном обращении к элементам откроется автоматически. !^хешфайл.cleanup[] пробежаться по всем элементам и удалить устаревшие. пример: $sessions[^hashfile::open[/db/sessions]] $sid[^math:uuid[]] $sessions.$sid[$.value[$uid] $.expires(1)] $uid[$sessions.$sid] !form [берётся первый элемент из одноимённых из GET, потом первый из POST] !$form:поле = string/file !$form:nameless = поле со значением поля без имени "?value&...", "...&value&...", "...&value" !$form:qtail = строка со значением текста после второго "?xxxxx", если там не было ',' [imap] !$form:fields = hash со всеми полями формы !$form:tables.поле = table с одним столбцом "field" со значениями "поля" !$form:files.поле = hash со значениями полей типа файл, ключи - 0, 1, ..., значение - файл !$form:imap = хэш с ключами 'x' и 'y' со значением ?1,2 приписки при использовании server-site image map !env !$env:переменная !$env:PARSER то же самое, что показывается при запуске parser.cgi !cookie !$cookie:имя считать старое или свежезаданное !$cookie:имя[значение] на 90 дней !$cookie:имя[$.value[значение] $.expires[ЗНАЧЕНИЕ] $.secure(true)] !значение поля expires может быть 'session', date, или число дней(0дней=session) ! если дата, она будет преобразована к формату "Sun, 25-Aug-2002 12:03:45 GMT" ! можно устанавливать bool свойства, например $.secure(true), $.httponly(true) !$cookie:fields = hash со всеми cookies !request !$request:query !$request:body unprocessed POST request body !$request:uri !$request:document-root каталог, относительно которого считаются пути в parser, по-умолчанию = $env:DOCUMENT_ROOT можно изменить, если на hosting что-то неудобно настроено !$request:argv = hash с параметрами коммандной строки. ключи 0, 1, ... [0 -- имя обрабатываемого файла]. X!$request:browser это hash, поля: !$type = ie/nn и !$version = номер, скажем 5.5 X$request:user X$request:password !$request:charset Кодировка исходного документа !используется при upper/lower и match[][i] ПРЕДУПРЕЖДЕНИЕ: класс form получает свои поля после обработки всех auto класса MAIN поэтому необходимо задать $request/response:charset в одном из них. не после. !response !$response:поле[значение] и можно считать старое -- $response:поле !значение может быть string а может быть hash: ! $value[abc] field: {abc}<<часть ! $attribute[zzz] field: abc; {attribute=zzz}<<часть !значение поля или атрибута может быть string или date ! если дата, она будет преобразована к формату "Sun, 25-Aug-2002 12:03:45 GMT" !$response:headers накопленные поля !$response:body[DATA] замещает стандартный ответ !$response:download[DATA] замещает стандартный ответ, выставляет флаг, заставляющий browser предложить download !$response:status !^response:clear[] забыть все заданные response поля !$response:charset кодировка клиента т.е. та, 1) из которой будут перекодированы $form:поля после забирания из browser'а 2) в которую документ будет перекодирован перед отдаванием в browser 3) в которую будет перекодирован текст языка uri не добавляет к content-type ничего, если хочется, это надо сделать вручную ПРЕДУПРЕЖДЕНИЕ: класс form получает свои поля после обработки всех auto класса MAIN поэтому необходимо задать $request/response:charset в одном из них. не после. !regex !в выражении !логическое значение всегда равно true !числовое значение равно количеству байт скомпилированного шаблона. !^regex::create[шаблон-строка][[опции поиска]] !^шаблон.size[] количество байт скомпилированного шаблона если значение очень большое -- стоит почитать документацию по pcre и, возможно, переписать шаблон. !^шаблон.study_size[] размер study-структуры. если==0 -- шаблон не может быть "изучен" ^шаблон.save[filespec] ^шаблон.load[filespec] !reflection !^reflection:create[класс;конструктор[;пара;[мет[;ры]]]] вызывает указанный конструктор класса (не более 100 параметров) !^reflection:classes[] хеш со всеми классами. ключ -- имя класса, значение бывает methoded (класс с методами) или void !^reflection:class[объект] класс переданного объекта !^reflection:class_name[объект] имя класса переданного объекта !^reflection:base[объект] родительский класс переданного объекта !^reflection:base_name[объект] имя родительского класса переданного объекта !^reflection:methods[класс] хеш со списком методов указанного класса, значения -- строки 'native' или 'parser' !^reflection:method[класс или объект;имя метода] возвращает junction-method класса или объекта !^reflection:fields[класс или объект] хеш со списком статических полей указанного класса или динамических полей указанного объекта !^reflection:field[класс или объект;имя поля] возвращает значение указанного поля класса или объекта. getter-ы игнорируются. !^reflection:uid[класс или объект] возвращает идентификатор объекта или класса !^reflection:method_info[класс;метод] хеш с параметрами указанного метода класса $.inherited[класс] имя класса, где метод был определён (возвращается только если метод был определён в предке) $.overridden[класс] имя класса, где метод был определён (возвращается только если метод был определён в предке) для native классов возвращается хеш: .min_params(минимально необходимое число параметров) .max_params(максимально возможное число параметров) .call_type[dynamic|static|any] для parser классов возвращается хеш: ключ -- номер параметра (0, 1, ...), значение - имя параметра !^reflection:dynamical[[object or class, caller if absent]] возвращает true, если метод был вызван из динамического контекста при передаче параметра возвращает true, если передан динамический объект, false если класс !^reflection:delete[класс или объект;имя переменной] удаляет переменную с указанным именем в указанном классе или объекте !mail !$mail.received=MESSAGE: .from .reply-to .subject .date класса date .message-id .raw[ .СЫРОЕ_ПОЛЬЗОВАТЕЛЬСКОЕ-ПОЛЕ-ЗАГОЛОВКА ] $.{text|html|file#}[ << нумеруется как и в mail:send (text, text2, ...) (file, file2, ...) $.content-type[ $.value[{text|...|x-unknown}/{plain|html|...|x-unknown}] [$.charset[windows-1251]] << в каком пришло, сейчас уже перекодировано $.ПОЛЬЗОВАТЕЛЬСКИЙ-ПАРАМЕТР-ЗАГОЛОВКА ] $.description $.content-id $.content-md5 $.content-location .raw[ .СЫРОЕ_ПОЛЬЗОВАТЕЛЬСКОЕ-ПОЛЕ-ЗАГОЛОВКА ] $.value[строка|FILE] ] $.message#[MESSAGE] (message, message2, ...) !^mail:send[ $.options[-odd] unix: строка, которая будет добавлена к команде запуска sendmail -odd означает "быстро поставь в очередь без проверки email" win32: игнорируется $.charset[кодировка заголовка и текстовых блоков] $.any-header-field $.text[string] $.text[ $.any-header-field $.value[string] ] $.html{string} $.html[ $.any-header-field $.value{string} ] $.file#[FILE] $.file#[ $.any-header-field $value[FILE] ] ] !если charset указан, письмо перекодируется в этот charset !content-type.charset не влияет на перекодирование !после имени части может идти # число ^mail:send[ # по-умолчанию, совпадает с source encoding. # задаёт кодировку body $.charset[windows-1251] # нет умолчания $.content-type[$.value[text/plain] $.charset[windows-1251]] $.from["вася" ] $.to["петя" ] $.subject[пойдём пивка] $.body[ слова ] ] !:send[$.header-field[] $.charset[кодировка письма] $.body[когда body не строка, а hash, отсылается multipart письмо]] !если charset указан, письмо перекодируется в этот charset !content-type.charset не влияет на перекодирование !после имени части может идти целое число, части пойдут в порядке чисел. !если body указан строкой, то это текст письма, никаких вложений. !если body указан hash, то это части, будут собраны текстовые блоки, затем вложения !это старый формат, поддерживается для обратной совместимости !если имя части начинается со слова text, то это текстовый блок. !если имя части начинается со слова file, то это вложение, формат задания:: !$file[$.format[!uue|!base64] $.value[DATA] $.name[user-file-name]] !важно: при multipart не указывать content-type ^mail:send[ # по-умолчанию, совпадает с source encoding. # задаёт кодировку body $.charset[windows-1251] # нет умолчания $.content-type[$.value[text/plain] $.charset[windows-1251]] $.from["вася" ] $.to["петя" ] $.subject[пойдём пивка] $.body[ слова ] ] ^mail:send[ $.from["вася" ] $.to["петя" ] $.subject[пойдём пивка] $.body[ $.text[ # задаёт кодировку body $.charset[windows-1251] # нет умолчания $.content-type[$.value[text/plain] $.charset[windows-1251]] $.body[слова] ] #для удобства скриптования можно указать только одну часть, при этом не будет multipart $.file[ $.value[^file::load[my beloved.doc]] $.name[мой любимый.doc] $.format[base64] ] $.file2[ $.value[^file::load[my beloved.doc]] $.name[мой любимый.doc] ] ] ] !для отправки под unix используется программа с параметрами, задаваемая $MAIL.sendmail[команда] если не будет задана, проверяется, доступна ли /usr/sbin/sendmail или /usr/lib/sendmail и, если доступна, то запускается с параметром "-t". под win32 используется SMTP протокол, сервер задаётся $MAIL.SMTP[smtp.domain.ru] !image !$картинка[^image::measure[DATA]] смотрит на .ext case insensitive, умеет мерить пока только .gif и .jpg .jpeg !$картинка.exif << hash после measure jpeg с exif информацией !$image.exif.DateTime & co [полный список см. http://www.ba.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html] !числа типа int/double, !даты типа date !перечисления в виде hash с ключами 0..count-1 !$картинка.src .width .height !$картинка.line-width число=ширина линий !$картинка.line-style строка=стиль линий '*** * '='*** * *** * *** * ' !^картинка.html[[hash]] = !^image::load[фон.gif] только gif пока !^image::create(размер X;размер Y[;цвет фона default белый]]) !^картинка.line(x0;y0;x1;y1;0xffFFff) !^картинка.fill(x;y;0xffFFff) !^картинка.rectangle(x0;y0;x1;y1;0xffFFff) !^картинка.bar(x0;y0;x1;y1;0xffFFff) !^картинка.replace(hex-цвет1;hex-цвет2)[table x:y вершины_многоугольника] !^картинка.polyline+(цвет)[table x:y точки] !^картинка.polygon(цвет)[table x:y вершины_многоугольника] !^картинка.polybar(цвет)[table x;y вершины_многоугольника] !^картинка.font[набор_букв;имя_файла_шрифта.gif][(ширина_пробела[;ширина_символа])] высота символа = высота картинки/количество букв в наборе если указана ширина_символа, то monospaced, если 0, то ширина_символа = ширине gif !^картинка.font[набор_букв;имя_файла_шрифта.gif; $.space(ширина_пробела) // по умолчанию = ширине gif $.width(ширина_символа) // см. выше, по умолчанию proportional $.spacing(расстояние между буквами) // по умолчанию = 1 ] !^картинка.text(x;y)[текст_надписи] AS_IS !^картинка.length[текст_надписи] AS_IS !^картинка.gif[возможно, имя файла] -- кодирует в FILE с content-type=image/gif имя файла будет использовано при $response:download !^картинка.arc(center x;center y;width;height;start in degrees;end in degrees;color) !^картинка.sector(center x;center y;width;height;start in degrees;end in degrees;color) !^картинка.circle(center x;center y;r;color) !^картинка.copy[source](src x;src y;src w;src h;dst x;dst y[;dest w[;dest h[;tolerance]]]) при заданных dest_w/dest_h делает изменение размера кусочка при уменьшении делает resample годится только для уменьшения простой[малоцветной] дребедени вроде графиков/pie, для thumbnais не годится. при не указанном dest_h сохраняет aspect ratio tolerance - некое число[квадрат расстояния в RGB пространстве до искомого цвета], определяющее прожорливость выделялки цветов из палитры [default=150] меньше - точнее приближает цвета, но они быстро кончаются больше - неточно приближает цвет, но бОльшей части хватит !^картинка.pixel(x;y)[(color)] узнать или задать цвет пиксела !file !$файл_из_post.name !$файл_из_post.size !$файлtиз_post.text !^файл.save[text|binary;имя файла[;$.charset[в какой кодировке сохраняем]]] !^file:delete[имя файла] !^file:find[имя файла][{когда не нашли}] !^file:list[путь[;шаблон-строка|шаблон-regex]] = table с колонкой name !^file::load[text|binary;!big.zip[;!domain_press_release_2001_03_01.zip][;опции]] !^file::create[text|binary;имя;data] !^file::create[text|binary;имя;data[;$.charset[кодировка букв в создаваемом файле] $.content-type[...]]] !^file::create[string-or-file-content[;$.name[имя] $.mode[text|binary] $.content-type[...] $.charset[...]]] !$файл_который_был_loaded.size !$файл_который_был_loaded_или_created.mode = text/binary !^file::stat[имя файла] !$файл_который_был_stated_или_loaded.size !.adate !.mdate !.cdate !^file::cgi[[text|binary;]имя файла[;env hash +options[;1cmd[;2line[;3ar[;4g[;5s]]]]]]] возвращённый заголовок рассыпается на $поля $status $stderr !^file::exec[[text|binary;]имя файла[;env hash[;1cmd[;2line[;3ar[;4g[;5s;...under unix max 50 args]]]]]]] options: $.stdin[текст] если текст пуст, отключается автоматическое пересовывание данных HTTP-POST !^file:move[старое имя файла;новое имя файла] можно переименовывать и двигать каталоги[win32: но не через границу дисков] каталоги для dest создаются с правами 775 каталог старого файла стирается, если после move он остаётся пуст !^file:copy[имя файла;имя копии файла] можно копировать только файлы !^file:lock[имя файла]{код} файл при необходимости создаётся блокируется выполняется код разблокируется Xchmod[...] НЕТ И НЕ БУДЕТ, ЧТОБЫ НЕ МОГЛИ СДЕЛАТЬ executable и запустить, даже если ftp запрещает chmod. !^file:dirname[/a/some.tar.gz]=/a (работает аналогично комманде *nix) !^file:dirname[/a/b/]=/a (работает аналогично комманде *nix) !^file:basename[/a/some.tar.gz]=some.tar.gz (работает аналогично комманде *nix) !^file:basename[/a/b/]=b (работает аналогично комманде *nix) !^file:justname[/a/some.tar.gz]=some.tar !^file:justext[/a/some.tar.gz]=gz !/some/page.html: ^file:fullpath[a.gif] => /some/a.gif !^файл.sql-string[] внутри ^connect даст правильно escaped строку, которую можно в запрос отдать X^file::sql[[имя_файла_для_download]]{query} !^file::sql{query}[[ $.name[имя_файла_для_download] $.content-type[пользовательский content-type] ]] результат запроса должен быть "одна строка". колонки: первая колонка - данные если есть вторая - это имя файла если есть третья - это content-type !^файл.base64[] encode !^file:base64[имя файла] encode !^file::base64[encoded string] !^file::base64[mode;имя файла;encoded string[;$.content-type[...]]] decode !^file:crc32[имя файла] вычисляет crc32 файла с указанным именем !^файл.crc32[] вычисляет crc32 объекта !^файл.md5[] !^file:md5[имя файла] выдает digest файла, длиной 16 байт в виде строки, где байты digest выданы в hex виде, впритык, в нижнем регистре !math !$math:PI !^math:round floor ceiling !^math:trunc frac !^math:abs sign !^math:exp log !^math:sin asin cos acos tan atan !^math:degrees radians !^math:pow sqrt !^math:random(ширина диапазона) !^math:uuid[] 22C0983C-E26E-4169-BD07-77ECE9405BA5 win32: пользуется cryptapi unix: пользуется /dev/urandom, если нет, /dev/random, если нет, rand [на solaris /dev/random можно добавить] !^math:uid64[] BA39BAB6340BE370 !^math:md5[string] выдает digest строки, длиной 16 байт в виде строки, где байты digest выданы в hex виде, впритык, в нижнем регистре !^math:crypt[password;salt] salt prefix $apr1$ вызывает встроенный MD5 алгоритм, если нет тела salt, оно создаётся случайным $1$ вызывает MD5 алгоритм функции OS 'crypt', если поддерживается [заведомо нет на solaris]. другие salt читайте документацию по функции OS 'crypt'. !^math:crc32[string] вычисляет crc32 строки !^math:sha1[string] !^math:convert[number](base-from;base-to) преобразует строку с числом из одной системы исчисления в другую !inet !^inet:ntoa(long) !^inet:aton[IP] !json !^json:parse[-json-строка-[; $.depth(максимальная глубина, default == 19) $.double(false) отключить встроенный парсинг чисел с плавающей точкой (по умолчанию включен) в этом случае они попадут в результирующий объект как строки $.distinct[first|last|all] как будет происходить разбор дублирующихся ключей у объектов first -- будет оставлен первый встретившийся элемент last -- будет оставлен последний встретившийся элемент all -- будут оставлены все элементы. при этом элементы, начиная со 2 получат числовые суффиксы (key_2 итд) по умолчанию дублирующиеся ключи приведут к exception $.object[method-junction] пользовательский метод[ключ;объект], которому будут передаваться все разобранные объекты и ключи объекта, метод возвращает новый объект $.array[method-junction] пользовательский метод, которому будут передаваться массивы ]] парсит json-строку в хэш !^json:string[system or user object[; $.skip-unknown(false) отключить exception и выдавать 'null' при сериализации объектов с типами отличных от void, bool, string, int, double, date, table, hash и file $.indent(true) форматировать результирующую строку табуляциями по глубине вложенности $.date[sql-string|gmt-string|unix-timestamp] формат вывода даты, по умолчанию -- sql-string $.table[object|array|compact] формат вывода таблицы, по умолчанию -- object object: [{"c1":"v11","c2":"v12",...},{"c1":"v21","c2":"v22",...},...] array: [["c1","c2",...] || null (for nameless),["v11","v12",...],...] compact: ["v11" || ["v11","v12",...],...] $.file[text|base64|stat] вывести тело файла в указанном виде (по умолчание тело файла не попадает в output) $.xdoc[hash] параметры преобразования xdoc в строку (как в ^xdoc.string[]) $.тип[method-junction] любой тип можно вывести с помощью пользовательского метода, который должен принимать 3 параметра: ключ, объект данного типа и опции вызова ^json:string[] ]] сериализует системный или пользовательский объект в json-строку !date !время типа time можно использовать в выражениях, подставляет количество дней с epoch [1 января 1970 (UTC)], дробное !всё происходит в localtime, !временная зона задаётся вне parser средствами OS $date:UTC-offset сколько дней надо прибавить,чтобы попасть в local время $date:TZ наш часовой пояс, дробное, в часах (где-то есть с точностью до получаса) !^date::now[] !^date::now(смещение в днях) выдаёт сейчас+смещение !^date::today[] дата на 00:00:00 текущего дня !^date::create(дней с epoch) // старое имя set !^date::create(year;month[;day[;hour[;minute[;second]]]]) // старое имя set !^date::create[дата в формате %Y-%m-%d %H:%M:%S] для удобного создания по значению из базы формат1: %Y[-%m[-%d[ %H[:%M[:%S]]]]] формат2: %H:%M[:%S] !^date::unix-timestamp() !^дата.unix-timestamp[] !$дата.year month day hour minute second weekday yearday(0...) daylightsaving TZ weekyear read-only TZ="" << локальная зона !^дата.roll[year|month|day](+-смещение) сдвигает дату !^дата.roll[TZ;Новая зона] говорит, что дата в таком-то часовом поясе: влияет на .hour & Co !^дата.sql-string[[datetime|date|time]] datetime или без параметра -- %Y-%m-%d %H:%M:%S date -- %Y-%m-%d time -- %H:%M:%S where published='^дата.sql-string[]' !^date:calendar[rus|eng](год;месяц) выдаёт неименованную таблицу столбцы: 0..6, week, year !^date:calendar[rus|eng](год;месяц;день) выдаёт именнованную таблицу столбцы: year, month, day, weekday !^date:last-day(год;месяц) вернёт последний день месяца !^дата.last-day[] вернёт последний день месяца $дата !^дата.gmt-string[] Fri, 23 Mar 2001 09:32:23 GMT xdoc(xnode) !$xdoc.search-namespaces hash, where keys=prefixes, values=urls DOM1 attributes: !readonly attribute DocumentType doctype Xreadonly attribute DOMImplementation implementation !readonly attribute Element documentElement DOM1 methods: !Element createElement(in DOMString tagName) !DocumentFragment createDocumentFragment() !Text createTextNode(in DOMString data) !Comment createComment(in DOMString data) !CDATASection createCDATASection(in DOMString data) !ProcessingInstruction createProcessingInstruction(in DOMString target,in DOMString data) !Attr createAttribute(in DOMString name) !EntityReference createEntityReference(in DOMString name) !NodeList getElementsByTagName(in DOMString tagname) DOM2 some methods: !^.getElementById[elementId] = xnode The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null. !кодировка строк и умолчание для $.encoding !равно текущей кодировке выходной страницы, $response:charset ::sql{...} !::create[[URI]]{} старое имя 'set' !::create[[URI]][qualifiedName] URI default = disk path to requested document для каталогов конечный / обязателен !::create[file] can be usable: $f[^file::load[binary;http://;some HTTP options here...]] $x[^xdoc::create[$f]] !::load[file.xml[;опции]] !.transform[rules.xsl|xdoc][[params hash]] выдаёт dom шаблон кэшируется, кэш обновляется при изменении даты файла шаблона, или изменении даты файла "имя шаблона.stamp"[проверка даты stamp приоритетнее] !параметры передаются как есть, не xpath выражения !.string[[output options]] !.save[file.xml[;output options]] с шапкой !.file[[output options]] = file output options идентичны атрибутам xsl:output [исключение: игнорируется cdata-section-elements, нужно будет, сделаю] выдаёт media-type при подстановке $response:body[сюда] !если на документ ссылаются так: parser://method/param/to/that/method то в качестве документа используется ^MAIN:method[/param/to/that/method] [примечание: в параметр всегда приходит лидирующая /, даже, если параметров вообще не было] !xnode DOM1 attributes: !$node.nodeName !$node.nodeValue !read !write !$node.nodeType = int ELEMENT_NODE = 1 ATTRIBUTE_NODE = 2 TEXT_NODE = 3 CDATA_SECTION_NODE = 4 ENTITY_REFERENCE_NODE = 5 ENTITY_NODE = 6 PROCESSING_INSTRUCTION_NODE = 7 COMMENT_NODE = 8 DOCUMENT_NODE = 9 DOCUMENT_TYPE_NODE = 10 DOCUMENT_FRAGMENT_NODE = 11 NOTATION_NODE = 12 $vasyaNode.type==$xnode:ELEMENT_NODE !$node.parentNode !$node.childNodes = array of nodes !$node.firstChild !$node.lastChild !$node.previousSibling !$node.nextSibling !$node.ownerDocument = xdoc !$node.prefix !$node.namespaceURI !$element_node.attributes = hash of xnodes !$element_node.tagName !$attribute_node.specified = boolean true if the attribute received its value explicitly in the XML document, or if a value was assigned programatically with the setValue function. false if the attribute value came from the default value declared in the document's DTD. !$attribute_node.name !$attribute_node.value $text_node/cdata_node/comment_node.substringData !$pi_node.target = target of this processing instruction XML defines this as being the first token following the markup that begins the processing instruction. !$pi_node.data = The content of this processing instruction This is from the first non white space character after the target to the character immediately preceding the ?>. document_node. readonly attribute DocumentType doctype readonly attribute DOMImplementation implementation readonly attribute Element documentElement document_type_node. !readonly attribute DOMString name readonly attribute NamedNodeMap entities readonly attribute NamedNodeMap notations !notation_node. !readonly attribute DOMString publicId !readonly attribute DOMString systemId !DOM1 node methods: !Node insertBefore(in Node newChild,in Node refChild) !Node replaceChild(in Node newChild,in Node oldChild) !Node removeChild(in Node oldChild) !Node appendChild(in Node newChild) !boolean hasChildNodes() !Node cloneNode(in boolean deep) !DOM1 element methods: !DOMString getAttribute(in DOMString name) !void setAttribute(in DOMString name, in DOMString value) raises(DOMException) !void removeAttribute(in DOMString name) raises(DOMException) !Attr getAttributeNode(in DOMString name) !Attr setAttributeNode(in Attr newAttr) raises(DOMException) !Attr removeAttributeNode(in Attr oldAttr) raises(DOMException) !NodeList getElementsByTagName(in DOMString name) !void normalize() !Introduced in DOM Level 2: !Node importNode(in Node importedNode, in boolean deep) raises(DOMException) !NodeList getElementsByTagNameNS(in DOMString namespaceURI, in DOMString localName) !boolean hasAttributes() !XPath: !^node.select[xpath/query/expression] = array of nodes, empty array if nothing found !^node.selectSingle[xpath/query/expression] = first node if any !^node.selectBool[xpath/query/expression] = bool if any or die !^node.selectNumber[xpath/query/expression] = double if any or die !^node.selectString[xpath/query/expression] = string if any or die !error codes(пока придут как текст в случае соответствующих ошибок): INDEX_SIZE_ERR If index or size is negative, or greater than the allowed value DOMSTRING_SIZE_ERR If the specified range of text does not fit into a DOMString HIERARCHY_REQUEST_ERR If any node is inserted somewhere it doesn't belong WRONG_DOCUMENT_ERR If a node is used in a different document than the one that created it (that doesn't support it) INVALID_CHARACTER_ERR If an invalid character is specified, such as in a name. NO_DATA_ALLOWED_ERR If data is specified for a node which does not support data NO_MODIFICATION_ALLOWED_ERR If an attempt is made to modify an object where modifications are not allowed NOT_FOUND_ERR If an attempt was made to reference a node in a context where it does not exist NOT_SUPPORTED_ERR If the implementation does not support the type of object requested INUSE_ATTRIBUTE_ERR If an attempt is made to add an attribute that is already inuse elsewhere !memory !^memory:compact[] собрать мусор, освободив место под новые данные (предупреждение: память процесса никогда не освобождается) полезно делать перед XSL transform. !status !чтобы класс был доступен, в apache нужно сказать ParserStatusAllowed !в cgi доступен везде !в isapi не доступен нигде !$status:sql hash !cache table url time url time url time !$status:stylesheet !cache table file time file time file time !$status:rusage hash !utime user time used !stime system time used !maxrss max resident set size !ixrss integral shared text memory size !idrss integral unshared data size !isrss integral unshared stack size !tv_sec !tv_usec $s[$status:rusage] ^s.tv_sec.format[%.0f].^s.tv_usec.format[%06.0f] !$status:memory hash !used Includes some pages that were allocated but never written. !free !ever_allocated_since_compact Return the number of bytes allocated since the last collection. !ever_allocated_since_start Return the total number of bytes [EVER(c)PAF] allocated in this process. Never decreases. !$status:pid process id !$status:tid thread id console $console:timeout !$console:line read/write строку DATA::=string | file | hash !hash вида [ $.file[имя файла на диске] $.name[имя файла для пользователя] $.mdate[date] ] !MAIN это класс, загружаемый на автомате из конфигурационного auto.p, кучи auto.p и запрашиваемого документа: !конфигурационный auto.p cgi: 1. или полный путь из переменной окружения CGI_PARSER_SITE_CONFIG или рядом с бинарником parser'а isapi: windows directory apache module: 1) ParserConfig [can be in .htaccess] !auto.p вниз от DOCUMENT_ROOT/ по дереву до каталога с обрабатываемым файлом включительно класс собирается из всех этих файлов, последующие становятся родителями предыдущих имя последнего загруженного MAIN, имён у предыдущих нет !после загрузки MAIN класса вызывается его @main[] !результат которого передаётся в его @postprocess[data] if($data is string) ... !результат которого отдаётся пользователю !если встречается ошибка и try не задан, её можно красиво сообщить пользователю, !определив !@unhandled_exception[exception;stack] !$exception.type строка "тип проблемы" !$exception.file $exception.lineno $exception.colno файл, строка и позиция, где случилась проблема [если не запрещены при компиляции] !$exception.source строка, из-за которой случилась проблема !$exception.comment комментарий english !stack табличка из колонок file line name, там лежат в обратном порядке имена[name] и места вызовов[file line] операторов/методов, приведших к ошибке. !при загрузке файла (file::load, table::load, xdoc::load) можно указать такое имя файла: !http://domain/document[?params<> создает http.status ошибку, !это можно отключить, передав !$.any-status(1) !$.charset[кодировка удалённых докуметов по-умолчанию] << если сервер вернёт content-type:charset=ОНА_ПЕРЕБИВАЕТ !$.user[пользователь] !$.password[пароль] !file::load в дополнительные поля записывает !ПОЛЕ:значение (имена полей ответа заглавными буквами) !tables << хеш их ПОЛЕ->table с единственным столбцом "value". в таких таблицах можно брать повторяющиеся заголовки. например, несколько set-cookies todo:сделать отдельный cookies !системные типы ошибок: !parser.compile ^test[} компиляция (непарная скобка, ...) !parser.runtime ^if(0). параметры (больше/меньше, чем нужно, не тех типов, ...) !number.zerodivision ^eval(1/0) ^eval(1%0) !number.format ^eval(abc*5) !file.lock shared/exclusive lock error !file.missing ^file:delete[delme] not found !file.access ^table::load[.] no rights !file.read ^file::load[...] error while reading file !file.seek seek failed !file.execute ^file::cgi[...] incorrect cgi header/can't execute !image.format ^image::measure[index.html] not gif/jpg !sql.connect ^connect[mysql://baduser:pass@host/db]{} not found/timeout !sql.execute ^void:sql{select bad} syntax error sql.duplicate sql.access sql.missing sql.xxx [serge asked] !xml ^xdoc::create{} any error in xml/xslt libs !smtp.connect not found/timeout !smtp.execute communication error !email.format hren tam@null.ru wrong email format(bad chars/empty) !email.send $MAIL.sendmail[/shit] sendmail not executable !http.host ^file::load[http://notfound/there] host not found !http.connect ^file::load[http://not_accepting/there] host found, but do not accept connections !http.timeout ^file::load[http://host/doc] whole load operation failed to complete in # seconds !http.response ^file::load[http://ok/there] host found, connection accepted, bad answer !http.status ^file::load[http://ok/there] host found, connection accepted, status!=200 !date.range ^date::create(1950;1;1) date out of valid range !нужно выключить русский apache: CharsetDisable on Xесли в MAIN будет определён флаг $ORIGINS(1) то вместо обычного вывода страницы будет выдан список фрагментов результата с указанием их происхождения !если в MAIN определён $SIGPIPE(1) то в случае, если обработка была прервана пользователем, сообщение об этом будет записано в parser3.log (раньше оно всегда писалось) !если описание метода содержит локальную переменную result в явном виде (есть и неявная переменная) то код вывода строковых литералов не попадает в конечный байт-код, а непробельные символы считаются синтаксической ошибкой для вывода чего бы то ни было надо пользоваться этой переменной debian/TODO.Debian0000644000000000000000000000027612263210727011046 0ustar System-wide configuration: ? alike php: /etc/parser3//auto.p ? common for all SAPI ? howto handle system-wide auto.p with suexec (can't SetEnv) Misc: ? build safe-mode cgi/cli binary debian/watch0000644000000000000000000000031012263210727010213 0ustar # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 # http://www.parser.ru/download/src/ \ /off-line/download/src/parser-([0-9.]+)\.tar\.gz debian/libapache2-mod-parser3.apache20000644000000000000000000000010412263210727014534 0ustar mod src/targets/apache/.libs/mod_parser3.so mod debian/parser3.load debian/parser3.10000644000000000000000000000305412263210727010633 0ustar .\" -*- nroff -*- .TH PARSER 1 "Scripting Language" .SH NAME parser3 \- Command Line and CGI interface for Parser 3 Language. .SH SYNOPSIS .B parser3 .RI [\fB\-h\fP] [\fB\-c\fP \fIconffile\fP] \fIfile\fR .br .SH DESCRIPTION Parse and execute \fIfile\fR in Parser 3 language. Parser checks for configuration settings in the \fIauto.p\fR file beside of the binary (in the directory with CGI-script itself) and then in the default system-wide \fIauto.p\fR file, if neither option \-c or environment variable CGI_PARSER_CONFIG is specified. Parser makes records about errors to error log file parser3.log, which is implicitly located in the same directory where parser3 CGI script is. If Parser is not allowed to write to that file, errors are reported to standard error stream. .SH OPTIONS A summary of options is included below. .TP .B \-h Display usage information. .TP .B \fB\-c\fR \fIconffile\fR Use this \fIconffile\fR (/path/to/auto.p). .SH ENVIRONMENT VARIABLES Parser3 checks environment variable CGI_PARSER_CONFIG if option \-c is not specified. If you would rather change implicit location of parser3.log, you can explicitly specify it via stderr redirection or environment variable CGI_PARSER_LOG. .SH FILES .TP .B /etc/parser3/auto.p default \fBparser3\fP configuration file .SH SEE ALSO For more complete description of Parser3, look here: http://www.parser.ru/en/ .SH AUTHOR parser3 was written by Alexandr Petrosian . .PP This manual page was written by Sergey B Kirpichev , for the Debian project (but may be used by others). debian/parser3-dev.install0000644000000000000000000000002612263210727012711 0ustar usr/include/parser3/* debian/libapache2-mod-parser3.links0000644000000000000000000000010212263210727014347 0ustar usr/share/doc/parser3-common usr/share/doc/libapache2-mod-parser3 debian/parser3-cgi.manpages0000644000000000000000000000002112263210727013015 0ustar debian/parser3.1 debian/changelog0000644000000000000000000001726212263210727011052 0ustar parser (3.4.3-2) unstable; urgency=low * Fix lintian error: vcs-field-not-canonical * Drop 108_libxml2_new_buffer_fix.patch * Bump up Standards-Version (to 3.9.5) -- Sergey B Kirpichev Wed, 08 Jan 2014 12:52:22 +0400 parser (3.4.3-1) unstable; urgency=low * Fix mod_parser3.so path * Reformat maintainer scripts * Don't restart apache2 if it's configuration is broken (LP: #1160836) * Imported Upstream version 3.4.3 (Closes: #692628 and LP: #1184257) * Refresh patches, drop patch 117 (applied by upstream) * Correct lib/json copyright info * Update copyright dates * Fix spelling (patch 109) -- Sergey B Kirpichev Tue, 05 Nov 2013 22:00:46 +0400 parser (3.4.2-7) unstable; urgency=low * Repackage from experimental to sid (Closes: #709470) -- Sergey B Kirpichev Sun, 16 Jun 2013 15:26:02 +0400 parser (3.4.2-6) experimental; urgency=low * Refresh patches -- Sergey B Kirpichev Wed, 29 May 2013 19:40:22 +0400 parser (3.4.2-5) unstable; urgency=low * LIBXML2_NEW_BUFFER API changes in patch 108 (from Ubuntu) to fix FTBFS with newer libxml2 -- Sergey B Kirpichev Fri, 22 Feb 2013 19:49:43 +0400 parser (3.4.2-4) unstable; urgency=low * Removed duplicate field copyright (fix lintian) * Drop DMUA, fix lintian warning * Bump up Standards-Version (to 3.9.4) * Use autotools-dev helpers to update config.guess/config.sub (fix lintian warning: outdated-autotools-helper-file) -- Sergey B Kirpichev Thu, 27 Dec 2012 18:59:50 +0400 parser (3.4.2-3) unstable; urgency=low * Remove duplicated Copyright fields from debian/copyright (fix lintian W) * Document non-free license for json (see #692628) -- Sergey B Kirpichev Tue, 11 Dec 2012 18:02:03 +0400 parser (3.4.2-2) unstable; urgency=low * Add -D_LARGEFILE64_SOURCE to fix FTBS of apache2 module for i386 * Drop quilt deps * Add versioned deps on g++ -- Sergey B Kirpichev Thu, 28 Jun 2012 15:49:47 +0400 parser (3.4.2-1) unstable; urgency=low * Imported Upstream version 3.4.2 * Adopt changes by Konstantin Morshnev for 3.4.2 * Change Build-Depends: - add g++, libltdl-dev - drop automake1.9, apache2-threaded-dev * Fix auto.p.dist installation * Fix mod_parser3.so path * Drop unused override's * Drop --disable-version-update option * Update debian/operators.ru.txt -- Sergey B Kirpichev Thu, 28 Jun 2012 13:34:19 +0400 parser (3.4.1-7) unstable; urgency=low * Added patch 115 to call pa_setup_module_cells() while real request handling. * Fix syntax error for debian/copyright * Fix FTBFS: multiarch path for xml lib (Closes: #672054) * Refresh 199_reconfigure.patch * Change dh compat to 9, enable hardening support * Drop custom CFLAGS, LDFLAGS in debian/rules * Add -fPIC to CFLAGS/CXXFLAGS -- Sergey B Kirpichev Fri, 01 Jun 2012 15:58:59 +0400 parser (3.4.1-6) experimental; urgency=low * Added patch 115 to call pa_setup_module_cells() while real request handling. * Fix FTBFS: multiarch path for xml lib (Closes: #672054) * Fix build errors for apache 2.4 * Drop workaround for #666875 -- Sergey B Kirpichev Mon, 14 May 2012 17:39:07 +0400 parser (3.4.1-5) experimental; urgency=low * Update Build-Depends and Depends for Apache 2.4 * Switch to dh_apache2 (Closes: #666798) * Override dh_fixperms for #666875 * Fix syntax error for debian/copyright -- Sergey B Kirpichev Sat, 07 Apr 2012 19:04:15 +0400 parser (3.4.1-4) unstable; urgency=low * Reformat debian/copyright according to accepted DEP5 spec * Bump up Standards-Version to 3.9.3 (no changes) -- Sergey B Kirpichev Mon, 05 Mar 2012 15:29:17 +0400 parser (3.4.1-3) unstable; urgency=low * Added dependence on apache2.2-common for libapache2-mod-parser3 (fix puiparts installation error) * Fixed desc for libapache2-mod-parser3 -- Sergey B Kirpichev Sat, 26 Nov 2011 20:45:02 +0400 parser (3.4.1-2) unstable; urgency=low * Remove /etc/patser3/apache2/auto.p from CGI SAPI package (Closes: #649870) -- Sergey B Kirpichev Thu, 24 Nov 2011 23:56:32 +0400 parser (3.4.1-1) unstable; urgency=low * Create default constructor for VVoid to make compiler happy (with - fpermissive). Closes: #625021. * Bump up Standards-Version to 3.9.2. * Added (tmp) override for embedded-library ltdl * Removed obsoleted overrides cannot-check-whether-usr-share-doc- symlink-points-to-foreign-package * Imported Upstream version 3.4.1 * Refresh patches for 3.4.1 version * Update debian/operators.ru.txt * Build with Apache2 shared module * Cleanup debian/rules * Patch to build both CGI & Apache2 SAPI for --with-apache * Install auto.p in /etc/parser3/apache2/ for Apache2 SAPI * Install parser3.load for apache2 module * Fix apache.conf for apache2 module * Clarify installation procedure for different SAPI * Added postinst/prerm scripts for libapache2-mod-parser3 package -- Sergey B Kirpichev Sun, 20 Nov 2011 20:42:41 +0400 parser (3.4.0-4) unstable; urgency=low * Refresh patches with --no-index --no-timestamps -pab --diffstat * Update ltconfig & ltmain.sh to make lintian happy * Use tiny debian/rules, bump up debhelper compat level * Create links for docs (to parser3-common) * Add lintian overrides for cannot-check-whether-usr-share-doc- symlink-points-to-foreign-package (/usr/share/doc/ -> parser3-common) -- Sergey B Kirpichev Sat, 19 Mar 2011 01:10:14 +0300 parser (3.4.0-3) unstable; urgency=low * Bump up Standards-Version * Add hints to enable mod_actions in doc * Use versioned LGPL license file in debian/copyright * Added "DM-Upload-Allowed: yes" control field -- Sergey B Kirpichev Fri, 04 Mar 2011 14:40:59 +0300 parser (3.4.0-2) unstable; urgency=low * Add ${misc:Depends} for parser3. * Use "3.0 (quilt)" package format. * Update format of debian/copyright, copyright years. * Bump Standards-Version to 3.8.4. * Patch embedded copy ltdl.c from upstream branch-1-5 (CVE-2009-3736). Closes: #559837. * Use automake-1.9 for 199 patch (Closes: #560608). -- Sergey B Kirpichev Wed, 19 May 2010 21:20:06 +0400 parser (3.4.0-1) unstable; urgency=low * New Upstream Version. * Update patchset for 3.4.0. * Drop patches: 106,108,109. * Cleanup obsolete notes in README.Debian. * Add notes for quilt in debian/README.source. -- Sergey B Kirpichev Thu, 19 Nov 2009 01:42:28 +0300 parser (3.3.0-9) unstable; urgency=low * Bump up Standards-Version (3.8.3) -- Sergey B Kirpichev Tue, 01 Sep 2009 18:07:26 +0400 parser (3.3.0-8) unstable; urgency=low * Fix trim for utf8 strings. * Include all ^trim tests (works in utf8 now). * Fix desc for 109 patch. * Update config.{sub,guess} files (Closes: #535725). * Standards-Version -> 3.8.2 -- Sergey B Kirpichev Sun, 23 Aug 2009 12:08:23 +0400 parser (3.3.0-7) unstable; urgency=low * Use symlink for doc/ in parser3 metapackage. * Cleanup pcre defines (only really required internal stuff). * Fix desc for patch 107. * Merge amd64 fixes from release_3_3_0 branch. * Fix comment for patch 107. -- Sergey B Kirpichev Sat, 06 Jun 2009 13:23:28 +0400 parser (3.3.0-6) unstable; urgency=low * Initial release (Closes: #519574). -- Sergey B Kirpichev Fri, 13 Mar 2009 19:30:45 +0300 debian/patches/0000755000000000000000000000000012263210727010617 5ustar debian/patches/109_spelling.patch0000644000000000000000000000100512263210727014042 0ustar Description: Spelling fixes Author: Sergey B Kirpichev Forwarded: yes --- src/main/pa_globals.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/src/main/pa_globals.C +++ b/src/main/pa_globals.C @@ -306,7 +306,7 @@ void pa_dlinit() { if(!is_dlinited){ if(lt_dlinit()) - throw Exception(0,0,"prepare to dynamic libary loading failed, %s", lt_dlerror()); + throw Exception(0,0,"prepare to dynamic library loading failed, %s", lt_dlerror()); is_dlinited=true; } } debian/patches/103_auto_p.patch0000644000000000000000000000111712263210727013512 0ustar Description: Set Debian-specific defaults for system-wide parser3 config. Author: Sergey B Kirpichev --- bin/auto.p.dist.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/bin/auto.p.dist.in +++ b/bin/auto.p.dist.in @@ -1,9 +1,9 @@ #$Id: auto.p.dist.in,v 1.19 2013/10/19 11:34:33 misha Exp $ @conf[filespec] -$confdir[^file:dirname[$filespec]] -$charsetsdir[$confdir/charsets] -$sqldriversdir[$confdir/lib] +$confdir[@sysconfdir@] +$charsetsdir[@datadir@/charsets] +$sqldriversdir[@libdir@] $CHARSETS[ # $.cp866[$charsetsdir/cp866.cfg] debian/patches/107_config_path.patch0000644000000000000000000000215612263210727014514 0ustar Description: Search for configuration file in PARSER_CONFIG_DIR Author: Sergey B Kirpichev PARSER_CONFIG_DIR=/etc/parser3/ Search priority: 1. Command-line option -c 2. Environment variable CGI_PARSER_CONFIG 3. In the directory with CGI-script itself 4. Default location PARSER_CONFIG_DIR "/" AUTO_FILE_NAME --- src/targets/cgi/parser3.C | 3 +++ 1 file changed, 3 insertions(+) --- a/src/targets/cgi/parser3.C +++ b/src/targets/cgi/parser3.C @@ -39,6 +39,7 @@ #define REDIRECT_PREFIX "REDIRECT_" #define PARSER_CONFIG_ENV_NAME "CGI_PARSER_CONFIG" #define PARSER_LOG_ENV_NAME "CGI_PARSER_LOG" +#define PARSER_CONFIG_DIR "/etc/parser3" /// IIS refuses to read bigger chunks const size_t READ_POST_CHUNK_SIZE=0x400*0x400; // 1M @@ -539,6 +540,8 @@ "%s/%s", beside_binary_path, AUTO_FILE_NAME); config_filespec_cstr=config_filespec_buf; + if (!entry_exists(config_filespec_cstr)) // default system-wide... + config_filespec_cstr=PARSER_CONFIG_DIR "/" AUTO_FILE_NAME; fail_on_config_read_problem=entry_exists(config_filespec_cstr); } } debian/patches/series0000644000000000000000000000007212263210727012033 0ustar 103_auto_p.patch 107_config_path.patch 109_spelling.patch debian/examples/0000755000000000000000000000000012263210727011006 5ustar debian/examples/index.ru.html0000644000000000000000000010700512263210727013433 0ustar # Для того, чтобы данный тест заработал, в качестве обработчика документов с данным расширением должен быть установлен parser3, чего сейчас не наблюдается. # debian/examples/apache.conf0000644000000000000000000000223312263210727013076 0ustar # Deny access to .p files, mainly: auto.p Order allow,deny Deny from all # Override location of the configuration file: # This will NOT work for suexec-enabled setups, just copy # /etc/parser3/auto.p to your web directory tree and # modify as you wish... SetEnv CGI_PARSER_CONFIG "/etc/parser3/auto.p" # For server module SAPI: ParserConfig "/etc/parser3/apache2/auto.p" # Parser makes records about errors to error log file # parser3.log, which is implicitly located in the same directory # where parser3 CGI script is. If Parser is not allowed to write to # that file, errors are reported to standard error stream and are # recorded in web-server error log file. If you would rather change # implicit location of parser3.log, you can explicitly specify it. #SetEnv CGI_PARSER_LOG /path/to/file/parser3.log # Set up cgi-handler (remember to enable mod_actions before!), if there is no # apache module: Action parser3-handler /cgi-bin/parser3 Action parser3-cgi-handler /cgi-bin/parser3 debian/examples/index.en.html0000644000000000000000000006304012263210727013407 0ustar # To make this test work, Parser should be made a processor of documents with this extention, what now is not observed. # debian/parser3-dev.dirs0000644000000000000000000000002412263210727012202 0ustar usr/include/parser3 debian/parser3-cgi.dirs0000644000000000000000000000003012263210727012163 0ustar usr/bin usr/lib/cgi-bin debian/parser3-common.docs0000644000000000000000000000011212263210727012701 0ustar NEWS README debian/operators.ru.txt debian/examples/ debian/README.Debian debian/README.source0000644000000000000000000000076312263210727011355 0ustar Misc hints for Debian source package. UTF-ize operators.txt: iconv -f cp1251 -t utf8 ../operators.txt > operators.ru.txt index*.html files are examples from: http://www.parser.ru/off-line/download/utils/parser3test_russian.zip http://www.parser.ru/off-line/download/utils/parser3test_english.zip UTF-ize them: iconv -f cp1251 -t uft8 _test.html |sed 's/ $//' > index.en.html This package uses quilt for its patch management, see /usr/share/doc/quilt/README.source if you are unfamiliar with it. debian/parser3-common.install0000644000000000000000000000003512263210727013423 0ustar usr/share/parser3/charsets/* debian/rules0000755000000000000000000000155612263210727010257 0ustar #!/usr/bin/make -f export DEB_CFLAGS_MAINT_APPEND=-D_LARGEFILE64_SOURCE %: dh $@ --with autotools_dev --with apache2 override_dh_auto_configure: dh_auto_configure -- \ --prefix=/usr \ --sysconfdir=/etc/parser3 \ --datadir=/usr/share/parser3 \ --libdir=/usr/lib/parser3 \ --includedir=/usr/include/parser3 \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-safe-mode \ --with-xml \ --with-apache \ --with-pic override_dh_auto_install: dh_auto_install mkdir -p debian/tmp/etc/parser3/ mv debian/tmp/usr/bin/auto.p.dist \ debian/tmp/etc/parser3/auto.p mkdir debian/tmp/etc/parser3/apache2 ; cp debian/tmp/etc/parser3/auto.p \ debian/tmp/etc/parser3/apache2/auto.p override_dh_link: for package in parser3 parser3-cgi parser3-dev libapache2-mod-parser3; do \ rm -rf debian/$$package/usr/share/doc/$$package; \ done dh_link debian/parser3-dev.links0000644000000000000000000000006712263210727012370 0ustar usr/share/doc/parser3-common usr/share/doc/parser3-dev debian/copyright0000644000000000000000000003744112263210727011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Parser 3 Upstream-Contact: Art Lebedev Studio Source: http://www.parser.ru/en/download/src/ Files: * Copyright: 2001-2013, ArtLebedev Group (http://www.artlebedev.com) License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian GNU/Linux systems, the complete text of the GNU General Public License (GPL) version 2 can be found at /usr/share/common-licenses/GPL-2. Files: install-sh src/lib/ltdl/install-sh Copyright: 1991, the Massachusetts Institute of Technology License: other Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Files: src/lib/cord/*.c src/lib/cord/include/*.h src/lib/cord/include/private/cord_pos.h Copyright: 1993-1994, Xerox Corporation License: other THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. . Permission is hereby granted to use or copy this program for any purpose, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. Files: src/lib/gc/include/gc.h Copyright: 1988-1989, Hans-J. Boehm 1988-1989, Alan J. Demers 1991-1995, Xerox Corporation 1996-1999, Silicon Graphics 1999, Hewlett-Packard Company License: other THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. . Permission is hereby granted to use or copy this program for any purpose, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. Files: src/lib/gd/gif.h src/lib/gd/*.C Copyright: 2001-2005, ArtLebedev Group (http://www.artlebedev.com) 1994, Cold Spring Harbor Labs License: other Permission granted to use this code in any fashion provided that this notice is retained and any alterations are labeled as such. It is requested, but not required, that you share extensions to this module with us so that we can incorporate them into new versions. Files: src/lib/ltdl/ltdl.[hc] Copyright: 1998-2000, Free Software Foundation, Inc. License: LGPL-2+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian GNU/Linux systems, the complete text of the GNU Lesser General Public License (GPL) can be found at /usr/share/common-licenses/LGPL-2. Files: src/lib/md5/*.[hc] Copyright: 2001-2005, ArtLebedev Group (http://www.artlebedev.com) 1991-1992, RSA Data Security, Inc. 1996-1999, The Apache Group License: other License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. . License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. . RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. . These notices must be retained in any copies of any part of this documentation and/or software. . Copyright (c) 1996-1999 The Apache Group. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)." . 4. The names "Apache Server" and "Apache Group" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. . 5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their names without prior written permission of the Apache Group. . 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)." . THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: src/lib/sdbm/*.[hcC] src/lib/sdbm/apr-include/*.h Copyright: 2000-2002, The Apache Software Foundation License: other The Apache Software License, Version 1.1 . Copyright (c) 2000-2002 The Apache Software Foundation. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. . 4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. . 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. . THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: src/main/pa_common.C Copyright: 2001-2005, ArtLebedev Group (http://www.artlebedev.com) 2000-2004, Ximian, Inc. (www.ximian.com) 2000, Helix Code, Inc. (www.helixcode.com) License: GPL-2+ On Debian GNU/Linux systems, the complete text of the GNU General Public License (GPL) version 2 can be found at /usr/share/common-licenses/GPL-2. Files: src/main/compile.tab.C Copyright: 1984, 1989-1990, 2000-2004, Free Software Foundation, Inc. License: GPL-2+ On Debian GNU/Linux systems, the complete text of the GNU General Public License (GPL) version 2 can be found at /usr/share/common-licenses/GPL-2. Files: src/include/pa_hash.h Copyright: 2001-2005, ArtLebedev Group (http://www.artlebedev.com) 1999-2000, Zend Technologies Ltd. License: other --------------------------------------------------------------------------- The Zend License, version 0.92 Copyright (C) 1999-2000 Zend Technologies Ltd. --------------------------------------------------------------------------- . The Zend scripting engine library is a product of Zend Technologies Ltd. It may be used and/or distributed under the terms of the Q Public License (QPL) version 1.0, enclosed below. . For more information about Zend please visit http://www.zend.com/ For license related questions please mail license@zend.com . =========================================================================== . THE Q PUBLIC LICENSE version 1.0 . Copyright (C) 1999 Troll Tech AS, Norway. Everyone is permitted to copy and distribute this license document. . The intent of this license is to establish freedom to share and change the software regulated by this license under the open source model. . This license applies to any software containing a notice placed by the copyright holder saying that it may be distributed under the terms of the Q Public License version 1.0. Such software is herein referred to as the Software. This license covers modification and distribution of the Software, use of third-party application programs based on the Software, and development of free software which uses the Software. . Granted Rights . 1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license. . 2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed. . 3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications: . a. Modifications must not alter or remove any copyright notices in the Software. . b. When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer. . 4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions: . a. You must include this license document in the distribution. . b. You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this. . c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license. . 5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others. . 6. You may develop application programs, reusable components and other software items that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements: . a. You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer. . b. You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose. . c. If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one. . Limitations of Liability . In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise. . . No Warranty . The Software and this license document are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. . =========================================================================== Files: src/classes/math.C Copyright: 1996, 1997, 1998, 1999 Theodore Ts'o. 2001-2005, ArtLebedev Group (http://www.artlebedev.com) License: GPL-2+ On Debian GNU/Linux systems, the complete text of the GNU General Public License (GPL) version 2 can be found at /usr/share/common-licenses/GPL-2. Files: src/lib/json/* Copyright: 2009-2011 Vincent Hanquez License: GPL-3 On Debian GNU/Linux systems, the complete text of the GNU General Public License (GPL) version 3 can be found at /usr/share/common-licenses/GPL-3. Files: debian/* Copyright: 2009-2013, Sergey B Kirpichev License: GPL-2+ On Debian GNU/Linux systems, the complete text of the GNU General Public License (GPL) version 2 can be found at /usr/share/common-licenses/GPL-2. debian/README.Debian0000644000000000000000000000147112263210727011234 0ustar Parser 3 for Debian =================== parser3 binary will check for configuration settings in the default system-wide auto.p file (/etc/parser3/auto.p), if neither option -c or environment variable CGI_PARSER_CONFIG is specified. Then, if the default auto.p is not readable, Parser will search for configuration file in the directory with CGI-script itself. Quick'n'dirty setup for Apache 2 --------------------------------- * Install either parser3-cgi or libapache2-mod-parser3 packages. * Copy /usr/share/doc/parser3-common/examples/apache.conf to /etc/apache2/conf.d/parser * Enable module mod_actions: a2enmod actions * Declare Parser as .html files handler (i.e. in .htaccess file): AddHandler parser3-handler html You can test installation with /usr/share/doc/parser3-common/examples/*.html files. debian/control0000644000000000000000000000742612263210727010604 0ustar Source: parser Section: web Priority: optional Maintainer: Sergey B Kirpichev Build-Depends: debhelper (>= 9), g++ (>=4:4.4.5), libltdl-dev, libgc-dev, libpcre3-dev, libxml2-dev, libxslt1-dev, dh-apache2, apache2-dev (>= 2.4.2-1~), autotools-dev VCS-Git: git://anonscm.debian.org/collab-maint/parser.git VCS-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/parser.git;a=summary Homepage: http://www.parser.ru/en/ Standards-Version: 3.9.5 Package: parser3 Architecture: all Depends: ${misc:Depends}, parser3-cgi (>= ${source:Version}), parser3-common (>= ${source:Version}) Description: Parser 3, HTML-embedded scripting language (metapackage) This is a metapackage that, when installed, guarantees that you have at least one of the server-side versions of the Parser 3 interpreter installed. Removing this package won't remove Parser 3 from your system, but it may remove other packages that depend on this one. . Parser 3 - simple and convenient object-oriented language which allows creating good sites in short time. . Available features: * 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 Package: parser3-common Architecture: any Depends: ${misc:Depends} Description: Common files for packages built from the Parser 3 source This package contains the documentation and example files relevant to all the other packages built from the Parser 3 source. . Parser 3 - simple and convenient object-oriented language which allows creating good sites in short time. . Available features: * 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 Package: parser3-cgi Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, parser3-common (= ${binary:Version}) Description: Parser 3, HTML-embedded scripting language (CGI binary) This package provides the /usr/lib/cgi-bin/parser3 CGI interpreter built for use in Apache 2 with mod_actions, or any other CGI httpd that supports a similar mechanism. . Parser 3 - simple and convenient object-oriented language which allows creating good sites in short time. . Available features: * 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 Package: libapache2-mod-parser3 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, parser3-common (= ${binary:Version}) Description: Parser 3, HTML-embedded scripting language (Apache2 module) This package provides the Apache Parser3 module. . Parser 3 - simple and convenient object-oriented language which allows creating good sites in short time. . Available features: * 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 Package: parser3-dev Section: devel Architecture: any Depends: ${misc:Depends}, parser3-common (= ${binary:Version}) Description: Files for Parser 3 module development This package provides the files from the Parser 3 source needed for compiling additional modules. . Parser 3 - simple and convenient object-oriented language which allows creating good sites in short time. . Available features: * 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 debian/parser3-common.dirs0000644000000000000000000000004712263210727012721 0ustar etc/parser3 usr/share/parser3/charsets debian/parser3-cgi.links0000644000000000000000000000023612263210727012352 0ustar usr/bin/parser3 usr/lib/cgi-bin/parser3 usr/share/man/man1/parser3.1.gz usr/share/man/man1/parser.1.gz usr/share/doc/parser3-common usr/share/doc/parser3-cgi debian/parser3.load0000644000000000000000000000010212263210727011401 0ustar LoadModule parser3_module /usr/lib/apache2/modules/mod_parser3.so debian/libapache2-mod-parser3.install0000644000000000000000000000002612263210727014702 0ustar etc/parser3/apache2/* debian/parser3.links0000644000000000000000000000006312263210727011610 0ustar usr/share/doc/parser3-common usr/share/doc/parser3 debian/source/0000755000000000000000000000000012263210727010470 5ustar debian/source/format0000644000000000000000000000001412263210727011676 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212263210727010366 0ustar 9 debian/parser3-cgi.install0000644000000000000000000000004312263210727012674 0ustar etc/parser3/auto.p usr/bin/parser3