From 3e54d6651caab999f8827c46d60889c27f02af93 Mon Sep 17 00:00:00 2001 From: David Pyke Le Brun Date: Fri, 6 Feb 2015 13:36:40 +0000 Subject: [PATCH 1/9] update of old PL/SQL PLpgSQL and SQLPL patch based on current version see [linguist] add support for oracle PLSQL (#1003) --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/heuristics.rb | 25 ++++ lib/linguist/languages.yml | 29 +++++ samples/PLSQL/myobject.sql | 15 +++ samples/PLSQL/packagebody.pkb | 58 +++++++++ samples/PLSQL/packageheader.pks | 28 +++++ samples/PLSQL/who_called_me.sql | 65 ++++++++++ samples/PLpgSQL/plpgsql_lint-8.4.sql | 165 ++++++++++++++++++++++++ samples/PLpgSQL/plpgsql_lint-9.0.sql | 165 ++++++++++++++++++++++++ samples/PLpgSQL/plpgsql_lint-9.1.sql | 179 +++++++++++++++++++++++++++ samples/PLpgSQL/plpgsql_lint-9.2.sql | 166 +++++++++++++++++++++++++ samples/PLpgSQL/plpgsql_lint-9.3.sql | 166 +++++++++++++++++++++++++ samples/SQL/create_stuff.sql | 21 ++++ samples/SQL/drop_stuff.sql | 13 ++ samples/SQL/dual.sql | 3 + samples/SQLPL/check_reorg.sql | 39 ++++++ samples/SQLPL/comm_amount.db2 | 30 +++++ samples/SQLPL/drop_table.db2 | 13 ++ samples/SQLPL/runstats.sql | 18 +++ samples/SQLPL/trigger.sql | 9 ++ vendor/grammars/Oracle | 1 + 22 files changed, 1213 insertions(+) create mode 100644 samples/PLSQL/myobject.sql create mode 100644 samples/PLSQL/packagebody.pkb create mode 100644 samples/PLSQL/packageheader.pks create mode 100644 samples/PLSQL/who_called_me.sql create mode 100644 samples/PLpgSQL/plpgsql_lint-8.4.sql create mode 100644 samples/PLpgSQL/plpgsql_lint-9.0.sql create mode 100644 samples/PLpgSQL/plpgsql_lint-9.1.sql create mode 100644 samples/PLpgSQL/plpgsql_lint-9.2.sql create mode 100644 samples/PLpgSQL/plpgsql_lint-9.3.sql create mode 100644 samples/SQL/create_stuff.sql create mode 100644 samples/SQL/drop_stuff.sql create mode 100644 samples/SQL/dual.sql create mode 100644 samples/SQLPL/check_reorg.sql create mode 100644 samples/SQLPL/comm_amount.db2 create mode 100644 samples/SQLPL/drop_table.db2 create mode 100644 samples/SQLPL/runstats.sql create mode 100644 samples/SQLPL/trigger.sql create mode 160000 vendor/grammars/Oracle diff --git a/.gitmodules b/.gitmodules index 4e72920d..aefae11d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -594,3 +594,6 @@ [submodule "vendor/grammars/ec.tmbundle"] path = vendor/grammars/ec.tmbundle url = https://github.com/ecere/ec.tmbundle +[submodule "vendor/grammars/Oracle"] + path = vendor/grammars/Oracle + url = git@github.com:mulander/oracle.tmbundle.git diff --git a/grammars.yml b/grammars.yml index 00f2c9b1..398c2a35 100644 --- a/grammars.yml +++ b/grammars.yml @@ -68,6 +68,8 @@ vendor/grammars/NimLime: - source.nim - source.nim_filter - source.nimcfg +vendor/grammars/Oracle/: +- source.plsql.oracle vendor/grammars/PHP-Twig.tmbundle: - text.html.twig vendor/grammars/RDoc.tmbundle: diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index ee1a3625..3d1899ec 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -223,5 +223,30 @@ module Linguist Language["Text"] end end + disambiguate "PLSQL", "SQLPL", "PLpgSQL", "SQL" do |data| + match = nil + #unique keywords for each language + plpgsqlkeywords = [/^\\i\b/i, /begin ?(work|transaction)?;/i , /AS \$\$/i, /RAISE EXCEPTION/i, /LANGUAGE plpgsql\b/i ] + plsqlkeywords = [ /pragma\b/i , /constructor\W+function\b/i] + #sqlplkeywords = [ ] + + #common keywords that are not SQL + plkeywords = [/begin\b/i,/boolean\b/i, /package\b/i,/exception\b/i, /^end;\b/i ] + + re = Regexp.union(plpgsqlkeywords) + if data.match(re) + match = Language["PLpgSQL"] + else + re = Regexp.union(plsqlkeywords) + if data.match(re) + match= Language["PLSQL"] + else + re = Regexp.union(plkeywords) + match= Language["SQL"] if ! data.match(re) + end + end + + match + end end end diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index e899046e..d2133a5c 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2145,6 +2145,26 @@ PHP: aliases: - inc +#Oracle +PLSQL: + type: programming + ace_mode: sql + tm_scope: Oracle + extensions: + - .pls + - .pkb + - .pks + - .plb + - .sql + +#Postgres +PLpgSQL: + type: programming + ace_mode: pgsql + tm_scope: source.sql + extensions: + - .sql + Pan: type: programming color: '#cc0000' @@ -2675,6 +2695,15 @@ SQL: - .udf - .viw +#IBM DB2 +#SQLPL: + #type: programming + #ace_mode: sql + #tm_scope: source.sql + #extensions: + #- .sql + #- .db2 + STON: type: data group: Smalltalk diff --git a/samples/PLSQL/myobject.sql b/samples/PLSQL/myobject.sql new file mode 100644 index 00000000..dd2a68aa --- /dev/null +++ b/samples/PLSQL/myobject.sql @@ -0,0 +1,15 @@ +create or replace type myobject +AUTHID DEFINER +AS OBJECT +( + m_name varchar2(200), + member function toString RETURN VARCHAR2, + map member function Compare return varchar2 + +) +not instantiable not final; +/ + +prompt create type myarray +create or replace type myarray as table of myobject; +/ diff --git a/samples/PLSQL/packagebody.pkb b/samples/PLSQL/packagebody.pkb new file mode 100644 index 00000000..e5e80d99 --- /dev/null +++ b/samples/PLSQL/packagebody.pkb @@ -0,0 +1,58 @@ +CREATE OR REPLACE PACKAGE BODY linguistpackage +AS + /* + * Package: linguist pacakage body + * Purpose: a sample PLSQL file for linguist to work with + * + * Date: 03/03/2014 + * Author: david pyke le brun + * Comments: initial version + */ + +PROCEDURE proc_1 +IS +BEGIN +NULL; +END; + +-- functions with 1 arg +FUNCTION function1( param1 VARCHAR2 ) RETURN VARCHAR2 +IS +CURSOR c IS +select * from dual; +v c%ROWTYPE; +BEGIN + open c; + fetch c into v; + close c; + + return v; +end; + +FUNCTION function2( param1 NUMBER ) RETURN DATE +IS +BEGIN + return SYSDATE; +end; + +--a few more to use all basic SQL types +FUNCTION function3( param1 TIMESTAMP ) RETURN CHAR +IS +BEGIN +IF 1 = 2 THEN +return 'Y'; +ELSE +return 'N'; +END IF; +return NULL; +END; + + +FUNCTION function4( param1 CLOB ) RETURN BLOB +IS +BEGIN + return null; +END; + +END linguistpackage; +/ diff --git a/samples/PLSQL/packageheader.pks b/samples/PLSQL/packageheader.pks new file mode 100644 index 00000000..408cdca3 --- /dev/null +++ b/samples/PLSQL/packageheader.pks @@ -0,0 +1,28 @@ +CREATE OR REPLACE PACKAGE linguistpackage +AUTHID DEFINER +AS + /* + * Package: linguist pacakage + * Purpose: a sample PLSQL file for linguist to work with + * + * Date: 03/03/2014 + * Author: david pyke le brun + * Comments: initial version + */ + +k_constant CONSTANT NUMBER(10,2) := 3.14; + +--basic procedure +PROCEDURE proc_1; + +-- functions with 1 arg +FUNCTION function1( param1 VARCHAR2 ) RETURN VARCHAR2; +FUNCTION function2( param1 NUMBER ) RETURN DATE; + +--a few more to use all basic SQL types +FUNCTION function3( param1 TIMESTAMP ) RETURN CHAR; +FUNCTION function4( param1 CLOB ) RETURN BLOB; + +END linguistpackage; +/ + diff --git a/samples/PLSQL/who_called_me.sql b/samples/PLSQL/who_called_me.sql new file mode 100644 index 00000000..fee4ed9b --- /dev/null +++ b/samples/PLSQL/who_called_me.sql @@ -0,0 +1,65 @@ +CREATE OR REPLACE PROCEDURE who_called_me +( owner OUT VARCHAR2, + name OUT VARCHAR2, + lineno OUT NUMBER, + caller_t OUT VARCHAR2 , + depth NUMBER DEFAULT 1 +) +AUTHID DEFINER +AS +--depth based version of who_called_me from asktom + call_stack VARCHAR2(4096) default dbms_utility.format_call_stack; + n NUMBER; + found_stack BOOLEAN DEFAULT FALSE; + line VARCHAR2(255); + cnt NUMBER := 0; +BEGIN + LOOP + n := instr( call_stack, chr(10) ); + exit when ( n is NULL or n = 0 ); +-- + line := substr( call_stack, 1, n-1 ); + call_stack := substr( call_stack, n+1 ); +-- + if ( NOT found_stack ) then + if ( line like '%handle%number%name%' ) then + found_stack := TRUE; + end if; + else + cnt := cnt + 1; + -- cnt = 1 is ME + -- cnt = 2 is MY Caller + -- cnt = 3 is Their Caller + if ( cnt = (2+depth) ) then + lineno := to_number(substr( line, 13, 8 )); + line := substr( line, 23 ); --set to rest of line .. change from 21 to 23 + if ( line like 'pr%' ) then + n := length( 'procedure ' ); + elsif ( line like 'fun%' ) then + n := length( 'function ' ); + elsif ( line like 'package body%' ) then + n := length( 'package body ' ); + elsif ( line like 'pack%' ) then + n := length( 'package ' ); + elsif ( line like 'anonymous%' ) then + n := length( 'anonymous block ' ); + else + n := null; + end if; + if ( n is not null ) then + caller_t := ltrim(rtrim(upper(substr( line, 1, n-1 )))); + else + caller_t := 'TRIGGER'; + end if; + + line := substr( line, nvl(n,1) ); + n := instr( line, '.' ); + owner := ltrim(rtrim(substr( line, 1, n-1 ))); + name := LTRIM(RTRIM(SUBSTR( LINE, N+1 ))); + exit; + END IF; + END IF; + END LOOP; +END; +/ + diff --git a/samples/PLpgSQL/plpgsql_lint-8.4.sql b/samples/PLpgSQL/plpgsql_lint-8.4.sql new file mode 100644 index 00000000..72c84469 --- /dev/null +++ b/samples/PLpgSQL/plpgsql_lint-8.4.sql @@ -0,0 +1,165 @@ +load 'plpgsql'; +load 'plpgsql_lint'; + +create table t1(a int, b int); + +create function f1() +returns void as $$ +begin + if false then + update t1 set c = 30; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create function g1(out a int, out b int) +as $$ + select 10,20; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + r := g1(); + if false then + raise notice '%', r.c; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function g1(out a int, out b int) +returns setof record as $$ +select * from t1; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + raise notice '%', r.c; + end loop; +end; +$$ language plpgsql; + +select f1(); + +create or replace function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + r.c := 20; + end loop; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function f1() +returns int as $$ +declare r int; +begin + if false then + r := a + b; + end if; + return r; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '%', 1, 2; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '% %'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +declare r int[]; +begin + if false then + r[c+10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + + +create or replace function f1() +returns void as $$ +declare r int; +begin + if false then + r[10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create type diagnostic_info_type as ( + status text, + message text, + detail text, + row_count int); + +create or replace function f1() +returns void as $$ +declare + dg record; +begin + dg := NULL::diagnostic_info_type; + if false then + dg.status := '00000'; + dg.mistake := 'hello'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); diff --git a/samples/PLpgSQL/plpgsql_lint-9.0.sql b/samples/PLpgSQL/plpgsql_lint-9.0.sql new file mode 100644 index 00000000..72c84469 --- /dev/null +++ b/samples/PLpgSQL/plpgsql_lint-9.0.sql @@ -0,0 +1,165 @@ +load 'plpgsql'; +load 'plpgsql_lint'; + +create table t1(a int, b int); + +create function f1() +returns void as $$ +begin + if false then + update t1 set c = 30; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create function g1(out a int, out b int) +as $$ + select 10,20; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + r := g1(); + if false then + raise notice '%', r.c; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function g1(out a int, out b int) +returns setof record as $$ +select * from t1; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + raise notice '%', r.c; + end loop; +end; +$$ language plpgsql; + +select f1(); + +create or replace function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + r.c := 20; + end loop; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function f1() +returns int as $$ +declare r int; +begin + if false then + r := a + b; + end if; + return r; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '%', 1, 2; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '% %'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +declare r int[]; +begin + if false then + r[c+10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + + +create or replace function f1() +returns void as $$ +declare r int; +begin + if false then + r[10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create type diagnostic_info_type as ( + status text, + message text, + detail text, + row_count int); + +create or replace function f1() +returns void as $$ +declare + dg record; +begin + dg := NULL::diagnostic_info_type; + if false then + dg.status := '00000'; + dg.mistake := 'hello'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); diff --git a/samples/PLpgSQL/plpgsql_lint-9.1.sql b/samples/PLpgSQL/plpgsql_lint-9.1.sql new file mode 100644 index 00000000..2cc532a1 --- /dev/null +++ b/samples/PLpgSQL/plpgsql_lint-9.1.sql @@ -0,0 +1,179 @@ +load 'plpgsql'; +load 'plpgsql_lint'; + +create table t1(a int, b int); + +create function f1() +returns void as $$ +begin + if false then + update t1 set c = 30; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create function g1(out a int, out b int) +as $$ + select 10,20; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + r := g1(); + if false then + raise notice '%', r.c; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function g1(out a int, out b int) +returns setof record as $$ +select * from t1; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + raise notice '%', r.c; + end loop; +end; +$$ language plpgsql; + +select f1(); + +create or replace function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + r.c := 20; + end loop; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function f1() +returns int as $$ +declare r int; +begin + if false then + r := a + b; + end if; + return r; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '%', 1, 2; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '% %'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +declare r int[]; +begin + if false then + r[c+10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + + +create or replace function f1() +returns void as $$ +declare r int; +begin + if false then + r[10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create type diagnostic_info_type as ( + status text, + message text, + detail text, + row_count int); + +create or replace function f1() +returns void as $$ +declare dg record; +begin + dg := NULL::diagnostic_info_type; + if false then + dg.status := '00000'; + dg.mistake := 'hello'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +declare dg record; +begin + if false then + dg := 10,20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + diff --git a/samples/PLpgSQL/plpgsql_lint-9.2.sql b/samples/PLpgSQL/plpgsql_lint-9.2.sql new file mode 100644 index 00000000..73da6e67 --- /dev/null +++ b/samples/PLpgSQL/plpgsql_lint-9.2.sql @@ -0,0 +1,166 @@ +load 'plpgsql'; +load 'plpgsql_lint'; + +create table t1(a int, b int); + +create function f1() +returns void as $$ +begin + if false then + update t1 set c = 30; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create function g1(out a int, out b int) +as $$ + select 10,20; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + r := g1(); + if false then + raise notice '%', r.c; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function g1(out a int, out b int) +returns setof record as $$ +select * from t1; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + raise notice '%', r.c; + end loop; +end; +$$ language plpgsql; + +select f1(); + +create or replace function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + r.c := 20; + end loop; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function f1() +returns int as $$ +declare r int; +begin + if false then + r := a + b; + end if; + return r; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '%', 1, 2; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '% %'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +declare r int[]; +begin + if false then + r[c+10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + + +create or replace function f1() +returns void as $$ +declare r int; +begin + if false then + r[10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create type _exception_type as ( + state text, + message text, + detail text); + +create or replace function f1() +returns void as $$ +declare + _exception record; +begin + _exception := NULL::_exception_type; +exception when others then + get stacked diagnostics + _exception.state = RETURNED_SQLSTATE, + _exception.message = MESSAGE_TEXT, + _exception.detail = PG_EXCEPTION_DETAIL, + _exception.hint = PG_EXCEPTION_HINT; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); diff --git a/samples/PLpgSQL/plpgsql_lint-9.3.sql b/samples/PLpgSQL/plpgsql_lint-9.3.sql new file mode 100644 index 00000000..73da6e67 --- /dev/null +++ b/samples/PLpgSQL/plpgsql_lint-9.3.sql @@ -0,0 +1,166 @@ +load 'plpgsql'; +load 'plpgsql_lint'; + +create table t1(a int, b int); + +create function f1() +returns void as $$ +begin + if false then + update t1 set c = 30; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create function g1(out a int, out b int) +as $$ + select 10,20; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + r := g1(); + if false then + raise notice '%', r.c; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function g1(out a int, out b int) +returns setof record as $$ +select * from t1; +$$ language sql; + +create function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + raise notice '%', r.c; + end loop; +end; +$$ language plpgsql; + +select f1(); + +create or replace function f1() +returns void as $$ +declare r record; +begin + for r in select * from g1() + loop + r.c := 20; + end loop; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); +drop function g1(); + +create function f1() +returns int as $$ +declare r int; +begin + if false then + r := a + b; + end if; + return r; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '%', 1, 2; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +begin + if false then + raise notice '% %'; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create or replace function f1() +returns void as $$ +declare r int[]; +begin + if false then + r[c+10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + + +create or replace function f1() +returns void as $$ +declare r int; +begin + if false then + r[10] := 20; + end if; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); + +create type _exception_type as ( + state text, + message text, + detail text); + +create or replace function f1() +returns void as $$ +declare + _exception record; +begin + _exception := NULL::_exception_type; +exception when others then + get stacked diagnostics + _exception.state = RETURNED_SQLSTATE, + _exception.message = MESSAGE_TEXT, + _exception.detail = PG_EXCEPTION_DETAIL, + _exception.hint = PG_EXCEPTION_HINT; +end; +$$ language plpgsql; + +select f1(); + +drop function f1(); diff --git a/samples/SQL/create_stuff.sql b/samples/SQL/create_stuff.sql new file mode 100644 index 00000000..edfb569c --- /dev/null +++ b/samples/SQL/create_stuff.sql @@ -0,0 +1,21 @@ + +CREATE TABLE x AS SELECT * FROM DUAL; + +CREATE TABLE y ( +col1 NUMBER NOT NULL , +col2 VARCHAR2(200), +col3 DATE, +col4 TIMESTAMP WITH TIME ZONE NOT NULL +); + + +CREATE USER username IDENTIFIED BY password; + +GRANT CONNECT, RESOURCE TO username; + + +GRANT CREATE TYPE TO username; +GRANT CREATE PROCEDURE TO username; +GRANT CREATE TABLE TO username; +GRANT CREATE VIEW TO username; + diff --git a/samples/SQL/drop_stuff.sql b/samples/SQL/drop_stuff.sql new file mode 100644 index 00000000..7d638eed --- /dev/null +++ b/samples/SQL/drop_stuff.sql @@ -0,0 +1,13 @@ +drop procedure who_called_me; +drop package body linguist_package; +drop package linguist_package; +drop function functionname1; + +drop table x; +drop table y cascade; + +drop type typename1; +drop type typename2; + +drop view viewname1; +drop view viewname2; diff --git a/samples/SQL/dual.sql b/samples/SQL/dual.sql new file mode 100644 index 00000000..8ef5c624 --- /dev/null +++ b/samples/SQL/dual.sql @@ -0,0 +1,3 @@ +--this is the most basic oracle sql command +select * from dual; + diff --git a/samples/SQLPL/check_reorg.sql b/samples/SQLPL/check_reorg.sql new file mode 100644 index 00000000..f8906465 --- /dev/null +++ b/samples/SQLPL/check_reorg.sql @@ -0,0 +1,39 @@ +create procedure check_reorg_tables (in v_schema varchar(128), out v_reorg_counter integer) +begin + + declare loc result_set_locator varying; + + declare schema_out varchar(128); + declare table_out varchar(128); + declare card_out integer; + declare overflow_out integer; + declare npages_out integer; + declare fpages_out integer; + declare active_blocks_out integer; + declare tsize_out integer; + declare f1_out integer; + declare f2_out integer; + declare f3_out integer; + declare reorg_out varchar(3); + declare cursor_end smallint default 0; + + declare continue handler for NOT FOUND + + set cursor_end = 1; + set v_reorg_counter = 0; + + call reorgchk_tb_stats('S', v_schema); + associate result set locator(loc) with procedure reorgchk_tb_stats; + allocate mycursor cursor for result set loc; + + open mycursor; + repeat + fetch from mycursor into schema_out, table_out, card_out, overflow_out, npages_out, fpages_out, active_blocks_out, tsize_out, f1_out, f2_out, f3_out, reorg_out; + if reorg_out <> '---' then + set v_reorg_counter = v_reorg_counter + 1; + end if; + until cursor_end = 1 + end repeat; + close mycursor; + +end! diff --git a/samples/SQLPL/comm_amount.db2 b/samples/SQLPL/comm_amount.db2 new file mode 100644 index 00000000..66efc97c --- /dev/null +++ b/samples/SQLPL/comm_amount.db2 @@ -0,0 +1,30 @@ +DROP FUNCTION COMM_AMOUNT; +CREATE FUNCTION COMM_AMOUNT(SALARY DEC(9,2)) + RETURNS DEC(9,2) + LANGUAGE SQL READS SQL DATA + BEGIN ATOMIC + DECLARE REMAINDER DEC(9,2) DEFAULT 0.0;-- + DECLARE COMM_PAID DEC(9,2) DEFAULT 0.0;-- + DECLARE COMM_INCR INT DEFAULT 1;-- + DECLARE MAX_COMM DEC(9,2) DEFAULT 0.0;-- + + IF (SALARY <= 0) THEN + SIGNAL SQLSTATE '75000' + SET MESSAGE_TEXT = 'Bad Salary';-- + END IF;-- + + SET REMAINDER = SALARY;-- + +L1: WHILE REMAINDER > 0.0 DO + SET COMM_PAID = COMM_PAID + (COMM_INCR * 500.00);-- + SET REMAINDER = REMAINDER-(COMM_INCR * 5000.00);-- + SET COMM_INCR = COMM_INCR + 1;-- + END WHILE L1;-- + + SET MAX_COMM = + (SELECT SUM(SALARY)/100.00 FROM EMPLOYEE);-- + IF (COMM_PAID > MAX_COMM) THEN + SET COMM_PAID = MAX_COMM;-- + END IF;-- + RETURN COMM_PAID;-- +END; diff --git a/samples/SQLPL/drop_table.db2 b/samples/SQLPL/drop_table.db2 new file mode 100644 index 00000000..60e34d8e --- /dev/null +++ b/samples/SQLPL/drop_table.db2 @@ -0,0 +1,13 @@ +DROP TABLE TDEPT; +CREATE TABLE TDEPT (DEPTNO CHAR(4)); + +--#SET TERMINATOR @ +BEGIN ATOMIC + DECLARE COUNT INT DEFAULT 5; + + WHILE COUNT > 0 DO + INSERT INTO TDEPT VALUES 'F'|| + RTRIM(CHAR(COUNT)); + SET COUNT = COUNT - 1; + END WHILE; +END@ diff --git a/samples/SQLPL/runstats.sql b/samples/SQLPL/runstats.sql new file mode 100644 index 00000000..fcd8a46d --- /dev/null +++ b/samples/SQLPL/runstats.sql @@ -0,0 +1,18 @@ +create procedure runstats (out nr_tables integer, out nr_ok integer) +begin + declare SQLCODE integer; + declare stmt varchar(100); + + set nr_tables = 0; + set nr_ok = 0; + + for line as select tabschema, tabname from syscat.tables where type='T' and tabschema='SPODEN' + do + set nr_tables = nr_tables + 1; + set stmt = 'CALL SYSPROC.ADMIN_CMD (RUNSTATS ON TABLE ' concat rtrim(line.tabschema) concat '.' concat line.tabname concat ')'; + execute immediate stmt; + if SQLCODE = 0 then + set nr_ok = nr_ok + 1; + end if; + end for; +end! diff --git a/samples/SQLPL/trigger.sql b/samples/SQLPL/trigger.sql new file mode 100644 index 00000000..5002fa80 --- /dev/null +++ b/samples/SQLPL/trigger.sql @@ -0,0 +1,9 @@ +create trigger CHECK_HIREDATE +no cascade before insert on EMPLOYEE +referencing new as N +for each row mode db2sql +if n.hiredate > current date +then + signal SQLSTATE '75000' + set MESSAGE_TEXT = 'Hire date must be in the past'; +end if! diff --git a/vendor/grammars/Oracle b/vendor/grammars/Oracle new file mode 160000 index 00000000..f5308c9a --- /dev/null +++ b/vendor/grammars/Oracle @@ -0,0 +1 @@ +Subproject commit f5308c9abe377210145ffe606bd8b3ac0088608a From fb6ec8aaa76f58cd047de44dcf8f6389638b9a24 Mon Sep 17 00:00:00 2001 From: David Pyke Le Brun Date: Mon, 9 Feb 2015 11:46:14 +0000 Subject: [PATCH 2/9] remove oracle grammer. (to be readded) --- .gitmodules | 3 --- vendor/grammars/Oracle | 1 - 2 files changed, 4 deletions(-) delete mode 160000 vendor/grammars/Oracle diff --git a/.gitmodules b/.gitmodules index aefae11d..4e72920d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -594,6 +594,3 @@ [submodule "vendor/grammars/ec.tmbundle"] path = vendor/grammars/ec.tmbundle url = https://github.com/ecere/ec.tmbundle -[submodule "vendor/grammars/Oracle"] - path = vendor/grammars/Oracle - url = git@github.com:mulander/oracle.tmbundle.git diff --git a/vendor/grammars/Oracle b/vendor/grammars/Oracle deleted file mode 160000 index f5308c9a..00000000 --- a/vendor/grammars/Oracle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f5308c9abe377210145ffe606bd8b3ac0088608a From 7ecf65551e6f112bae5119dbd3eb62055f02ca82 Mon Sep 17 00:00:00 2001 From: David Pyke Le Brun Date: Mon, 9 Feb 2015 11:58:50 +0000 Subject: [PATCH 3/9] re-add oracle grammer module using https --- .gitmodules | 3 +++ grammars.yml | 4 ++-- lib/linguist/languages.yml | 2 +- vendor/grammars/oracle.tmbundle | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) create mode 160000 vendor/grammars/oracle.tmbundle diff --git a/.gitmodules b/.gitmodules index 4e72920d..d1bee979 100644 --- a/.gitmodules +++ b/.gitmodules @@ -594,3 +594,6 @@ [submodule "vendor/grammars/ec.tmbundle"] path = vendor/grammars/ec.tmbundle url = https://github.com/ecere/ec.tmbundle +[submodule "vendor/grammars/oracle.tmbundle"] + path = vendor/grammars/oracle.tmbundle + url = https://github.com/mulander/oracle.tmbundle.git diff --git a/grammars.yml b/grammars.yml index 398c2a35..696f27ff 100644 --- a/grammars.yml +++ b/grammars.yml @@ -68,8 +68,6 @@ vendor/grammars/NimLime: - source.nim - source.nim_filter - source.nimcfg -vendor/grammars/Oracle/: -- source.plsql.oracle vendor/grammars/PHP-Twig.tmbundle: - text.html.twig vendor/grammars/RDoc.tmbundle: @@ -364,6 +362,8 @@ vendor/grammars/ooc.tmbundle: - source.ooc vendor/grammars/opa.tmbundle: - source.opa +vendor/grammars/oracle.tmbundle: +- source.plsql.oracle vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage: - source.oz vendor/grammars/pascal.tmbundle: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d2133a5c..534b2fdc 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2149,7 +2149,7 @@ PHP: PLSQL: type: programming ace_mode: sql - tm_scope: Oracle + tm_scope: source.plsql.oracle extensions: - .pls - .pkb diff --git a/vendor/grammars/oracle.tmbundle b/vendor/grammars/oracle.tmbundle new file mode 160000 index 00000000..f5308c9a --- /dev/null +++ b/vendor/grammars/oracle.tmbundle @@ -0,0 +1 @@ +Subproject commit f5308c9abe377210145ffe606bd8b3ac0088608a From e9691725430bf553b452c6f8892c235e3d4f157a Mon Sep 17 00:00:00 2001 From: David Pyke Le Brun Date: Mon, 9 Feb 2015 14:16:25 +0000 Subject: [PATCH 4/9] recode heuristic to use existing style. add additional sample --- lib/linguist/heuristics.rb | 33 +++++++++++++-------------------- lib/linguist/languages.yml | 14 +++++++------- samples/SQLPL/sleep.sql | 9 +++++++++ 3 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 samples/SQLPL/sleep.sql diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 3d1899ec..85b013eb 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -224,29 +224,22 @@ module Linguist end end disambiguate "PLSQL", "SQLPL", "PLpgSQL", "SQL" do |data| - match = nil - #unique keywords for each language - plpgsqlkeywords = [/^\\i\b/i, /begin ?(work|transaction)?;/i , /AS \$\$/i, /RAISE EXCEPTION/i, /LANGUAGE plpgsql\b/i ] - plsqlkeywords = [ /pragma\b/i , /constructor\W+function\b/i] - #sqlplkeywords = [ ] + #only return value if a definite positive - #common keywords that are not SQL - plkeywords = [/begin\b/i,/boolean\b/i, /package\b/i,/exception\b/i, /^end;\b/i ] - - re = Regexp.union(plpgsqlkeywords) - if data.match(re) - match = Language["PLpgSQL"] - else - re = Regexp.union(plsqlkeywords) - if data.match(re) - match= Language["PLSQL"] - else - re = Regexp.union(plkeywords) - match= Language["SQL"] if ! data.match(re) - end + if /^\\i\b|AS \$\$|LANGUAGE '+plpgsql'+/i.match(data) || /SECURITY (DEFINER|INVOKER)/i.match(data) || /BEGIN (WORK|TRANSACTION)+;/i.match(data) + #postgres + Language["PLpgSQL"] + elsif /(alter module)|(language sql)|(begin( NOT)+ atomic)/i.match(data) || /signal SQLSTATE '[0-9]+'/i.match(data) + #ibm db2 + Language["SQLPL"] + elsif /pragma|\$\$PLSQL_|XMLTYPE|sysdate|systimestamp|\.nextval|connect by|AUTHID (DEFINER|CURRENT_USER)/i.match(data) || /constructor\W+function/i.match(data) + #oraclestuff + Language["PLSQL"] + elsif ! /begin|boolean|package|exception/i.match(data) + #generic sql + Language["SQL"] end - match end end end diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 2ea132d5..c26884b4 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2696,13 +2696,13 @@ SQL: - .viw #IBM DB2 -#SQLPL: - #type: programming - #ace_mode: sql - #tm_scope: source.sql - #extensions: - #- .sql - #- .db2 +SQLPL: + type: programming + ace_mode: sql + tm_scope: source.sql + extensions: + - .sql + - .db2 STON: type: data diff --git a/samples/SQLPL/sleep.sql b/samples/SQLPL/sleep.sql new file mode 100644 index 00000000..18f72055 --- /dev/null +++ b/samples/SQLPL/sleep.sql @@ -0,0 +1,9 @@ +create procedure sleep (in sleeptime integer) +begin + declare wait_until timestamp; + + set wait_until = (current timestamp + sleeptime seconds); + while (wait_until > current timestamp) + do + end while; +end! From 5e9bb67d10f0670ba1278c130fe66d44b682b90b Mon Sep 17 00:00:00 2001 From: David Pyke Le Brun Date: Mon, 9 Feb 2015 14:27:14 +0000 Subject: [PATCH 5/9] temporary add grammer to whitelist until license gets added --- lib/linguist/heuristics.rb | 2 +- test/test_grammars.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 85b013eb..a4d31626 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -226,7 +226,7 @@ module Linguist disambiguate "PLSQL", "SQLPL", "PLpgSQL", "SQL" do |data| #only return value if a definite positive - if /^\\i\b|AS \$\$|LANGUAGE '+plpgsql'+/i.match(data) || /SECURITY (DEFINER|INVOKER)/i.match(data) || /BEGIN (WORK|TRANSACTION)+;/i.match(data) + if /^\\i\b|AS \$\$|LANGUAGE '+plpgsql'+/i.match(data) || /SECURITY (DEFINER|INVOKER)/i.match(data) || /BEGIN( WORK| TRANSACTION)?;/i.match(data) #postgres Language["PLpgSQL"] elsif /(alter module)|(language sql)|(begin( NOT)+ atomic)/i.match(data) || /signal SQLSTATE '[0-9]+'/i.match(data) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 188bc187..48f6d83c 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -9,6 +9,7 @@ class TestGrammars < Minitest::Test vendor/grammars/Sublime-Lasso vendor/grammars/Sublime-REBOL vendor/grammars/x86-assembly-textmate-bundle + vendor/grammars/oracle.tmbundle ].freeze def setup From e24a9ba602604ae55ac982e0ef797e4f72ac3eab Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 27 Feb 2015 13:36:12 -0600 Subject: [PATCH 6/9] Ordering --- grammars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars.yml b/grammars.yml index 827e61cf..311bb226 100644 --- a/grammars.yml +++ b/grammars.yml @@ -383,10 +383,10 @@ vendor/grammars/ooc.tmbundle: - source.ooc vendor/grammars/opa.tmbundle: - source.opa -vendor/grammars/oracle.tmbundle: -- source.plsql.oracle vendor/grammars/openscad.tmbundle/: - source.scad +vendor/grammars/oracle.tmbundle: +- source.plsql.oracle vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage: - source.oz vendor/grammars/pascal.tmbundle: From b350f1572be21c4b8f2fc156f769abd5fb0b3cb4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 27 Feb 2015 13:36:20 -0600 Subject: [PATCH 7/9] Reformatting --- lib/linguist/heuristics.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 885d578c..2ff8d9fb 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -237,20 +237,18 @@ module Linguist end disambiguate "PLSQL", "SQLPL", "PLpgSQL", "SQL" do |data| - #only return value if a definite positive - if /^\\i\b|AS \$\$|LANGUAGE '+plpgsql'+/i.match(data) || /SECURITY (DEFINER|INVOKER)/i.match(data) || /BEGIN( WORK| TRANSACTION)?;/i.match(data) - #postgres - Language["PLpgSQL"] + #Postgres + Language["PLpgSQL"] elsif /(alter module)|(language sql)|(begin( NOT)+ atomic)/i.match(data) || /signal SQLSTATE '[0-9]+'/i.match(data) - #ibm db2 - Language["SQLPL"] + #IBM db2 + Language["SQLPL"] elsif /pragma|\$\$PLSQL_|XMLTYPE|sysdate|systimestamp|\.nextval|connect by|AUTHID (DEFINER|CURRENT_USER)/i.match(data) || /constructor\W+function/i.match(data) - #oraclestuff - Language["PLSQL"] + #Oracle + Language["PLSQL"] elsif ! /begin|boolean|package|exception/i.match(data) - #generic sql - Language["SQL"] + #Generic SQL + Language["SQL"] end end From 63fc9dd6a5d0a551e73b5ce1c4c0861d3e88c624 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 27 Feb 2015 13:50:29 -0600 Subject: [PATCH 8/9] Updating grammars --- vendor/grammars/Stylus | 2 +- vendor/grammars/Sublime-VimL | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/dart-sublime-bundle | 2 +- vendor/grammars/factor | 2 +- vendor/grammars/fsharpbinding | 2 +- vendor/grammars/grace-tmbundle | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/oracle.tmbundle | 2 +- vendor/grammars/powershell | 2 +- vendor/grammars/sublime-nginx | 2 +- vendor/grammars/toml.tmbundle | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/vendor/grammars/Stylus b/vendor/grammars/Stylus index b9214d1f..c060554e 160000 --- a/vendor/grammars/Stylus +++ b/vendor/grammars/Stylus @@ -1 +1 @@ -Subproject commit b9214d1ffd5031b60d77d07a6f315a934d4a473e +Subproject commit c060554eb82ed253969457b2609d9eb5c7739c6e diff --git a/vendor/grammars/Sublime-VimL b/vendor/grammars/Sublime-VimL index 366fdc64..4b23352c 160000 --- a/vendor/grammars/Sublime-VimL +++ b/vendor/grammars/Sublime-VimL @@ -1 +1 @@ -Subproject commit 366fdc64e3655207a0b2672f630d7167e6aac2c3 +Subproject commit 4b23352ce5e48a191d55d61883a9478211df91fd diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index 27313007..e1b78aac 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit 27313007d94fd4ae802702e5ca6b454e8a5e9468 +Subproject commit e1b78aacb6b0ab8b4c26ea897b128335f8ed939c diff --git a/vendor/grammars/dart-sublime-bundle b/vendor/grammars/dart-sublime-bundle index d55b1d42..21096f24 160000 --- a/vendor/grammars/dart-sublime-bundle +++ b/vendor/grammars/dart-sublime-bundle @@ -1 +1 @@ -Subproject commit d55b1d427845aa4c2f2fe5947121616b7f1160fa +Subproject commit 21096f24d8a34668d54ad31b8902ab5c709c1c07 diff --git a/vendor/grammars/factor b/vendor/grammars/factor index ec896cd5..fe2c2d23 160000 --- a/vendor/grammars/factor +++ b/vendor/grammars/factor @@ -1 +1 @@ -Subproject commit ec896cd5ad05d4ae9b837fa5a64cd9431d2a14d6 +Subproject commit fe2c2d23de9e300d7cd1b04e139dfbdd2069d00a diff --git a/vendor/grammars/fsharpbinding b/vendor/grammars/fsharpbinding index 0cd6439b..a008fe9c 160000 --- a/vendor/grammars/fsharpbinding +++ b/vendor/grammars/fsharpbinding @@ -1 +1 @@ -Subproject commit 0cd6439b513631c469d69b0e02a26804b068674b +Subproject commit a008fe9c64d454132941eb72334c52e4ad93266e diff --git a/vendor/grammars/grace-tmbundle b/vendor/grammars/grace-tmbundle index acbf9a24..6bea212a 160000 --- a/vendor/grammars/grace-tmbundle +++ b/vendor/grammars/grace-tmbundle @@ -1 +1 @@ -Subproject commit acbf9a247c6fae57d0e51c712669933b93ca4251 +Subproject commit 6bea212a5843e152cd605ec6075eb7352cbeaf0d diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index bae6eee8..51978f7d 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit bae6eee8557c2158592ac485a7168ccd10fc6dfb +Subproject commit 51978f7d1b1a7b92f77ccf02b042b768946844bd diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index d58edec6..da1fdb69 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit d58edec65539e014fa13579461df6bebc24250c0 +Subproject commit da1fdb6949eea5d107c8f30063437d14a3c3a677 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index 669040b8..610ee6ef 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit 669040b8936375e54fb208dfb56e2ed4a3945d76 +Subproject commit 610ee6ef0d6162249374a480c1209c1ddd46a955 diff --git a/vendor/grammars/oracle.tmbundle b/vendor/grammars/oracle.tmbundle index f5308c9a..b41e6d33 160000 --- a/vendor/grammars/oracle.tmbundle +++ b/vendor/grammars/oracle.tmbundle @@ -1 +1 @@ -Subproject commit f5308c9abe377210145ffe606bd8b3ac0088608a +Subproject commit b41e6d33d6a71649d97e497fb1504aa01e7ceb41 diff --git a/vendor/grammars/powershell b/vendor/grammars/powershell index 84fd9726..0d9478d1 160000 --- a/vendor/grammars/powershell +++ b/vendor/grammars/powershell @@ -1 +1 @@ -Subproject commit 84fd97265c93abcd52de5915b4cf1179cc508373 +Subproject commit 0d9478d1175969291741ee46a85445dd34f38d04 diff --git a/vendor/grammars/sublime-nginx b/vendor/grammars/sublime-nginx index eee371d7..872afddd 160000 --- a/vendor/grammars/sublime-nginx +++ b/vendor/grammars/sublime-nginx @@ -1 +1 @@ -Subproject commit eee371d7f4d688c6ccac0322c63506080e873131 +Subproject commit 872afddd2d61acae85560fa009658257f4030244 diff --git a/vendor/grammars/toml.tmbundle b/vendor/grammars/toml.tmbundle index cda2b74d..d261ef63 160000 --- a/vendor/grammars/toml.tmbundle +++ b/vendor/grammars/toml.tmbundle @@ -1 +1 @@ -Subproject commit cda2b74d0d40c841c573eae9c5e9edd7621d8d90 +Subproject commit d261ef630a6025c6ee518762715086bc22209c41 From 7ba4f0c57131de5b9ab4e3f8ae98431465575661 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 27 Feb 2015 13:51:23 -0600 Subject: [PATCH 9/9] Oracle grammar now has a license --- test/test_grammars.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 9026b7ce..c5fbee4e 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -14,8 +14,7 @@ class TestGrammars < Minitest::Test # must have a license that allows redistribution. "vendor/grammars/Sublime-Lasso", "vendor/grammars/Sublime-REBOL", - "vendor/grammars/x86-assembly-textmate-bundle", - "vendor/grammars/oracle.tmbundle" + "vendor/grammars/x86-assembly-textmate-bundle" ].freeze def setup