View mode: basic / threaded / horizontal-split · Log in · Help
August 25, 2008
TextPad Syntax File?
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
August 25, 2008
Re: TextPad Syntax File?
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
August 25, 2008
Re: TextPad Syntax File?
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
August 25, 2008
Re: TextPad Syntax File?
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
August 26, 2008
Re: TextPad Syntax File?
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
August 26, 2008
Re: TextPad Syntax File?
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
Top | Discussion index | About this forum | D home