From 420594874a7716aee9f2a24d74a7d98acdad72e0 Mon Sep 17 00:00:00 2001 From: Michael Mullis Date: Thu, 30 May 2013 01:17:07 +0000 Subject: [PATCH 1/3] add COBOL language support --- lib/linguist/languages.yml | 9 +++++++++ samples/COBOL/hello_world.cbl | 5 +++++ samples/COBOL/hello_world.ccp | 6 ++++++ samples/COBOL/hello_world.cob | 6 ++++++ samples/COBOL/simple.cpy | 7 +++++++ 5 files changed, 33 insertions(+) create mode 100644 samples/COBOL/hello_world.cbl create mode 100644 samples/COBOL/hello_world.ccp create mode 100644 samples/COBOL/hello_world.cob create mode 100644 samples/COBOL/simple.cpy diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c61ebd72..461770e0 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -235,6 +235,15 @@ Clojure: filenames: - riemann.config +COBOL: + type: programming + primary_extension: .cob + extensions: + - .cbl + - .cpy + - .cobol + - .ccp + CoffeeScript: type: programming ace_mode: coffee diff --git a/samples/COBOL/hello_world.cbl b/samples/COBOL/hello_world.cbl new file mode 100644 index 00000000..07387bde --- /dev/null +++ b/samples/COBOL/hello_world.cbl @@ -0,0 +1,5 @@ + program-id. hello. + procedure division. + display "Hello, World!". + stop run. + diff --git a/samples/COBOL/hello_world.ccp b/samples/COBOL/hello_world.ccp new file mode 100644 index 00000000..a1efc10b --- /dev/null +++ b/samples/COBOL/hello_world.ccp @@ -0,0 +1,6 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. hello. + PROCEDURE DIVISION. + DISPLAY "Hello World, yet again.". + STOP RUN. + diff --git a/samples/COBOL/hello_world.cob b/samples/COBOL/hello_world.cob new file mode 100644 index 00000000..da734fa6 --- /dev/null +++ b/samples/COBOL/hello_world.cob @@ -0,0 +1,6 @@ + IDENTIFICATION DIVISION. + PROGRAM-ID. hello. + PROCEDURE DIVISION. + DISPLAY "Hello World!". + STOP RUN. + diff --git a/samples/COBOL/simple.cpy b/samples/COBOL/simple.cpy new file mode 100644 index 00000000..d82c2305 --- /dev/null +++ b/samples/COBOL/simple.cpy @@ -0,0 +1,7 @@ +01 COBOL-TEST-RECORD. + 05 COBOL-TEST-USAGES. + 10 COBOL-4-COMP PIC S9(4) COMP. + 10 COBOL-8-COMP PIC S9(8) COMP. + 10 COBOL-9-COMP PIC S9(9) COMP. + 10 COBOL-4-COMP2 PIC S9(4) COMP-2. + 10 COBOL-7-COMP2 PIC 9(7) COMP-2. From c6d38ab647a3b3e876b02598a9af1d21b55c9470 Mon Sep 17 00:00:00 2001 From: Michael Mullis Date: Thu, 30 May 2013 01:29:36 +0000 Subject: [PATCH 2/3] COBOL comes before Clojure and extensions must be sorted --- lib/linguist/languages.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 461770e0..eba8df5b 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -225,6 +225,15 @@ ChucK: lexer: Java primary_extension: .ck +COBOL: + type: programming + primary_extension: .cob + extensions: + - .cbl + - .ccp + - .cobol + - .cpy + Clojure: type: programming ace_mode: clojure @@ -235,15 +244,6 @@ Clojure: filenames: - riemann.config -COBOL: - type: programming - primary_extension: .cob - extensions: - - .cbl - - .cpy - - .cobol - - .ccp - CoffeeScript: type: programming ace_mode: coffee From f2b80a239fea35eea68850afdc6476a557a19863 Mon Sep 17 00:00:00 2001 From: Michael Mullis Date: Thu, 30 May 2013 01:33:04 +0000 Subject: [PATCH 3/3] COBOL: move up in the sort order --- lib/linguist/languages.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index eba8df5b..44af424c 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -212,6 +212,15 @@ CMake: filenames: - CMakeLists.txt +COBOL: + type: programming + primary_extension: .cob + extensions: + - .cbl + - .ccp + - .cobol + - .cpy + CSS: ace_mode: css primary_extension: .css @@ -225,15 +234,6 @@ ChucK: lexer: Java primary_extension: .ck -COBOL: - type: programming - primary_extension: .cob - extensions: - - .cbl - - .ccp - - .cobol - - .cpy - Clojure: type: programming ace_mode: clojure