Tools to Convert From BNF or Other Editors?
Posted: 16 February 2010 12:35 PM   [ Ignore ]
Newbie
Rank
Total Posts:  13
Joined  2010-02-16

Are there any tools available that simplify the creation of the syntax XML? In its current state, this part of sugar development is a major and critical obstacle.

I can imagine it would be fantastic to generate the XML from BNF notation or translate from other editor products via XSLT or something.

Any ideas?

Profile
 
 
Posted: 16 February 2010 05:59 PM   [ Ignore ]   [ # 1 ]
Moderator
RankRankRankRank
Total Posts:  1249
Joined  2008-10-28

There’s a tool to convert from Textmate syntax files, but it’s pretty hit and miss and you definitely have to go through and clean/test things after the fact:

http://wiki.macrabbit.com/index/Syntaxes/

(Link midway down; called the Espresso Syntax Tool.)

I don’t think anyone has written converters for other products, although it would certainly be possible to do via just about any scripting language with basic XML support.  So far, most Sugar authors have just been coding by hand.

There is also a very basic Sugar.sugar that contains snippets and codesense for most Sugar XML tags to help speed up development:

http://github.com/derekr/sugar.sugar

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 26 June 2010 01:58 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  1
Joined  2010-06-26

I tried using the tool to convert a tmLanguage file, but I can’t figure out where the result ends up. Doesn’t seem to output to the clipboard or a file.

Any pointers on how to use it?

...martin

(OS 10.6.4)

Profile
 
 
Posted: 28 June 2010 06:32 PM   [ Ignore ]   [ # 3 ]
Moderator
RankRankRankRank
Total Posts:  1249
Joined  2008-10-28

1) Launch the TM syntax tool application
2) Click the Convert TextMate Syntax button
3) Navigate to the TM syntax definition in the resulting window, select it, and click Open
4) Navigate to where you want to save the Espresso syntax XML file and hit Save

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile