Martin Baker wrote:
>
> On 20/03/14 08:05, Ralf Hemmecke wrote:
> > OK, I see, you basically want to rename i-output.boot to newoutput.spad
> > and change the syntax from boot to spad.
>
> In the case of mathprintWithNumber/algebraFormat I would rather write it
> by modifying an existing formatter than by reverse engineering
> i-output.boot.
All formatters call 'outputTran' and the only definition is in
i-output.boot. Also, 2D text formatter is real formatter,
namely it computes sizes of thing and makes line/page
breaking decisions based on them. All other formatters
are just tree transformers, they take one tree (that
is OutputForm) and emit another tree. Of course, tree
walking part should be identical in all formatters.
But this is about 200-250 lines of code. The rest
is specific to text format.
> I think this will give much cleaner and well documented code and will
> allow more advanced capabilities and structures of SPAD to be taken
> advantage off. I think it will then be more ready for the time when
> Waldek is willing to cut over to new OutputForm structure.
>
> The other stuff in i-output.boot is probably best done by reverse
> engineering existing boot code.
I am not sure what you mean by "other stuff": probably 95% of
i-output.boot is involved in implementing 'mathprintWithNumber'
This includes 'outputTran' which alone is about 200-300
lines. Basically beside 'mathprintWithNumber' in i-output.boot
we also have tolevel control of printing, which is easy
to translate to Spad.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.