help-source-highlight
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-source-highlight] Problem with double-quoted expressions in langua


From: Matthew M. Burke
Subject: [Help-source-highlight] Problem with double-quoted expressions in language definition
Date: Thu, 10 Mar 2016 08:27:01 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

I'm using source-highlight version 3.1.8 on OS X 10.11.3.
(I installed it using homebrew).


I am writing a language definition file for Forth and I cannot get double-quoted expressions to work. Perhaps I am misunderstanding something.

According to my understanding of the documentation, if I double-quote keywords then they should only match if they are surrounded by a word boundary, i.e. they should not match internally to an alphanumeric string.

Below is a snippet from my forth.lang:

keyword = "i",
 "j",
 "k",
 "for",
 "do",
 "of"

But when I run source-highlight on a sample Forth file, it highlights the "do" in "does>" and the "i" in "trial", etc.

I've posted the complete forth.lang file to http://bluedino.net/downloads/forth.lang and a sample image of the output to http://bluedino.net/downloads/forthlisting.png. Note that I am also using a custom style file so that I can use custom language elements (for completeness I've uploaded it to http://bluedino.net/downloads/forth.style) .

Any help is appreciated!

Thanks,

Matt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]