Commit graph

24 commits

Author SHA1 Message Date
River Tarnell aa982fce43 - using leaf_node_t includes the skip parser in the parsed token, causing expressions like (1 == ONE) to fail. use reduced_node_t instead
- add regression test framework and some basic tests
2008-08-10 20:38:52 +00:00
River Tarnell bbf1737cc2 - convert parser to AST. while this is slower than the previous implementation, it's clearer, and more correct (lazy evaluation is supported)
- to compensate for the slower parser, optimised it a little
- change basic_string to fray, a refcounted immutable string
- add 'xml' tool, prints the parser tree in XML
2008-08-10 03:52:17 +00:00
River Tarnell 365234b95f - add 'evaluate' tool, evaluates a filter on the command line
- remove filter_evaluator.cpp, no longer used
2008-08-09 16:44:54 +00:00
River Tarnell 337d39f713 - remove utf8.{cpp,h} which are no longer used
- convert request (and syntax_check) to use u32expressor
2008-08-09 16:34:34 +00:00
River Tarnell 5037acbd0d Unicode conversion: full Unicode support for parser, and 'expr' tool
add UTF-8/UTF-32 conversion functions for input/output
2008-08-09 16:18:04 +00:00
River Tarnell 04554a30de Unicode conversion: affunctions and filter_evaluator should be templated on character type 2008-08-09 15:07:07 +00:00
River Tarnell df6341487c Unicode conversion, phase 2: parser should be templated on char type 2008-08-09 14:34:17 +00:00
River Tarnell eb5586854e Unicode conversion, phase1: datum should be templated on char type.
added basic_datum<charT>, with typedefs datum and u32datum
2008-08-09 13:37:58 +00:00
River Tarnell 305efb0961 - implement 'rlike' and 'regex' operators
- copyright header for all files
2008-08-08 12:35:13 +00:00
River Tarnell ff2465007f - remove unused isInVector
- move AFP stuff into its own namespace
- move utf8 and equivset into seperate modules
- parser should understand /* */ comments
2008-08-08 03:23:34 +00:00
River Tarnell bbd787bde2 implement === and !== properly 2008-08-08 00:35:12 +00:00
River Tarnell 1912d62d09 - rewrote AFPData to use boost::variant (type safe, no manual memory management)
- rewrote parser to use boost.spirit instead of a hand-written parser
- refactored request loading into 'request' object
- added 'expr', a command-line tool to test the new parser
- some performance fixes for affunctions
2008-08-08 00:01:22 +00:00
River Tarnell 1d2f4351c2 remove obsolete stuff from makefile 2008-08-07 14:34:25 +00:00
River Tarnell 649c1b8bef add a makefile config that's not in version control 2008-08-07 14:28:45 +00:00
River Tarnell 77aab08c36 aftypes: use lexical_cast instead of stringstream tests; avoid warnings by initialising newVal; use std::find for isInvector
makefile: -W -Wall
2008-08-07 14:14:14 +00:00
River Tarnell 4ac7f67766 makefile: cleanups
affunctions: change glib to ICU (untested)
eval.cpp: remote obsolete libxml include
2008-08-07 13:57:40 +00:00
River Tarnell 901b79f8d3 add .cpp to .SUFFIXES 2008-08-07 12:35:42 +00:00
Andrew Garrett 016da694a6 Abuse Filter:
* Reimplement tools, starting with a spiffy AJAX expression tester. Didn't bother implementing as non-AJAX, as it's just an extra.
* Change exchange protocol between native parser and PHP app. Resulted in 2-3-fold performance boost.
* Fix minor bug from last night.
2008-08-04 14:27:48 +00:00
Andrew Garrett 4c57a8cf4d Abuse Filter:
* Make with -O3 instead of -g, to improve performance.
* Add AJAX filter syntax checking.
2008-08-04 12:15:14 +00:00
Andrew Garrett 4b53ea93ec Fix deadlocking with shell out to native parser 2008-08-02 11:10:42 +00:00
Andrew Garrett 42af5836f3 Fix problem in makefile from unmerging vasiliev's changes. 2008-08-01 05:41:06 +00:00
Andrew Garrett b283904b81 AbuseFilter native parser:
* Revert r38187 for now:
** Introduced a memory leak.
** Used an unnecessary library. The point is taken, and this will be fixed in a few days (using glibc instead).
* Fix logic error in boolean ops.
* Integrate with the PHP abuse filter using AbuseFilterParserNative class.
* Fix memory leak.
* Fix a few miscellaneous bugs
2008-07-31 16:28:24 +00:00
Victor Vasiliev 284ebfcfc9 Support Unicode via ICU in parser_native 2008-07-29 15:11:59 +00:00
Andrew Garrett 62dd7d3da7 Add native parser for AbuseFilter. Currently being made into a PHP extension. Also some PLURAL stuff that somehow wasn't committed previously 2008-07-29 11:03:26 +00:00