Discussion › Forums › discussion › Scheme for q/k
This topic contains 0 voices and has 2 replies.
| Author | Posts |
|---|---|
| Author | Posts |
| July 21, 2011 at 5:20 pm #5379 | |
|
crntaylor Member
|
I have tried to create a scheme for PN2 for the language q, but I can’t get it to work. I have the file q.scheme in the ‘schemes’ folder of my PN2 directory, but every time I switch to use my new Q syntax highlighting, it displays all text in the same color. Any help would be greatly appreciated. Here’s the content of my q.scheme file: <?xml version="1.0" encoding="UTF-8"?> <Scheme> <keyword-classes> <keyword-class name="QKeywords"> abs aj aj0 acos all and any asc asin asof atan attr avg avgs bin ceiling cols cor cos count cov cross cut deleta deltas desc dev differ distinct div do each ej enlist eval except exec exit exp fby fills first flip floor fkeys from get getenv group gtime hclose hcount hopen hsym iasc idesc if ij in insert inter inv key keys last like lj load log lower lsq ltime ltrim mavg max maxs mcount md5 mdev med meta min mins mmax mmin mmu mod msum neg next not null or over parse peach pj plist prd prds prev prior rand rank ratios raze read0 read1 reciprocal reverse rload rotate rsave rtrim save scan select set setenv show signum sin sqrt ss ssr string sublist sum sums sv system tables tan til trim txf type uj ungroup union update upper upsert value var view views vs wavg where while within wj wj1 wsum xasc xbar xcol xcols xdesc xexp xgroup xkey xlog xprev xrank </keyword-class> </keyword-classes> <language name="q" title="Q" folding="true" casesensitive="true"> <lexer name="q"/> <comments line="/"/> <use-keywords> <keyword key="0" name="Keywords" class="QKeywords"/> </use-keywords> <use-styles> <style name="Default" key="32" /> <style name="Whitespace" key="0" class="whitespace"/> <style name="Comment" key="1" class="commentline"/> <style name="Variable" key="2" class="variable"/> <style name="Number" key="3" class="number"/> <style name="Keyword" key="4" class="keyword"/> <style name="String" key="5" class="string"/> <style name="Operator" key="6" class="operator"/> <style name="Atom" key="7" fore="000080"/> </use-styles> </language> </Scheme>
|
| July 28, 2011 at 2:28 pm #17940 | |
|
simon Key Master
|
This scheme relies on Scintilla having a built-in lexer for Q, I’m not sure it does? You could certainly use a schemedef to highlight custom keywords, I’m not familiar with Q so I’m not sure if it has any unusual constructs. |
| August 4, 2011 at 7:24 pm #17941 | |
|
maXmo Member
|
Seems like it uses a single slash for comments, so the only option is to create a schemedef file. Make sure you have the latest version of PN, there was a problem with loading this custom lexer. |
You must be logged in to reply to this topic.