| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
No functional change except that for mdoc(7), it now skips leading
escape sequences just like it already did for man(7).
Escape sequences rarely occur in mdoc(7) code and if they do,
skipping them is an improvement in this context.
Minus 30 lines of code.
|
|
|
|
|
|
| |
high-level parsers to allow further unification of functions that
only need to recognize this code, but that don't care about different
high-level macrosets beyond that.
|
|
|
|
|
| |
arguments of mparse_result() by one. No functional change.
Written on the ICE Bruxelles-Koeln on the way back from p2k15.
|
|
|
|
|
| |
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.
|
|
|
|
|
| |
Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta.
Written of the train from London to Exeter on the way to p2k15.
|
|
|
|
|
|
|
|
|
| |
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to p2k15.
|
|
|
|
|
|
| |
Replace enum mdoc_type and enum man_type by a unified enum roff_type.
Almost mechanical, no functional change.
Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
|
|
|
|
| |
libmandoc.h and there's nothing left.
|
|
|
|
|
|
|
|
|
|
| |
stuff into libmandoc.h, including old mdoc.h/man.h/roff.h functions now
used by read.c. The motivation behind this is to tighten the
relationship between the underlying compilers while keeping parse data
hidden from general callers (e.g., main.c).
While here, also move register values from mandoc.h into libmandoc.h as
noted by schwarze@. See above for explanation.
|
|
|
|
|
|
|
|
|
| |
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the
time being in libmandoc.h. This requires struct mparse to be passed
into the allocation routines instead of mandocmsg and a void pointer.
Then, move some of the functionality of the old mmsg() into read.c's
mparse_mmsg() (check against wlevel and setting of file_status) and use
main.c's mmsg() as simply a printing tool.
|
|
|
|
| |
the adding itself is implemented; equation data is not yet shown.
|
|
|
|
|
|
|
|
| |
between EQ and EN roff blocks. EQN is different from TBL in that data
after .EQ is unilaterally considered an equation until an .EN. Thus,
there's no need to jump through hoops in having table spans and so on.
This is ONLY the parse code framework in libroff. EQN is not yet passed
into the backends.
|
| |
|
|
|
|
| |
roff.h interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference to a current tbl parse and routes ALL text into the tbl parse
after stripping reserved words and making block-level pre-processing
(e.g., `ig'). This is consistent with an analysis of embedded `TS/TE'
in manuals with sprinkled -mdoc, roff, and -man macros.
Fact of a parse is exposed to main.c by a return value (ROFF_TBL), which
will trigger main.c to add a foreign parsed body to the -mdoc or -man
parse stream. This interface isn't in yet, but will follow the
parse-text functions in both libraries. I put this login in main.c
because I don't want libroff calling directly into libmdoc or libman.
As a consequence, a parsed row can be pushed directly into any -mdoc or
-man context (put a `Bd -literal -offset indent' into a `TE/TS' block to
see why this is necessary). It will then absorb formatting cues in the
front-ends.
A note on naming. I decided on libroff.h instead of tbl.h because this
is purely within the roff layer. Separate tbl implementations will
need, then, to interface with libroff. This is "how it should be"
because tbl is tightly linked with roff in terms of `ds' and other
formatting macros, as well as, of course, special characters and other
roffisms.
|
|
|
|
|
|
|
|
| |
carefully by joerg@. Merge roff.h header for compilation's sake (this is not
yet implemented in roff.c.).
THIS IS A BUGGY CHECK-IN. The manual type is erroneously kept between runs
of the compiler. This is a known bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.
|
|
|
|
|
|
|
|
|
| |
functionality and UGLY works quite well thanks to schwarze@'s careful
attention.
This also backs out function-prototype changes for struct regset,
instead stuffing a pointer to the regset directly into struct
mdoc/man/roff.
|
|
|
|
|
|
| |
patch by schwarze@. This commit adds support to libroff parsing `nr'
into register set defined in regs.h. This will propogate into libmdoc
and libman in later commits.
|
|
|
|
|
|
|
|
|
|
| |
conditional-negative context so as to preserve structural integrity.
Initial "rules" (deny/allow) are now inherited for future work in
evaluating conditionals.
Lint-fix noted by Joerg.
Added regression tests for zany constructs.
|
|
|
|
|
|
|
|
|
| |
Allow roff_parseln() to manipulate the line buffer offset. This is used
in situations like `.ie n .TH FOO 1' or `.ie n .ie n', where the line
buffer offset is recalculated then the roff parser re-run.
Fix mdoc_parseln() and man_parseln() to accept the initial line offset.
WARNING: backed-out ALL roff macros whilst accomodating for how roff
handles multi-line conditionals (in short, re-running the parser).
|
|
|
|
|
|
| |
with unified ones.
Add initial roff pre-processor shim, a compiler sitting outside of the other compilers that processes pure roff instructions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|