Angus Leeming wrote:
> Some preliminary questions:
> 
> * 'swallow_newlines' is used to clean-up the output, right? Ie, the
> input has already been parsed and the output data generated, but
> swallow_newlines is used to 'prettify' this output?

Yes. This should probably be modified to handle spaces too, or completely
ignored.

> * Is the '// note the space' still needed? I thought that the point of
> all this was to remove the need to modify the input data in this
> arbitrary manner?
> @@ -110,8 +112,7 @@
>                         os << t.character();
> 
>                 else if (t.cat() == catNewline) {
> -                       //if (p.next_token().cat() == catNewline) {
> -                       //      p.get_token();
> +                       //if (t.cs.size() > 1) {
>                         //      handle_par(os);
>                         //} else {
>                                 os << "\n "; // note the space
> 

It is not needed. In fact, the whole special case for catNewline and
catSpace is not needed, because the mathed parser will ignore the spaces.
The whole whitespace stuff is easy in math mode, because whitespace acts
only as token delimiter.

> * Is the CatCode comment for the 'Consecutive newlines' correct
> (catSpace, not carNewline)?

Of course not ;-)

Georg


Reply via email to