|
|
Darren New wrote:
> May I suggest that perhaps dark blue on black (and similar color
> schemes) aren't the best choice? Most of it, I can't read.
Oh, OK. It's actually all very readable on my screen; I guess it has a
higher gamma or something.
> Stick to
> either bright colors on a dark background or vice versa. Or at least
> make things like the prompt dim and the results bright. :-)
Actually I made the prompt bright and the input + result dim. :-} Maybe
I should reverse that?
The mean reasoning behind all this multicoloured madness is so that if a
predicate produces 6 pages of output, you can easily find the thing you
typed in, because it's a different colour.
...and then I tried to extend this concept as far as humanly possible,
possibly resulting in a screen that's a tad too busy. ;-)
BTW, are you impressed that I got this to work? Somebody wrote a small
Haskell library that invokes windows.h under Windoze or emits ANSI
escape sequences on POSIX. Neat, eh? Also, notice the window title
bar... ;-)
> And if you say "x = y + 3 & y = 17" it says "x = y", which wouldn't seem
> to be right. Unless I have the syntax wrong or something.
Really? That shouldn't - ah, wait, I see what's happening.
Check the second line of output:
Predicate: x = y
Since "+" isn't a valid token, the parser has ignored everything after
that point. If the predicate *is* x = y, then the result you got would
be perfectly correct.
This is one of the irritating things about Parsec. It can silently fail
to parse all of the input. Like, if some prefix of the input is a valid
expression but the rest isn't, it returns just the prefix. (Obviously it
depends how you structure your parser.) I must figure out how to fix that...
Anyway, *this* is why it prints out what it thinks it parsed the
expression as. (With lots of extra brackets.) In all cases, check that
the program has parsed something that matches what you intended! o_O
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|