--[[ Main data ]]-- ---------------------------------------- --[[ description: -- Used types. -- Используемые типы. --]] ---------------------------------------- --[[ uses: nil. -- group: Config, Datas. --]] ---------------------------------------- --[[ used: Miettunen J. Filex Offline. -[El. res].- El. text data. 2000. --]] -------------------------------------------------------------------------------- ---------------------------------------- Used parts local lines = { -- firstlines: ini = '^[;%[]', ini_ext = '^[;#%[]', assa = '%[Script Info%]', asm_rem = '^%s*;', c_rem = '^%s*/[/%*]', pas_rem = '^%s*{', lua_rem = '^%s*%-%-', s_inc = '#include', s_def = '#define', s_if = '#if', xml = '^<%?xml', -- firstlines' common parts: lang = 'language%s*=.-', dtd_xhtml = 'DTD XHTML%s.-', } --- lines local masks = { -- masks: inc = '%.inc$', html = '%.[^ptr]?html?$', xhtml = '%.x?html?$', asp_as = '%.as[pa]$', asp_ht = '%.ht[rxa]$', } --- masks local msets = { -- masks' sets: xhtml = {masks.xhtml}, asp = {masks.asp_as, masks.asp_ht, masks.inc}, modula = {'[%(<]%*', 'MODULE', 'DEFINITION', 'IMPLEMENTATION'}, } --- msets ---------------------------------------- Abstract types local abstract_types = { _meta_ = { abstract = true }, -- They usually haven't masks field! -- default default = { desc = 'Default type', }, -- abstract -- -- 0. special special = { inherit = 'default', desc = 'Special type', }, none = { inherit = 'special', desc = 'None type', }, common = { inherit = 'special', desc = 'Commmon data', }, --accept = { inherit = 'special', desc = 'Accepted data', }, ignore = { inherit = 'special', desc = 'Ignored data', skiplines = { ['^%s-$'] = false, ['^<%?xml'] = 'xml', }, }, -- for empty, xml, etc -- -- 1. text (typescript) text = { inherit = 'default', desc = 'Text type', }, plain = { inherit = 'text', desc = 'Plain text', }, -- 1.1. straight rich = { inherit = 'text', desc = 'Rich text', }, -- 1.2. formatted config = { inherit = 'rich', desc = 'Config text', }, define = { inherit = 'rich', desc = 'Data define', }, markup = { inherit = 'rich', desc = 'Markup text', }, source = { inherit = 'text', desc = 'Source language', }, -- 1.3. main = { inherit = 'source', desc = 'Main language', }, dbl = { inherit = 'main', desc = 'Database language', }, net = { inherit = 'main', desc = 'Network language', }, script = { inherit = 'source', desc = 'Script language', }, shell = { inherit = 'script', desc = 'Shell/batch language', }, -- types below is recommended for 'group' field only: rare = { inherit = 'main', desc = 'Seldom used language', }, -- -- 2. packed (no text) packed = { inherit = 'default', desc = 'Packed type', }, exec = { inherit = 'packed', desc = 'Executable code', },-- 2.1. store = { inherit = 'packed', desc = 'Packed storage', }, -- 2.2. arch = { inherit = 'store', desc = 'File archive', }, disk = { inherit = 'store', desc = 'Disk image', }, media = { inherit = 'packed', desc = 'Multimedia data', },-- 2.3. image = { inherit = 'media', desc = 'Graphic data', }, audio = { inherit = 'media', desc = 'Audio data', }, video = { inherit = 'media', desc = 'Video data', }, -- -- 3. mixed (text + packed) mixed = { inherit = 'default', desc = 'Mixed type', }, doc = { inherit = 'mixed', desc = 'Document data', }, -- 3.1. font = { inherit = 'mixed', desc = 'Font data', }, -- 3.2. } --- abstract_types ---------------------------------------- Available types local types = { _meta_ = { basis = 'base', merge = 'update', }, -- They usually are real or auxiliary types. -- 0. special empty = { inherit = 'special', desc = 'Empty', }, back = { inherit = 'special', desc = '".."', masks = {'[/\\]?%.%.$'}, }, dir = { inherit = 'special', desc = 'Directory', path = '[/\\].+[/\\]$', }, -- 1. text -- 1.1. plain text -- -- 1.1.-. default text txt = { inherit = 'plain', desc = 'Text', masks = {'%.txt$','%.ans$','%.asc$'}, }, txt_lang = { inherit = 'txt', desc = 'Locale text', masks = {'%.rus$','%.eng$'}, }, txt_spec = { inherit = 'txt', desc = 'Special text', masks = {'%.nfo$','%.spo$','%.___$','%.!!!$'}, }, txt_dist = { inherit = 'txt', desc = 'Install text', -- Distribution kit masks = {'^read%.?me$','^faq.-$', '^install.-$','^todo.-$', '^.-changelog.-$','^copying.-$', '^license.-$','^authors.-$'}, }, -- rare --mancolorer= { inherit = 'text', desc = 'man colorer', masks = {'^man%s?colorer$'}, }, -- test (used in typesTest.lua) tst_def = { inherit = 'plain', desc = 'Test: Default text', masks = {'%.tst$'}, }, tst_fl1 = { inherit = 'tst_def', desc = 'Test: fl #1 text', --masks = {'%.tst$'}, firstline = {'line #1'}, }, masks = {'%.tst$'}, strongline = {'line #1'}, }, tst_fl2 = { inherit = 'tst_def', desc = 'Test: fl #2 text', --masks = {'%.tst$'}, firstline = {'line #2'}, }, masks = {'%.tst$'}, strongline = {'line #2'}, }, -- 1.1.-. formed text -- Message: message = { inherit = 'plain', desc = 'Message', }, msg_fido = { inherit = 'message', desc = 'FIDO message', masks = {'%.msg$','%.uue$'}, }, msg_eml = { inherit = 'message', desc = 'E-mail message', masks = {'%.eml$','%.msg$','%.nws$'}, firstline = {'^FROM'}, }, msg_pkt = { inherit = 'message', desc = 'PKTview message', masks = {'%.pms$'}, }, msg_far = { inherit = 'message', desc = 'FARMail message', masks = {'%.msg$','%.eml$','%.nsw$'}, firstline = {'%%start%%'}, }, -- Others: filedesc = { inherit = 'plain', desc = 'File description', masks = {'file_id%.diz','descript%.ion', 'files%.bbs'}, }, irclog = { inherit = 'plain', desc = 'IRC log', masks = {'%.irclog$'}, }, -- 1.2. rich text -- -- 1.2.1. config text -- ini = { inherit = 'config', desc = 'INI config', masks = {'%.ini$','%.cfg$'}, }, --ini_ini = { inherit = 'config', desc = 'Main config', -- masks = {'%.ini$','%.cfg$'}, firstline = {lines.ini}, }, ini_cfg = { inherit = 'ini', desc = 'Other config', masks = {'%.ctl$','%.tpl$','%.srg$','%.lng$', --'%.conf$', -- xml-based config '%.gitconfig$', '%.types$','%.tab$'}, firstline = {lines.ini_ext}, }, ini_dlf = { inherit = 'ini', desc = 'Delphi ini', -- Delphi config: masks = {'%.dof$','%.dsk$','%.dro$','%.dci$'}, firstline = {lines.ini}, }, -- Lua somes: cfg_lua = { inherit = 'config', desc = 'Lua-ini config', masks = {'%.ltx$'}, firstline = {lines.ini}, }, -- FAR Manager & plugins: lng_far = { inherit = 'config', desc = 'FAR lng', masks = {'%.lng$'}, firstline = {'^%.Language'}, }, ini_far = { inherit = 'ini', desc = 'FAR ini', masks = {'%.farini$'}, firstline = {lines.ini}, }, --reg_far = { inherit = 'reg', desc = 'FAR reg', masks = {'%.farreg$'}, }, -- System config: cfg_sys = { inherit = 'config', desc = 'System config', }, sys_boot = { inherit = 'cfg_sys', desc = 'Boot.ini', masks = {'boot%.ini$'}, firstline = {'%[boot%sloader%]'}, }, sys_dos = { inherit = 'cfg_sys', desc = 'MsDos.sys', masks = {'^msdos%.sys'}, }, sys_cfg = { inherit = 'cfg_sys', desc = 'Config.sys', masks = {'^config%.sys'}, }, -- Windows config: inf = { inherit = 'sys_cfg', desc = 'Windows INF', masks = {'%.inf$'}, firstline = {lines.ini}, }, reg = { inherit = 'sys_cfg', desc = 'Windows REG', masks = {'%.reg$'}, firstline = {'^%s*REGEDIT4%s*$','^%s-FARREG%d%d%s*$', '^%s*Windows Registry Editor Version %d%.%d%d%s*$'}, }, -- 1.2.2. data define -- -- Resources: frm_dlf = { inherit = 'define', desc = 'Delphi form', masks = {'%.dfm$'}, }, res_src = { inherit = 'define', desc = 'Resource source', masks = {'%.rc$','%.dlg$'}, }, vmodeler = { inherit = 'define', desc = 'Visual Modeler', masks = {'%.mdl$'}, }, -- Subtitles: sub = { inherit = 'define', desc = 'Subtitles', }, sub_assa = { inherit = 'sub', desc = '(Advanced) Sub Station Alpha', group = 'ini', masks = {'%.ass$','%.ssa$'}, firstline = {'^'..lines.assa,'^...'..lines.assa}, }, sub_srt = { inherit = 'sub', desc = 'SubRipper', group = 'ini', masks = {'%.srt$'}, firstline = {'^%d+'}, }, sub_sub = { inherit = 'sub', desc = 'SubViewer/SubMagic/etc', group = 'sub_srt', masks = {'%.sub$'}, firstline = {'^%[%w+%]'}, }, -- rare --[[ sub_jaco = { inherit = 'sub', desc = 'JACOsub', masks = {'%.js$'}, firstline = {'^# JACOsub script file'}, }, sub_pjs = { inherit = 'sub', desc = 'Phoenix Japanimation Society', masks = {'%.pjs$'}, }, sub_qt = { inherit = 'sub', desc = 'QTtext', group = 'ini', masks = {'%.txt$'}, firstline = {'^{QTtext}'}, }, sub_s2k = { inherit = 'sub', desc = 'Sasami2k', masks = {'%.s2k$'}, firstline = {'Sasami'}, }, --]] --[[ sub_mdv = { inherit = 'sub', desc = 'MicroDVD', masks = {'%.txt$','%.sub$'}, firstline = {''}, }, -- Unknown firstline! sub_tmps = { inherit = 'sub', desc = 'TMPlayer subtritres', masks = {'%.sub$'}, firstline = {''}, }, -- Unknown firstline! -- unknown sub format for: masks = {'%.mpl$'} --]] --[[ sub_sgml = { inherit = 'sgml', desc = 'SGML subtitle', group = 'sub', }, sub_sami = { inherit = 'sub_sgml', desc = 'Microsoft SAMI' masks = {'%.smi$'}, firstline = {'^%s*'}, }, sub_smil = { inherit = 'sub_sgml', desc = 'W3C SMIL', masks = {'%.smil?$'}, firstline = {'^%s*'}, }, sub_rt = { inherit = 'sub_smil', desc = 'W3C RealText', masks = {'%.rt$'}, firstline = {'^%s*%s*'}, }, --..'%s+%w+%s*=%*[\'\"].-[\'\"]%s*' -- more complex check dtd = { inherit = 'xml', desc = 'DTD', masks = {'%.dtd$','%.ent$','%.mod$'}, }, xmlschema = { inherit = 'xml', desc = 'XML Schema', masks = {'%.xsd?$'}, }, xslfo = { inherit = 'xml', desc = 'XSL-FO', masks = {'%.xsltfo?$','%.fo$'}, }, -- 1.0 xslt = { inherit = 'xml', desc = 'XSLT', masks = {'%.xslt?2?$'}, firstline = {'stylesheet%s+', '[tT]ransform%s+'}, }, -- 1.0 & 2.0 -- use colorer' proto.hrc to separate XSLT 1.0 and XSLT 2.0 xquery = { inherit = 'xml', desc = 'XQuery', masks = {'%.xq$'}, firstline = {'^%s*xquery%s+'}, }, schematron= { inherit = 'xml', desc = 'Schematron', masks = {'%.sch$'}, }, -- XML book: xmlbook = { inherit = 'xml', desc = 'XML Book', }, docbook = { inherit = 'xmlbook', desc = 'DocBook', masks = {'%.dbk?$','%.docbook$'}, firstline = {'DocBook XML','DOCTYPE article', ''}, }, svg = { inherit = 'xml', desc = 'SVG', masks = {'%.svg$'}, }, -- 1.0 taglib = { inherit = 'xml', desc = 'JSP taglib', group = 'jsp', masks = {'%.tld$'}, }, web_app = { inherit = 'xml', desc = 'web-app', masks = {'web%.xml$'}, }, wsc = { inherit = 'xml', desc = 'WSC', masks = {'%.wsc$'}, }, wsdl = { inherit = 'xml', desc = 'WSDL', masks = {'%.wsdl$'}, }, wsf = { inherit = 'xml', desc = 'WSH', masks = {'%.wsf$'}, }, -- wsf ~= wsh --xaml = { inherit = 'xml', desc = 'XAML', masks = {'%.xaml$'}, }, xbl = { inherit = 'xml', desc = 'Mozilla XBL', masks = {'%.xml$'}, firstline = {'xmlns%s*=%s*["\']http://www%.mozilla%.org/xbl["\']'}, }, xul = { inherit = 'xml', desc = 'Mozilla XUL', masks = {'%.xul$'}, }, --firstline = {'xmlns%s*=%s*["\']http://www%.mozilla%.org/xul["\']'}, }, xsieve = { inherit = 'xslt', desc = 'XSieve XSLT', masks = {'%.xsl$'}, firstline = {'xmlns%s*=%s*["\']http://www%.sourceforge%.net["\']'}, }, -- rare --[[ digidoc = { inherit = 'xml', desc = 'DigiDoc', masks = {'%.ddoc$','%.dd$'}, }, --]] -- SGML others: vrml = { inherit = 'sgml', desc = 'VRML', masks = {'%.wrl$'}, }, -- rare -- [[ mathml = { inherit = 'sgml', desc = 'MathML', masks = {'%.mml$','%.math?$'}, firstline = {'MathML'}, }, -- 2.0 micqlog = { inherit = 'sgml', desc = 'mICQ log', group = 'text', masks = {'^[%._]log$'}, firstline = {'^<$'}, }, sdml = { inherit = 'sgml', desc = 'SDML', masks = {'%.sdml$'}, }, wml = { inherit = 'sgml', desc = 'WML', masks = {'%.wml$'}, }, --]] -- Colorer-take5: colorer = { inherit = 'xml', desc = 'Colorer', }, clr_hrc = { inherit = 'colorer', desc = 'Colorer HRC', masks = {'%.hrc$'}, }, clr_hrd = { inherit = 'colorer', desc = 'Colorer HRD', masks = {'%.hrd$'}, }, clr_ent = { inherit = 'colorer', desc = 'Colorer Entities', masks = {'%.ent%.hrc$','%.proto%.hrc$'}, }, --clr_bkt = { inherit = 'colorer', desc = 'Colorer bracket', -- masks = {'%.bkt%'}, }, clr5cat = { inherit = 'colorer', desc = 'Colorer5 catalog', masks = {'catalog%.xml$'}, firstline = {'DTD Colorer CATALOG'}, }, clr_x2h = { inherit = 'colorer', desc = 'xsd2hrc.custom', masks = {'custom%..-%.xml$'}, firstline = {'uri:colorer:custom'}, }, -- 1.3. source -- -- 1.3.1. language source -- -- 1.3.1.1. frequently used language asm = { inherit = 'main', desc = 'Assembler', masks = {'%.asm$','%.mac$','%.cod$'}, }, asm_inc = { inherit = 'asm', masks = {masks.inc,'%.i16$','%.i32$'}, firstline = {lines.asm_rem}, }, basic = { inherit = 'main', desc = 'Basic', masks = {'%.bas$'}, }, vb = { inherit = 'basic', desc = 'Visual Basic', masks = {'%.bas$','%.vbp$','%.frm$','%.cls$'}, firstline = {'^VERSION %d+%.%d+', '^VBWIZARD %d+%.%d+'}, }, c = { inherit = 'main', desc = 'C', masks = {'%.[ch]$'}, }, cpp = { inherit = 'c', desc = 'C++', masks = {'%.[ch]pp$','%.cc$','%.hh$','%.cxx$'}, strongline = {lines.c_rem, lines.s_inc, lines.s_def, lines.s_if}, }, -- use firstline -^ (from colorer) for fine choice d = { inherit = 'main', desc = 'D', masks = {'%.di?$'}, firstline = {'^%s*modula','^%s*import'} }, forth = { inherit = 'main', desc = 'Forth', masks = {'%.[4f]th$','%.f32$','%.spf$'}, }, -- ,'%.f$' fortran = { inherit = 'main', desc = 'Fortran', masks = {'%.for$','%.f$','%.f90$','%.f77$'}, firstline = {'^%*', '^C'}, }, -- conflict -^ go = { inherit = 'c', desc = 'Go', masks = {'%.go$'}, }, idl = { inherit = 'main', desc = 'IDL', masks = {'%.hvs$','%.[io]dl$'}, firstline = {lines.c_rem, lines.s_inc}, }, java = { inherit = 'main', desc = 'Java', masks = {'%.java$','%.ja[vd]$'}, strongline = {'^%// Decompiled by Jad'}, }, pascal = { inherit = 'main', desc = 'Pascal', masks = {'%.~?pas$','%.~?[bdlp]p[rk]$','%.pp$'}, firstline = {'program','library','unit','package'}, }, pas_inc = { inherit = 'pascal', masks = {masks.inc,'%.i16$','%.i32$','%.int$'}, }, perl = { inherit = 'main', desc = 'Perl', masks = {'%.pl[sx]?$','%.p[hm]$','%.pod$','%.t$'}, --masks = {'%.pl[sx]?$','%.p[hm]$','%.pod$','%.t$','%.cgi$'}, strongline = {'^#!%s-%S*perl'}, firstline = {'perl'}, }, python = { inherit = 'main', desc = 'Python', masks = {'%.py[ws]?$'}, strongline = {'^#!%s-%S*python'}, }, ruby = { inherit = 'main', desc = 'Ruby', masks = {'%.rbw?$','%.ruby$','%.rake$','Rakefile$'}, strongline = {'^#!%s-%S*ruby','%-%*%- ruby %-%*%-'}, --[[firstline = {'%-%*%- ruby %-%*%-'},]] }, scala = { inherit = 'main', desc = 'Scala', masks = {'%.scala$'}, }, -- Wirth langs: modula = { inherit = 'main', desc = 'Modula', group = 'pascal', masks = {'%.mod$','%.def$'}, firstline = msets.modula, }, oberon = { inherit = 'modula', desc = 'Oberon', masks = {'%.ob2?$','%.odf$'}, firstline = msets.modula, }, -- rare ada = { inherit = 'main', desc = 'Ada', masks = {'%.ad[sbc]$'}, }, --cup = { inherit = 'main', desc = 'Cup', masks = {'%.cup$'}, }, eiffel = { inherit = 'main', desc = 'Eiffel', masks = {'%.e$'}, }, erlang = { inherit = 'main', desc = 'Erlang', masks = {'%.[eh]rl$'}, }, gpss = { inherit = 'main', desc = 'GPSS', masks = {'%.gps$'}, }, icon = { inherit = 'main', desc = 'Icon', masks = {'%.icn$'}, }, lisp = { inherit = 'main', desc = 'Lisp', masks = {'%.li?sp$','%.scm$','%.elc?$'}, }, llvm = { inherit = 'main', desc = 'LLVM IR', masks = {'%.ll$'}, }, matlab = { inherit = 'main', desc = 'MatLab', masks = {'%.m$'}, }, --nesc = { inherit = 'c', desc = 'nesC', masks = {'%.nc$'}, }, --pl1 = { inherit = 'main', desc = 'PL/I', masks = {'%.pl[1i]$'}, }, --stata = { inherit = 'main', desc = 'Stata', masks = {'%.a?do$'}, }, --ubasic = { inherit = 'basic', desc = 'UniVision Basic', -- masks = {'%.uvbasic$'}, -- firstline = {'^PROGRAM%s+%w+$', -- '^SUBROUTINE%s+%w+', '^EXTERNALFUNCTION%s+%w+'}, }, -- [[ -- Others: abap4 = { inherit = 'main', desc = 'ABAP/4', group = 'rare', masks = {'%.abap4?$'}, }, -- unknown cache = { inherit = 'main', desc = 'Cache/Open-M', group = 'rare', masks = {'%.rsa$','%.ro$','%.rtn$','%.in[ct]$','%.mac$','%.cdl$'}, firstline = {'^Cache[^%^]-%^IN[CT][^%^]-%^.-$', -- firstline? '^OpenM[^%^]-%^IN[CT][^%^]-%^.-$', '^Cache[^%^]-%^MAC[^%^]-%^.-$', '^OpenM[^%^]-%^MAC[^%^]-%^.-$'}, }, -- unknown cobol = { inherit = 'main', desc = 'Cobol', group = 'rare', masks = {'%.cob$','%.cbl$'}, }, dssp = { inherit = 'main', desc = 'DSSP', group = 'rare', masks = {'%.dsp$'}, firstline = {'PROGRAM'}, }, -- unknown --]] --[[ -- Assemblers: assem = { inherit = 'asm', desc = 'Special asm', group = 'rare', }, adsp = { inherit = 'assem', desc = 'ADSP-21xx asm', masks = {'%.dsp$'}, }, -- ,'%.sys$' -- unknown asasm = { inherit = 'assem', desc = 'AsAsm', masks = {'%.asasm$'}, }, asm8051 = { inherit = 'assem', desc = '8051 MCU asm', masks = {'%.a5[12]$'}, }, avrasm = { inherit = 'assem', desc = 'AVR MCU asm', masks = {'%.asm$','%.avr$','%.inc$'}, firstline = {'^%s*;'}, }, picasm = { inherit = 'assem', desc = 'PicAsm', masks = {'%.asm$','%.pic$'}, }, z80asm = { inherit = 'assem', desc = 'Z80 asm: za', masks = {'%.za$'}, }, zasm80 = { inherit = 'assem', desc = 'Z80 asm: a80', masks = {'%.a80$'}, }, --]] -- [[ -- HDL: hdl = { inherit = 'main', desc = 'HDL', group = 'rare', }, ahdl = { inherit = 'hdl', desc = 'AHDL', masks = {'%.ahdl$','%.td[fo]$'}, }, vhdl = { inherit = 'hdl', desc = 'VHDL', masks = {'%.vhdl?$'}, }, verilog = { inherit = 'hdl', desc = 'Verilog', masks = {'%.g?v$'}, }, --]] -- [[ -- ML: ml = { inherit = 'main', desc = 'Meta-Language', group = 'rare', }, sml = { inherit = 'ml', desc = 'Standard ML', masks = {'%.sml$','%.sig$'}, }, ocaml = { inherit = 'ml', desc = 'Objective Caml', masks = {'%.ml[ilpy]?$'}, }, --]] -- [[ -- Prolog: prolog = { inherit = 'main', desc = 'Prolog', group = 'rare', }, sprolog = { inherit = 'prolog', desc = 'Sicstus Prolog', masks = {'%.pl$'}, }, tprolog = { inherit = 'prolog', desc = 'Turbo Prolog', masks = {'%.tpl$'}, }, --]] -- Lexers: lex = { inherit = 'main', desc = 'Lex/flex', masks = {'%.f?lex$','%.l+$'}, }, yacc = { inherit = 'lex', desc = 'YACC/Bison', masks = {'%.yacc$','%.y+$'}, }, --lemon = { inherit = 'lex', desc = 'Lemon', masks = {'%.y$'}, }, -- Java somes: j_pnuts = { inherit = 'java', desc = 'Java Pnuts', masks = {'%.pnut$'}, }, j_jcc = { inherit = 'java', desc = 'Java Compiler Compiler', masks = {'%.jjt?$'}, }, j_props = { inherit = 'java', desc = 'Java properties', masks = {'%.prop?$','%.properties$'}, }, j_policy = { inherit = 'java', desc = 'Java policy', masks = {'%.policy$'}, }, -- 1.3.1.2. database language -- clarion = { inherit = 'dbl', desc = 'Clarion', masks = {'%.cl[aw]$'}, }, clipper = { inherit = 'dbl', desc = 'Clipper', masks = {'%.ch$','%.prg$'}, -- prg firstline = {lines.s_inc, lines.s_def, lines.s_if}, }, -- conflict -^ foxpro = { inherit = 'dbl', desc = 'FoxPro', masks = {'%.prg$','%.[sm]pr$'}, }, paradox = { inherit = 'dbl', desc = 'Paradox', masks = {'%.sc$'}, }, sql = { inherit = 'dbl', desc = 'SQL', masks = {'%.sql$'}, }, -- SQL, PL/SQL, MySQL -- SQL package, specification, type: sqluf = { inherit = 'sql', desc = 'SQL-used files', masks = {'%.pck$','%.spc$','%.tps$'}, strongline = {'^create or replace'}, }, sqlj = { inherit = 'dbl', desc = 'SQLJ', masks = {'%.sqlj$'}, }, -- rare -- [[ s1c = { inherit = 'dbl', desc = '1C', group = 'rare', masks = {'%.1c$'}, }, baan = { inherit = 'dbl', desc = 'Baan 4GL', group = 'rare', masks = {'%.cln$'}, }, rsmac = { inherit = 'dbl', desc = 'R-Style macro', group = 'rare', masks = {'%.rsl$','%.mac$'}, }, --]] -- [[ sql_emb = { inherit = 'sql', desc = 'EmbeddedSQL', group = 'rare', }, sql_c = { inherit = 'sql_emb', desc = 'EmbeddedSQL for C', masks = {'%.sc$'}, }, sql_cpp = { inherit = 'sql_emb', desc = 'EmbeddedSQL for C++', masks = {'%.scpp$'}, }, sql_cbl = { inherit = 'sql_emb', desc = 'EmbeddedSQL for Cobol', masks = {'%.sco$'}, }, --]] -- 1.3.1.-. .NET support language dotnet = { inherit = 'main', desc = '.NET language', }, cs = { inherit = 'dotnet', desc = 'C#', masks = {'%.cs$'}, }, js_net = { inherit = 'dotnet', desc = 'JS.NET', masks = {'%.js$'}, }, vb_net = { inherit = 'dotnet', desc = 'VB.NET', masks = {'%.vb$'}, }, -- 1.3.1.3. network language erb = { inherit = 'net', desc = 'Embedded Ruby', masks = {'%.erb$','%.r?html$','html%.erb$'}, }, php = { inherit = 'net', desc = 'PHP', masks = {'%.php%d?$','%.[pt]html$'}, strongline = {'^#%s-%S*php'}, }, php_inc = { inherit = 'php', masks = {'%.inc$'}, firstline = {'^<%?php'}, }, smarty = { inherit = 'php', desc = 'Smarty PHP Templates', masks = {'%.smarty$'}, }, twig = { inherit = 'php', desc = 'Twig PHP Templates', masks = {'%.twig$'}, }, -- 1.3.1.3.-. network script netscript = { inherit = 'net', desc = 'Network script', group = 'script', }, ascript = { inherit = 'netscript', desc = 'ActionScript', masks = {'%.as$','%.jsfl$'}, }, coldfusion= { inherit = 'netscript', desc = 'ColdFusion', masks = {'%.cf[mc]$'}, }, jscript = { inherit = 'netscript', desc = 'JavaScript', masks = {'%.js$','%.mocha$'}, }, vbscript = { inherit = 'netscript', desc = 'VBScript', masks = {'%.vbs$'}, }, -- 1.3.1.3.-. server pages asp = { inherit = 'net', desc = 'Active Server Pages', masks = {masks.asp_as,masks.asp_ht}, }, asp_vbs = { inherit = 'asp', desc = 'ASP: VBScript', group = 'basic', masks = msets.asp, firstline = {lines.lang..'vbscript', '<%%'}, }, asp_js = { inherit = 'asp', desc = 'ASP: JavaScript', group = 'jscript', masks = msets.asp, firstline = {lines.lang..'jscript',lines.lang..'javascript'}, }, asp_ps = { inherit = 'asp', desc = 'ASP: PerlScript', group = 'perl', masks = msets.asp, firstline = {lines.lang..'perlscript'}, }, adp = { inherit = 'net', desc = 'AOLserver Dynamic Pages', masks = {'%.adp$'}, firstline = {lines.lang..'tcltk', '<%%'}, }, jsp = { inherit = 'net', desc = 'Java Server Pages', group = 'java', masks = {'%.jspf?$','%.tag$'}, }, mako = { inherit = 'net', desc = 'Mako', group = 'python', masks = {'%.mako$'}, }, mason = { inherit = 'net', desc = 'Mason', group = 'perl', masks = {'%.mc$'}, }, psp = { inherit = 'net', desc = 'Pascal Server Pages', group = 'pascal', masks = {'%.psp$'}, }, -- 1.3.2. Script language -- --acapella= { inherit = 'script', desc = 'Acapella', -- It is required firstline! -- masks = {'%.script$','%.proc$','%.param$','%.parameter$'}, }, avisynth = { inherit = 'script', desc = 'AviSynth', masks = {'%.avsi?$'}, }, farmacro = { inherit = 'script', desc = 'FAR macros', masks = {'%.macro$'}, }, farmail = { inherit = 'script', desc = 'FARMail Script', masks = {'%.fms$'}, }, r = { inherit = 'script', desc = 'R', masks = {'%.r$','%.rhistory$','%.rprofile$'}, }, squirrel = { inherit = 'script', desc = 'Squirrel', masks = {'%.nut$'}, }, tcl_tk = { inherit = 'script', desc = 'Tcl/Tk', masks = {'%.tcl$','%.tk$'}, strongline = {'^#!%s-%S*tcl','^#!%s-%S*wish'}, }, -- Lua: lua = { inherit = 'script', desc = 'Lua', masks = {'%.lua$','%.wlua$'}, strongline = {'^#!%s-%S*lua'}, firstline = {lines.lua_rem}, }, lua_inc = { inherit = 'lua', desc = 'Lua include', masks = {'%.script$'}, firstline = {lines.lua_rem}, }, lua_dat = { inherit = 'lua', desc = 'Lua data', group = 'config', masks = {'%.cfg$','history%.data$'}, firstline = {'^do local'}, }, -- 1.3.2.1. batch/shell -- batch = { inherit = 'shell', desc = 'Batch', group = 'script', masks = {'%.cmd$','%.bat$','%.nt$','%.btm$','%.sys$'}, }, sh = { inherit = 'shell', desc = 'Shell', group = 'script', masks = {'%.sh$','%.spec$','^pkgbuild$'}, strongline = {'^#!%s-%S*sh'}, }, csh = { inherit = 'shell', desc = 'CSH script', group = 'script', masks = {'%.csh$'}, strongline = {'^#!%s-%S*csh'}, }, bash = { inherit = 'shell', desc = 'BASH script', group = 'script', masks = {'%.bash$'}, strongline = {'^#!%s-%S*bash'}, }, fish = { inherit = 'shell', desc = 'FISH script', group = 'script', masks = {'%.fish$'}, strongline = {'^#!%s-%S*fish'}, }, apache = { inherit = 'shell', desc = 'Apache httpd.conf', group = 'script', masks = {'httpd%.conf$','srm%.conf$','access%.conf$', '%.htaccess$','apache%.conf$'}, }, powershell= { inherit = 'shell', desc = 'PowerShell script', group = 'script', masks = {'%.ps[dm]?1$','%.psfconsole$'}, }, -- rare --[[ shell_r = { inherit = 'shell', desc = 'Batch/Shell rare', group = 'rare', }, dcl = { inherit = 'shell_r', desc = 'HP OpenVMS DCL', masks = {'%.com$'}, }, jcl = { inherit = 'shell_r', desc = 'JCL', masks = {'%.jcl$'}, firstline = {'^//'}, }, kixtart = { inherit = 'shell_r', desc = 'Kixtart', masks = {'%.kix$','%.kixkix$'}, }, rexx = { inherit = 'shell_r', desc = 'REXX', masks = {'%.rexx?$','%.cmd$'}, firstline = {'REM/%*','^# regina','^/%*%s-REXX%s-%*/'}, }, urq = { inherit = 'shell_r', desc = 'URQ', masks = {'%.qst$'}, }, -- unknown --]] -- 1.3.2.-. makefile makefile = { inherit = 'script', desc = 'MakeFile script', }, make = { inherit = 'makefile', desc = 'MakeFile', masks = {'^makefile','gnumakefile','%.make?$','%.g?mk$'}, }, make_ap = { inherit = 'makefile', desc = 'MakeFile: AirPlay SDK', masks = {'%.mk[bf]$'}, }, -- .. project/package/group make_bor = { inherit = 'makefile', desc = 'MakeFile: Borland', masks = {'%.bp[krg]$'}, }, -- .. project/package/group make_ms = { inherit = 'makefile', desc = 'MakeFile: MS DS', masks = {'%.ds[pw]$'}, -- .. project/workspace firstline = {'Microsoft Developer Studio'}, }, make_sln = { inherit = 'makefile', desc = 'MS VS solution file', masks = {'%.sln$'}, }, -- solution make_qt = { inherit = 'makefile', desc = 'MakeFile: Qt qmake', masks = {'%.pr[oif]$'}, }, -- .. project/package/group make_sc = { inherit = 'makefile', desc = 'SCons tool', group = 'script', masks = {'sconstruct$','sconscript$'}, }, -- Software Construction tool -- rare --ant = { inherit = 'makefile', desc = 'Ant\'s build', -- group = 'xml', masks = {'build%.xml$'}, -- firstline = {'