Jonas Fonseca
0bfb1d7742
Free nodes created on the SGML parsing stack
2006-01-04 00:29:10 +01:00
Jonas Fonseca
66cf866ab6
Cleanup the DOM stack flags; s/KEEP_NODES/FREE_NODES/
2006-01-03 20:35:32 +01:00
Jonas Fonseca
7a5f699a88
Drop unneeded -b arg to cmp, which isn't available in FreeBSD's version
2006-01-03 20:00:06 +01:00
Jonas Fonseca
146ca09c43
Improve support for running 'make test' when srcdir != builddir
...
Additionally, also make TESTDEPS conditionally contain memdebug object
binary only if CONFIG_DEBUG is yes.
2006-01-03 19:04:17 +01:00
Jonas Fonseca
50183bf5d8
Add support for recursively running all tests
2006-01-03 02:07:51 +01:00
Jonas Fonseca
ba5bdfec00
Move the 'make test' handling to Makefile.lib
...
The test rule is defined when TEST_PROGS is defined. Users should also set
TESTDEPS to get the correct object files linked in.
2006-01-03 00:45:22 +01:00
Jonas Fonseca
23f0085842
Move src/dom/test/libtest test/libtest.sh, put path to it in TEST_LIB
2006-01-03 00:34:10 +01:00
Jonas Fonseca
f88cbe6761
Add check of incomplete text
2006-01-02 22:35:03 +01:00
Jonas Fonseca
42156f4477
Change one test description to start with 'Parse ...'
2006-01-02 22:31:28 +01:00
Jonas Fonseca
f75ccffbc7
Fix SGML parsing and scanning so that all tests succeeds
...
This includes checking the return token of get_next_dom_scanner_token() and
fixing the calculated size of recovered processing instruction data tokens.
2006-01-02 21:04:51 +01:00
Jonas Fonseca
0160c0a464
Make it possible to test how incomplete input is parsed
...
Also fix the expected output of proc. instruction test.
2006-01-02 21:02:41 +01:00
Jonas Fonseca
e78d43f1ac
Add mode where the SGML scanner checks for completeness
2006-01-02 17:46:09 +01:00
Jonas Fonseca
af72dd8435
Make parse_sgml() return the sgml_parser_code enum
...
It is mostly just ignored for now. The SGML parser test tool will however
return parser code.
2006-01-02 17:40:42 +01:00
Jonas Fonseca
29279e71b7
Add SGML_TOKEN_INCOMPLETE and handle it in the parser
2006-01-02 17:20:39 +01:00
Jonas Fonseca
2d813f2cbf
Introduce enum sgml_parser_code and make the parsers return something
2006-01-02 17:14:51 +01:00
Jonas Fonseca
fcf7677584
Skip spaces immediately when recognising '<?ident'
2006-01-02 16:58:48 +01:00
Jonas Fonseca
8c9324cc37
Add test for SGML such as, e.g. '<parent<child/></parent>'
2006-01-02 16:26:01 +01:00
Jonas Fonseca
0071ea696c
Fix logic in update_number_of_lines() and tell parse_sgml() src is complete
2006-01-02 14:59:54 +01:00
Jonas Fonseca
58c31f44a0
Clearify the code a bit
2006-01-02 03:06:47 +01:00
Jonas Fonseca
dc10be626e
The attribute parsing of proc. instruction nodes has the complete source
2006-01-02 02:44:01 +01:00
Jonas Fonseca
f608e2a0ae
Add the concept of completeness to strings being parsed and scanned
...
... not used yet.
2006-01-02 02:08:20 +01:00
Jonas Fonseca
6e9a18b444
fix a few bugs for line counting in plain text
2006-01-02 01:49:12 +01:00
Jonas Fonseca
7717862401
Make it possible to pass --print-lines to test line counting
2006-01-02 01:48:08 +01:00
Jonas Fonseca
247debe34f
Add get_sgml_parser_line_number(), and fix a copy/paste error
2006-01-02 01:47:02 +01:00
Jonas Fonseca
275ba0b789
Use common print_indent() to simplify printf()-strings
2006-01-02 00:32:22 +01:00
Jonas Fonseca
b83bbf9c4a
Add sgml_parser_flag which can be used to specify SGML_PARSER_COUNT_LINES
2006-01-02 00:29:37 +01:00
Jonas Fonseca
1801a21b50
init_sgml_parser(): Rename flags to stack_flags
2006-01-02 00:29:36 +01:00
Laurent MONIN
54997c506f
Drop trailing whitespaces.
2006-01-02 00:15:20 +01:00
Jonas Fonseca
43b34dcb2f
Add DocBook element and attribute definitions and drop a bogus file
2006-01-01 23:59:57 +01:00
Jonas Fonseca
021af4e87c
Although aware ELinks doesn't need another sgml/doctype here is DocBook
...
It was created a long time ago so (I think) it deserves to survive. It
maps .sgml files to applicatino/docbook+xml and uses the highlighter.
2006-01-01 23:22:10 +01:00
Jonas Fonseca
6b62e0cb77
Declare struct sgml_parser_state above struct sgml_parser
...
... and describe the info member.
2005-12-31 20:02:39 +01:00
Jonas Fonseca
f0148c2ecf
Keep struct sgml_parsing_state private to the parser
2005-12-31 19:59:11 +01:00
Jonas Fonseca
4a766f350b
Just for fun also parse <?xml-stylesheet attributes
2005-12-31 03:13:39 +01:00
Jonas Fonseca
a578ed4667
Make the SGML scanner (optionally) keep track of line numbers
...
A new line is either \n or \f. The main logic for counting lines is in
skip_sgml{,_chars,_space}. For the general case where line numbers are not
wanted the code tries to avoid the extra checks for newlines.
This will be useful for reporting errors when loading the XBEL file.
2005-12-31 02:46:56 +01:00
Jonas Fonseca
b23beed031
Rename skip_comment() and skip_cdata_section() to conform to skip_sgml_*()
2005-12-31 02:00:09 +01:00
Jonas Fonseca
0891cda51e
Introduce skip_sgml_space() that wraps scan_sgml(..., SGML_SCAN_WHITESPACE)
2005-12-31 01:57:54 +01:00
Jonas Fonseca
9264221635
Make init_dom_scanner() take the state arg and drop a macro
2005-12-31 01:55:38 +01:00
Jonas Fonseca
7489c134f7
Make non-terminated comments and cdata sections have 'the rest' as content
2005-12-31 01:47:57 +01:00
Jonas Fonseca
8f7f6abc16
Use skip_sgml_chars() in skip_comment() and skip_cdata_section()
2005-12-31 01:40:52 +01:00
Jonas Fonseca
4e10bcf772
Drop useless code for proc. instruction scanning
2005-12-31 01:18:49 +01:00
Jonas Fonseca
e8ff8bd5f0
Fix another off-by-one error similar to the SGML comment parsing
2005-12-31 01:14:52 +01:00
Jonas Fonseca
ab7ba39d42
Introduce skip_sgml_chars() to avoid usage of memchr()
2005-12-31 00:06:12 +01:00
Jonas Fonseca
14a3f9c0fd
Disable dom-select building since it requires defining of DOM_STACK_TRACE
2005-12-31 00:05:49 +01:00
Jonas Fonseca
9a0bf83756
Add basic stuff for XBEL parsing/highlighting using the DOM engine
2005-12-30 22:19:32 +01:00
Jonas Fonseca
aa07b3edf4
Fix old (non) problem with using VERSION identifier by #undef'ing it first
2005-12-30 22:13:13 +01:00
Jonas Fonseca
65a114f4bc
Sort the RSS elements, they are supposed to be binarily searchable
2005-12-30 21:46:44 +01:00
Jonas Fonseca
ad052c3985
Hey, hey Cripple Creek Fai^H^Herry
2005-12-30 21:19:46 +01:00
Jonas Fonseca
41f1f5f9d3
Add a simple program for testing the DOM select code
...
It accepts --uri, --src and --selector args.
2005-12-30 03:33:48 +01:00
Jonas Fonseca
4f09ac99f7
Make it possible to identify the output of DOM stack tracers
2005-12-30 03:29:17 +01:00
Jonas Fonseca
0ddb5f2d18
Use the DOM stack tracer for getting a dump of active nodes
2005-12-30 03:02:59 +01:00