aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html4_strict.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-11-23 23:35:25 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-11-23 23:35:25 +0000
commit9ace2b1f113399d0b520fca84718ec7862abc61f (patch)
treea5591e90355f5aa8fdd3efb2dcb6e6dcae6d1431 /html4_strict.c
parentfcd75b8529c408716dc1c378ac99f204d67d96a0 (diff)
downloadmandoc-9ace2b1f113399d0b520fca84718ec7862abc61f.tar.gz
mandoc-9ace2b1f113399d0b520fca84718ec7862abc61f.tar.zst
mandoc-9ace2b1f113399d0b520fca84718ec7862abc61f.zip
Added initial support for callable/parsable.
Diffstat (limited to 'html4_strict.c')
-rw-r--r--html4_strict.c53
1 files changed, 48 insertions, 5 deletions
diff --git a/html4_strict.c b/html4_strict.c
index 16a66da6..d170855b 100644
--- a/html4_strict.c
+++ b/html4_strict.c
@@ -1,4 +1,4 @@
-/* $Id: html4_strict.c,v 1.4 2008/11/23 23:12:47 kristaps Exp $ */
+/* $Id: html4_strict.c,v 1.5 2008/11/23 23:35:25 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -472,6 +472,8 @@ static int
roff_Dd(ROFFCALL_ARGS)
{
+ dbg_enter(arg, ROFF_Dd);
+
assert(ROFF_PRELUDE & tree->state);
if (ROFF_PRELUDE_Dt & tree->state ||
ROFF_PRELUDE_Dd & tree->state) {
@@ -483,7 +485,8 @@ roff_Dd(ROFFCALL_ARGS)
assert(NULL == tree->last);
tree->state |= ROFF_PRELUDE_Dd;
- dbg_enter(arg, ROFF_Dd);
+ dbg_leave(arg, ROFF_Dd);
+
return(1);
}
@@ -492,6 +495,8 @@ static int
roff_Dt(ROFFCALL_ARGS)
{
+ dbg_enter(arg, ROFF_Dt);
+
assert(ROFF_PRELUDE & tree->state);
if ( ! (ROFF_PRELUDE_Dd & tree->state) ||
(ROFF_PRELUDE_Dt & tree->state)) {
@@ -503,7 +508,8 @@ roff_Dt(ROFFCALL_ARGS)
assert(NULL == tree->last);
tree->state |= ROFF_PRELUDE_Dt;
- dbg_enter(arg, ROFF_Dt);
+ dbg_leave(arg, ROFF_Dt);
+
return(1);
}
@@ -518,6 +524,8 @@ roff_Os(ROFFCALL_ARGS)
return(1);
}
+ dbg_enter(arg, ROFF_Os);
+
assert(ROFF_PRELUDE & tree->state);
if ( ! (ROFF_PRELUDE_Dt & tree->state) ||
! (ROFF_PRELUDE_Dd & tree->state)) {
@@ -534,7 +542,6 @@ roff_Os(ROFFCALL_ARGS)
tree->state &= ~ROFF_PRELUDE;
tree->state |= ROFF_BODY;
- dbg_enter(arg, ROFF_Os);
return(1);
}
@@ -549,10 +556,13 @@ roff_Sh(ROFFCALL_ARGS)
return(1);
}
+ dbg_enter(arg, ROFF_Sh);
+
if (NULL == roffnode_new(ROFF_Sh, in->line, tree))
return(0);
- dbg_enter(arg, ROFF_Sh);
+ dbg_leave(arg, ROFF_Li);
+
return(1);
}
@@ -561,13 +571,46 @@ static int
roff_Li(ROFFCALL_ARGS)
{
+ dbg_enter(arg, ROFF_Li);
+ dbg_leave(arg, ROFF_Li);
+
return(1);
}
+#if 0
+static int
+parse_args(void)
+{
+ skip_whitespace();
+
+ while (pos < sz) {
+
+ if (is_arg) {
+ } else if (parsable) {
+ if (is_callable_token()) {
+ }
+ }
+
+ skip_whitespace();
+ }
+}
+#endif
+
+
static int
roff_An(ROFFCALL_ARGS)
{
+ dbg_enter(arg, ROFF_An);
+
+ /* Do our ML stuff. */
+
+ /*parse_args();*/
+
+ /* Do our trailing whitespace stuff. */
+
+ dbg_leave(arg, ROFF_An);
+
return(1);
}