[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-kawa] not a BRL error: an unmatched '[' was read
From: |
Per Bothner |
Subject: |
Re: [Bug-kawa] not a BRL error: an unmatched '[' was read |
Date: |
Fri, 25 Nov 2005 14:04:56 -0800 |
User-agent: |
Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) |
[It's generally best to enter bug reports in BugZilla, rather than
sending mail directly to bug-kawa.]
Bruce R. Lewis wrote:
gnu.kawa.brl.BRLRead signals an error if there is no matching ']'. In
BRL this is not an error. Sometimes it is helpful to assure no
extraneous newlines at the end of output (e.g. producing a spreadsheet),
You mean a file with no newlines at the end? Or one with only a single
newline at the end? An alternative way to achieve the latter might be:
<h2>this is the header</h2>[
(do-each line (begin (newline) (display-line)))]
Or perhaps better a rule that if there is only whitespace after a final
']' the final whitespace is ignored. Optionally combined with a rule
to emit a final newline if the last line is non-terminated. That might
be a little more robust.
But it's your language so you decide. Keeping with historical behavior
is presumably easiest.
and a BRLfile deliberately does not end in ] to make sure any ending
whitespace is not output.
Send me a patch for the way you like it. If a warning is ok, the
easiest is probably easiest to replace the 'e' by 'w'.
--
--Per Bothner
address@hidden http://per.bothner.com/