You are here: PSPad forum > English discussion forum > Re: PSPad "Code V.INI" highlighter not recognizing strings properly

Re: PSPad "Code V.INI" highlighter not recognizing strings properly

#1 PSPad "Code V.INI" highlighter not recognizing strings properly

Posted by: ScheissSchiesser88 | Date: 2016-01-19 15:25 | IP: IP Logged

Hello,

I am having an issue with this CodeV highlighter (found here: www.pspad.com). The syntax of the language it is meant to highlight is somewhat problematic for PSPad, it seems. The following is valid syntax in MacroPLUS (Code V macro language):

@volume == @vol((SLB S'M2'))

However, as I have shown here, the highlighter (or PSPad) does not recognize the first single quote. Is it possible to get PSPad to recognize a single quote which starts after a character, rather than just after white space?

As an example, I want this behavior instead:

@volume == @vol((SLB S'M2'))

Thank you to Francheu for providing this highlighter! It has been very helpful.

Thanks for your time!

Options: Reply | Quote | Up ^


#2 Re: PSPad "Code V.INI" highlighter not recognizing strings properly

Posted by: pspad | Date: 2016-01-19 18:13 | IP: IP Logged

I will take a look on it.
Code V + 2 other versions are part of the PSPad package

Options: Reply | Quote | Up ^


#3 Re: PSPad "Code V.INI" highlighter not recognizing strings properly

Posted by: francheu | Date: 2016-01-25 12:57 | IP: IP Logged

Hi,
If the first quote is after a space, there is no problem. If it just after a character its behaviour depends on the content between quotes:
- if the text is an actual keyword, it will be highlighted as a keyword, and the string terminates correctly
- with any other text the string does not terminate and everything after is colored as a string

In both cases the highlighting is actually wrong, and it is linked to the way PSPad manages single quotes when the first quote is preceded by a character instead of a space. The problem does not appear with double quotes.

image

In the syntax definition, both single and double quotes are activated. Maybe desactivating single quote will do the trick, but it would be illogical.

I have already observed this problem, but lived with it. I wonder if this is linked to the fact that for some languages (actual language, not programming), as in French, the single quote is used to bind two words and avoid weird pronunciations (such as "L'erreur est humaine"). But this would mean that the single quote option in the syntax definition is useless...

--
François

Options: Reply | Quote | Up ^


#4 Re: PSPad "Code V.INI" highlighter not recognizing strings properly

Posted by: ScheissSchiesser88 | Date: 2016-01-28 15:11 | IP: IP Logged

François,

Thank you for the reply. It is somewhat comforting to hear that I am not the only one who has dealt with this issue.

Perhaps using the double-quotes is the ticket.

I take from your reply that there is nothing that can be done, in terms of the CodeV syntax definition, to fix this issue. It is PSPad internal, it seems.

Again, thank you for your work on this add-on. As a student, this has been very helpful.

-Eric

Options: Reply | Quote | Up ^


#5 Re: PSPad "Code V.INI" highlighter not recognizing strings properly

Posted by: pspad | Date: 2016-03-22 14:02 | IP: IP Logged

There were conflict with MathLab syntax where v' means vector.
I added special option for vectors into user highlighter definition, it means CoveV will be highlighted OK in the next build

Options: Reply | Quote | Up ^


#6 Re: PSPad "Code V.INI" highlighter not recognizing strings properly

Posted by: ScheissSchiesser88 | Date: 2016-10-01 18:29 | IP: IP Logged

I only just checked this discussion now since my last post. I will give the new build a shot and see how it works. Thank you!

Edit: Works like a charm! Thank you for your time.

Edited 1 time(s). Last edit at 2016-10-01 18:32 by ScheissSchiesser88.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR