discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* tbl example - what should be fixed?
@ 2011-05-16 11:18 Yuri Pankov
  2011-05-17 13:13 ` Kristaps Dzonsons
  0 siblings, 1 reply; 4+ messages in thread
From: Yuri Pankov @ 2011-05-16 11:18 UTC (permalink / raw)
  To: discuss

Hi,

We have a lot of manpages having the similar looking tables:
.TS
tab(\a) box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
TYPE\aVALUE
_
Type1\aValue1
_
Type2\aValue2
.TE

Output of -Tlint:
tbl.example:2:5: ERROR: skipping bad character: ignoring byte
tbl.example:2:6: ERROR: bad table syntax
tbl.example:3:12: ERROR: bad table layout
tbl.example:4:12: ERROR: bad table layout
tbl.example:6:15: ERROR: skipping bad character: ignoring byte
tbl.example:6:4: ERROR: bad table layout
tbl.example:8:4: ERROR: skipping bad character: ignoring byte
tbl.example:8:2: ERROR: bad table layout
tbl.example:10:20: ERROR: skipping bad character: ignoring byte
tbl.example:10:1: ERROR: bad table layout
tbl.example:1:1: ERROR: no table data cells specified


My questions is, is there anything that could/should be fixed/improved
in tbl parser, or all of the errors are 100% correct and should be fixed
in the manpages?


TIA,
Yuri
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tbl example - what should be fixed?
  2011-05-16 11:18 tbl example - what should be fixed? Yuri Pankov
@ 2011-05-17 13:13 ` Kristaps Dzonsons
  2011-05-18  6:30   ` Yuri Pankov
  0 siblings, 1 reply; 4+ messages in thread
From: Kristaps Dzonsons @ 2011-05-17 13:13 UTC (permalink / raw)
  To: discuss

> We have a lot of manpages having the similar looking tables:
> .TS
> tab(\a) box;
> cw(2.75i) |cw(2.75i)
> lw(2.75i) |lw(2.75i)
> .
> TYPE\aVALUE
> _
> Type1\aValue1
> _
> Type2\aValue2
> .TE
>
> Output of -Tlint:
> tbl.example:2:5: ERROR: skipping bad character: ignoring byte
> tbl.example:2:6: ERROR: bad table syntax
> tbl.example:3:12: ERROR: bad table layout
> tbl.example:4:12: ERROR: bad table layout
> tbl.example:6:15: ERROR: skipping bad character: ignoring byte
> tbl.example:6:4: ERROR: bad table layout
> tbl.example:8:4: ERROR: skipping bad character: ignoring byte
> tbl.example:8:2: ERROR: bad table layout
> tbl.example:10:20: ERROR: skipping bad character: ignoring byte
> tbl.example:10:1: ERROR: bad table layout
> tbl.example:1:1: ERROR: no table data cells specified
>
>
> My questions is, is there anything that could/should be fixed/improved
> in tbl parser, or all of the errors are 100% correct and should be fixed
> in the manpages?

Yuri,

 From mdoc.7:

LANGUAGE SYNTAX
      mdoc documents may contain only graphable 7-bit ASCII
      characters, the space character, and, in certain circumstances,
      the tab character.

The tbl.7 manuals says the same.  But you have non-ASCII characters in 
the input.  groff is probably letting you get away with this by simply 
reading through the binary to the ')', but mandoc throws away the binary 
characters before parsing.

Second, you did raise a bug!  I was looking for modifiers for the 
vertical bar, i.e., a|b -> error.  I just committed a fix for this.

The stand-alone period is another problem.  groff *should* ignore it by 
its own definition of a no-op macro.  But as it occurs in a tbl context, 
it's different?  Blje...  For now, just put the period on the same line 
as the last macro.

Thanks again,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tbl example - what should be fixed?
  2011-05-17 13:13 ` Kristaps Dzonsons
@ 2011-05-18  6:30   ` Yuri Pankov
  2011-05-18  9:36     ` Kristaps Dzonsons
  0 siblings, 1 reply; 4+ messages in thread
From: Yuri Pankov @ 2011-05-18  6:30 UTC (permalink / raw)
  To: discuss

