Menu

#13 onsgmls postfix output grouping (3 of 3)

open
nobody
None
5
2014-08-14
2001-10-31
No

3) (This is the odd one) Adds an output option
"postfix" which basically reverses the grouping order
in the output, as PYX does. I think an example's the
best explanation for this. Here's a segment of normal
"prefix" output:

e
(EMPTY
o
)EMPTY
ADEF TOKEN VAL2
o
AIMP IMPLIED
ACUR TOKEN A
o
ADATA IMPLIED
L15
(ATTR-EL
-set defaulted and current
L16
o
)ATTR-EL

and here's that very same segment as "postfix" output:

(EMPTY
e
)EMPTY
o
(ATTR-EL
ADEF TOKEN VAL2
AIMP IMPLIED
o
ACUR TOKEN A
ADATA IMPLIED
o
L15
-set defaulted and current
)ATTR-EL
L16
o

I don't actually think this is useful, but I was
annoyed reading the PYX page's attitude, and I've been
meaning to address whatever need they have to do things
this way. :) I understand if no one wants this
included, but I think I have managed to do it with
minimal impact on the source, and it actually allows
some small cleanups in the output code, due to the more
abstracted output grouping (eg, you don't have to
prepare all the info in advance, and you can issue
related commands even in the middle of the current
"main" command). There's also #ifdef's around it which
should let you build onsgmls with or without the option.
This patch (patch-3-postfix) should be applied to an
opensp_1_5_branch, and ONLY after my patch-char-changes
and patch-2-output-features patches (that's #476606 and
#476642), because they require specific support in this
patch.

I'll also attach a file named patch-postfix to this
submission. That's a patch made against a clean
opensp_1_5_branch source tree, and should be considered
FOR REFERENCE ONLY. Applying this patch after
patch-output-features will NOT produce correct results.
Only patch-3-postfix should really be applied, and only
after patch-char-changes and patch-2-output-features..

Discussion

  • Robert Braddock

    Robert Braddock - 2001-10-31

    unified diiff

     
  • Robert Braddock

    Robert Braddock - 2001-10-31

    unified diff

     

Log in to post a comment.