• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript Syntax File?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >AppleScript Syntax File? (From: Stephen Swift <email@hidden>)

  • Prev by Date: Re: Internet Explorer +
  • Next by Date: Re: scope property, parent, load script
  • Previous by thread: Re: AppleScript Syntax File?
  • Next by thread: Path to current script file?
  • Index(es):
    • Date
    • Thread