diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-04-09 18:31:31 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-04-09 18:31:31 +0300 |
commit | 7d29ae8b7175bfb884d43225373ff0bae467c974 (patch) | |
tree | 92864e37dd1b61c155cf9868149ce978145fabb4 /lib | |
parent | fb2ba9d16c2954e63ee5257b59cf6e8572abde5e (diff) | |
download | sciteco-7d29ae8b7175bfb884d43225373ff0bae467c974.tar.gz |
added SQL lexer configuration
* Unfortunately, the Lexilla lexer does not recognize PostgreSQL multiline
strings between $$...$$.
* All of the other SQL variants, that Scite supports, are skipped for the time
being. They'd probably have to be separate SciTECO lexer configs anyway.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 3 | ||||
-rw-r--r-- | lib/lexers/sql.tes | 70 |
2 files changed, 72 insertions, 1 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 5ea80e2..e0da727 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -103,6 +103,7 @@ dist_lexer_DATA += lexers/verilog.tes \ lexers/yaml.tes \ lexers/markdown.tes \ lexers/asciidoc.tes \ - lexers/troff.tes + lexers/troff.tes \ + lexers/sql.tes endif diff --git a/lib/lexers/sql.tes b/lib/lexers/sql.tes new file mode 100644 index 0000000..83d3f8c --- /dev/null +++ b/lib/lexers/sql.tes @@ -0,0 +1,70 @@ +!* SQL *! + +@[lexer.test.sql]{ + :EN*.sqlQ* +} + +@[lexer.set.sql]{ + ESSETILEXERsql + 0ESSETKEYWORDS + absolute action add admin after aggregate alias all allocate alter and any are + array as asc assertion at authorization before begin binary bit blob body boolean + both breadth by call cascade cascaded case cast catalog char character check class + clob close collate collation column commit completion connect connection constraint + constraints constructor continue corresponding create cross cube current current_date + current_path current_role current_time current_timestamp current_user cursor cycle + data date datetime day deallocate dec decimal declare default deferrable deferred + delete depth deref desc describe descriptor destroy destructor deterministic dictionary + diagnostics disconnect distinct domain double drop dynamic each else end end-exec + equals escape every except exception exec execute exists exit external false fetch + first float for foreign found from free full function general get global go goto + grant group grouping having host hour identity if ignore immediate in indicator + initialize initially inner inout input insert int integer intersect interval into + is isolation iterate join key language large last lateral leading left less level + like limit local localtime localtimestamp locator map match merge minute modifies + modify module month names national natural nchar nclob new next no none not null + numeric object of off old on only open operation option or order ordinality out + outer output package pad parameter parameters partial path postfix precision prefix + preorder prepare preserve primary prior privileges procedure public read reads + real recursive ref references referencing relative restrict result return returns + revoke right role rollback rollup routine row rows savepoint schema scroll scope + search second section select sequence session session_user set sets size smallint + some| space specific specifictype sql sqlexception sqlstate sqlwarning start state + statement static structure system_user table temporary terminate than then time + timestamp timezone_hour timezone_minute to trailing transaction translation treat + trigger true under union unique unknown unnest update usage user using value values + varchar variable varying view when whenever where with without work write year + zone + !* keywords for PlDoc comments *! + 2ESSETKEYWORDS + param author since return see deprecated todo + !* keywords for SQL*Plus *! + 3ESSETKEYWORDS + acc~ept a~ppend archive log attribute bre~ak bti~tle c~hange cl~ear col~umn comp~ute + conn~ect copy def~ine del desc~ribe disc~onnect e~dit exec~ute exit get help ho~st + i~nput l~ist passw~ord pau~se pri~nt pro~mpt quit recover rem~ark repf~ooter reph~eader + r~un sav~e set sho~w shutdown spo~ol sta~rt startup store timi~ng tti~tle undef~ine + var~iable whenever oserror whenever sqlerror + !* keywords for standard packages *! + 4ESSETKEYWORDS + dbms_output.disable dbms_output.enable dbms_output.get_line dbms_output.get_lines + dbms_output.new_line dbms_output.put dbms_output.put_line + :M[color.comment],1M[color.set] + :M[color.comment],2M[color.set] + :M[color.comment],3M[color.set] + :M[color.number],4M[color.set] + :M[color.keyword],5M[color.set] + :M[color.string],6M[color.set] + :M[color.string2],7M[color.set] + :M[color.preproc],8M[color.set] + :M[color.preproc2],9M[color.set] + :M[color.operator],10M[color.set] + !!:M[color.variable],11M[color.set] + :M[color.comment],13M[color.set] + :M[color.comment],15M[color.set] + :M[color.keyword],19M[color.set] + :M[color.keyword],20M[color.set] + :M[color.keyword],21M[color.set] + :M[color.keyword],22M[color.set] + :M[color.variable],23M[color.set] +} |