Discussion › Forums › discussion › Creating a new scheme in PN portable
This topic contains 0 voices and has 2 replies.
| Author | Posts |
|---|---|
| Author | Posts |
| January 27, 2012 at 6:17 am #7553 | |
|
prgcoder Member
|
Hi All, <first post> I am having some problems trying to create a scheme for Ingres and/or OpenRoad. I am using the portable version of PN (nice). I see in the forum some talk of .schemedef files – i do not see any of these in the portable version. I have tried copying existing .scheme files and associated them through the Tools > Options > Files > Add button, but no luck. Any pointers would be greatly appreciated. Regards, Andy. |
| January 28, 2012 at 3:35 am #18451 | |
|
Roody Member
|
It took me some time to find where things are explained, too. It seems that all of the .scheme files refer to lexers that are built-in to the Scintilla SciLexer.dll file. Unless the language you’re trying to add is 100% compatible to one of those built-in lexers, yeah, you need to make a .schemedef file. Here’s an example file for prolog. I think I got it from somewhere on here. <?xml version="1.0" ?> <!-- This is a very improvised, kluged schemedef for Prolog, written without documentation of Programmers Notepad scheme definition syntax. Main limitations: No folding of comments. Quoted atoms with a quote doubled ('don''t panic') are not treated correctly. Escaped quoted atoms ('don't panic') are OK and are preferred. Michael A. Covington - University of Georgia - http://www.ai.uga.edu/mc --> <Scheme> <keyword-classes> <keyword-class name="prolog"> <!-- Strictly speaking Prolog has no keywords. These are the ISO directives. --> dynamic multifile module discontiguous set_prolog_flag op char_conversion initialization include ensure_loaded </keyword-class> </keyword-classes> <schemedef name="prolog" title="Prolog" author="M. Covington" url="http://www.ai.uga.edu/mc/" version="1" casesensitive="true" braces="{[()]}"> <!-- Max 2 --> <strings> <!-- Quoted atom, with as an escape character. --> <stringtype id="0" start="'" end="'" multiline="false" escape="" /> <!-- Double quoted string, same --> <stringtype id="1" start=""" end=""" multiline="false" escape="" /> </strings> <identifiers start="[_a-zA-Z]" /> <comments> <line start="%" /> <block start="/*" end="*/" /> </comments> <numbers start="[0-9]" content="[0-9.]" /> <!-- From here on is the traditional scheme definition block... --> <lexer name="prolog" /> <use-styles> <style name="Default" key="32" /> <style name="Line Comment" key="1" class="comment" /> <style name="Block Comment" key="2" class="comment" /> <style name="Atom, Variable" key="3" fore="000080"/> <style name="Number" key="4" class="number" /> <style name="Directive" key="5" class="keyword" /> <!-- <style name="Keywords 2" key="6" class="keyword" fore="f80000" /> --> <style name="Quoted Atom" key="10" class="string" /> <style name="Edinburgh String" key="11" class="string" fore="f80000"/> <!-- <style name="Pre-Processor" key="12" class="preprocessor" /> --> <!-- <style name="Special Identifier" key="13" fore="478698" /> --> </use-styles> <use-keywords> <keyword key="0" name="Keywords" class="prolog"/> </use-keywords> </schemedef> </Scheme>
|
| January 30, 2012 at 4:26 am #18452 | |
|
prgcoder Member
|
Thanks Roody – that has helped me get something started. |
You must be logged in to reply to this topic.