On Tue, May 17, 2011 at 03:13:13PM +0200, Kristaps Dzonsons wrote:
> > We have a lot of manpages having the similar looking tables:
> > .TS
> > tab(\a) box;
> > cw(2.75i) |cw(2.75i)
> > lw(2.75i) |lw(2.75i)
> > .
> > TYPE\aVALUE
> > _
> > Type1\aValue1
> > _
> > Type2\aValue2
> > .TE
> >
> > Output of -Tlint:
> > tbl.example:2:5: ERROR: skipping bad character: ignoring byte
> > tbl.example:2:6: ERROR: bad table syntax
> > tbl.example:3:12: ERROR: bad table layout
> > tbl.example:4:12: ERROR: bad table layout
> > tbl.example:6:15: ERROR: skipping bad character: ignoring byte
> > tbl.example:6:4: ERROR: bad table layout
> > tbl.example:8:4: ERROR: skipping bad character: ignoring byte
> > tbl.example:8:2: ERROR: bad table layout
> > tbl.example:10:20: ERROR: skipping bad character: ignoring byte
> > tbl.example:10:1: ERROR: bad table layout
> > tbl.example:1:1: ERROR: no table data cells specified
> >
> >
> > My questions is, is there anything that could/should be fixed/improved
> > in tbl parser, or all of the errors are 100% correct and should be fixed
> > in the manpages?
> 
> Yuri,
> 
>  From mdoc.7:
> 
> LANGUAGE SYNTAX
>       mdoc documents may contain only graphable 7-bit ASCII
>       characters, the space character, and, in certain circumstances,
>       the tab character.
> 
> The tbl.7 manuals says the same.  But you have non-ASCII characters in 
> the input.  groff is probably letting you get away with this by simply 
> reading through the binary to the ')', but mandoc throws away the binary 
> characters before parsing.
> 
> Second, you did raise a bug!  I was looking for modifiers for the 
> vertical bar, i.e., a|b -> error.  I just committed a fix for this.
> 
> The stand-alone period is another problem.  groff *should* ignore it by 
> its own definition of a no-op macro.  But as it occurs in a tbl context, 
> it's different?  Blje...  For now, just put the period on the same line 
> as the last macro.

Thanks, Kristaps. I was just making sure what I should fix locally (a
simple sed script took care of it..)


Yuri
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tbl example - what should be fixed?
  2011-05-18  6:30   ` Yuri Pankov
@ 2011-05-18  9:36     ` Kristaps Dzonsons
  0 siblings, 0 replies; 4+ messages in thread
From: Kristaps Dzonsons @ 2011-05-18  9:36 UTC (permalink / raw)
  To: discuss

On 18/05/2011 08:30, Yuri Pankov wrote:
> On Tue, May 17, 2011 at 03:13:13PM +0200, Kristaps Dzonsons wrote:
>>> We have a lot of manpages having the similar looking tables:
>>> .TS
>>> tab(\a) box;
>>> cw(2.75i) |cw(2.75i)
>>> lw(2.75i) |lw(2.75i)
>>> .
>>> TYPE\aVALUE
>>> _
>>> Type1\aValue1
>>> _
>>> Type2\aValue2
>>> .TE
>>>
>>> Output of -Tlint:
>>> tbl.example:2:5: ERROR: skipping bad character: ignoring byte
>>> tbl.example:2:6: ERROR: bad table syntax
>>> tbl.example:3:12: ERROR: bad table layout
>>> tbl.example:4:12: ERROR: bad table layout
>>> tbl.example:6:15: ERROR: skipping bad character: ignoring byte
>>> tbl.example:6:4: ERROR: bad table layout
>>> tbl.example:8:4: ERROR: skipping bad character: ignoring byte
>>> tbl.example:8:2: ERROR: bad table layout
>>> tbl.example:10:20: ERROR: skipping bad character: ignoring byte
>>> tbl.example:10:1: ERROR: bad table layout
>>> tbl.example:1:1: ERROR: no table data cells specified
>>>
>>>
>>> My questions is, is there anything that could/should be fixed/improved
>>> in tbl parser, or all of the errors are 100% correct and should be fixed
>>> in the manpages?
>>
>> Yuri,
>>
>>   From mdoc.7:
>>
>> LANGUAGE SYNTAX
>>        mdoc documents may contain only graphable 7-bit ASCII
>>        characters, the space character, and, in certain circumstances,
>>        the tab character.
>>
>> The tbl.7 manuals says the same.  But you have non-ASCII characters in
>> the input.  groff is probably letting you get away with this by simply
>> reading through the binary to the ')', but mandoc throws away the binary
>> characters before parsing.
>>
>> Second, you did raise a bug!  I was looking for modifiers for the
>> vertical bar, i.e., a|b ->  error.  I just committed a fix for this.
>>
>> The stand-alone period is another problem.  groff *should* ignore it by
>> its own definition of a no-op macro.  But as it occurs in a tbl context,
>> it's different?  Blje...  For now, just put the period on the same line
>> as the last macro.
>
> Thanks, Kristaps. I was just making sure what I should fix locally (a
> simple sed script took care of it..)

Yuri, great!  The multibyte char is something that can be solved in 
different ways, but I've added an entry to the TODO regarding the 
standalone period, which should be implemented if you're seeing it in 
the wild.

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-18  9:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 11:18 tbl example - what should be fixed? Yuri Pankov
2011-05-17 13:13 ` Kristaps Dzonsons
2011-05-18  6:30   ` Yuri Pankov
2011-05-18  9:36     ` Kristaps Dzonsons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).