CVS log for docbook2mdoc/parse.c

[BACK] Up to [cvsweb.bsd.lv] / docbook2mdoc

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.60 / (download) - annotate - [select for diffs], Tue May 7 23:41:48 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.59: +12 -4 lines
Diff to previous 1.59 (colored) to selected 1.33 (colored)

support hexadecimal character entities;
patch from Hiltjo Posthuma <hiltjo at codemadness at org>,
tweaked by me

Revision 1.59 / (download) - annotate - [select for diffs], Thu May 2 11:58:18 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_1_0
Changes since 1.58: +3 -1 lines
Diff to previous 1.58 (colored) to selected 1.33 (colored)

ignore <jobtitle> and <orgdiv>

Revision 1.58 / (download) - annotate - [select for diffs], Thu May 2 04:09:26 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.57: +5 -5 lines
Diff to previous 1.57 (colored) to selected 1.33 (colored)

When moving the last word of a text node into its own node
for use with .Pf before a macro node, make sure what remains
of the original text node isn't leading whitespace only.

Revision 1.57 / (download) - annotate - [select for diffs], Wed May 1 17:20:47 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.56: +15 -7 lines
Diff to previous 1.56 (colored) to selected 1.33 (colored)

More whitespace improvements:
* Skip XML line breaks right after opening tags.
* When processing a text node, check whether a paragraph break is needed
before starting more detailed checks regarding macro arguments.
* Break the mdoc line at the beginning of a new XML line
unless a macro line is open and wants more arguments.
* Do not print "\c" escapes on macro lines.

Revision 1.56 / (download) - annotate - [select for diffs], Wed May 1 11:34:20 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.55: +1 -2 lines
Diff to previous 1.55 (colored) to selected 1.33 (colored)

print commas between Copyright years

Revision 1.55 / (download) - annotate - [select for diffs], Mon Apr 29 02:00:50 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_0_2
Changes since 1.54: +2 -1 lines
Diff to previous 1.54 (colored) to selected 1.33 (colored)

explicitly ignore <keycombo>

Revision 1.54 / (download) - annotate - [select for diffs], Sun Apr 28 15:32:05 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.53: +2 -4 lines
Diff to previous 1.53 (colored) to selected 1.33 (colored)

provide a simple function to generate a text node

Revision 1.53 / (download) - annotate - [select for diffs], Sun Apr 28 15:03:29 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.52: +23 -49 lines
Diff to previous 1.52 (colored) to selected 1.33 (colored)

In this program, there is never a need to survive memory allocation
failure, and there are many places allocating memory.  Consequently,
the code can be simplified providing memory allocation functions
that error out on failure, in the conventional way.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Apr 25 17:57:59 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored) to selected 1.33 (colored)

Make <reference> an alias for <section>.

This is not perfect because if <reference> starts with a <title>,
that title is still printed before the NAME section.  But at least
the <refentry>s no longer get lumped *into* the <title>.

Issue found by Stephen Gregoratto <dev at sgregoratto dot me>
in Xcomposite(3).

Revision 1.51 / (download) - annotate - [select for diffs], Wed Apr 24 18:38:02 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_0_1
Changes since 1.50: +25 -19 lines
Diff to previous 1.50 (colored) to selected 1.33 (colored)

Remove some needless output line breaks between text nodes.
Some of them were incorrect in no-fill mode.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Apr 23 15:47:23 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.49: +14 -6 lines
Diff to previous 1.49 (colored) to selected 1.33 (colored)

handle file inclusion via "<!ENTITY %"

Revision 1.49 / (download) - annotate - [select for diffs], Tue Apr 23 14:01:55 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.48: +13 -1 lines
Diff to previous 1.48 (colored) to selected 1.33 (colored)

translate decimal character entities to Unicode escapes

Revision 1.48 / (download) - annotate - [select for diffs], Sun Apr 21 14:48:11 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.47: +4 -1 lines
Diff to previous 1.47 (colored) to selected 1.33 (colored)

Implement <void> child of <funcprototype>.
Also treat <tag> just like <sgmltag> and <markup>.
Some small parts of this patch were sent in by
Stephen Gregoratto <dev at sgregoratto dot me>.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Apr 20 04:15:06 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.33 (colored)

do not crash by trying to insert an attribute into a non-existent node;
segfault reported by Stephen Gregoratto <dev at sgregoratto dot me>

Revision 1.46 / (download) - annotate - [select for diffs], Tue Apr 16 21:19:54 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_0_0
Changes since 1.45: +3 -1 lines
Diff to previous 1.45 (colored) to selected 1.33 (colored)

treat <sect3> and <sect4> like <section>

Revision 1.45 / (download) - annotate - [select for diffs], Tue Apr 16 14:58:19 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.44: +15 -2 lines
Diff to previous 1.44 (colored) to selected 1.33 (colored)

