> I'd better make sure that scanning *can't* give an error, though.
There are several errors that can occur in the lex phase, e.g.,
'\q'bad character literal
"\q"bad string literal
\u0001 bad character in input
I REALLY dislike the idea of having my comment
> Actually, shouldn't "isn't" be parsed as a single varid? From the 1.4
> report:
OK, OK, let me change my example:
{- A comment, isn 't it? -}
-- Lennart
> I REALLY dislike the idea of having my comments lexed. Can't we leave
> this part of the language spec alone?
OK, ok, ok. I am suitably berated and I yield.
* Comments *start* with a lexeme, as previously discussed, and I think
this is fine.
* The opening lexeme may be '--', '---' etc
> "Simon" == Simon Peyton-Jones <[EMAIL PROTECTED]> writes:
>> I don't understand this remark. Are you telling me that after
>> a '{-' token the usual lexical process is used to find the
>> matching '-}' token?
Simon> That's what I intended. Provided that scanning can't gi
Simon Peyton-Jones wrote:
>
> * Comments *start* with a lexeme, as previously discussed, and I think
>this is fine.
>
> * The opening lexeme may be '--', '---' etc for ordinary comments, or
>'{-' for nested comments
>
> * Note that '{--' is not a lexeme at all, so the maximal munch ru
Folks,
I have now completed the draft report on Haskell 98, both language and
libraries. I have dated them both 'Draft: 1 Dec 1998'.
You can find them at
http://research.microsoft.com/users/simonpj/Haskell/haskell98.html
There's an allegedly-complete list of changes, along with the re
> "Alex" == S Alexander Jacobson <[EMAIL PROTECTED]> writes:
Alex> Just to confirm, What is the official handling of:
>> main = putStr " -- Hello World "
Alex> and
>> main = putStr " {- this is not a comment -} "
in both cases the scanner is insi
On 23 Nov, Graeme Moss wrote:
>
> So no one minds that `--(Nothing)' is a comment whereas `--?Nothing?'
> is not a comment?
I think that this highlights the fact that the top-bit-set characters
were put into the language with relatively few distinctions; ASCII
brackets (){}[] are not include
Just to confirm,
What is the official handling of:
> main = putStr " -- Hello World "
and
> main = putStr " {- this is not a comment -} "
-Alex-
On Mon, 23 Nov 1998, Simon Peyton-Jones wrote:
> > I REALLY dislike the idea of having my comments lexed. Can't we lea
> May I at least assume the implication:
> reduction_count1 > reduction_count2 ==> time1 > time2 ?
I'm not sure how the reduction count is done in Hugs,
but if it simply counts G-machine instructions then
you can't assume even this. It's likely to be true,
but G-machine instructions
Folks, here's a clarification about comment syntax.
Simon
|The new draft (which you won't have seen) says:
|
|"An ordinary comment begins with a lexeme consisting of
|two or more consecutive dashes (e.g. @--@) and extends to the following
|newline. The comment must begin with a lexeme consistin
|> Starts a comment: `--', `---', `--Hello', `--(', `--;', `--_'
|>
|> Does not start a comment: `-->', `--=>', `--\', `--.', `--|', `--->',
|> `--? What is this', `--! Amazing', `--½ done', `--® Microsoft',
|> `--© 1998 Microsoft', `--«Nothing»'.
|
|Yes, these are correct.
So no one minds t
> Come to think of it, that's good:
>
> {- This is a string "-}" burble -}
>
> would now not be confused by the quoted -}; the lexeme is
> a string not a '-}' thing.
I don't understand this remark. Are you telling me that after
a '{-' token the usual lexical process is used to find the
m
> I don't understand this remark. Are you telling me that after
> a '{-' token the usual lexical process is used to find the
> matching '-}' token?
That's what I intended. Provided that scanning can't given an error,
that is actually *easier* than searching for the first '-}' sequence.
And it d
| {- A comment, isn't it? -}
|despite the unmatched single quote.
Actually, shouldn't "isn't" be parsed as a single varid? From the 1.4
report:
"An identifier consists of a letter followed by zero or more letters,
digits, underscores, and single quotes."
I don't know of anywhere in the repor
Hi Jan,
| Could anyone explain what is a relation between
| number of reductions and execution time of any
| given Haskell function? Is there any linear
| relationship between the two on any given machine
| and compiler/interpreter?
Absolutely, definitely not. To p
16 matches
Mail list logo