Conditional assembly highlighting ...

Post any comments, suggestions, annoyances or ideas for future releases here. Please do not post bug reports or questions here.
Post Reply
Rabbit
Posts: 2
Joined: Tue Mar 27, 2012 1:12 pm

Conditional assembly highlighting ...

Post by Rabbit »

Hi all,
I'm using Zeus editor for development of applications mainly at assembler source level and I'm often using the conditional assembly structures.
It will be very useful to have a possibility to have highlighted only the code segments which are enabled by the #define s.
Have anyone a suggestion to do that? I'm using the folding feature, but it's not perfest (as I'm only human and make a mistakes ...). :wink: .
Thank for any reply!
George
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi George,
It will be very useful to have a possibility to have highlighted only the code segments which are enabled by the #defines.
The difficulty of implementing such a feature is it requires the editor to have full knowledge of the programming language.

Now this sort of feature is fairly easy to implement in a full blown, single language IDE since all that is needed is embedding a language parser into the IDE.

But if you look at the number of programming languages Zeus tries to support (i.e. Options, Document Types menu), embedding that many language parsers into Zeus is not practical :(

But I am happen to be proven wrong on this.

If anyone can identify a general purpose text editor that implements such a feature without having to embed a language parser I will be more than happy to try adding a similar feature into Zeus ;)

Cheers Jussi
Rabbit
Posts: 2
Joined: Tue Mar 27, 2012 1:12 pm

Post by Rabbit »

Hi, Jussi!
That's a ultraquick reply :wink:
But I'm afraid that I don't fully understand your objection - I'll be fully satisfied with the highlighting rules for C - preprocessor (and hope others too). Maybe I'm wrong, but that seems to me as not so wide specification.
Cheers,
George
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi George,
I'll be fully satisfied with the highlighting rules for C - preprocessor (and hope others too).

You are correct. To make it work would require embedding some sort of C preprocessor.

But it is not as simple as just adding a simple C preprocessor.

The preprocessor would also need to understand things like include path environment variables.

It may also need to check environment variables for defines.

It would also need to be able to search and navigate include paths for include files.

It would have to manage nested includes.

In other words it is well on the way to becoming a compiler.

Add to this, the code would need to be fast enough to fire every time the user made an edit change to the file.

And if it got any one of these steps wrong it would highlight the code incorrectly, resulting in a bug report :(

As I said, show me a general purpose editor that implements such a feature and I will stand corrected and agree this is an easy feature to implement.

But I am not convinced this is a simple feature to implement.

Far from it, I think think this sounds like a very difficult feature to implement :(

Cheers Jussi
Post Reply