Re: AppleScript Syntax File?
Re: AppleScript Syntax File?
- Subject: Re: AppleScript Syntax File?
- From: Timothy Bates <email@hidden>
- Date: Tue, 29 Apr 2003 14:47:54 +1000
>
I've been looking at Hydra <http://hydra.globalse.org/> and thought it would
>
be cool if it did AppleScript syntax coloring.
What you need to write is a series of grep strings for the language.
So figure out the classes to color, and the rules for every legal item and
away you go. Would take about half a day. I am not sure if it is worth
doing, as you won't get the syntax checking and indenting, nor anything but
text coloring (no styles except color in Hydra).
To do it, you build strings like this to define dictionary elements and thir
parameter values:
<dict>
<key>Name</key>
<string>key words</string>
<key>Color</key><!--browns -->
<array>
<real>0.4</real>
<real>0.1</real>
<real>0.65</real>
</array>
<key>Plain Strings</key>
<array>
<string>[;/]</string>
<!--group type Data, Calculation, Constraint (p40)-->
<string>[Dd]ata</string>
<string>[Cc][Aa][Ll][Cc](ulation)?</string>
<string>[Cc][Oo][Nn](straint)?</string>
<string>[Mm]atrices;</string>
<string>[Mm]atrix</string>
<string>[Bb]egin *[Mm][Aa][Tt]rices(= ?[Gg]roup [0-9]+ ?)?</string>
...
</array>
<key>Regular Expressions</key>
<array>
<!--file options -->
<string>[Dd][Rr]aw=</string> <!-- write RAMPATH commands to draw a model
p 108 -->
<string>[Mm][Xx][a-zA-Z]=</string> <!-- write matrix to file p 106 -->
<string>[Mm][Xx]\%[EMPV]=</string> <!-- write likelihood data to file p
106 -->
</array>
</dict>
You build strings like this
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.