bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64239] [eqn] handle input leaders like input tabs


From: G. Branden Robinson
Subject: [bug #64239] [eqn] handle input leaders like input tabs
Date: Tue, 23 May 2023 04:09:20 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64239>

                 Summary: [eqn] handle input leaders like input tabs
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Tue 23 May 2023 08:09:18 AM UTC
                Category: Preprocessor eqn
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 23 May 2023 08:09:18 AM UTC By: G. Branden Robinson <gbranden>
Input tab characters are rejected except at the "outermost" level of lexical
grouping.  (eqn is not fooled by superfluous braces.)

Since leaders are pretty much "noisy" tabs, they should be handled similarly.


$ hd EXPERIMENTS/eqn-using-tab.roff
00000000  2e 45 51 0a 61 09 62 20  73 71 72 74 20 7b 20 63  |.EQ.a.b sqrt {
c|
00000010  09 64 20 7d 0a 2e 45 4e  0a                       |.d }..EN.|
00000019
$ ./build/eqn -Tascii EXPERIMENTS/eqn-using-tab.roff >/dev/null
./build/eqn:EXPERIMENTS/eqn-using-tab.roff:1: error: tabs allowed only at
outermost level
$ hd EXPERIMENTS/eqn-using-leader.roff 
00000000  2e 45 51 0a 61 01 62 20  73 71 72 74 20 7b 20 63  |.EQ.a.b sqrt {
c|
00000010  01 64 20 7d 0a 2e 45 4e  0a                       |.d }..EN.|
00000019
$ ./build/eqn -Tascii EXPERIMENTS/eqn-using-leader.roff >/dev/null
[bupkis; no diagnostic]


And indeed things go pretty wrong if you sneak a leader past _eqn_.


$ ./build/test-groff -e -Tascii EXPERIMENTS/eqn-using-leader.roff | cat -s
troff:EXPERIMENTS/eqn-using-leader.roff:20: warning: special character 'sqrt'
not defined
troff:EXPERIMENTS/eqn-using-leader.roff:49: warning: special character 'rn'
not defined
troff:EXPERIMENTS/eqn-using-leader.roff:2: error: invalid token in argument to
escaped 'Z'
troff: error: horizontal line drawing character must have positive width
a.......bcd



The code change would happen
[https://git.savannah.gnu.org/cgit/groff.git/tree/src/preproc/eqn/box.cpp?h=1.23.0.rc4#n583
around here].







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64239>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]