preserve leading whitespace in no-fill mode

Revision 1.44 / (download) - annotate - [select for diffs], Sun Apr 14 22:37:56 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.43: +5 -1 lines
Diff to previous 1.43 (colored) to selected 1.33 (colored)

Rudimentary implementation of <imagedata> by printing the filename.
Ignore the wrappers <caption>, <figure>, <imageobject>, <mediaobject>.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Apr 14 18:07:35 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.42: +6 -1 lines
Diff to previous 1.42 (colored) to selected 1.33 (colored)

Minor improvements to the handling of some meta-information:
* Translate <simplesect> and <legalnotice> to .Ss or lower.
* Do not uppercase high-level <note> and similar elements.
* Handle <subtitle> like stand-alone <title>.
* Handle <editor> by the <author> handler function.
* Make <copyright> print "Copyright (C)".
* Ignore some transparent nodes.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Apr 14 14:00:16 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.41: +6 -1 lines
Diff to previous 1.41 (colored) to selected 1.33 (colored)

Minor improvements for some inline elements:
* New aliases <keycap> and <property>.
* Make <application> an alias for <command>.
* Ignore <keycode> and <returnvalue>.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Apr 13 13:06:35 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored) to selected 1.33 (colored)

Improve the proplogue:
* Use <pubdate> or <date> for .Dd.
* Clean up the way how <title> from <bookinfo> is used for .Nd.
* Treat <articleinfo> just like <bookinfo>.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Apr 12 21:37:07 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored) to selected 1.33 (colored)

Author node polishing:
* In the AUTHORS section, set -nosplit mode.
* In <author>, do not recurse for <email>: it is pointless because it
cannot reasonably contain child elements, but it can trigger assertions.
* For standalone <email>, do the standard was_impl dance.
* Treat <othercredit> just like <author>.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Apr 12 16:40:53 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.38: +68 -178 lines
Diff to previous 1.38 (colored) to selected 1.33 (colored)

Infrastructure to access node properties
that can be used by both the parser and the formatter.
Use it to decide whether a text node needs .Pf before a macro,
whether the first word of a text node needs to be split off after
a macro, and whether a macro node can suppress the SPACE flag.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Apr 12 11:37:09 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.37: +1 -4 lines
Diff to previous 1.37 (colored) to selected 1.33 (colored)

There is no need to ever use the eqn(7) inline syntax ($$):
Its purpose it to inline eqn(7) source code in the *input* file.
On the *output* side, equations are inlined by default.
To display them, the .EQ block needs to be wrapped in .Bd.
This patch gets rid of another user of "sv".

Revision 1.37 / (download) - annotate - [select for diffs], Fri Apr 12 07:53:09 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.36: +34 -8 lines
Diff to previous 1.36 (colored) to selected 1.33 (colored)

If a text node precedes a non-text node without intervening whitespace,
split out the last word for use with .Pf.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Apr 12 07:05:19 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored) to selected 1.33 (colored)

handle <computeroutput> and <markup>;
patch from Stephen Gregoratto <dev at sgregoratto dot me>
who found that both are frequently used in the doclifter manpage

Revision 1.35 / (download) - annotate - [select for diffs], Fri Apr 12 06:46:45 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +65 -21 lines
Diff to previous 1.34 (colored) to selected 1.33 (colored)

If a text node follows a non-text node without intervening whitespace,
keep the text in it as short as possible.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 12 04:39:24 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.33: +4 -19 lines
Diff to previous 1.33 (colored)

New function pnode_alloc() to reduce code duplication.
No functional change.

Revision 1.33 / (download) - annotate - [selected], Fri Apr 12 04:17:11 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.32: +4 -2 lines
Diff to previous 1.32 (colored)

Do not include literal linefeed characters in text nodes;
instead, let the parser split them into two text nodes.

For now, let the formatter start text nodes preceded by whitespace
on new output lines, which is a crude way of preserving input line
breaks and making sure output text lines are limited to reasonable
length.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Apr 11 04:23:22 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +21 -19 lines
Diff to previous 1.31 (colored) to selected 1.33 (colored)

Introduce FMT_* formatter flags to control what can be added to the
current macro line.  Move trailing punctuation handling to the text
formatter, allowing elimination of the function macro_closepunct()
and of the "real" and "bsz" members from struct node.
Substantial functional improvements, yet minus 25 lines of code.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 10 14:34:08 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.30: +24 -24 lines
Diff to previous 1.30 (colored) to selected 1.33 (colored)

Last instance of consistent "struct parse *p" function argument naming.
While the previous commit caused no binary change, this one does,
but only because the argument is used in an assert(3).
Still no functional change.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Apr 10 14:22:37 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +103 -103 lines
Diff to previous 1.29 (colored) to selected 1.33 (colored)

