From fd585beb0781a6aedfd28b6103dca6ba4620182d Mon Sep 17 00:00:00 2001
From: Rachel Mant
Date: Wed, 2 Apr 2014 12:55:29 +0100
Subject: [PATCH 001/366] Improved the C++ heuristic for detecting based on
included headers
---
lib/linguist/heuristics.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index a3de46e9..a925fd39 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -38,7 +38,8 @@ module Linguist
def self.disambiguate_c(data, languages)
matches = []
matches << Language["Objective-C"] if data.include?("@interface")
- matches << Language["C++"] if data.include?("#include ")
+ if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>$/.match(data))
+ matches << Language["C++"]
matches
end
From 667f3de26bc3f184df6671afd513a100d6978a44 Mon Sep 17 00:00:00 2001
From: Rachel Mant
Date: Wed, 2 Apr 2014 13:09:17 +0100
Subject: [PATCH 002/366] Improved the Obj-C heuristic with a Regex matching
multiple unique keywords
Also improved the C++ heuristic by checking for class without an @ on the front.
---
lib/linguist/heuristics.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index a925fd39..1673206f 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -37,8 +37,10 @@ module Linguist
# Returns an array of Languages or []
def self.disambiguate_c(data, languages)
matches = []
- matches << Language["Objective-C"] if data.include?("@interface")
- if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>$/.match(data))
+ if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
+ matches << Language["Objective-C"]
+ if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>$/.match(data) or
+ /template\s*
Date: Wed, 2 Apr 2014 13:44:17 +0100
Subject: [PATCH 003/366] Added the end statements for the two new if
statmeents
Did not know ends were required on one-liner ifs. Fixed.
---
lib/linguist/heuristics.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index 1673206f..94965eaf 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -39,9 +39,11 @@ module Linguist
matches = []
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
matches << Language["Objective-C"]
+ end
if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>$/.match(data) or
/template\s*
Date: Wed, 2 Apr 2014 17:57:58 +0100
Subject: [PATCH 004/366] Fixed the failing patten for detecting C++-only
headers
---
lib/linguist/heuristics.rb | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index 94965eaf..f4303c88 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -39,8 +39,7 @@ module Linguist
matches = []
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
matches << Language["Objective-C"]
- end
- if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>$/.match(data) or
+ elsif (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or
/template\s*
Date: Wed, 2 Apr 2014 19:48:44 +0100
Subject: [PATCH 005/366] More regex goodness to improve the detection of C++
vs C
---
lib/linguist/heuristics.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index f4303c88..c7f31a42 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -39,8 +39,9 @@ module Linguist
matches = []
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
matches << Language["Objective-C"]
- elsif (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or
- /template\s*/.match(data) or
+ /^\s*template\s*
Date: Wed, 2 Apr 2014 19:55:24 +0100
Subject: [PATCH 006/366] Found out that nothing was ever getting returned from
the heuristic function "find_by_heuristics", and that headers matching C,
Obj-C and C++ were never getting checked heuristically
---
lib/linguist/heuristics.rb | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index c7f31a42..e6d17686 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -12,23 +12,25 @@ module Linguist
#
# Returns an array of Languages or []
def self.find_by_heuristics(data, languages)
+ matches = []
if active?
- if languages.all? { |l| ["Objective-C", "C++"].include?(l) }
- disambiguate_c(data, languages)
+ if languages.all? { |l| ["Objective-C", "C++", "C"].include?(l) }
+ matches = disambiguate_c(data, languages)
end
if languages.all? { |l| ["Perl", "Prolog"].include?(l) }
- disambiguate_pl(data, languages)
+ matches = disambiguate_pl(data, languages)
end
if languages.all? { |l| ["ECL", "Prolog"].include?(l) }
- disambiguate_ecl(data, languages)
+ matches = disambiguate_ecl(data, languages)
end
if languages.all? { |l| ["TypeScript", "XML"].include?(l) }
- disambiguate_ts(data, languages)
+ matches = disambiguate_ts(data, languages)
end
if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) }
- disambiguate_cl(data, languages)
+ matches = disambiguate_cl(data, languages)
end
end
+ matches
end
# .h extensions are ambigious between C, C++, and Objective-C.
From 6524ac3588df115f3525d95e9c254625529a0f22 Mon Sep 17 00:00:00 2001
From: DX-MON
Date: Wed, 2 Apr 2014 20:08:47 +0100
Subject: [PATCH 007/366] Fixed the C++ class matching regex that was breaking
the test for C/jni_layer.h
---
lib/linguist/heuristics.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index e6d17686..3912ac5c 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -43,7 +43,7 @@ module Linguist
matches << Language["Objective-C"]
end
if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or
- /^\s*template\s*
Date: Wed, 2 Apr 2014 20:17:33 +0100
Subject: [PATCH 008/366] Found my new heuristic was still not being used
because heuristics had been switched off
---
lib/linguist/heuristics.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index 3912ac5c..75ce74f2 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -1,7 +1,7 @@
module Linguist
# A collection of simple heuristics that can be used to better analyze languages.
class Heuristics
- ACTIVE = false
+ ACTIVE = true
# Public: Given an array of String language names,
# apply heuristics against the given data and return an array
From af30a8070257a3999875f7a392ead82c4b41b7ff Mon Sep 17 00:00:00 2001
From: DX-MON
Date: Wed, 2 Apr 2014 21:41:02 +0100
Subject: [PATCH 009/366] Added two new heuristics tests for the new
C/C++/Obj-C heuristics
---
samples/C++/16F88.h | 86 ++++++++++++++++++++++++++++++++++
samples/C++/Memory16F88.h | 32 +++++++++++++
samples/C++/ThreadedQueue.h | 76 ++++++++++++++++++++++++++++++
samples/C/ArrowLeft.h | 93 +++++++++++++++++++++++++++++++++++++
test/test_heuristics.rb | 9 ++++
5 files changed, 296 insertions(+)
create mode 100644 samples/C++/16F88.h
create mode 100644 samples/C++/Memory16F88.h
create mode 100644 samples/C++/ThreadedQueue.h
create mode 100644 samples/C/ArrowLeft.h
diff --git a/samples/C++/16F88.h b/samples/C++/16F88.h
new file mode 100644
index 00000000..28f51ce4
--- /dev/null
+++ b/samples/C++/16F88.h
@@ -0,0 +1,86 @@
+/*
+ * This file is part of PIC
+ * Copyright © 2012 Rachel Mant (dx-mon@users.sourceforge.net)
+ *
+ * PIC is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * PIC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+enum PIC16F88Instruction
+{
+ ADDWF,
+ ANDWF,
+ CLRF,
+ CLRW,
+ COMF,
+ DECF,
+ DECFSZ,
+ INCF,
+ INCFSZ,
+ IORWF,
+ MOVF,
+ MOVWF,
+ NOP,
+ RLF,
+ RRF,
+ SUBWF,
+ SWAPF,
+ XORWF,
+ BCF,
+ BSF,
+ BTFSC,
+ BTFSS,
+ ADDLW,
+ ANDLW,
+ CALL,
+ CLRWDT,
+ GOTO,
+ IORLW,
+ MOVLW,
+ RETFIE,
+ RETLW,
+ RETURN,
+ SLEEP,
+ SUBLW,
+ XORLW
+};
+
+class PIC16F88
+{
+public:
+ PIC16F88(ROM *ProgramMemory);
+ void Step();
+
+private:
+ uint8_t q;
+ bool nextIsNop, trapped;
+ Memory *memory;
+ ROM *program;
+ Stack *CallStack;
+ Register *PC;
+ Register<> *WREG, *PCL, *STATUS, *PCLATCH;
+ PIC16F88Instruction inst;
+ uint16_t instrWord;
+
+private:
+ void DecodeInstruction();
+ void ProcessInstruction();
+
+ uint8_t GetBank();
+ uint8_t GetMemoryContents(uint8_t partialAddress);
+ void SetMemoryContents(uint8_t partialAddress, uint8_t newVal);
+ void CheckZero(uint8_t value);
+ void StoreValue(uint8_t value, bool updateZero);
+ uint8_t SetCarry(bool val);
+ uint16_t GetPCHFinalBits();
+};
diff --git a/samples/C++/Memory16F88.h b/samples/C++/Memory16F88.h
new file mode 100644
index 00000000..ced2ef13
--- /dev/null
+++ b/samples/C++/Memory16F88.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of PIC
+ * Copyright © 2012 Rachel Mant (dx-mon@users.sourceforge.net)
+ *
+ * PIC is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * PIC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+#include "Memory.h"
+
+class Memory16F88 : public Memory
+{
+private:
+ uint8_t memory[512];
+ std::map memoryMap;
+
+public:
+ Memory16F88();
+ uint8_t Dereference(uint8_t bank, uint8_t partialAddress);
+ uint8_t *Reference(uint8_t bank, uint8_t partialAddress);
+ uint8_t *operator [](uint32_t ref);
+};
diff --git a/samples/C++/ThreadedQueue.h b/samples/C++/ThreadedQueue.h
new file mode 100644
index 00000000..6b2fbaad
--- /dev/null
+++ b/samples/C++/ThreadedQueue.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of IRCBot
+ * Copyright © 2014 Rachel Mant (dx-mon@users.sourceforge.net)
+ *
+ * IRCBot is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * IRCBot is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef __THREADED_QUEUE_H__
+#define __THREADED_QUEUE_H__
+
+#include
+#include
+
+template
+class ThreadedQueue : public std::queue
+{
+private:
+ pthread_mutex_t queueMutex;
+ pthread_cond_t queueCond;
+
+public:
+ ThreadedQueue()
+ {
+ pthread_mutexattr_t mutexAttrs;
+ pthread_condattr_t condAttrs;
+
+ pthread_mutexattr_init(&mutexAttrs);
+ pthread_mutexattr_settype(&mutexAttrs, PTHREAD_MUTEX_ERRORCHECK);
+ pthread_mutex_init(&queueMutex, &mutexAttrs);
+ pthread_mutexattr_destroy(&mutexAttrs);
+
+ pthread_condattr_init(&condAttrs);
+ pthread_condattr_setpshared(&condAttrs, PTHREAD_PROCESS_PRIVATE);
+ pthread_cond_init(&queueCond, &condAttrs);
+ pthread_condattr_destroy(&condAttrs);
+ }
+
+ ~ThreadedQueue()
+ {
+ pthread_cond_destroy(&queueCond);
+ pthread_mutex_destroy(&queueMutex);
+ }
+
+ void waitItems()
+ {
+ pthread_mutex_lock(&queueMutex);
+ pthread_cond_wait(&queueCond, &queueMutex);
+ pthread_mutex_unlock(&queueMutex);
+ }
+
+ void signalItems()
+ {
+ pthread_mutex_lock(&queueMutex);
+ pthread_cond_broadcast(&queueCond);
+ pthread_mutex_unlock(&queueMutex);
+ }
+
+ void push(T item)
+ {
+ std::queue::push(item);
+ signalItems();
+ }
+};
+
+#endif /*__THREADED_QUEUE_H__*/
diff --git a/samples/C/ArrowLeft.h b/samples/C/ArrowLeft.h
new file mode 100644
index 00000000..b3577c0e
--- /dev/null
+++ b/samples/C/ArrowLeft.h
@@ -0,0 +1,93 @@
+/*
+ * This file is part of GTK++ (libGTK++)
+ * Copyright © 2012 Rachel Mant (dx-mon@users.sourceforge.net)
+ *
+ * GTK++ is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GTK++ is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/* GdkPixbuf RGBA C-Source image dump */
+
+#ifdef __SUNPRO_C
+#pragma align 4 (ArrowLeft)
+#endif
+#ifdef __GNUC__
+static const uint8_t ArrowLeft[] __attribute__ ((__aligned__ (4))) =
+#else
+static const uint8_t ArrowLeft[] =
+#endif
+{ ""
+ /* Pixbuf magic (0x47646b50) */
+ "GdkP"
+ /* length: header (24) + pixel_data (1600) */
+ "\0\0\6X"
+ /* pixdata_type (0x1010002) */
+ "\1\1\0\2"
+ /* rowstride (80) */
+ "\0\0\0P"
+ /* width (20) */
+ "\0\0\0\24"
+ /* height (20) */
+ "\0\0\0\24"
+ /* pixel_data: */
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0"
+ "\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0"};
+
+
diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb
index 0c1a07ff..d629c302 100644
--- a/test/test_heuristics.rb
+++ b/test/test_heuristics.rb
@@ -32,6 +32,15 @@ class TestHeuristcs < Test::Unit::TestCase
languages = ["C++", "Objective-C"]
results = Heuristics.disambiguate_c(fixture("C++/render_adapter.cpp"), languages)
assert_equal Language["C++"], results.first
+ languages = ["C++", "Objective-C", "C"]
+ results = Heuristics.disambiguate_c(fixture("C++/ThreadedQueue.h"), languages)
+ assert_equal Language["C++"], results.first
+ end
+
+ def test_c_by_heuristics
+ languages = ["C++", "Objective-C", "C"]
+ results = Heuristics.disambiguate_c(fixture("C/ArrowLeft.h"), languages)
+ assert_equal nil, results.first
end
def test_detect_still_works_if_nothing_matches
From e79e45a74e34c8eceba5e6bf0e14dc5dbca17e33 Mon Sep 17 00:00:00 2001
From: DX-MON
Date: Wed, 2 Apr 2014 22:22:22 +0100
Subject: [PATCH 010/366] Removed the matches variable from find_by_heuristics
without re-breaking anything
---
lib/linguist/heuristics.rb | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb
index 75ce74f2..5a8c787d 100644
--- a/lib/linguist/heuristics.rb
+++ b/lib/linguist/heuristics.rb
@@ -12,25 +12,23 @@ module Linguist
#
# Returns an array of Languages or []
def self.find_by_heuristics(data, languages)
- matches = []
if active?
if languages.all? { |l| ["Objective-C", "C++", "C"].include?(l) }
- matches = disambiguate_c(data, languages)
+ disambiguate_c(data, languages)
end
if languages.all? { |l| ["Perl", "Prolog"].include?(l) }
- matches = disambiguate_pl(data, languages)
+ disambiguate_pl(data, languages)
end
if languages.all? { |l| ["ECL", "Prolog"].include?(l) }
- matches = disambiguate_ecl(data, languages)
+ disambiguate_ecl(data, languages)
end
if languages.all? { |l| ["TypeScript", "XML"].include?(l) }
- matches = disambiguate_ts(data, languages)
+ disambiguate_ts(data, languages)
end
if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) }
- matches = disambiguate_cl(data, languages)
+ disambiguate_cl(data, languages)
end
end
- matches
end
# .h extensions are ambigious between C, C++, and Objective-C.
From 492aa12cad08950c9ffb26516b4465b6084e3442 Mon Sep 17 00:00:00 2001
From: DX-MON
Date: Thu, 3 Apr 2014 11:18:36 +0100
Subject: [PATCH 011/366] Updated the samples database file as recommended
---
lib/linguist/samples.json | 92938 ++++++++++++++++++------------------
1 file changed, 46793 insertions(+), 46145 deletions(-)
diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json
index 6d26388a..6a99a786 100644
--- a/lib/linguist/samples.json
+++ b/lib/linguist/samples.json
@@ -1,66 +1,25 @@
{
"extnames": {
- "ABAP": [
- ".abap"
+ "IDL": [
+ ".dlm",
+ ".pro"
],
- "Agda": [
- ".agda"
+ "TypeScript": [
+ ".ts"
],
- "Apex": [
- ".cls"
+ "Julia": [
+ ".jl"
],
- "AppleScript": [
- ".applescript"
+ "Nimrod": [
+ ".nim"
],
- "Arduino": [
- ".ino"
+ "RMarkdown": [
+ ".rmd"
],
- "AsciiDoc": [
- ".adoc",
- ".asc",
- ".asciidoc"
- ],
- "ATS": [
- ".atxt",
- ".dats",
- ".hats",
- ".sats"
- ],
- "AutoHotkey": [
- ".ahk"
- ],
- "Awk": [
- ".awk"
- ],
- "BlitzBasic": [
- ".bb"
- ],
- "Bluespec": [
- ".bsv"
- ],
- "Brightscript": [
- ".brs"
- ],
- "C": [
- ".c",
- ".cats",
- ".h"
- ],
- "C#": [
- ".cs",
- ".cshtml"
- ],
- "C++": [
- ".cc",
- ".cpp",
- ".h",
- ".hpp"
- ],
- "Ceylon": [
- ".ceylon"
- ],
- "Cirru": [
- ".cirru"
+ "PHP": [
+ ".module",
+ ".php",
+ ".script!"
],
"Clojure": [
".cl2",
@@ -71,244 +30,37 @@
".cljx",
".hic"
],
- "COBOL": [
- ".cbl",
- ".ccp",
- ".cob",
- ".cpy"
- ],
- "CoffeeScript": [
- ".coffee"
- ],
- "Common Lisp": [
- ".lisp"
- ],
"Coq": [
".v"
],
- "Creole": [
- ".creole"
- ],
- "CSS": [
- ".css"
- ],
- "Cuda": [
- ".cu",
- ".cuh"
- ],
- "Dart": [
- ".dart"
- ],
- "Diff": [
- ".patch"
- ],
- "DM": [
- ".dm"
- ],
- "ECL": [
- ".ecl"
- ],
- "edn": [
- ".edn"
- ],
- "Elm": [
- ".elm"
- ],
- "Emacs Lisp": [
- ".el"
- ],
- "Erlang": [
- ".erl",
- ".escript",
- ".script!"
- ],
- "fish": [
- ".fish"
- ],
- "Forth": [
- ".forth",
- ".fth"
- ],
- "GAS": [
- ".s"
- ],
- "GLSL": [
- ".fp",
- ".glsl"
- ],
- "Gosu": [
- ".gs",
- ".gst",
- ".gsx",
- ".vark"
- ],
- "Groovy": [
- ".gradle",
- ".script!"
- ],
- "Groovy Server Pages": [
- ".gsp"
- ],
- "Haml": [
- ".haml"
- ],
- "Handlebars": [
- ".handlebars",
- ".hbs"
- ],
- "Hy": [
- ".hy"
- ],
- "IDL": [
- ".dlm",
- ".pro"
- ],
- "Idris": [
- ".idr"
- ],
- "Ioke": [
- ".ik"
- ],
- "Jade": [
- ".jade"
- ],
- "Java": [
- ".java"
- ],
- "JavaScript": [
- ".js",
- ".script!"
- ],
- "JSON": [
- ".json",
- ".lock"
- ],
- "JSON5": [
- ".json5"
- ],
- "JSONLD": [
- ".jsonld"
- ],
- "Julia": [
- ".jl"
- ],
- "Kotlin": [
- ".kt"
- ],
- "KRL": [
- ".krl"
- ],
- "Lasso": [
- ".las",
- ".lasso",
- ".lasso9",
- ".ldml"
- ],
- "Less": [
- ".less"
- ],
- "LFE": [
- ".lfe"
- ],
- "Literate Agda": [
- ".lagda"
- ],
- "Literate CoffeeScript": [
- ".litcoffee"
- ],
- "LiveScript": [
- ".ls"
- ],
- "Logos": [
- ".xm"
- ],
- "Logtalk": [
- ".lgt"
- ],
- "Lua": [
- ".pd_lua"
- ],
- "M": [
- ".m"
- ],
- "Makefile": [
- ".script!"
- ],
- "Markdown": [
- ".md"
- ],
- "Matlab": [
- ".m"
- ],
- "Max": [
- ".maxhelp",
- ".maxpat",
- ".mxt"
- ],
- "MediaWiki": [
- ".mediawiki"
- ],
"Monkey": [
".monkey"
],
- "MoonScript": [
- ".moon"
+ "Pascal": [
+ ".dpr"
],
- "Nemerle": [
- ".n"
+ "AutoHotkey": [
+ ".ahk"
],
- "NetLogo": [
- ".nlogo"
- ],
- "Nimrod": [
- ".nim"
- ],
- "NSIS": [
- ".nsh",
- ".nsi"
- ],
- "Nu": [
- ".nu",
- ".script!"
- ],
- "Objective-C": [
- ".h",
- ".m"
- ],
- "OCaml": [
- ".eliom",
- ".ml"
- ],
- "Omgrofl": [
- ".omgrofl"
- ],
- "Opa": [
- ".opa"
- ],
- "OpenCL": [
- ".cl"
+ "UnrealScript": [
+ ".uc"
],
"OpenEdge ABL": [
".cls",
".p"
],
- "Org": [
- ".org"
+ "edn": [
+ ".edn"
],
- "Oxygene": [
- ".oxygene"
+ "Mask": [
+ ".mask"
],
- "Parrot Assembly": [
- ".pasm"
+ "C#": [
+ ".cs",
+ ".cshtml"
],
- "Parrot Internal Representation": [
- ".pir"
- ],
- "Pascal": [
- ".dpr"
- ],
- "PAWN": [
- ".pwn"
+ "JSON5": [
+ ".json5"
],
"Perl": [
".fcgi",
@@ -317,111 +69,81 @@
".script!",
".t"
],
- "Perl6": [
- ".p6",
- ".pm6"
+ "ECL": [
+ ".ecl"
],
- "PHP": [
- ".module",
- ".php",
- ".script!"
+ "CoffeeScript": [
+ ".coffee"
],
- "Pod": [
- ".pod"
+ "Logos": [
+ ".xm"
+ ],
+ "XC": [
+ ".xc"
],
"PogoScript": [
".pogo"
],
- "PostScript": [
- ".ps"
+ "Arduino": [
+ ".ino"
],
- "PowerShell": [
- ".ps1",
- ".psm1"
+ "Org": [
+ ".org"
],
- "Processing": [
- ".pde"
+ "Idris": [
+ ".idr"
],
- "Prolog": [
- ".ecl",
- ".pl",
- ".prolog"
- ],
- "Protocol Buffer": [
- ".proto"
- ],
- "Python": [
- ".py",
- ".script!"
- ],
- "R": [
- ".R",
- ".rsx",
- ".script!"
+ "Jade": [
+ ".jade"
],
"Racket": [
".scrbl"
],
- "Ragel in Ruby Host": [
- ".rl"
- ],
- "RDoc": [
- ".rdoc"
- ],
- "Rebol": [
- ".r"
- ],
- "RMarkdown": [
- ".rmd"
- ],
- "RobotFramework": [
- ".robot"
- ],
- "Ruby": [
- ".pluginspec",
- ".rabl",
- ".rake",
- ".rb",
- ".script!"
- ],
- "Rust": [
- ".rs"
- ],
- "Sass": [
- ".sass",
- ".scss"
- ],
- "Scala": [
- ".sbt",
- ".sc",
- ".script!"
- ],
- "Scaml": [
- ".scaml"
- ],
- "Scheme": [
- ".sld",
- ".sps"
- ],
- "Scilab": [
- ".sce",
- ".sci",
- ".tst"
- ],
- "SCSS": [
- ".scss"
- ],
"Shell": [
".bash",
".script!",
".sh",
".zsh"
],
- "Slash": [
- ".sl"
+ "Less": [
+ ".less"
],
- "Squirrel": [
- ".nut"
+ "Markdown": [
+ ".md"
+ ],
+ "LiveScript": [
+ ".ls"
+ ],
+ "R": [
+ ".R",
+ ".rsx",
+ ".script!"
+ ],
+ "Handlebars": [
+ ".handlebars",
+ ".hbs"
+ ],
+ "NetLogo": [
+ ".nlogo"
+ ],
+ "JavaScript": [
+ ".js",
+ ".script!"
+ ],
+ "Ioke": [
+ ".ik"
+ ],
+ "LFE": [
+ ".lfe"
+ ],
+ "OpenCL": [
+ ".cl"
+ ],
+ "PAWN": [
+ ".pwn"
+ ],
+ "AppleScript": [
+ ".applescript"
],
"Standard ML": [
".fun",
@@ -431,60 +153,347 @@
"Stylus": [
".styl"
],
- "SuperCollider": [
- ".scd"
+ "BlitzBasic": [
+ ".bb"
],
- "Tea": [
- ".tea"
+ "OCaml": [
+ ".eliom",
+ ".ml"
],
- "TeX": [
+ "Agda": [
+ ".agda"
+ ],
+ "Groovy": [
+ ".gradle",
+ ".script!"
+ ],
+ "CSS": [
+ ".css"
+ ],
+ "Ruby": [
+ ".pluginspec",
+ ".rabl",
+ ".rake",
+ ".rb",
+ ".script!"
+ ],
+ "Haml": [
+ ".haml"
+ ],
+ "JSONLD": [
+ ".jsonld"
+ ],
+ "Squirrel": [
+ ".nut"
+ ],
+ "Opa": [
+ ".opa"
+ ],
+ "Apex": [
".cls"
],
- "Turing": [
- ".t"
+ "NSIS": [
+ ".nsh",
+ ".nsi"
],
- "TXL": [
- ".txl"
+ "Oxygene": [
+ ".oxygene"
],
- "TypeScript": [
- ".ts"
- ],
- "UnrealScript": [
- ".uc"
+ "wisp": [
+ ".wisp"
],
"Verilog": [
".v"
],
- "VHDL": [
- ".vhd"
+ "Turing": [
+ ".t"
+ ],
+ "Sass": [
+ ".sass",
+ ".scss"
+ ],
+ "Ceylon": [
+ ".ceylon"
+ ],
+ "Erlang": [
+ ".erl",
+ ".escript",
+ ".script!"
+ ],
+ "Processing": [
+ ".pde"
+ ],
+ "Python": [
+ ".py",
+ ".script!"
+ ],
+ "Cirru": [
+ ".cirru"
+ ],
+ "Scheme": [
+ ".sld",
+ ".sps"
+ ],
+ "SCSS": [
+ ".scss"
+ ],
+ "Scilab": [
+ ".sce",
+ ".sci",
+ ".tst"
+ ],
+ "Kotlin": [
+ ".kt"
+ ],
+ "Nemerle": [
+ ".n"
+ ],
+ "SuperCollider": [
+ ".scd"
+ ],
+ "fish": [
+ ".fish"
+ ],
+ "Slash": [
+ ".sl"
+ ],
+ "C++": [
+ ".cc",
+ ".cpp",
+ ".h",
+ ".hpp"
+ ],
+ "Dart": [
+ ".dart"
+ ],
+ "Ragel in Ruby Host": [
+ ".rl"
+ ],
+ "Literate Agda": [
+ ".lagda"
+ ],
+ "TXL": [
+ ".txl"
+ ],
+ "Prolog": [
+ ".ecl",
+ ".pl",
+ ".prolog"
],
"Visual Basic": [
".cls",
".vb",
".vbhtml"
],
- "Volt": [
- ".volt"
+ "PostScript": [
+ ".ps"
],
- "wisp": [
- ".wisp"
+ "Tea": [
+ ".tea"
],
- "XC": [
- ".xc"
+ "Shen": [
+ ".shen"
+ ],
+ "JSON": [
+ ".json",
+ ".lock"
+ ],
+ "Cuda": [
+ ".cu",
+ ".cuh"
],
"XML": [
".ant",
".ivy",
".xml"
],
+ "Hy": [
+ ".hy"
+ ],
+ "Objective-C": [
+ ".h",
+ ".m"
+ ],
+ "YAML": [
+ ".yml"
+ ],
+ "RDoc": [
+ ".rdoc"
+ ],
+ "Pod": [
+ ".pod"
+ ],
+ "Forth": [
+ ".forth",
+ ".fth"
+ ],
+ "Omgrofl": [
+ ".omgrofl"
+ ],
+ "Elm": [
+ ".elm"
+ ],
+ "Diff": [
+ ".patch"
+ ],
+ "Logtalk": [
+ ".lgt"
+ ],
+ "TeX": [
+ ".cls"
+ ],
+ "Awk": [
+ ".awk"
+ ],
+ "Rebol": [
+ ".r"
+ ],
+ "Nu": [
+ ".nu",
+ ".script!"
+ ],
+ "Makefile": [
+ ".script!"
+ ],
+ "ABAP": [
+ ".abap"
+ ],
+ "Groovy Server Pages": [
+ ".gsp"
+ ],
+ "MediaWiki": [
+ ".mediawiki"
+ ],
+ "Matlab": [
+ ".m"
+ ],
+ "Lua": [
+ ".pd_lua"
+ ],
+ "COBOL": [
+ ".cbl",
+ ".ccp",
+ ".cob",
+ ".cpy"
+ ],
+ "MoonScript": [
+ ".moon"
+ ],
+ "Emacs Lisp": [
+ ".el"
+ ],
+ "Parrot Internal Representation": [
+ ".pir"
+ ],
+ "ATS": [
+ ".atxt",
+ ".dats",
+ ".hats",
+ ".sats"
+ ],
+ "KRL": [
+ ".krl"
+ ],
+ "DM": [
+ ".dm"
+ ],
+ "XSLT": [
+ ".xslt"
+ ],
+ "Lasso": [
+ ".las",
+ ".lasso",
+ ".lasso9",
+ ".ldml"
+ ],
+ "M": [
+ ".m"
+ ],
+ "Java": [
+ ".java"
+ ],
+ "Bluespec": [
+ ".bsv"
+ ],
+ "Max": [
+ ".maxhelp",
+ ".maxpat",
+ ".mxt"
+ ],
+ "Scala": [
+ ".sbt",
+ ".sc",
+ ".script!"
+ ],
+ "VHDL": [
+ ".vhd"
+ ],
+ "PowerShell": [
+ ".ps1",
+ ".psm1"
+ ],
+ "GAS": [
+ ".s"
+ ],
+ "Literate CoffeeScript": [
+ ".litcoffee"
+ ],
+ "Brightscript": [
+ ".brs"
+ ],
"XProc": [
".xpl"
],
+ "Parrot Assembly": [
+ ".pasm"
+ ],
+ "AsciiDoc": [
+ ".adoc",
+ ".asc",
+ ".asciidoc"
+ ],
+ "Protocol Buffer": [
+ ".proto"
+ ],
+ "Common Lisp": [
+ ".lisp"
+ ],
+ "C": [
+ ".c",
+ ".cats",
+ ".h"
+ ],
"XQuery": [
".xqm"
],
- "XSLT": [
- ".xslt"
+ "RobotFramework": [
+ ".robot"
+ ],
+ "Gosu": [
+ ".gs",
+ ".gst",
+ ".gsx",
+ ".vark"
+ ],
+ "Rust": [
+ ".rs"
+ ],
+ "Volt": [
+ ".volt"
+ ],
+ "Creole": [
+ ".creole"
+ ],
+ "Scaml": [
+ ".scaml"
+ ],
+ "Perl6": [
+ ".p6",
+ ".pm6"
+ ],
+ "GLSL": [
+ ".fp",
+ ".glsl"
],
"Xtend": [
".xtend"
@@ -494,29 +503,12 @@
},
"filenames": {
- "ApacheConf": [
- ".htaccess",
- "apache2.conf",
- "httpd.conf"
- ],
- "INI": [
- ".editorconfig",
- ".gitconfig"
- ],
- "Makefile": [
- "Makefile"
- ],
"Nginx": [
"nginx.conf"
],
"Perl": [
"ack"
],
- "Ruby": [
- "Appraisals",
- "Capfile",
- "Rakefile"
- ],
"Shell": [
".bash_logout",
".bash_profile",
@@ -543,8665 +535,3706 @@
"zshenv",
"zshrc"
],
+ "ApacheConf": [
+ ".htaccess",
+ "apache2.conf",
+ "httpd.conf"
+ ],
+ "Ruby": [
+ "Appraisals",
+ "Capfile",
+ "Rakefile"
+ ],
"VimL": [
".gvimrc",
".vimrc"
],
"YAML": [
".gemrc"
+ ],
+ "Makefile": [
+ "Makefile"
+ ],
+ "INI": [
+ ".editorconfig",
+ ".gitconfig"
]
},
- "tokens_total": 450556,
- "languages_total": 548,
+ "tokens_total": 454570,
+ "languages_total": 557,
"tokens": {
- "ABAP": {
- "*/**": 1,
- "*": 56,
- "The": 2,
- "MIT": 2,
- "License": 1,
- "(": 8,
- ")": 8,
- "Copyright": 1,
- "c": 3,
- "Ren": 1,
- "van": 1,
- "Mil": 1,
- "Permission": 1,
- "is": 2,
- "hereby": 1,
- "granted": 1,
- "free": 1,
- "of": 6,
- "charge": 1,
- "to": 10,
- "any": 1,
- "person": 1,
- "obtaining": 1,
- "a": 1,
- "copy": 2,
- "this": 2,
- "software": 1,
- "and": 3,
- "associated": 1,
- "documentation": 1,
- "files": 4,
- "the": 10,
- "deal": 1,
- "in": 3,
- "Software": 3,
- "without": 2,
- "restriction": 1,
- "including": 1,
- "limitation": 1,
- "rights": 1,
- "use": 1,
- "modify": 1,
- "merge": 1,
- "publish": 1,
- "distribute": 1,
- "sublicense": 1,
- "and/or": 1,
- "sell": 1,
- "copies": 2,
- "permit": 1,
- "persons": 1,
- "whom": 1,
- "furnished": 1,
- "do": 4,
- "so": 1,
- "subject": 1,
- "following": 1,
- "conditions": 1,
- "above": 1,
- "copyright": 1,
- "notice": 2,
- "permission": 1,
- "shall": 1,
- "be": 1,
- "included": 1,
- "all": 1,
- "or": 1,
- "substantial": 1,
- "portions": 1,
- "Software.": 1,
- "THE": 6,
- "SOFTWARE": 2,
- "IS": 1,
- "PROVIDED": 1,
- "WITHOUT": 1,
- "WARRANTY": 1,
- "OF": 4,
- "ANY": 2,
- "KIND": 1,
- "EXPRESS": 1,
- "OR": 7,
- "IMPLIED": 1,
- "INCLUDING": 1,
- "BUT": 1,
- "NOT": 1,
- "LIMITED": 1,
- "TO": 2,
- "WARRANTIES": 1,
- "MERCHANTABILITY": 1,
- "FITNESS": 1,
- "FOR": 2,
- "A": 1,
- "PARTICULAR": 1,
- "PURPOSE": 1,
- "AND": 1,
- "NONINFRINGEMENT.": 1,
- "IN": 4,
- "NO": 1,
- "EVENT": 1,
- "SHALL": 1,
- "AUTHORS": 1,
- "COPYRIGHT": 1,
- "HOLDERS": 1,
- "BE": 1,
- "LIABLE": 1,
- "CLAIM": 1,
- "DAMAGES": 1,
- "OTHER": 2,
- "LIABILITY": 1,
- "WHETHER": 1,
- "AN": 1,
- "ACTION": 1,
- "CONTRACT": 1,
- "TORT": 1,
- "OTHERWISE": 1,
- "ARISING": 1,
- "FROM": 1,
- "OUT": 1,
- "CONNECTION": 1,
- "WITH": 1,
- "USE": 1,
- "DEALINGS": 1,
- "SOFTWARE.": 1,
- "*/": 1,
- "-": 978,
- "CLASS": 2,
- "CL_CSV_PARSER": 6,
- "DEFINITION": 2,
- "class": 2,
- "cl_csv_parser": 2,
- "definition": 1,
- "public": 3,
- "inheriting": 1,
- "from": 1,
- "cl_object": 1,
- "final": 1,
- "create": 1,
- ".": 9,
- "section.": 3,
- "not": 3,
- "include": 3,
- "other": 3,
- "source": 3,
- "here": 3,
- "type": 11,
- "pools": 1,
- "abap": 1,
- "methods": 2,
- "constructor": 2,
- "importing": 1,
- "delegate": 1,
- "ref": 1,
- "if_csv_parser_delegate": 1,
- "csvstring": 1,
- "string": 1,
- "separator": 1,
- "skip_first_line": 1,
- "abap_bool": 2,
- "parse": 2,
- "raising": 1,
- "cx_csv_parse_error": 2,
- "protected": 1,
- "private": 1,
- "constants": 1,
- "_textindicator": 1,
- "value": 2,
- "IMPLEMENTATION": 2,
- "implementation.": 1,
- "": 2,
- "+": 9,
- "|": 7,
- "Instance": 2,
- "Public": 1,
- "Method": 2,
- "CONSTRUCTOR": 1,
- "[": 5,
- "]": 5,
- "DELEGATE": 1,
- "TYPE": 5,
- "REF": 1,
- "IF_CSV_PARSER_DELEGATE": 1,
- "CSVSTRING": 1,
- "STRING": 1,
- "SEPARATOR": 1,
- "C": 1,
- "SKIP_FIRST_LINE": 1,
- "ABAP_BOOL": 1,
- "": 2,
- "method": 2,
- "constructor.": 1,
- "super": 1,
- "_delegate": 1,
- "delegate.": 1,
- "_csvstring": 2,
- "csvstring.": 1,
- "_separator": 1,
- "separator.": 1,
- "_skip_first_line": 1,
- "skip_first_line.": 1,
- "endmethod.": 2,
- "Get": 1,
- "lines": 4,
- "data": 3,
- "is_first_line": 1,
- "abap_true.": 2,
- "standard": 2,
- "table": 3,
- "string.": 3,
- "_lines": 1,
- "field": 1,
- "symbols": 1,
- "": 3,
- "loop": 1,
- "at": 2,
- "assigning": 1,
- "Parse": 1,
- "line": 1,
- "values": 2,
- "_parse_line": 2,
- "Private": 1,
- "_LINES": 1,
- "<": 1,
- "RETURNING": 1,
- "STRINGTAB": 1,
- "_lines.": 1,
- "split": 1,
- "cl_abap_char_utilities": 1,
- "cr_lf": 1,
- "into": 6,
- "returning.": 1,
- "Space": 2,
- "concatenate": 4,
- "csvvalue": 6,
- "csvvalue.": 5,
- "else.": 4,
- "char": 2,
- "endif.": 6,
- "This": 1,
- "indicates": 1,
- "an": 1,
- "error": 1,
- "CSV": 1,
- "formatting": 1,
- "text_ended": 1,
- "message": 2,
- "e003": 1,
- "csv": 1,
- "msg.": 2,
- "raise": 1,
- "exception": 1,
- "exporting": 1,
- "endwhile.": 2,
- "append": 2,
- "csvvalues.": 2,
- "clear": 1,
- "pos": 2,
- "endclass.": 1
- },
- "Agda": {
- "module": 3,
- "NatCat": 1,
- "where": 2,
- "open": 2,
- "import": 2,
- "Relation.Binary.PropositionalEquality": 1,
- "-": 21,
- "If": 1,
- "you": 2,
- "can": 1,
- "show": 1,
- "that": 1,
- "a": 1,
- "relation": 1,
- "only": 1,
- "ever": 1,
- "has": 1,
- "one": 1,
- "inhabitant": 5,
- "get": 1,
- "the": 1,
- "category": 1,
- "laws": 1,
- "for": 1,
- "free": 1,
- "EasyCategory": 3,
- "(": 36,
- "obj": 4,
- "Set": 2,
- ")": 36,
- "_": 6,
- "{": 10,
- "x": 34,
- "y": 28,
- "z": 18,
- "}": 10,
- "id": 9,
- "single": 4,
- "r": 26,
- "s": 29,
- "assoc": 2,
- "w": 4,
- "t": 6,
- "Data.Nat": 1,
- "same": 5,
- ".0": 2,
- "n": 14,
- "refl": 6,
- ".": 5,
- "suc": 6,
- "m": 6,
- "cong": 1,
- "trans": 5,
- ".n": 1,
- "zero": 1,
- "Nat": 1
- },
- "ApacheConf": {
- "ServerSignature": 1,
- "Off": 1,
- "RewriteCond": 15,
- "%": 48,
- "{": 16,
- "REQUEST_METHOD": 1,
- "}": 16,
- "(": 16,
- "HEAD": 1,
- "|": 80,
- "TRACE": 1,
- "DELETE": 1,
- "TRACK": 1,
- ")": 17,
- "[": 17,
- "NC": 13,
- "OR": 14,
- "]": 17,
- "THE_REQUEST": 1,
- "r": 1,
- "n": 1,
- "A": 6,
- "D": 6,
- "HTTP_REFERER": 1,
- "<|>": 6,
- "C": 5,
- "E": 5,
- "HTTP_COOKIE": 1,
- "REQUEST_URI": 1,
- "/": 3,
- ";": 2,
- "<": 1,
- ".": 7,
- "HTTP_USER_AGENT": 5,
- "java": 1,
- "curl": 2,
- "wget": 2,
- "winhttp": 1,
- "HTTrack": 1,
- "clshttp": 1,
- "archiver": 1,
- "loader": 1,
- "email": 1,
- "harvest": 1,
- "extract": 1,
- "grab": 1,
- "miner": 1,
- "libwww": 1,
- "-": 43,
- "perl": 1,
- "python": 1,
- "nikto": 1,
- "scan": 1,
- "#Block": 1,
- "mySQL": 1,
- "injects": 1,
- "QUERY_STRING": 5,
- ".*": 3,
- "*": 1,
- "union": 1,
- "select": 1,
- "insert": 1,
- "cast": 1,
- "set": 1,
- "declare": 1,
- "drop": 1,
- "update": 1,
- "md5": 1,
- "benchmark": 1,
- "./": 1,
- "localhost": 1,
- "loopback": 1,
- ".0": 2,
- ".1": 1,
- "a": 1,
- "z0": 1,
- "RewriteRule": 1,
- "index.php": 1,
- "F": 1,
- "#": 182,
- "ServerRoot": 2,
- "#Listen": 2,
- "Listen": 2,
- "LoadModule": 126,
- "authn_file_module": 2,
- "/usr/lib/apache2/modules/mod_authn_file.so": 1,
- "authn_dbm_module": 2,
- "/usr/lib/apache2/modules/mod_authn_dbm.so": 1,
- "authn_anon_module": 2,
- "/usr/lib/apache2/modules/mod_authn_anon.so": 1,
- "authn_dbd_module": 2,
- "/usr/lib/apache2/modules/mod_authn_dbd.so": 1,
- "authn_default_module": 2,
- "/usr/lib/apache2/modules/mod_authn_default.so": 1,
- "authn_alias_module": 1,
- "/usr/lib/apache2/modules/mod_authn_alias.so": 1,
- "authz_host_module": 2,
- "/usr/lib/apache2/modules/mod_authz_host.so": 1,
- "authz_groupfile_module": 2,
- "/usr/lib/apache2/modules/mod_authz_groupfile.so": 1,
- "authz_user_module": 2,
- "/usr/lib/apache2/modules/mod_authz_user.so": 1,
- "authz_dbm_module": 2,
- "/usr/lib/apache2/modules/mod_authz_dbm.so": 1,
- "authz_owner_module": 2,
- "/usr/lib/apache2/modules/mod_authz_owner.so": 1,
- "authnz_ldap_module": 1,
- "/usr/lib/apache2/modules/mod_authnz_ldap.so": 1,
- "authz_default_module": 2,
- "/usr/lib/apache2/modules/mod_authz_default.so": 1,
- "auth_basic_module": 2,
- "/usr/lib/apache2/modules/mod_auth_basic.so": 1,
- "auth_digest_module": 2,
- "/usr/lib/apache2/modules/mod_auth_digest.so": 1,
- "file_cache_module": 1,
- "/usr/lib/apache2/modules/mod_file_cache.so": 1,
- "cache_module": 2,
- "/usr/lib/apache2/modules/mod_cache.so": 1,
- "disk_cache_module": 2,
- "/usr/lib/apache2/modules/mod_disk_cache.so": 1,
- "mem_cache_module": 2,
- "/usr/lib/apache2/modules/mod_mem_cache.so": 1,
- "dbd_module": 2,
- "/usr/lib/apache2/modules/mod_dbd.so": 1,
- "dumpio_module": 2,
- "/usr/lib/apache2/modules/mod_dumpio.so": 1,
- "ext_filter_module": 2,
- "/usr/lib/apache2/modules/mod_ext_filter.so": 1,
- "include_module": 2,
- "/usr/lib/apache2/modules/mod_include.so": 1,
- "filter_module": 2,
- "/usr/lib/apache2/modules/mod_filter.so": 1,
- "charset_lite_module": 1,
- "/usr/lib/apache2/modules/mod_charset_lite.so": 1,
- "deflate_module": 2,
- "/usr/lib/apache2/modules/mod_deflate.so": 1,
- "ldap_module": 1,
- "/usr/lib/apache2/modules/mod_ldap.so": 1,
- "log_forensic_module": 2,
- "/usr/lib/apache2/modules/mod_log_forensic.so": 1,
- "env_module": 2,
- "/usr/lib/apache2/modules/mod_env.so": 1,
- "mime_magic_module": 2,
- "/usr/lib/apache2/modules/mod_mime_magic.so": 1,
- "cern_meta_module": 2,
- "/usr/lib/apache2/modules/mod_cern_meta.so": 1,
- "expires_module": 2,
- "/usr/lib/apache2/modules/mod_expires.so": 1,
- "headers_module": 2,
- "/usr/lib/apache2/modules/mod_headers.so": 1,
- "ident_module": 2,
- "/usr/lib/apache2/modules/mod_ident.so": 1,
- "usertrack_module": 2,
- "/usr/lib/apache2/modules/mod_usertrack.so": 1,
- "unique_id_module": 2,
- "/usr/lib/apache2/modules/mod_unique_id.so": 1,
- "setenvif_module": 2,
- "/usr/lib/apache2/modules/mod_setenvif.so": 1,
- "version_module": 2,
- "/usr/lib/apache2/modules/mod_version.so": 1,
- "proxy_module": 2,
- "/usr/lib/apache2/modules/mod_proxy.so": 1,
- "proxy_connect_module": 2,
- "/usr/lib/apache2/modules/mod_proxy_connect.so": 1,
- "proxy_ftp_module": 2,
- "/usr/lib/apache2/modules/mod_proxy_ftp.so": 1,
- "proxy_http_module": 2,
- "/usr/lib/apache2/modules/mod_proxy_http.so": 1,
- "proxy_ajp_module": 2,
- "/usr/lib/apache2/modules/mod_proxy_ajp.so": 1,
- "proxy_balancer_module": 2,
- "/usr/lib/apache2/modules/mod_proxy_balancer.so": 1,
- "ssl_module": 4,
- "/usr/lib/apache2/modules/mod_ssl.so": 1,
- "mime_module": 4,
- "/usr/lib/apache2/modules/mod_mime.so": 1,
- "dav_module": 2,
- "/usr/lib/apache2/modules/mod_dav.so": 1,
- "status_module": 2,
- "/usr/lib/apache2/modules/mod_status.so": 1,
- "autoindex_module": 2,
- "/usr/lib/apache2/modules/mod_autoindex.so": 1,
- "asis_module": 2,
- "/usr/lib/apache2/modules/mod_asis.so": 1,
- "info_module": 2,
- "/usr/lib/apache2/modules/mod_info.so": 1,
- "suexec_module": 1,
- "/usr/lib/apache2/modules/mod_suexec.so": 1,
- "cgid_module": 3,
- "/usr/lib/apache2/modules/mod_cgid.so": 1,
- "cgi_module": 2,
- "/usr/lib/apache2/modules/mod_cgi.so": 1,
- "dav_fs_module": 2,
- "/usr/lib/apache2/modules/mod_dav_fs.so": 1,
- "dav_lock_module": 1,
- "/usr/lib/apache2/modules/mod_dav_lock.so": 1,
- "vhost_alias_module": 2,
- "/usr/lib/apache2/modules/mod_vhost_alias.so": 1,
- "negotiation_module": 2,
- "/usr/lib/apache2/modules/mod_negotiation.so": 1,
- "dir_module": 4,
- "/usr/lib/apache2/modules/mod_dir.so": 1,
- "imagemap_module": 2,
- "/usr/lib/apache2/modules/mod_imagemap.so": 1,
- "actions_module": 2,
- "/usr/lib/apache2/modules/mod_actions.so": 1,
- "speling_module": 2,
- "/usr/lib/apache2/modules/mod_speling.so": 1,
- "userdir_module": 2,
- "/usr/lib/apache2/modules/mod_userdir.so": 1,
- "alias_module": 4,
- "/usr/lib/apache2/modules/mod_alias.so": 1,
- "rewrite_module": 2,
- "/usr/lib/apache2/modules/mod_rewrite.so": 1,
- "": 17,
- "mpm_netware_module": 2,
- "User": 2,
- "daemon": 2,
- "Group": 2,
- "": 17,
- "ServerAdmin": 2,
- "you@example.com": 2,
- "#ServerName": 2,
- "www.example.com": 2,
- "DocumentRoot": 2,
- "": 6,
- "Options": 6,
- "FollowSymLinks": 4,
- "AllowOverride": 6,
- "None": 8,
- "Order": 10,
- "deny": 10,
- "allow": 10,
- "Deny": 6,
- "from": 10,
- "all": 10,
- "": 6,
- "usr": 2,
- "share": 1,
- "apache2": 1,
- "default": 1,
- "site": 1,
- "htdocs": 1,
- "Indexes": 2,
- "Allow": 4,
- "DirectoryIndex": 2,
- "index.html": 2,
- "": 2,
- "ht": 1,
- "Satisfy": 4,
- "All": 4,
- "": 2,
- "ErrorLog": 2,
- "/var/log/apache2/error_log": 1,
- "LogLevel": 2,
- "warn": 2,
- "log_config_module": 3,
- "LogFormat": 6,
- "combined": 4,
- "common": 4,
- "logio_module": 3,
- "combinedio": 2,
- "CustomLog": 2,
- "/var/log/apache2/access_log": 2,
- "#CustomLog": 2,
- "ScriptAlias": 1,
- "/cgi": 2,
- "bin/": 2,
- "#Scriptsock": 2,
- "/var/run/apache2/cgisock": 1,
- "lib": 1,
- "cgi": 3,
- "bin": 1,
- "DefaultType": 2,
- "text/plain": 2,
- "TypesConfig": 2,
- "/etc/apache2/mime.types": 1,
- "#AddType": 4,
- "application/x": 6,
- "gzip": 6,
- ".tgz": 6,
- "#AddEncoding": 4,
- "x": 4,
- "compress": 4,
- ".Z": 4,
- ".gz": 4,
- "AddType": 4,
- "#AddHandler": 4,
- "script": 2,
- ".cgi": 2,
- "type": 2,
- "map": 2,
- "var": 2,
- "text/html": 2,
- ".shtml": 4,
- "#AddOutputFilter": 2,
- "INCLUDES": 2,
- "#MIMEMagicFile": 2,
- "/etc/apache2/magic": 1,
- "#ErrorDocument": 8,
- "/missing.html": 2,
- "http": 2,
- "//www.example.com/subscription_info.html": 2,
- "#EnableMMAP": 2,
- "off": 5,
- "#EnableSendfile": 2,
- "#Include": 17,
- "/etc/apache2/extra/httpd": 11,
- "mpm.conf": 2,
- "multilang": 2,
- "errordoc.conf": 2,
- "autoindex.conf": 2,
- "languages.conf": 2,
- "userdir.conf": 2,
- "info.conf": 2,
- "vhosts.conf": 2,
- "manual.conf": 2,
- "dav.conf": 2,
- "default.conf": 2,
- "ssl.conf": 2,
- "SSLRandomSeed": 4,
- "startup": 2,
- "builtin": 4,
- "connect": 2,
- "libexec/apache2/mod_authn_file.so": 1,
- "libexec/apache2/mod_authn_dbm.so": 1,
- "libexec/apache2/mod_authn_anon.so": 1,
- "libexec/apache2/mod_authn_dbd.so": 1,
- "libexec/apache2/mod_authn_default.so": 1,
- "libexec/apache2/mod_authz_host.so": 1,
- "libexec/apache2/mod_authz_groupfile.so": 1,
- "libexec/apache2/mod_authz_user.so": 1,
- "libexec/apache2/mod_authz_dbm.so": 1,
- "libexec/apache2/mod_authz_owner.so": 1,
- "libexec/apache2/mod_authz_default.so": 1,
- "libexec/apache2/mod_auth_basic.so": 1,
- "libexec/apache2/mod_auth_digest.so": 1,
- "libexec/apache2/mod_cache.so": 1,
- "libexec/apache2/mod_disk_cache.so": 1,
- "libexec/apache2/mod_mem_cache.so": 1,
- "libexec/apache2/mod_dbd.so": 1,
- "libexec/apache2/mod_dumpio.so": 1,
- "reqtimeout_module": 1,
- "libexec/apache2/mod_reqtimeout.so": 1,
- "libexec/apache2/mod_ext_filter.so": 1,
- "libexec/apache2/mod_include.so": 1,
- "libexec/apache2/mod_filter.so": 1,
- "substitute_module": 1,
- "libexec/apache2/mod_substitute.so": 1,
- "libexec/apache2/mod_deflate.so": 1,
- "libexec/apache2/mod_log_config.so": 1,
- "libexec/apache2/mod_log_forensic.so": 1,
- "libexec/apache2/mod_logio.so": 1,
- "libexec/apache2/mod_env.so": 1,
- "libexec/apache2/mod_mime_magic.so": 1,
- "libexec/apache2/mod_cern_meta.so": 1,
- "libexec/apache2/mod_expires.so": 1,
- "libexec/apache2/mod_headers.so": 1,
- "libexec/apache2/mod_ident.so": 1,
- "libexec/apache2/mod_usertrack.so": 1,
- "#LoadModule": 4,
- "libexec/apache2/mod_unique_id.so": 1,
- "libexec/apache2/mod_setenvif.so": 1,
- "libexec/apache2/mod_version.so": 1,
- "libexec/apache2/mod_proxy.so": 1,
- "libexec/apache2/mod_proxy_connect.so": 1,
- "libexec/apache2/mod_proxy_ftp.so": 1,
- "libexec/apache2/mod_proxy_http.so": 1,
- "proxy_scgi_module": 1,
- "libexec/apache2/mod_proxy_scgi.so": 1,
- "libexec/apache2/mod_proxy_ajp.so": 1,
- "libexec/apache2/mod_proxy_balancer.so": 1,
- "libexec/apache2/mod_ssl.so": 1,
- "libexec/apache2/mod_mime.so": 1,
- "libexec/apache2/mod_dav.so": 1,
- "libexec/apache2/mod_status.so": 1,
- "libexec/apache2/mod_autoindex.so": 1,
- "libexec/apache2/mod_asis.so": 1,
- "libexec/apache2/mod_info.so": 1,
- "libexec/apache2/mod_cgi.so": 1,
- "libexec/apache2/mod_dav_fs.so": 1,
- "libexec/apache2/mod_vhost_alias.so": 1,
- "libexec/apache2/mod_negotiation.so": 1,
- "libexec/apache2/mod_dir.so": 1,
- "libexec/apache2/mod_imagemap.so": 1,
- "libexec/apache2/mod_actions.so": 1,
- "libexec/apache2/mod_speling.so": 1,
- "libexec/apache2/mod_userdir.so": 1,
- "libexec/apache2/mod_alias.so": 1,
- "libexec/apache2/mod_rewrite.so": 1,
- "perl_module": 1,
- "libexec/apache2/mod_perl.so": 1,
- "php5_module": 1,
- "libexec/apache2/libphp5.so": 1,
- "hfs_apple_module": 1,
- "libexec/apache2/mod_hfs_apple.so": 1,
- "mpm_winnt_module": 1,
- "_www": 2,
- "Library": 2,
- "WebServer": 2,
- "Documents": 1,
- "MultiViews": 1,
- "Hh": 1,
- "Tt": 1,
- "Dd": 1,
- "Ss": 2,
- "_": 1,
- "": 1,
- "rsrc": 1,
- "": 1,
- "": 1,
- "namedfork": 1,
- "": 1,
- "ScriptAliasMatch": 1,
- "i": 1,
- "webobjects": 1,
- "/private/var/run/cgisock": 1,
- "CGI": 1,
- "Executables": 1,
- "/private/etc/apache2/mime.types": 1,
- "/private/etc/apache2/magic": 1,
- "#MaxRanges": 1,
- "unlimited": 1,
- "TraceEnable": 1,
- "Include": 6,
- "/private/etc/apache2/extra/httpd": 11,
- "/private/etc/apache2/other/*.conf": 1
- },
- "Apex": {
- "global": 70,
- "class": 7,
- "ArrayUtils": 1,
- "{": 219,
- "static": 83,
- "String": 60,
- "[": 102,
- "]": 102,
- "EMPTY_STRING_ARRAY": 1,
- "new": 60,
- "}": 219,
- ";": 308,
- "Integer": 34,
- "MAX_NUMBER_OF_ELEMENTS_IN_LIST": 5,
- "get": 4,
- "return": 106,
- "List": 71,
- "": 30,
- "objectToString": 1,
- "(": 481,
- "
": 1,
+ "cart.item_count": 7,
+ "There": 1,
+ "pluralize": 3,
+ "title=": 3,
+ "your": 1,
+ "cart": 1,
+ "": 1,
+ "Your": 1,
+ "subtotal": 1,
+ "is": 1,
+ "cart.total_price": 2,
+ ".": 3,
+ "
": 1,
+ "item": 1,
+ "cart.items": 1,
+ "onMouseover=": 2,
+ "onMouseout=": 2,
+ "
": 2,
+ "": 1,
+ "
": 1,
+ "onclick=": 1,
+ "View": 1,
+ "Mini": 1,
+ "Cart": 1,
+ "(": 1,
+ ")": 1,
+ "
": 3,
+ "content_for_layout": 1,
+ "link": 2,
+ "linklists.main": 1,
+ "menu.links": 1,
+ "link.title": 2,
+ "link_to": 2,
+ "link.url": 2,
+ "tags": 1,
+ "tag": 4,
+ "collection.tags": 1,
+ "": 1,
+ "link_to_add_tag": 1,
+ "": 1,
+ "highlight_active_tag": 1,
+ "link_to_tag": 1,
+ "linklists.footer.links": 1,
+ "All": 1,
+ "prices": 1,
+ "are": 1,
+ "shop.currency": 1,
+ "Powered": 1,
+ "by": 1,
+ "Shopify": 1,
"": 1,
- "": 1,
- "main": 1,
- "fprint_filsub": 1,
- "option0": 3,
- "functor_option0": 2,
- "option0_map": 1,
- "functor_homres": 2,
- "c": 3,
- "Yoneda_phi": 3,
- "Yoneda_psi": 3,
- "m": 4,
- "mf": 4,
- "natrans": 3,
- "G": 2,
- "Yoneda_phi_nat": 2,
- "Yoneda_psi_nat": 2,
- "list_t": 1,
- "g0ofg1_list": 1,
- "Yoneda_bool_list0": 3,
- "myboolist1": 2
+ "