Simon,
First let me thank you for a wonderful program. This has quickly become my favourite coding tool.
I'm attempting, mostly successfully, to create a schemedef file to match the Arduino IDE (www.arduino.cc). Here's the code:
`<?xml version="1.0" ?>
<!-- Arduino SchemeDef to match the Arduino IDE (www.arduino.cc) with a few additions for added clarity.
- added break, continue, #include, and #define to "datatype" keywords
- added sizeof to "method" keywords
- added Servo and Wire library keywords to "method"
Written by: A. Weber - Ontario, Canada
Last Modified: 2007-11-19
-->
<Scheme>
<keyword-classes>
<keyword-class name="datatype">
<!-- data types and structures -->
#include #define boolean break byte case char class continue default do double else false float for
if int long new null private protected public return short signed static switch this throw true
try unsigned void while
</keyword-class>
<keyword-class name="method">
abs acos analogRead analogWrite asin atan atan2 attach attached attachInterrupt available begin
beginSerial beginTransmission ceil constrain cos delay delayMicroseconds detach detachInterrupt
digitalRead digitalWrite endTransmission exp floor flush max millis min onReceive onRequest pinMode
print printBinary printByte printHex printInteger println printNewline printOctal printString
pulseIn random randomSeed read receive refresh requestFrom send Serial serialAvailable serialRead
serialWrite Servo setMaximumPulse setMinimumPulse shiftOut sin sizeof sq sqrt switch tan Wire write
</keyword-class>
<keyword-class name="literal">
BIN BYTE CHANGE DEC DISPLAY FALLING HALF_PI HALF_PI HEX HIGH INPUT LOW LSBFIRST MSBFIRST null OCT
OUTPUT PI RISING SERIALTWO_PI TWO_PI FALSE TRUE
</keyword-class>
<keyword-class name="special">
setup loop
</keyword-class>
</keyword-classes>
<schemedef name="arduino" title="Arduino" author="A. Weber" url="http://www.arduiono.cc" version="1"
casesensitive="true" braces="{[()]}">
<strings>
<!-- Double quoted string with \ as an escape character -->
<stringtype id="0" 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.xA-F]" />
<preprocessor start="#" end="[ \.]" /> <!-- continuation="\" -->
<!-- From here on is the traditional scheme definition block... -->
<lexer name="arduino" />
<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="Number" key="4" class="number" />
<style name="Keywords" key="5" class="keyword" />
<style name="Keywords 2" key="6" class="keyword" fore="b00040" />
<style name="Keywords 3" key="7" class="keyword" fore="f80000" />
<style name="Keywords 4" key="8" class="keyword" fore="ff7800" bold="true" />
<style name="String" key="10" class="string" />
<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="datatype"/>
<keyword key="1" name="Keywords 2" class="method"/>
<keyword key="2" name="Keywords 3" class="literal"/>
<keyword key="3" name="Keywords 4" class="special"/>
</use-keywords>
</schemedef>
</Scheme>`
Everything is working well except the "preprocessor" class. The start="#" works well but the end"[ \.]" doesn't terminate it. Basically I want only the first word after the "#" symbol to be highlighted (until the first space or period). Right now it is highlighting the entire line.
Any help thoughts?
Thanks,
310weber