BoxToText

File BoxToText.str
Author unknown
Since unknown

This is a simple Box to text converter.It formats H, HV, A/R and ALT boxes.

Authors:- Merijn de Jonge <mdjonge@cwi.nl>- Eelco Visser <visser@acm.org>- Joost Visser <jvisser@cwi.nl>- Martin Bravenboer <martin.bravenboer@gmail.com>

Eelco Visser (April 5, 2001)- repaired bug in handling of H boxes- refactored handling of H case using thread-map

Martin Bravenboer (December 26/27/28, 2002)- implemented HV and A/R boxes- refactored many strategy defs




Statistics


General
Lines of code 383
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 23 (47% documented)
Rule number 20 (35% documented)
DynamicRule number 0



Strategy summary


abox2text(ATerm width) n/a BoxToText.str
abox2text(Strategy rec, ATerm xpos, ATerm width) Use different names to make profiling easier BoxToText.str
abox2text-A(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-ALT(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-H(Strategy rec, ATerm xpos, ATerm width) H BoxToText.str
abox2text-HV(Strategy rec, ATerm xpos, ATerm width) HV BoxToText.str
abox2text-V(Strategy rec, ATerm xpos, ATerm width) V BoxToText.str
gpp-copy(ATerm t) n/a BoxToText.str
gpp-copy(ATerm t, ATerm ts) n/a BoxToText.str
gpp-FitToMax(ATerm nr-cols) n/a BoxToText.str
gpp-hs-chars n/a BoxToText.str
gpp-hs-text n/a BoxToText.str
gpp-is-chars n/a BoxToText.str
gpp-is-chars(ATerm cont) n/a BoxToText.str
gpp-is-real-hbox n/a BoxToText.str
gpp-is-real-vbox n/a BoxToText.str
gpp-is-text n/a BoxToText.str
gpp-to-matrix(ATerm nr-cols) n/a BoxToText.str
gpp-vertical-sep(ATerm xpos) n/a BoxToText.str
gpp-vs-chars n/a BoxToText.str
gpp-vs-chars(ATerm cont) n/a BoxToText.str
gpp-vs-text n/a BoxToText.str
try-abox2text(ATerm pos, ATerm width) n/a BoxToText.str

Rule summary


abox2text-A(Strategy rec, ATerm xpos, ATerm width) A BoxToText.str
abox2text-A(Strategy rec, ATerm xpos, ATerm width) Without subboxes ([[]] as third argument) BoxToText.str
abox2text-C(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-FBOX(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-list(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-list(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-R(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-R(Strategy rec, ATerm xpos, ATerm width) n/a BoxToText.str
abox2text-S(Strategy rec, ATerm xpos, ATerm width) S BoxToText.str
gpp-align-column n/a BoxToText.str
gpp-align-column n/a BoxToText.str
gpp-align-column n/a BoxToText.str
gpp-align-column n/a BoxToText.str
gpp-do-A-column(Strategy rec) (A-OPTION * (Int * [BOX])) * (Int * [[Strs]]) -> Int * [[Strs]] BoxToText.str
gpp-do-vbox-children(Strategy rec, ATerm xpos, ATerm left-xpos) n/a BoxToText.str
gpp-format-vbox(ATerm sopt, ATerm xpos) n/a BoxToText.str
gpp-hv-add-to-hbox(Strategy rec, ATerm hsl, ATerm width) n/a BoxToText.str
gpp-hv-in-new-vbox(Strategy rec, ATerm hsl, ATerm left-xpos, ATerm width) n/a BoxToText.str
gpp-thread-map(Strategy s, ATerm t) n/a BoxToText.str
gpp-thread-map(Strategy s, ATerm t) n/a BoxToText.str



Strategy details


ATerm abox2text(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

Use different names to make profiling easier.



 
ATerm abox2text-H(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

H


type (Box, Int) -> (Strs, Int)

 
ATerm abox2text-HV(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

HV


todo Handle vs and is options
todo Substract last hspace from xpos
type (Box, Int) -> (Strs, Int)

 
ATerm abox2text-V(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

V


type (Box, Int) -> (Strs, Int)

 
ATerm gpp-hs-text
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type List(S-Option) -> String

 
ATerm gpp-is-real-hbox
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type Box ->? Box

 
ATerm gpp-is-real-vbox
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type Box ->? Box

 
ATerm gpp-is-text
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type List(S-Option) -> String

 
ATerm gpp-vertical-sep(ATerm xpos)
File BoxToText.str
Author unknown
Since unknown
 
Parameters
ATerm xpos Int

No information available.


type List(S-Option) -> String

 
ATerm gpp-vs-text
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type List(S-Option) -> String

 
ATerm try-abox2text(ATerm pos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

No information available.


todo Dump the exit

 

Rule details


ATerm abox2text-A(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

A

The first two rules are to handle empty alignment operators, i.e., Aboxses with [] or [[]] as third argument.Without subboxes ([] as third argument)



 
ATerm abox2text-A(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

Without subboxes ([[]] as third argument)



 
ATerm abox2text-S(Strategy rec, ATerm xpos, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

S



 
ATerm gpp-do-A-column(Strategy rec)
File BoxToText.str
Author unknown
Since unknown
 

(A-OPTION * (Int * [BOX])) * (Int * [[Strs]]) -> Int * [[Strs]]



 
ATerm gpp-do-vbox-children(Strategy rec, ATerm xpos, ATerm left-xpos)
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type Int * Int * [BOX] -> [Strings * Int]

 
ATerm gpp-format-vbox(ATerm sopt, ATerm xpos)
File BoxToText.str
Author unknown
Since unknown
 
Parameters
ATerm sopt List(S-Option)
ATerm xpos Int

No information available.


type List((Strings, Int)) -> (List(Strings), Int)

 
ATerm gpp-hv-add-to-hbox(Strategy rec, ATerm hsl, ATerm width)
File BoxToText.str
Author unknown
Since unknown
 

No information available.


type Box * [Int * [String]] -> [Int * [String]]