Commit graph

1057 commits

Author SHA1 Message Date
River Tarnell 10e89fda5c improved string literal parser. now \xHH works as expected (only matches two digits), and \uHHHH, \UHHHHHHHH are supported (16/32-bit Unicode characters) 2008-08-10 12:53:21 +00:00
Siebrand Mazeland 9911042c66 Localisation updates for extension messages from Betawiki (2008-08-10 11:10 CEST) 2008-08-10 09:51:37 +00:00
River Tarnell 6ad335fbe9 cleanup: move ast_evaluator into its own module, move expr functions from parser to affunctions 2008-08-10 04:21:28 +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
Siebrand Mazeland d96dca49a0 * rebuild all extension messages localisation files supported by Translate (part 1 - 100 of 223 files)
* indentation changed from aligned to 'as short as possible
* alphabetical ordering of authors
* export of Betawiki's translation hints. Developers are encouraged to add, correct, elaborate!
* contains the latest export for extension messages from Betawiki
2008-08-09 20:02:27 +00:00
Alexandre Emsenhuber f8c03ff388 svn:eol-style native 2008-08-09 18:31:42 +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 691b88b9b1 convert check to u32filter_evaluator, and use "" quotes instead of '' quotes 2008-08-09 16:38:39 +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 4eda47daab add 'expr' tool 2008-08-09 16:22:21 +00:00
Siebrand Mazeland 98aa1a73b1 Localisation updates for extension special page aliases from Betawiki 2008-08-09 16:21:32 +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
Siebrand Mazeland bba4102689 Localisation updates for extension messages from Betawiki (2008-08-09 17:11 CEST) 2008-08-09 15:22:52 +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 dbc2da3177 remove cast / ctors for basic types from aftypes, too prone to error.
(side effect: time for the test case goes from 6:14 to 5:26)
2008-08-09 12:14:08 +00:00
River Tarnell a2ae14f3bb better checking for correct # of arguments 2008-08-09 11:16:45 +00:00
River Tarnell d3ce6a5973 support string escapes: \b \t \n \f \r \\ \" \' \xHH \OOO 2008-08-09 10:33:02 +00:00
River Tarnell d2e95116f0 - match value before variable, otherwise FFFF is matched as a variable and a parse error occurs
- support uppercase X, O, B for base indicators
2008-08-09 09:59:40 +00:00
River Tarnell d94fd3860b support hex (10x), oct (10o) and binary (10b) literals 2008-08-09 09:32:19 +00:00
River Tarnell 7bf795588e implement unary - + operators 2008-08-09 09:16:04 +00:00
Meno25 041b24b601 Add author info 2008-08-08 19:23:24 +00:00
Siebrand Mazeland 8eed65630d Localisation updates for extension messages from Betawiki (2008-08-08 17:40 CEST) 2008-08-08 15:53:28 +00:00
Alexandre Emsenhuber 36f5be9441 svn:eol-style native 2008-08-08 15:38:37 +00:00
Siebrand Mazeland 152420838a Localisation updates for extension messages from Betawiki (2008-08-08 16:20 CEST) 2008-08-08 14:29:03 +00:00
Siebrand Mazeland 3ac6f6d5bc Clarify 'abusefilter-edit-builder-funcs-specialratio' based on Werdna's explanation 2008-08-08 12:37:15 +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 90afa30066 implement "a like b" operator (and alias "a matches b"). pattern matching code taken from NetBSD src/lib/libc/gen/fnmatch.c 2008-08-08 12:13:03 +00:00
River Tarnell 0042e5d4f5 add aliases: a = b (a == b); a /= b (a != b); a contains b (b in a) 2008-08-08 11:54:11 +00:00
River Tarnell 3501eac719 add built-in cast functions int(), float() and string() 2008-08-08 11:48:12 +00:00
River Tarnell 2da745687c when either operand of datum's operator+ is a string, treat the operation as a string concatenation instead of arith 2008-08-08 11:35:13 +00:00
Andrew Garrett e786ae8f42 Fix misspelling 2008-08-08 11:00:50 +00:00
River Tarnell 66b0cb4159 document the datum type 2008-08-08 10:53:46 +00:00
River Tarnell f278237aa7 define by default 'true' and 'false' variables 2008-08-08 10:39:23 +00:00
River Tarnell 52791b24f8 - document the parser some
- make pow_expr a seperate rule with higher precedence than mult_expr
- rename eq_expr/eq2_expr to ord_expr/eq_expr
- match strict_real_p instead of real_p, otherwise '1 / 2' is 0.5 instead of 0
2008-08-08 10:36:17 +00:00
River Tarnell 27a7e25d61 need to qualify std::pow() to avoid infinite recursion 2008-08-08 10:16:27 +00:00
Siebrand Mazeland 63ab66ade1 Localisation updates for extension special page aliases from Betawiki 2008-08-08 09:37:07 +00:00
Andrew Garrett af1cbfb759 Abuse Filter:
* Add power operator.
* Add filter builder (very simple, just a drop-down box with commonly-used constructs)
2008-08-08 09:37:05 +00:00
Siebrand Mazeland f4fb062c6d Localisation updates for extension messages from Betawiki (2008-08-08 10:12 CEST) 2008-08-08 08:51:25 +00:00
River Tarnell 984386e8c4 refactor 2008-08-08 07:25:10 +00:00
River Tarnell e97f624e8d the maximum size of input (filter, keys, values) should be limited to avoid devouring all memory 2008-08-08 06:31:46 +00:00
River Tarnell 920482def7 support c ? a : c2 ? b : c (right associative) 2008-08-08 05:52:44 +00:00
River Tarnell 56581c109d parser should support the ?: operator 2008-08-08 05:39:51 +00:00
River Tarnell b01c2ce063 - use ICU u_isalnum instead of std::isalnum, which doesn't work with Unicode 2008-08-08 03:57:25 +00:00
River Tarnell 3b7ae936ce - add missing files from last commit
- convert next_utf8_char into an iterator
2008-08-08 03:46:02 +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 81343c86c7 incorrect definition of bool_expr caused parse failure on '1 & 2 == 3' 2008-08-08 00:53:22 +00:00
River Tarnell bbd787bde2 implement === and !== properly 2008-08-08 00:35:12 +00:00
River Tarnell 9d6e37fd51 - remove svn:executable prop from source files 2008-08-08 00:25:23 +00:00