1. euphoria/colorize does not deal with nested long comments

Long comments, beginning /^ and ending */, can be nested. The interpreter handles them properly, but using last_multiline_token with the routine colorize() in euphoria/syncolor.e terminates a nested long comment, beginning /*.../*, at the first */. For example:

/* long comment 

puts(1, "This is inside a comment, so it should not be printed.\n") 
/* nested 

puts(1, "This inside a nested long comment, so it should not be printed.\n") 
*/ 
puts(1, "Still inside a single level of long comment, so it should not be printed.\n") 
*/ 
puts(1, "This should be the first output from the program.\n") 

Executing the above code shows that nested comments work in Euphoria v4.0.5 using the colouring routines from v4.1.0 -
(after changing sizeof(C_POINTER) to 4).

Having previewed, I see that it doesn't show the correct colours in the forum either!

Should this be a ticket?

Arthur

new topic     » topic index » view message » categorize

2. Re: euphoria/colorize does not deal with nested long comments

ArthurCrump said...

Executing the above code shows that nested comments work in Euphoria v4.0.5 using the colouring routines from v4.1.0 -
(after changing sizeof(C_POINTER) to 4).

So 4.0.5 has the bug, but 4.1.0 does not?

ArthurCrump said...

Having previewed, I see that it doesn't show the correct colours in the forum either!

Should this be a ticket?

Yes. In fact, we might have two tickets here: one on the openeuphoria.org product and one for the Euphoria product.

new topic     » goto parent     » topic index » view message » categorize

3. Re: euphoria/colorize does not deal with nested long comments

jimcbrown said...
ArthurCrump said...

Executing the above code shows that nested comments work in Euphoria v4.0.5 using the colouring routines from v4.1.0 -
(after changing sizeof(C_POINTER) to 4).

So 4.0.5 has the bug, but 4.1.0 does not?

ArthurCrump said...

Having previewed, I see that it doesn't show the correct colours in the forum either!

Should this be a ticket?

Yes. In fact, we might have two tickets here: one on the openeuphoria.org product and one for the Euphoria product.

I am sorry, I should have installed v4.1, (or perhaps not mentioned that I had used v4.0.5).
I have been too lazy to install v4.1 yet.
I used the routines in syncolor.e (and the ones it called) from the v4.1 distribution because the routines in the v4.0.5 distribution do not appear to support last_multiline_token. (v4.0.5 also does not support sizeof, so I hacked it).

I am pretty sure that the bug is in tokenize.e in v4.1.

In any case the bug also shows up in the forum and I postulate that it is the same bug, not a different one.

I think it is time for me to install v4.1 properly and try again.

Arthur

new topic     » goto parent     » topic index » view message » categorize

4. Re: euphoria/colorize does not deal with nested long comments

ArthurCrump said...

Long comments, beginning /^ and ending */, can be nested. The interpreter handles them properly, but using last_multiline_token with the routine colorize() in euphoria/syncolor.e terminates a nested long comment, beginning /*.../*, at the first */.

Should this be a ticket?

I have now tried this using entirely version 4.1.0.
The result is the same.

Arthur

new topic     » goto parent     » topic index » view message » categorize

5. Re: euphoria/colorize does not deal with nested long comments

ArthurCrump said...
ArthurCrump said...

Long comments, beginning /^ and ending */, can be nested. The interpreter handles them properly, but using last_multiline_token with the routine colorize() in euphoria/syncolor.e terminates a nested long comment, beginning /*.../*, at the first */.

Should this be a ticket?

I have now tried this using entirely version 4.1.0.
The result is the same.

Arthur

I have finally got round to raising a ticket for this: Ticket:902

Arthur

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu