% 4dos Mode % Syntax coloring for .btm and .bat files % % Create : 25 Oct 1997 % Update : 30 May 1999 % Author : Marko Mahnič, marko.mahnic@usa.net % static variable d4dosmode = "4dos"; create_syntax_table(d4dosmode); define_syntax("::", "", '%', d4dosmode); define_syntax('"', '"', d4dosmode); define_syntax ("([", ")]", '(', d4dosmode); define_syntax ("@0-9a-zA-Z_", 'w', d4dosmode); % words define_syntax ("-+0-9.", '0', d4dosmode); % Numbers define_syntax (",;.?", ',', d4dosmode); define_syntax ("%$()[]-+/*=<>^", '+', d4dosmode); set_syntax_flags (d4dosmode, 1); % case insensitive () = define_keywords_n (d4dosmode, "doeqgegtifleltne", 2, 0); () = define_keywords_n (d4dosmode, "foriffsetnot", 3, 0); () = define_keywords_n (d4dosmode, ".or.callechoelseexitgotoquitthen", 4, 0); () = define_keywords_n (d4dosmode, ".and..xor.breakenddogosubwhile", 5, 0); () = define_keywords_n (d4dosmode, "endiffreturn", 6, 0); () = define_keywords_n (d4dosmode, "elseiff", 7, 0); () = define_keywords_n (d4dosmode, "setlocal", 8, 0); () = define_keywords_n (d4dosmode, "@if", 3, 1); () = define_keywords_n (d4dosmode, "@dec@ems@ext@inc@int@len@lpt@xms", 4, 1); () = define_keywords_n (d4dosmode, "@cahr@date@eval@exec@full@line@name@path@time@trim@word", 5, 1); () = define_keywords_n (d4dosmode, "@ascii@alias@cdrom@comma@files@index@instr@label@lines@lower@ready@timer@upper@words", 6, 1); () = define_keywords_n (d4dosmode, "@attrib@device@dosmem@format@master@random@remote@repeat@search@select@substr@unique", 7, 1); () = define_keywords_n (d4dosmode, "@fileage@makeage@numeric@readscr", 8, 1); () = define_keywords_n (d4dosmode, "@descript@diskfree@diskused@extended@filedate@filename@fileopen@fileread@fileseek@filesize@filetime@findnext@makedate@maketime@truename", 9, 1); () = define_keywords_n (d4dosmode, "@disktotal@fileclose@fileseekl@filewrite@findfirst@removable", 10, 1); () = define_keywords_n (d4dosmode, "@filewriteb", 11, 1); % -------------------------------------------------------------- % Main entry % define d4dos_mode () { set_mode(d4dosmode, 2); use_syntax_table(d4dosmode); }