...
 
Commits (3)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Apktool-android @ 4c1841a5
Subproject commit 4c1841a582d1e79cb87d9221f948cf06a63e8384
This diff is collapsed.
CQL @ 73505d09
Subproject commit 73505d09f1ec453e92739186721fa4ff2febd495
apt @ d3e235b8
Subproject commit d3e235b8daf09fb40cda0ca2b20523e57afe1b5e
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Tom Everett\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nlexer grammar HTMLLexer;\n\nHTML_COMMENT\n : \'<!--\' .*? \'-->\'\n ;\n\nHTML_CONDITIONAL_COMMENT\n : \'<![\' .*? \']>\'\n ;\n\nXML_DECLARATION\n : \'<?xml\' .*? \'>\'\n ;\n\nCDATA\n : \'<![CDATA[\' .*? \']]>\'\n ;\n\nDTD\n : \'<!\' .*? \'>\'\n ;\n\nSCRIPTLET\n : \'<?\' .*? \'?>\'\n | \'<%\' .*? \'%>\'\n ;\n\nSEA_WS\n : (\' \'|\'\\t\'|\'\\r\'? \'\\n\')+\n ;\n\nSCRIPT_OPEN\n : \'<script\' .*? \'>\' ->pushMode(SCRIPT)\n ;\n\nSTYLE_OPEN\n : \'<style\' .*? \'>\' ->pushMode(STYLE)\n ;\n\nTAG_OPEN\n : \'<\' -> pushMode(TAG)\n ;\n\nHTML_TEXT\n : ~\'<\'+\n ;\n\n//\n// tag declarations\n//\nmode TAG;\n\nTAG_CLOSE\n : \'>\' -> popMode\n ;\n\nTAG_SLASH_CLOSE\n : \'/>\' -> popMode\n ;\n\nTAG_SLASH\n : \'/\'\n ;\n\n//\n// lexing mode for attribute values\n//\nTAG_EQUALS\n : \'=\' -> pushMode(ATTVALUE)\n ;\n\nTAG_NAME\n : TAG_NameStartChar TAG_NameChar*\n ;\n\nTAG_WHITESPACE\n : [ \\t\\r\\n] -> skip\n ;\n\nfragment\nHEXDIGIT\n : [a-fA-F0-9]\n ;\n\nfragment\nDIGIT\n : [0-9]\n ;\n\nfragment\nTAG_NameChar\n : TAG_NameStartChar\n | \'-\'\n | \'_\'\n | \'.\'\n | DIGIT\n | \'\\u00B7\'\n | \'\\u0300\'..\'\\u036F\'\n | \'\\u203F\'..\'\\u2040\'\n ;\n\nfragment\nTAG_NameStartChar\n : [:a-zA-Z]\n | \'\\u2070\'..\'\\u218F\'\n | \'\\u2C00\'..\'\\u2FEF\'\n | \'\\u3001\'..\'\\uD7FF\'\n | \'\\uF900\'..\'\\uFDCF\'\n | \'\\uFDF0\'..\'\\uFFFD\'\n ;\n\n//\n// <scripts>\n//\nmode SCRIPT;\n\nSCRIPT_BODY\n : .*? \'</script>\' -> popMode\n ;\n\nSCRIPT_SHORT_BODY\n : .*? \'</>\' -> popMode\n ;\n\n//\n// <styles>\n//\nmode STYLE;\n\nSTYLE_BODY\n : .*? \'</style>\' -> popMode\n ;\n\nSTYLE_SHORT_BODY\n : .*? \'</>\' -> popMode\n ;\n\n//\n// attribute values\n//\nmode ATTVALUE;\n\n// an attribute value may have spaces b/t the \'=\' and the value\nATTVALUE_VALUE\n : [ ]* ATTRIBUTE -> popMode\n ;\n\nATTRIBUTE\n : DOUBLE_QUOTE_STRING\n | SINGLE_QUOTE_STRING\n | ATTCHARS\n | HEXCHARS\n | DECCHARS\n ;\n\nfragment ATTCHAR\n : \'-\'\n | \'_\'\n | \'.\'\n | \'/\'\n | \'+\'\n | \',\'\n | \'?\'\n | \'=\'\n | \':\'\n | \';\'\n | \'#\'\n | [0-9a-zA-Z]\n ;\n\nfragment ATTCHARS\n : ATTCHAR+ \' \'?\n ;\n\nfragment HEXCHARS\n : \'#\' [0-9a-fA-F]+\n ;\n\nfragment DECCHARS\n : [0-9]+ \'%\'?\n ;\n\nfragment DOUBLE_QUOTE_STRING\n : \'"\' ~[<"]* \'"\'\n ;\n\nfragment SINGLE_QUOTE_STRING\n : \'\\\'\' ~[<\']* \'\\\'\'\n ;\n\n'
\ No newline at end of file
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Tom Everett\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nparser grammar HTMLParser;\n\noptions { tokenVocab=HTMLLexer; }\n\nhtmlDocument\n : (scriptlet | SEA_WS)* xml? (scriptlet | SEA_WS)* dtd? (scriptlet | SEA_WS)* htmlElements*\n ;\n\nhtmlElements\n : htmlMisc* htmlElement htmlMisc*\n ;\n\nhtmlElement\n : TAG_OPEN htmlTagName htmlAttribute* TAG_CLOSE htmlContent TAG_OPEN TAG_SLASH htmlTagName TAG_CLOSE\n | TAG_OPEN htmlTagName htmlAttribute* TAG_SLASH_CLOSE\n | TAG_OPEN htmlTagName htmlAttribute* TAG_CLOSE\n | scriptlet\n | script\n | style\n ;\n\nhtmlContent\n : htmlChardata? ((htmlElement | xhtmlCDATA | htmlComment) htmlChardata?)*\n ;\n\nhtmlAttribute\n : htmlAttributeName TAG_EQUALS htmlAttributeValue\n | htmlAttributeName\n ;\n\nhtmlAttributeName\n : TAG_NAME\n ;\n\nhtmlAttributeValue\n : ATTVALUE_VALUE\n ;\n\nhtmlTagName\n : TAG_NAME\n ;\n\nhtmlChardata\n : HTML_TEXT\n | SEA_WS\n ;\n\nhtmlMisc\n : htmlComment\n | SEA_WS\n ;\n\nhtmlComment\n : HTML_COMMENT\n | HTML_CONDITIONAL_COMMENT\n ;\n\nxhtmlCDATA\n : CDATA\n ;\n\ndtd\n : DTD\n ;\n\nxml\n : XML_DECLARATION\n ;\n\nscriptlet\n : SCRIPTLET\n ;\n\nscript\n : SCRIPT_OPEN ( SCRIPT_BODY | SCRIPT_SHORT_BODY)\n ;\n\nstyle\n : STYLE_OPEN ( STYLE_BODY | STYLE_SHORT_BODY)\n ;\n'
\ No newline at end of file
b'\n/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */\n\n// Derived from http://json.org\ngrammar JSON;\n\njson\n : value\n ;\n\nobj\n : \'{\' pair (\',\' pair)* \'}\'\n | \'{\' \'}\'\n ;\n\npair\n : STRING \':\' value\n ;\n\narray\n : \'[\' value (\',\' value)* \']\'\n | \'[\' \']\'\n ;\n\nvalue\n : STRING\n | NUMBER\n | obj\n | array\n | TRUE\n | FALSE\n | NULL\n ;\n\nTRUE\n : \'true\'\n ;\n\nFALSE\n : \'false\'\n ;\n\nNULL\n : \'null\'\n ;\n\nSTRING\n : \'"\' (ESC | SAFECODEPOINT)* \'"\'\n ;\n\nLBRACE : \'{\' ;\nRBRACE : \'}\' ;\nLBRACK : \'[\' ;\nRBRACK : \']\' ;\nCOMMA : \',\' ;\nCOLON : \':\' ;\nfragment ESC\n : \'\\\\\' (["\\\\/bfnrt] | UNICODE)\n ;\n\n\nfragment UNICODE\n : \'u\' HEX HEX HEX HEX\n ;\n\n\nfragment HEX\n : [0-9a-fA-F]\n ;\n\n\nfragment SAFECODEPOINT\n : ~ ["\\\\\\u0000-\\u001F]\n ;\n\n\nNUMBER\n : \'-\'? INT (\'.\' [0-9] +)? EXP?\n ;\n\n\nfragment INT\n : \'0\' | [1-9] [0-9]*\n ;\n\n// no leading zeros\n\nfragment EXP\n : [Ee] [+\\-]? INT\n ;\n\n// \\- since - means "range" inside [...]\n\nWS\n : [ \\t\\n\\r] + -> skip\n ;\n'
\ No newline at end of file
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Terence Parr, Sam Harwell\n Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8)\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nlexer grammar JavaLexer;\n\n// Keywords\n\nABSTRACT: \'abstract\';\nASSERT: \'assert\';\nBOOLEAN: \'boolean\';\nBREAK: \'break\';\nBYTE: \'byte\';\nCASE: \'case\';\nCATCH: \'catch\';\nCHAR: \'char\';\nCLASS: \'class\';\nCONST: \'const\';\nCONTINUE: \'continue\';\nDEFAULT: \'default\';\nDO: \'do\';\nDOUBLE: \'double\';\nELSE: \'else\';\nENUM: \'enum\';\nEXTENDS: \'extends\';\nFINAL: \'final\';\nFINALLY: \'finally\';\nFLOAT: \'float\';\nFOR: \'for\';\nIF: \'if\';\nGOTO: \'goto\';\nIMPLEMENTS: \'implements\';\nIMPORT: \'import\';\nINSTANCEOF: \'instanceof\';\nINT: \'int\';\nINTERFACE: \'interface\';\nLONG: \'long\';\nNATIVE: \'native\';\nNEW: \'new\';\nPACKAGE: \'package\';\nPRIVATE: \'private\';\nPROTECTED: \'protected\';\nPUBLIC: \'public\';\nRETURN: \'return\';\nSHORT: \'short\';\nSTATIC: \'static\';\nSTRICTFP: \'strictfp\';\nSUPER: \'super\';\nSWITCH: \'switch\';\nSYNCHRONIZED: \'synchronized\';\nTHIS: \'this\';\nTHROW: \'throw\';\nTHROWS: \'throws\';\nTRANSIENT: \'transient\';\nTRY: \'try\';\nVOID: \'void\';\nVOLATILE: \'volatile\';\nWHILE: \'while\';\n\n// Literals\n\nDECIMAL_LITERAL: (\'0\' | [1-9] (Digits? | \'_\'+ Digits)) [lL]?;\nHEX_LITERAL: \'0\' [xX] [0-9a-fA-F] ([0-9a-fA-F_]* [0-9a-fA-F])? [lL]?;\nOCT_LITERAL: \'0\' \'_\'* [0-7] ([0-7_]* [0-7])? [lL]?;\nBINARY_LITERAL: \'0\' [bB] [01] ([01_]* [01])? [lL]?;\n \nFLOAT_LITERAL: (Digits \'.\' Digits? | \'.\' Digits) ExponentPart? [fFdD]?\n | Digits (ExponentPart [fFdD]? | [fFdD])\n ;\n\nHEX_FLOAT_LITERAL: \'0\' [xX] (HexDigits \'.\'? | HexDigits? \'.\' HexDigits) [pP] [+-]? Digits [fFdD]?;\n\nBOOL_LITERAL: \'true\'\n | \'false\'\n ;\n\nCHAR_LITERAL: \'\\\'\' (~[\'\\\\\\r\\n] | EscapeSequence) \'\\\'\';\n\nSTRING_LITERAL: \'"\' (~["\\\\\\r\\n] | EscapeSequence)* \'"\';\n\nNULL_LITERAL: \'null\';\n\n// Separators\n\nLPAREN: \'(\';\nRPAREN: \')\';\nLBRACE: \'{\';\nRBRACE: \'}\';\nLBRACK: \'[\';\nRBRACK: \']\';\nSEMI: \';\';\nCOMMA: \',\';\nDOT: \'.\';\n\n// Operators\n\nASSIGN: \'=\';\nGT: \'>\';\nLT: \'<\';\nBANG: \'!\';\nTILDE: \'~\';\nQUESTION: \'?\';\nCOLON: \':\';\nEQUAL: \'==\';\nLE: \'<=\';\nGE: \'>=\';\nNOTEQUAL: \'!=\';\nAND: \'&&\';\nOR: \'||\';\nINC: \'++\';\nDEC: \'--\';\nADD: \'+\';\nSUB: \'-\';\nMUL: \'*\';\nDIV: \'/\';\nBITAND: \'&\';\nBITOR: \'|\';\nCARET: \'^\';\nMOD: \'%\';\n\nADD_ASSIGN: \'+=\';\nSUB_ASSIGN: \'-=\';\nMUL_ASSIGN: \'*=\';\nDIV_ASSIGN: \'/=\';\nAND_ASSIGN: \'&=\';\nOR_ASSIGN: \'|=\';\nXOR_ASSIGN: \'^=\';\nMOD_ASSIGN: \'%=\';\nLSHIFT_ASSIGN: \'<<=\';\nRSHIFT_ASSIGN: \'>>=\';\nURSHIFT_ASSIGN: \'>>>=\';\n\n// Java 8 tokens\n\nARROW: \'->\';\nCOLONCOLON: \'::\';\n\n// Additional symbols not defined in the lexical specification\n\nAT: \'@\';\nELLIPSIS: \'...\';\n\n// Whitespace and comments\n\nWS: [ \\t\\r\\n\\u000C]+ -> channel(HIDDEN);\nCOMMENT: \'/*\' .*? \'*/\' -> channel(HIDDEN);\nLINE_COMMENT: \'//\' ~[\\r\\n]* -> channel(HIDDEN);\n\n// Identifiers\n\nIDENTIFIER: Letter LetterOrDigit*;\n\n// Fragment rules\n\nfragment ExponentPart\n : [eE] [+-]? Digits\n ;\n\nfragment EscapeSequence\n : \'\\\\\' [btnfr"\'\\\\]\n | \'\\\\\' ([0-3]? [0-7])? [0-7]\n | \'\\\\\' \'u\'+ HexDigit HexDigit HexDigit HexDigit\n ;\n\nfragment HexDigits\n : HexDigit ((HexDigit | \'_\')* HexDigit)?\n ;\n\nfragment HexDigit\n : [0-9a-fA-F]\n ;\n\nfragment Digits\n : [0-9] ([0-9_]* [0-9])?\n ;\n\nfragment LetterOrDigit\n : Letter\n | [0-9]\n ;\n\nfragment Letter\n : [a-zA-Z$_] // these are the "java letters" below 0x7F\n | ~[\\u0000-\\u007F\\uD800-\\uDBFF] // covers all characters above 0x7F which are not a surrogate\n | [\\uD800-\\uDBFF] [\\uDC00-\\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF\n ;\n'
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
MSPaintIDE @ 497d0494
Subproject commit 497d0494e8539b74eea01281241f074fe3bbe464
This diff is collapsed.
PlayWithCompiler @ 2a8d2e62
Subproject commit 2a8d2e626d921df63cde5b92db3123fcbf3b9f7f
robozonky @ 9b58f8ea
Subproject commit 9b58f8eae43adc19968c086fa4627ec25094c798
This diff is collapsed.
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Terence Parr\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/** XML lexer derived from ANTLR v4 ref guide book example */\nlexer grammar XMLLexer;\n\n// Default "mode": Everything OUTSIDE of a tag\nCOMMENT : \'<!--\' .*? \'-->\' ;\nCDATA : \'<![CDATA[\' .*? \']]>\' ;\n/** Scarf all DTD stuff, Entity Declarations like <!ENTITY ...>,\n * and Notation Declarations <!NOTATION ...>\n */\nDTD : \'<!\' .*? \'>\' -> skip ;\nEntityRef : \'&\' Name \';\' ;\nCharRef : \'&#\' DIGIT+ \';\'\n | \'&#x\' HEXDIGIT+ \';\'\n ;\nSEA_WS : (\' \'|\'\\t\'|\'\\r\'? \'\\n\')+ ;\n\nOPEN : \'<\' -> pushMode(INSIDE) ;\nXMLDeclOpen : \'<?xml\' S -> pushMode(INSIDE) ;\nSPECIAL_OPEN: \'<?\' Name -> more, pushMode(PROC_INSTR) ;\n\nTEXT : ~[<&]+ ; // match any 16 bit char other than < and &\n\n// ----------------- Everything INSIDE of a tag ---------------------\nmode INSIDE;\n\nCLOSE : \'>\' -> popMode ;\nSPECIAL_CLOSE: \'?>\' -> popMode ; // close <?xml...?>\nSLASH_CLOSE : \'/>\' -> popMode ;\nSLASH : \'/\' ;\nEQUALS : \'=\' ;\nSTRING : \'"\' ~[<"]* \'"\'\n | \'\\\'\' ~[<\']* \'\\\'\'\n ;\nName : NameStartChar NameChar* ;\nS : [ \\t\\r\\n] -> skip ;\n\nfragment\nHEXDIGIT : [a-fA-F0-9] ;\n\nfragment\nDIGIT : [0-9] ;\n\nfragment\nNameChar : NameStartChar\n | \'-\' | \'_\' | \'.\' | DIGIT\n | \'\\u00B7\'\n | \'\\u0300\'..\'\\u036F\'\n | \'\\u203F\'..\'\\u2040\'\n ;\n\nfragment\nNameStartChar\n : [:a-zA-Z]\n | \'\\u2070\'..\'\\u218F\'\n | \'\\u2C00\'..\'\\u2FEF\'\n | \'\\u3001\'..\'\\uD7FF\'\n | \'\\uF900\'..\'\\uFDCF\'\n | \'\\uFDF0\'..\'\\uFFFD\'\n ;\n\n// ----------------- Handle <? ... ?> ---------------------\nmode PROC_INSTR;\n\nPI : \'?>\' -> popMode ; // close <?...?>\nIGNORE : . -> more ;\n'
\ No newline at end of file
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Terence Parr\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/** XML parser derived from ANTLR v4 ref guide book example */\nparser grammar XMLParser;\n\noptions { tokenVocab=XMLLexer; }\n\ndocument : prolog? misc* element misc*;\n\nprolog : XMLDeclOpen attribute* SPECIAL_CLOSE ;\n\ncontent : chardata?\n ((element | reference | CDATA | PI | COMMENT) chardata?)* ;\n\nelement : \'<\' Name attribute* \'>\' content \'<\' \'/\' Name \'>\'\n | \'<\' Name attribute* \'/>\'\n ;\n\nreference : EntityRef | CharRef ;\n\nattribute : name=Name \'=\' value=STRING ; // Our STRING is AttValue in spec\n\n/** ``All text that is not markup constitutes the character data of\n * the document.\'\'\n */\nchardata : TEXT | SEA_WS ;\n\nmisc : COMMENT | PI | SEA_WS ;\n'
\ No newline at end of file
intellij-plugin-v4 @ 784abe70
Subproject commit 784abe70a3d79d02977e27c32ee6dd37a88e2c4d
antlr4ide @ 5481ad79
Subproject commit 5481ad79f4447d1208819ca3af950422a8a94092
jet @ f4d8640a
Subproject commit f4d8640a285146282e42a2caa11670eef83fd51b
bioLQM @ 5e6a5fb3
Subproject commit 5e6a5fb3f36b26028201f938ec4737fe2ed91f39
scava @ 0515082a
Subproject commit 0515082a7cf9a44bb118e982e43962299163c977
This diff is collapsed.
NBStudio @ aea83f2c
Subproject commit aea83f2c97f0baca5f1d16ceda672cad9e34dc38
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 15:35:13 2020
@author: eric
"""
from git import Repo
import pandas as pd
import git
import os
import shutil
FILE ='sample.csv'
PATH = '/home/eric/Documents/a-masters/MinSoftRep/Assigment3/'
data = pd.read_csv(FILE)
data.head()
data.columns
data.describe()
data['repository'][0]
data['g4']>5
df = data[(data['g4'] >5) & (data['g4'] < 200) & (data['subscribers_count']>5)]
df
df2 = df[(df['created_at']!=df['updated_at'])]
print(df2)
#for repo in df2
#DIR_NAME = df['repository'][0]
REMOTE_URL = "https://github.com/"
for DIR_NAME in df['repository']:
if os.path.isdir(DIR_NAME):
shutil.rmtree(DIR_NAME)
os.makedirs(DIR_NAME)
repo = git.Repo.init(DIR_NAME)
origin = repo.create_remote('origin',REMOTE_URL+DIR_NAME)
origin.fetch()
origin.pull(origin.refs[0].remote_head)
print("---- DONE ----")
"""
for j in df2['repository']:
rep_add = 'https://github.com/' + repo
os.makedirs(PATH + i)
cloned_repo = i.clone(os.path.join(rep_add, PATH))
assert cloned_repo.__class__ is Repo # clone an existing repository
"""
'''
for i in df2['repository']:
cloned_repo = repo.clone(os.path.join('https://github.com/'+i,'/home/eric/Documents/a-masters/MinSoftRep/Assignment3/'))
assert cloned_repo.__class__ is Repo
'''
'''
for i in df2['repository']:
print(i)
print('------')
'''
Subproject commit 1c70b8b4df6d8bdef07d10d49cdb23fa7b46a5b4
jdmn @ 2780f3e2
Subproject commit 2780f3e23ae575a792fad03db9720a60138555f9
inflectible @ 2d5d22d8
Subproject commit 2d5d22d840d7b7061717466fb27efd1909f65d78
inmemantlr @ a1f5dc1b
Subproject commit a1f5dc1bdc17a9ff60f9b05c9ff28dcb012db261
bigdata-sql-parser @ f3b747e8
Subproject commit f3b747e8d2227afebdaaac41d908adf39401bdef
vscode-antlr4 @ f08e8ed3
Subproject commit f08e8ed33a115c89d38d3401aeac8da1e09feca2
depends @ 05027323
Subproject commit 0502732341e3d5ef1658aabc18596e967d7bdcba
archie @ fce9656c
Subproject commit fce9656c23313b13cf7ac8c07ae027663c14d540
joern @ 9c57b72d
Subproject commit 9c57b72d9148de4982e949ebda336e09c4b720e3
yangtools @ 3a9a5528
Subproject commit 3a9a552879aeb9760dcce0ade0903c74ed864820
cs652 @ 24a23532
Subproject commit 24a2353290887203c11a0a50bc703084374483c0
pgcodekeeper @ 3c028ca7
Subproject commit 3c028ca777087e0c61c6fb51ba501fce8b7f23c5
ingrid @ 53dd21cb
Subproject commit 53dd21cbbc310b345366830d838759e1039657a5
tom @ 466263b1
Subproject commit 466263b10ae79b18539262028ef0e28d5b1a568f
This source diff could not be displayed because it is too large. You can view the blob instead.
onedev @ 11708d3e
Subproject commit 11708d3e4225d1a28d29f90c7e915711d286042f
antlr4 @ 269c382d
Subproject commit 269c382dd23ebccf0f987523205bf9fe6d72e021
antlr4cs @ 4874e010
Subproject commit 4874e010bafe828192b6bf436a2a7d02bab161ec
antlrworks2 @ 1e357ffb
Subproject commit 1e357ffbbac18cc0ca656e3c80e1e1e68f6e889d
PoseidonX @ fec90db8
Subproject commit fec90db846cf829fd1d608fe628cfa7b896b5dc4
vercors @ 4b0875b4
Subproject commit 4b0875b44cd63df3c74a3958142fa0768f96ddc5
maxwell @ 0440e926
Subproject commit 0440e92601170a1dc72eb5db12fb515c56c76086
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Tom Everett\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nlexer grammar HTMLLexer;\n\nHTML_COMMENT\n : \'<!--\' .*? \'-->\'\n ;\n\nHTML_CONDITIONAL_COMMENT\n : \'<![\' .*? \']>\'\n ;\n\nXML_DECLARATION\n : \'<?xml\' .*? \'>\'\n ;\n\nCDATA\n : \'<![CDATA[\' .*? \']]>\'\n ;\n\nDTD\n : \'<!\' .*? \'>\'\n ;\n\nSCRIPTLET\n : \'<?\' .*? \'?>\'\n | \'<%\' .*? \'%>\'\n ;\n\nSEA_WS\n : (\' \'|\'\\t\'|\'\\r\'? \'\\n\')+\n ;\n\nSCRIPT_OPEN\n : \'<script\' .*? \'>\' ->pushMode(SCRIPT)\n ;\n\nSTYLE_OPEN\n : \'<style\' .*? \'>\' ->pushMode(STYLE)\n ;\n\nTAG_OPEN\n : \'<\' -> pushMode(TAG)\n ;\n\nHTML_TEXT\n : ~\'<\'+\n ;\n\n//\n// tag declarations\n//\nmode TAG;\n\nTAG_CLOSE\n : \'>\' -> popMode\n ;\n\nTAG_SLASH_CLOSE\n : \'/>\' -> popMode\n ;\n\nTAG_SLASH\n : \'/\'\n ;\n\n//\n// lexing mode for attribute values\n//\nTAG_EQUALS\n : \'=\' -> pushMode(ATTVALUE)\n ;\n\nTAG_NAME\n : TAG_NameStartChar TAG_NameChar*\n ;\n\nTAG_WHITESPACE\n : [ \\t\\r\\n] -> skip\n ;\n\nfragment\nHEXDIGIT\n : [a-fA-F0-9]\n ;\n\nfragment\nDIGIT\n : [0-9]\n ;\n\nfragment\nTAG_NameChar\n : TAG_NameStartChar\n | \'-\'\n | \'_\'\n | \'.\'\n | DIGIT\n | \'\\u00B7\'\n | \'\\u0300\'..\'\\u036F\'\n | \'\\u203F\'..\'\\u2040\'\n ;\n\nfragment\nTAG_NameStartChar\n : [:a-zA-Z]\n | \'\\u2070\'..\'\\u218F\'\n | \'\\u2C00\'..\'\\u2FEF\'\n | \'\\u3001\'..\'\\uD7FF\'\n | \'\\uF900\'..\'\\uFDCF\'\n | \'\\uFDF0\'..\'\\uFFFD\'\n ;\n\n//\n// <scripts>\n//\nmode SCRIPT;\n\nSCRIPT_BODY\n : .*? \'</script>\' -> popMode\n ;\n\nSCRIPT_SHORT_BODY\n : .*? \'</>\' -> popMode\n ;\n\n//\n// <styles>\n//\nmode STYLE;\n\nSTYLE_BODY\n : .*? \'</style>\' -> popMode\n ;\n\nSTYLE_SHORT_BODY\n : .*? \'</>\' -> popMode\n ;\n\n//\n// attribute values\n//\nmode ATTVALUE;\n\n// an attribute value may have spaces b/t the \'=\' and the value\nATTVALUE_VALUE\n : [ ]* ATTRIBUTE -> popMode\n ;\n\nATTRIBUTE\n : DOUBLE_QUOTE_STRING\n | SINGLE_QUOTE_STRING\n | ATTCHARS\n | HEXCHARS\n | DECCHARS\n ;\n\nfragment ATTCHAR\n : \'-\'\n | \'_\'\n | \'.\'\n | \'/\'\n | \'+\'\n | \',\'\n | \'?\'\n | \'=\'\n | \':\'\n | \';\'\n | \'#\'\n | [0-9a-zA-Z]\n ;\n\nfragment ATTCHARS\n : ATTCHAR+ \' \'?\n ;\n\nfragment HEXCHARS\n : \'#\' [0-9a-fA-F]+\n ;\n\nfragment DECCHARS\n : [0-9]+ \'%\'?\n ;\n\nfragment DOUBLE_QUOTE_STRING\n : \'"\' ~[<"]* \'"\'\n ;\n\nfragment SINGLE_QUOTE_STRING\n : \'\\\'\' ~[<\']* \'\\\'\'\n ;\n\n'
\ No newline at end of file
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Tom Everett\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nparser grammar HTMLParser;\n\noptions { tokenVocab=HTMLLexer; }\n\nhtmlDocument\n : (scriptlet | SEA_WS)* xml? (scriptlet | SEA_WS)* dtd? (scriptlet | SEA_WS)* htmlElements*\n ;\n\nhtmlElements\n : htmlMisc* htmlElement htmlMisc*\n ;\n\nhtmlElement\n : TAG_OPEN htmlTagName htmlAttribute* TAG_CLOSE htmlContent TAG_OPEN TAG_SLASH htmlTagName TAG_CLOSE\n | TAG_OPEN htmlTagName htmlAttribute* TAG_SLASH_CLOSE\n | TAG_OPEN htmlTagName htmlAttribute* TAG_CLOSE\n | scriptlet\n | script\n | style\n ;\n\nhtmlContent\n : htmlChardata? ((htmlElement | xhtmlCDATA | htmlComment) htmlChardata?)*\n ;\n\nhtmlAttribute\n : htmlAttributeName TAG_EQUALS htmlAttributeValue\n | htmlAttributeName\n ;\n\nhtmlAttributeName\n : TAG_NAME\n ;\n\nhtmlAttributeValue\n : ATTVALUE_VALUE\n ;\n\nhtmlTagName\n : TAG_NAME\n ;\n\nhtmlChardata\n : HTML_TEXT\n | SEA_WS\n ;\n\nhtmlMisc\n : htmlComment\n | SEA_WS\n ;\n\nhtmlComment\n : HTML_COMMENT\n | HTML_CONDITIONAL_COMMENT\n ;\n\nxhtmlCDATA\n : CDATA\n ;\n\ndtd\n : DTD\n ;\n\nxml\n : XML_DECLARATION\n ;\n\nscriptlet\n : SCRIPTLET\n ;\n\nscript\n : SCRIPT_OPEN ( SCRIPT_BODY | SCRIPT_SHORT_BODY)\n ;\n\nstyle\n : STYLE_OPEN ( STYLE_BODY | STYLE_SHORT_BODY)\n ;\n'
\ No newline at end of file
b'\n/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */\n\n// Derived from http://json.org\ngrammar JSON;\n\njson\n : value\n ;\n\nobj\n : \'{\' pair (\',\' pair)* \'}\'\n | \'{\' \'}\'\n ;\n\npair\n : STRING \':\' value\n ;\n\narray\n : \'[\' value (\',\' value)* \']\'\n | \'[\' \']\'\n ;\n\nvalue\n : STRING\n | NUMBER\n | obj\n | array\n | TRUE\n | FALSE\n | NULL\n ;\n\nTRUE\n : \'true\'\n ;\n\nFALSE\n : \'false\'\n ;\n\nNULL\n : \'null\'\n ;\n\nSTRING\n : \'"\' (ESC | SAFECODEPOINT)* \'"\'\n ;\n\nLBRACE : \'{\' ;\nRBRACE : \'}\' ;\nLBRACK : \'[\' ;\nRBRACK : \']\' ;\nCOMMA : \',\' ;\nCOLON : \':\' ;\nfragment ESC\n : \'\\\\\' (["\\\\/bfnrt] | UNICODE)\n ;\n\n\nfragment UNICODE\n : \'u\' HEX HEX HEX HEX\n ;\n\n\nfragment HEX\n : [0-9a-fA-F]\n ;\n\n\nfragment SAFECODEPOINT\n : ~ ["\\\\\\u0000-\\u001F]\n ;\n\n\nNUMBER\n : \'-\'? INT (\'.\' [0-9] +)? EXP?\n ;\n\n\nfragment INT\n : \'0\' | [1-9] [0-9]*\n ;\n\n// no leading zeros\n\nfragment EXP\n : [Ee] [+\\-]? INT\n ;\n\n// \\- since - means "range" inside [...]\n\nWS\n : [ \\t\\n\\r] + -> skip\n ;\n'
\ No newline at end of file
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Terence Parr, Sam Harwell\n Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8)\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nlexer grammar JavaLexer;\n\n// Keywords\n\nABSTRACT: \'abstract\';\nASSERT: \'assert\';\nBOOLEAN: \'boolean\';\nBREAK: \'break\';\nBYTE: \'byte\';\nCASE: \'case\';\nCATCH: \'catch\';\nCHAR: \'char\';\nCLASS: \'class\';\nCONST: \'const\';\nCONTINUE: \'continue\';\nDEFAULT: \'default\';\nDO: \'do\';\nDOUBLE: \'double\';\nELSE: \'else\';\nENUM: \'enum\';\nEXTENDS: \'extends\';\nFINAL: \'final\';\nFINALLY: \'finally\';\nFLOAT: \'float\';\nFOR: \'for\';\nIF: \'if\';\nGOTO: \'goto\';\nIMPLEMENTS: \'implements\';\nIMPORT: \'import\';\nINSTANCEOF: \'instanceof\';\nINT: \'int\';\nINTERFACE: \'interface\';\nLONG: \'long\';\nNATIVE: \'native\';\nNEW: \'new\';\nPACKAGE: \'package\';\nPRIVATE: \'private\';\nPROTECTED: \'protected\';\nPUBLIC: \'public\';\nRETURN: \'return\';\nSHORT: \'short\';\nSTATIC: \'static\';\nSTRICTFP: \'strictfp\';\nSUPER: \'super\';\nSWITCH: \'switch\';\nSYNCHRONIZED: \'synchronized\';\nTHIS: \'this\';\nTHROW: \'throw\';\nTHROWS: \'throws\';\nTRANSIENT: \'transient\';\nTRY: \'try\';\nVOID: \'void\';\nVOLATILE: \'volatile\';\nWHILE: \'while\';\n\n// Literals\n\nDECIMAL_LITERAL: (\'0\' | [1-9] (Digits? | \'_\'+ Digits)) [lL]?;\nHEX_LITERAL: \'0\' [xX] [0-9a-fA-F] ([0-9a-fA-F_]* [0-9a-fA-F])? [lL]?;\nOCT_LITERAL: \'0\' \'_\'* [0-7] ([0-7_]* [0-7])? [lL]?;\nBINARY_LITERAL: \'0\' [bB] [01] ([01_]* [01])? [lL]?;\n \nFLOAT_LITERAL: (Digits \'.\' Digits? | \'.\' Digits) ExponentPart? [fFdD]?\n | Digits (ExponentPart [fFdD]? | [fFdD])\n ;\n\nHEX_FLOAT_LITERAL: \'0\' [xX] (HexDigits \'.\'? | HexDigits? \'.\' HexDigits) [pP] [+-]? Digits [fFdD]?;\n\nBOOL_LITERAL: \'true\'\n | \'false\'\n ;\n\nCHAR_LITERAL: \'\\\'\' (~[\'\\\\\\r\\n] | EscapeSequence) \'\\\'\';\n\nSTRING_LITERAL: \'"\' (~["\\\\\\r\\n] | EscapeSequence)* \'"\';\n\nNULL_LITERAL: \'null\';\n\n// Separators\n\nLPAREN: \'(\';\nRPAREN: \')\';\nLBRACE: \'{\';\nRBRACE: \'}\';\nLBRACK: \'[\';\nRBRACK: \']\';\nSEMI: \';\';\nCOMMA: \',\';\nDOT: \'.\';\n\n// Operators\n\nASSIGN: \'=\';\nGT: \'>\';\nLT: \'<\';\nBANG: \'!\';\nTILDE: \'~\';\nQUESTION: \'?\';\nCOLON: \':\';\nEQUAL: \'==\';\nLE: \'<=\';\nGE: \'>=\';\nNOTEQUAL: \'!=\';\nAND: \'&&\';\nOR: \'||\';\nINC: \'++\';\nDEC: \'--\';\nADD: \'+\';\nSUB: \'-\';\nMUL: \'*\';\nDIV: \'/\';\nBITAND: \'&\';\nBITOR: \'|\';\nCARET: \'^\';\nMOD: \'%\';\n\nADD_ASSIGN: \'+=\';\nSUB_ASSIGN: \'-=\';\nMUL_ASSIGN: \'*=\';\nDIV_ASSIGN: \'/=\';\nAND_ASSIGN: \'&=\';\nOR_ASSIGN: \'|=\';\nXOR_ASSIGN: \'^=\';\nMOD_ASSIGN: \'%=\';\nLSHIFT_ASSIGN: \'<<=\';\nRSHIFT_ASSIGN: \'>>=\';\nURSHIFT_ASSIGN: \'>>>=\';\n\n// Java 8 tokens\n\nARROW: \'->\';\nCOLONCOLON: \'::\';\n\n// Additional symbols not defined in the lexical specification\n\nAT: \'@\';\nELLIPSIS: \'...\';\n\n// Whitespace and comments\n\nWS: [ \\t\\r\\n\\u000C]+ -> channel(HIDDEN);\nCOMMENT: \'/*\' .*? \'*/\' -> channel(HIDDEN);\nLINE_COMMENT: \'//\' ~[\\r\\n]* -> channel(HIDDEN);\n\n// Identifiers\n\nIDENTIFIER: Letter LetterOrDigit*;\n\n// Fragment rules\n\nfragment ExponentPart\n : [eE] [+-]? Digits\n ;\n\nfragment EscapeSequence\n : \'\\\\\' [btnfr"\'\\\\]\n | \'\\\\\' ([0-3]? [0-7])? [0-7]\n | \'\\\\\' \'u\'+ HexDigit HexDigit HexDigit HexDigit\n ;\n\nfragment HexDigits\n : HexDigit ((HexDigit | \'_\')* HexDigit)?\n ;\n\nfragment HexDigit\n : [0-9a-fA-F]\n ;\n\nfragment Digits\n : [0-9] ([0-9_]* [0-9])?\n ;\n\nfragment LetterOrDigit\n : Letter\n | [0-9]\n ;\n\nfragment Letter\n : [a-zA-Z$_] // these are the "java letters" below 0x7F\n | ~[\\u0000-\\u007F\\uD800-\\uDBFF] // covers all characters above 0x7F which are not a surrogate\n | [\\uD800-\\uDBFF] [\\uDC00-\\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF\n ;\n'
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -13368,7 +13368,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.7.4"
}
},
"nbformat": 4,
......
This diff is collapsed.
This diff is collapsed.
......@@ -15658,7 +15658,7 @@
" commits = list(repo.iter_commits('master'))[:COMMITS_TO_PRINT]\n",
" for commit in commits:\n",
" print_commit(commit)\n",
" print('turdsssssssssssssssssss')\n",
" print('cheeeeeeeeeeeeeeeeeeeck')\n",
" print(type(commit.stats.files))\n",
" print(commit.stats.files)\n",
" for key in commit.stats.files:\n",
This diff is collapsed.
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Terence Parr\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/** XML lexer derived from ANTLR v4 ref guide book example */\nlexer grammar XMLLexer;\n\n// Default "mode": Everything OUTSIDE of a tag\nCOMMENT : \'<!--\' .*? \'-->\' ;\nCDATA : \'<![CDATA[\' .*? \']]>\' ;\n/** Scarf all DTD stuff, Entity Declarations like <!ENTITY ...>,\n * and Notation Declarations <!NOTATION ...>\n */\nDTD : \'<!\' .*? \'>\' -> skip ;\nEntityRef : \'&\' Name \';\' ;\nCharRef : \'&#\' DIGIT+ \';\'\n | \'&#x\' HEXDIGIT+ \';\'\n ;\nSEA_WS : (\' \'|\'\\t\'|\'\\r\'? \'\\n\')+ ;\n\nOPEN : \'<\' -> pushMode(INSIDE) ;\nXMLDeclOpen : \'<?xml\' S -> pushMode(INSIDE) ;\nSPECIAL_OPEN: \'<?\' Name -> more, pushMode(PROC_INSTR) ;\n\nTEXT : ~[<&]+ ; // match any 16 bit char other than < and &\n\n// ----------------- Everything INSIDE of a tag ---------------------\nmode INSIDE;\n\nCLOSE : \'>\' -> popMode ;\nSPECIAL_CLOSE: \'?>\' -> popMode ; // close <?xml...?>\nSLASH_CLOSE : \'/>\' -> popMode ;\nSLASH : \'/\' ;\nEQUALS : \'=\' ;\nSTRING : \'"\' ~[<"]* \'"\'\n | \'\\\'\' ~[<\']* \'\\\'\'\n ;\nName : NameStartChar NameChar* ;\nS : [ \\t\\r\\n] -> skip ;\n\nfragment\nHEXDIGIT : [a-fA-F0-9] ;\n\nfragment\nDIGIT : [0-9] ;\n\nfragment\nNameChar : NameStartChar\n | \'-\' | \'_\' | \'.\' | DIGIT\n | \'\\u00B7\'\n | \'\\u0300\'..\'\\u036F\'\n | \'\\u203F\'..\'\\u2040\'\n ;\n\nfragment\nNameStartChar\n : [:a-zA-Z]\n | \'\\u2070\'..\'\\u218F\'\n | \'\\u2C00\'..\'\\u2FEF\'\n | \'\\u3001\'..\'\\uD7FF\'\n | \'\\uF900\'..\'\\uFDCF\'\n | \'\\uFDF0\'..\'\\uFFFD\'\n ;\n\n// ----------------- Handle <? ... ?> ---------------------\nmode PROC_INSTR;\n\nPI : \'?>\' -> popMode ; // close <?...?>\nIGNORE : . -> more ;\n'
\ No newline at end of file
b'/*\n [The "BSD licence"]\n Copyright (c) 2013 Terence Parr\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS\'\' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/** XML parser derived from ANTLR v4 ref guide book example */\nparser grammar XMLParser;\n\noptions { tokenVocab=XMLLexer; }\n\ndocument : prolog? misc* element misc*;\n\nprolog : XMLDeclOpen attribute* SPECIAL_CLOSE ;\n\ncontent : chardata?\n ((element | reference | CDATA | PI | COMMENT) chardata?)* ;\n\nelement : \'<\' Name attribute* \'>\' content \'<\' \'/\' Name \'>\'\n | \'<\' Name attribute* \'/>\'\n ;\n\nreference : EntityRef | CharRef ;\n\nattribute : name=Name \'=\' value=STRING ; // Our STRING is AttValue in spec\n\n/** ``All text that is not markup constitutes the character data of\n * the document.\'\'\n */\nchardata : TEXT | SEA_WS ;\n\nmisc : COMMENT | PI | SEA_WS ;\n'
\ No newline at end of file
import pandas as pd
from git import Repo
import os
fileExtLst=[]
for root, dirs, files in os.walk("Assigment3/"):
for file in files:
if file.endswith(".g4"):
fileExtLst.append(os.path.join(root,file))
#print(os.path.join(root, file))
fileExtLst
#f= open('11111/C:\\Users\\Admin\\Documents\\Studium\\MSR\\datadump\\215/parser/grammar/RobotsTxt.g4',"r")
#f = f.read()
data = []
#print(f)
'''
for i in range(len(fileExtLst)):
g = open(fileExtLst[i])
g = g.read()
#print(g)
g = bytes(g, 'utf-8').decode('utf-8', 'ignore')
#g.encode('utf-8').strip()
data.append(g)
#data.append(bytes(g,'utf-8').decode('utf-8', 'ignore'))
'''
for i in range(len(fileExtLst)):
g = open(fileExtLst[i],"rb")
g = g.read()
try:
data.append(g)
#break
except UnicodeDecodeError:
fileExtLst.pop(i)
print("Oops! That was no valid number. Try again...")
'''
for i in files:
list_.append(pd.read_csv('//directory'+i ,sep="\t" , quoting=csv.QUOTE_NONE,header=None,names=["message", "label"]))
'''
print(len(data),len(fileExtLst))
#print(data)
rules = []
print(len(data))
#for i in range(len(data)):
#print ((str(data[i])).split('\\n\n'))
for i in range(len(data)):
x = str(data[i]).split('\\n')
rules.append(x)
#print(x)
len(rules)
#for rule in range(1):
#print(rules[rule])
#print(rules)
hash_rule = []
for file in range(len(rules)):
x = rules[file]
a = []
for rule in range(len(rules[file])):
m = hash(rules[file][rule])
a.append(m)
hash_rule.append(a)
len(data)
hashed_data = []
for i in range(len(data)):
hashed_data.append(hash(data[i]))
hashed_data
val = []
for i in range(len(hashed_data)):
val.append(1)
print(len(hashed_data))
#len(set(hashed_data))
data_dict = {'folder':fileExtLst,'hash':hashed_data}#,'val':val}
print(len(hashed_data),len(hash_rule))
total_rules = []
rule_dictionary ={}
for i in range(len(hashed_data)):
x = []
for j in range(len(hash_rule[i])):
if hash_rule[i][j] == 0:
continue
else:
x.append(hash_rule[i][j])
total_rules.append(hash_rule[i][j])
rule_dictionary.update({hashed_data[i]:x})
#hashed_data[element]
total_rules
total_rules_set = list(set(total_rules))
print("total rules = ",len(total_rules)," total rules set = ",len(total_rules_set))
total_rules_count = []
for i in range(len(total_rules_set)):
total_rules_count.append(total_rules.count(total_rules_set[i]))
for rule in total_rules_count:
if rule>5 and rule< 50:
print (rule)
#print(total_rules_count)
print("total rules = ",len(total_rules)," total rules set = ",len(total_rules_set),len(total_rules_count))
#for i in rule_dictionary:
# print(i)
print("butts")
rule_dataframe = pd.DataFrame(dict([ (k,pd.Series(v)) for k,v in rule_dictionary.items() ]))
print(rule_dataframe)
rule_dataframe.T
df_data = pd.DataFrame(data_dict)
df_data
df2 = df_data.groupby(['hash']).count()
df2 = df2[(df2['folder']>1)]
'''
for i in df2.index:
print(i)
'''
df_data['count'] = df_data.groupby(['hash'])['folder'].transform('count')
#df_data['count'] = df_data.groupby(['folder'])['hash'].transform('count')
df2
len(df2)
pd.options.display.max_rows = 120
pd.options.display.max_columns = 90
pd.options.display.width = 1000
pd.options.display.max_colwidth = 80
df_data.sort_values('hash')#groupby('hash')['folder'].apply(list)
df_data
df_data_interesting = df_data[(df_data['count']>1)]
len(df_data_interesting)
df_data_interesting
df_data
hash_dictionary = {}
for element in df2.index:
hash_list = []
for i in range(len(df_data)):
if df_data['hash'][i] == element:
hash_list.append(df_data['folder'][i])
#print(hash_list)
hash_dictionary.update({element:hash_list})
#print(df_data['hash'][i])
hash_dictionary
df_data
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.