www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - TextPad Syntax File?

reply Benji Smith <dlanguage benjismith.net> writes:
Does anyone have a TextPad syntax file for D1, preferably with class 
names from Tango included as second-level keywords?

There's one here: http://textpad.com/add-ons/syna2g.html
And there's one here: http://www.digitalmars.com/d/archives/13475.html

...but they're both more than five years old, so I'm looking for 
something a little more up-to-date :)

--benji
Aug 24 2008
parent reply Alexander Panek <alexander.panek brainsware.org> writes:
Benji Smith wrote:
 Does anyone have a TextPad syntax file for D1, preferably with class 
 names from Tango included as second-level keywords?
 
 There's one here: http://textpad.com/add-ons/syna2g.html
 And there's one here: http://www.digitalmars.com/d/archives/13475.html
 
 ...but they're both more than five years old, so I'm looking for 
 something a little more up-to-date :)
Hey, don't diss mah syntax file. :P Anyways, it's really easy to update, just download the file and add keywords as desired. IIRC it's just an INI file. Don't forget to resubmit it to the TextPad team! Kind regards, Alex
Aug 24 2008
parent reply Benji Smith <dlanguage benjismith.net> writes:
Alexander Panek wrote:
 Hey, don't diss mah syntax file. :P
 
 Anyways, it's really easy to update, just download the file and add 
 keywords as desired. IIRC it's just an INI file. Don't forget to 
 resubmit it to the TextPad team!
 
 Kind regards, Alex
Yeah, I know the file itself isn't hard to create. The tricky part is making sure it's up-to-date with the actual language spec, and with all the classes in the standard library. Incidentally, I also just found this one: http://pr.stewartsplace.org.uk/d/ I guess I'll take a look at all three files and try to cobble together a new one that matches the D1 language spec as closely as possible. Getting all the classes from Tango will be the annoying bit. When I finish, I'll post an update here, and send a copy to the TP people. --benji
Aug 24 2008
parent reply Benji Smith <dlanguage benjismith.net> writes:
Benji Smith wrote:
 I guess I'll take a look at all three files and try to cobble together a 
  new one that matches the D1 language spec as closely as possible. 
 Getting all the classes from Tango will be the annoying bit.
 
 When I finish, I'll post an update here, and send a copy to the TP people.
 
 --benji
All right. I've got a basic TP syntax file coming nicely along. Some of the existing syntax files needed updates to the keyword lists and operators. A few minor touches, at best. I've also added keyword entries (using a keyword group, for different coloring) for the opcodes, keywords, and register names of D's inline assembler syntax. As one final touch, I'd also like to include a complete list of the public classes, structs, aliases, typedefs, and functions, from both Phobos and Tango. But I'm at a loss for how to produce a comprehensive list (without simultaneously generating a bunch of garbage). I tried using some basic regular expressions on the Phobos source code, but that technique quickly turned into a total quagmire. Any suggestions? --benji
Aug 24 2008
parent reply Benji Smith <dlanguage benjismith.net> writes:
I've attached the TP syntax file I've put together, in case anyone is 
interested. It's up-to-date with the language spec, as of 1.034 and 2.018.

Using this file, you should get keyword coloring for all D language 
keywords, as well as for the inline assembler syntax, with different 
colors for language keywords, ASM directives, register names, and opcodes.

I'll also send a copy to the TextPad website, so that they can update 
their link.

--benji
Aug 26 2008
parent Benji Smith <dlanguage benjismith.net> writes:
Benji Smith wrote:
 I've attached the TP syntax file I've put together, in case anyone is 
 interested. It's up-to-date with the language spec, as of 1.034 and 2.018.
 
 Using this file, you should get keyword coloring for all D language 
 keywords, as well as for the inline assembler syntax, with different 
 colors for language keywords, ASM directives, register names, and opcodes.
 
 I'll also send a copy to the TextPad website, so that they can update 
 their link.
 
 --benji
Oops. Ignore that last one. Use this one instead. In the previous one, I mentioned in the comments that the D2 string aliases were included (string, dstring, wstring), but I forgot to put them in the keyword listing. --b
Aug 26 2008