Consitently use for function arguments:
struct parse *p, struct format *f, struct pnode *n, struct pattr *a

Consistently use struct pnode *nc, *nn, *np
for child, next, and previous nodes, respectively.

I admit this makes commit history a bit harder to inspect,
but i think seeing at once what variables mean is worth it.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Apr 9 15:23:51 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +30 -37 lines
Diff to previous 1.28 (colored) to selected 1.33 (colored)

switch to mandoc(1)-style EXIT STATUS and DIAGNOSTICS

Revision 1.28 / (download) - annotate - [select for diffs], Tue Apr 9 13:35:29 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +4 -2 lines
Diff to previous 1.27 (colored) to selected 1.33 (colored)

Fix a logic bug causing tree corruption:
When parsing an internal subset declaration,
text does not extend beyond closing square brackets.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 9 12:23:34 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored) to selected 1.33 (colored)

Fix a logic bug and a memory leak:
After parsing an attribute value, clear the attribute flag, such that,
if another attribute value follows, it gets ignored rather than
clobbering the first value.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Apr 9 01:39:09 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +16 -2 lines
Diff to previous 1.25 (colored) to selected 1.33 (colored)

implement file inclusion via <xi:include>

Revision 1.25 / (download) - annotate - [select for diffs], Mon Apr 8 23:40:17 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +10 -3 lines
Diff to previous 1.24 (colored) to selected 1.33 (colored)

implement file inclusion via the ENTITY SYSTEM mechanism

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 8 22:47:34 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +82 -27 lines
Diff to previous 1.23 (colored) to selected 1.33 (colored)

Make the function parse_file() fit for recursion:
* Save and restore reporting data around the read loop.
* Open the file inside the function, not before calling it.
* On the top level, change directory on a best-effort basis.
* Finalize the parse tree only on the top level.
No new functionality yet.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 8 14:37:31 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +133 -32 lines
Diff to previous 1.22 (colored) to selected 1.33 (colored)

Handle DOCTYPE declarations containing ENTITY definitions.
Also make <sbr> self-closing even without a trailing slash.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 7 19:33:27 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +5 -2 lines
Diff to previous 1.21 (colored) to selected 1.33 (colored)

handle <appendix>, <article>, <book>, and <legalnotice> similar to <section>

Revision 1.21 / (download) - annotate - [select for diffs], Sun Apr 7 18:51:53 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +6 -1 lines
Diff to previous 1.20 (colored) to selected 1.33 (colored)

handle glossaries just like variablelists

Revision 1.20 / (download) - annotate - [select for diffs], Sun Apr 7 17:55:18 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored) to selected 1.33 (colored)

render <blockquote> as .Bd -ragged -offset indent

Revision 1.19 / (download) - annotate - [select for diffs], Sun Apr 7 17:39:26 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.33 (colored)

Discard attributes of ignored elements.
As a side benefit, this avoids a null pointer access
if the document element is ignored and has attributes.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Apr 7 17:00:56 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) to selected 1.33 (colored)

better handling of <link> and <ulink> elements
including endterm=, linkend=, url=, and xlink:href= attributes

Revision 1.17 / (download) - annotate - [select for diffs], Sun Apr 7 14:49:26 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +45 -3 lines
Diff to previous 1.16 (colored) to selected 1.33 (colored)

handle preceding a macro without intervening whitespace

Revision 1.16 / (download) - annotate - [select for diffs], Sat Apr 6 22:37:57 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.15: +34 -28 lines
Diff to previous 1.15 (colored) to selected 1.33 (colored)

Store the information whether a node is preceded by whitespace
into the node tree.  Use that information in the formatter
to suppress the insertion of whitespace
in text-text, macro-text, and macro-macro node sequences.

Text-macro sequences are not yet handled.  They are more complicated
because they require emitting a .Pf macro as part of a text node
depending on the spacing properties of the *following* macro node.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 6 13:45:58 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored) to selected 1.33 (colored)

treat <simpara> just like <para>; simplified version
of a patch from Stephen Gregoratto <dev at sgregoratto dot me>

Revision 1.14 / (download) - annotate - [select for diffs], Fri Apr 5 14:37:36 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +193 -184 lines
Diff to previous 1.13 (colored) to selected 1.33 (colored)

Split parse_file() into parse_file() to fill the parse buffer
and parse_string() to handle it,
to allow parsing from alternative sources in a subsequent step.
Only advance line and column number when parsing from the main input file.
Represent parsing state as an enum rather than with multiple flags.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Apr 3 17:53:02 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +6 -4 lines
Diff to previous 1.12 (colored) to selected 1.33 (colored)

Various in-line elements:
Translate <errorname> to .Er.
Translate <sgmltag> to .Ic.
Translate <literal> to .Ql, avoiding .Li.
Map <code> and <userinput> to <literal>.
Map <structname> to <type>.
Map <structfield> to <parameter>.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Apr 3 16:08:57 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored) to selected 1.33 (colored)

introduce <symbol> as an alias for <constant>

Revision 1.11 / (download) - annotate - [select for diffs], Wed Apr 3 11:46:09 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored) to selected 1.33 (colored)

Prints tables containing only one column as .Bl -bullet -compact.
The number of columns is taken from the "cols" attribute.

No neat to treat <informaltable> separately from <table>;
the only difference is whether or not it has a title.

Treat <table> as transparent and handle <tgroup> instead.
The advantages are that <title> gets a generic handler
which also works in other contexts
and that other children of <table> are now covered as well.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Apr 3 11:23:48 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored) to selected 1.33 (colored)

handle attributes in single quotes

Revision 1.9 / (download) - annotate - [select for diffs], Tue Apr 2 15:53:02 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +120 -7 lines
Diff to previous 1.8 (colored) to selected 1.33 (colored)

Translate XML character entity references to roff character escape sequences.
Missing feature reported by Stephen Gregoratto <dev at sgregoratto dot me>.

Remaining known issues:
* Whitespace handling isn't perfect yet.
* Numeric character references aren't handled yet.
* The list of entities is still very incomplete.
* When it grows longer, we may have to switch to binary search.
* Local entities declared in the DTD are not yet handled.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Apr 2 13:11:09 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +25 -1 lines
Diff to previous 1.7 (colored) to selected 1.33 (colored)

skip XML comments even if they contain greater-than characters;
issue reported by Stephen Gregoratto <dev at sgregoratto dot me>

Revision 1.7 / (download) - annotate - [select for diffs], Thu Mar 28 20:41:33 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.6: +5 -4 lines
Diff to previous 1.6 (colored) to selected 1.33 (colored)

Implement a formatter for <author> elements,
handling <contrib>, <personname>, <firstname>, <othername>, <surname>,
as well as arbitrary children properly.

This required minor work on the formatting infrastructure:
Improve macro_addnode() such that it also handles text nodes.
Add a companion function print_textnode().
Let print_text() optionally work without ARG_SPACE.

Triggered by a report from Stephen Gregoratto <dev at sgregoratto
dot me> that and how GTK documentation uses <contrib>.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Mar 28 15:05:40 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.5: +42 -33 lines
Diff to previous 1.5 (colored) to selected 1.33 (colored)

Simple warn_msg() and error_msg() functions to avoid repetitive code.
While here, drop the warning about unknown attributes.
Those are just too abundant and hardly matter.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 28 12:21:10 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.4: +322 -100 lines
Diff to previous 1.4 (colored) to selected 1.33 (colored)

The expat library aborts parsing as soon as it encounters invalid
input, and the basic design of the library practically precludes
fixing it.  However, whether the input is well-formed XML or not
is totally irrelevant, and in fact, i have seen real-world documents
from X.org that expat rejects as not well-formed.  Kristaps reports
the same from OpenGL.

We really want to parse *ANYTHING* whatsoever without ever throwing
a fatal error - after all, the point is to convert legacy documents
to a better format, and nitpicking about the syntax merely alienates
users (including myself).

Consequently, ditch expat and write a parser from scratch, optimized
for robustness on invalid input.

Oh, and by the way, it only requires 200 lines of code,
compared to 15,000 lines in expat - an economy of 98.5%
at the sime time as being much more useful in practice.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 26 22:39:33 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.3: +40 -13 lines
Diff to previous 1.3 (colored) to selected 1.33 (colored)

Provide a way to exclude elements including their children from the tree
and use that for <anchor>, <indexterm>, <primary>, and <secondary>.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 26 21:52:09 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.2: +8 -8 lines
Diff to previous 1.2 (colored) to selected 1.33 (colored)

mark the first seven elements as ignored,
shortening enum nodeid, and in one case even pnode_print()

Revision 1.2 / (download) - annotate - [select for diffs], Tue Mar 26 20:54:43 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.1: +31 -11 lines
Diff to previous 1.1 (colored) to selected 1.33 (colored)

Provide an easy way to parse an XML element without generating a node,
either ignoring it outright or emitting a warning if -W was specified.
Use this to handle <xi:include> more cleanly, fixing two FIXMEs.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Mar 26 18:32:07 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Diff to selected 1.33 (colored)

The program docbook2mdoc(1) has become large enough that splitting
it into a number of logical components makes sense: node tree,
parser, formatter, each with interface and implementation, and the
main program.  That way, it becomes easier to see what interacts
with what, and what is independent of what.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb