/ec/ECAssignmentBox/Products/ECAssignmentBox/PlagDetector/Normalize/ |
H A D | normNormal.py | 33 import re
namespace 37 #pattern = re.compile(r'\W+', re.L)
38 pattern = re.compile(r'[^A-Za-z0-9����]+') #TODO: anpassen an alle Sprachs�tze?
39 #pattern = re.compile("^\w+", re.L)
|
H A D | normPython.py | 49 import re namespace 143 s = re.sub(pattern, synonyms.get(pattern), s)
199 funMatch = re.search(functionPattern, line)
220 classMatch = re.search(classPattern, line)
242 lines[f.posStart] = re.sub(functionPattern, 'BEGIN_METHOD', lines[f.posStart])
250 lines[c.posStart] = re.sub(classPattern, 'BEGIN_CLASS', lines[c.posStart])
264 match = re.search('(\w+)\(.*\)', line) #TODO: was ist mit mehr zeiligen Funktionsdefinitionen
270 lines[lineNr] = re.sub(match.group(1)+'.*', '\n'+body, line)
320 #if line == '' or re.search('\s+', line):#if re [all...] |
/ec/ECAssignmentBox/Products/ECAssignmentBox/PlagDetector/Visualize/ |
H A D | htmlMaker.py | 31 import re
namespace 62 import re
namespace 64 text1 = re.sub("\n", "<br/>", markedTexts[0])
65 text2 = re.sub("\n", "<br/>", markedTexts[1])
129 matches = re.findall(pattern, string, re.I|re.L|re.U) #ignore case
175 if len([s for s in line if re.search('\s', s)]) == len(line):
|
/ec/ECLecture/Products/ECLecture/content/ |
H A D | validators.py | 11 import re namespace 40 m = re.match('^\s*(\d\d)[.:]?(\d\d)\s*$', item)
|
H A D | TimePeriodField.py | 11 import re namespace 71 m = re.match('^(\d\d)[.:]?(\d\d)$', item.strip())
|
/ec/ECQuiz/Products/ECQuiz/ |
H A D | ListValidator.py | 25 import re namespace 32 listValidatorRe = re.compile(ur"\s*(?P<nonEmpty>\[\s*'[^']+'(\s*,\s*'[^']+'\s*)*\s*\])|(?P<empty>\[\s*\])\s*")
|
H A D | validators.py | 23 import re namespace 78 if (not re.compile(r'^[1-9]\d*$').match(value)): 102 match = re.match('^[0-9]+(\\' 198 match = re.match('^[0-9]+(\\'
|
H A D | findUntranslatedMessages.py | 24 import os, re, locale, sys namespace 42 PYTHON_RE = re.compile(ur'((msgid' + EQ + ur')|([' + QUOTES + ur']name[' + QUOTES + ur']\s*:\s*))' + CORE_EXPRESSION) 44 PT_RE = re.compile(ur'((translate)|(msgid)|(value))' + EQ + CORE_EXPRESSION) 45 I18N_FILE_RE = re.compile(ur'^\s*msgid\s*' + CORE_EXPRESSION)
|
H A D | ECQTool.py | 30 import re namespace 54 langcode = re.compile(r'^[^;]+')
|
H A D | l2.py | 24 import re, sys, os#, pickle namespace 51 RE_C_SINGLE = re.compile(r';.*') 59 TOKENS = [('(', re.compile(r'\(')), 60 (')', re.compile(r'\)')), 61 ('float', re.compile(r'[-+]?((0|([1-9]\d*))\.\d+)' 63 ('int', re.compile(r'[-+]?(0|([1-9]\d*))' 65 (':sym', re.compile(r':%s' % RE_SYM)), 66 ('sym', re.compile(RE_SYM)), 67 ('string', re.compile(r'"(?:[^"\\]+|(?:\\.)+)*"'))] \ 68 + [('shorthand', re [all...] |
/ec/ECSpooler/tests/ |
H A D | testJUnit.py | 8 import re namespace 235 match = re.search("import %s\.\*;" % JUnit.config.JUNIT_LIBS, src)
|
/ec/ECSpooler/backends/haskellext/ |
H A D | HaskellExt.py | 13 # replaced re.sub with replace whereever possible. 15 import sys, os, re namespace 139 #model = re.sub('\$\{SOURCE}', model, HaskellExtConf.semanticCheckTemplate) 140 #model = re.sub('\$\{MODULE}', 'Model', model) 142 #submission = re.sub('\$\{SOURCE}', submission, HaskellExtConf.semanticCheckTemplate) 143 #submission = re.sub('\$\{MODULE}', 'Student', submission) 173 #wrapper = re.sub('\$\{%s\}' % field.getName(), 178 #wrapper = re.sub('\$\{testFunction\}', test.test, wrapper) 182 wrapperSrc = re.sub('\$\{.*\}', '', wrapper) 187 #modelSrc = re [all...] |
/ec/ECSpooler/backends/erlang/ |
H A D | Erlang.py | 8 import sys, os, re namespace 145 result = re.sub('-module\((.*)\)\.', '-module(student).', 156 return re.sub('.*%s:(\d+)' % self.srcFileSuffix, 230 # FIXME: move the 're.sub' code to _preProcessCheckSyntax 233 model = re.sub('-module\((.*)\)\.', '-module(model).', model) 249 submission = re.sub('-module\((.*)\)\.', '-module(student).', 282 src = re.sub('\$\{%s\}' % field.getName(), repl, src) 285 src = re.sub('\$\{testFunction\}', test.test, src) 290 wrapper = re.sub('\$\{%s\}' % repeatField.getName(), t, src) 293 wrapper = re [all...] |
/ec/ECSpooler/backends/junit/ |
H A D | config.py | 34 import os, re namespace 68 METHOD_NOT_FOUND_RE = re.compile('location:.*\n.*;\n')
|
H A D | JUnit.py | 33 # replaced re.sub whenever possible 41 import sys, os, re namespace 75 CLASS_NAME_RE = re.compile(javaClassDeclaration) 78 PACKAGE_NAME_RE = re.compile('^\s*package\s+(?P<packageName>[a-z]+\w*);') 81 CLOSED_MULTILINE_COMMENTS_RE = re.compile('/\*.+?\*/', re.M | re.S) 84 IMPORT_NAME_NOT_JAVA_RE = re.compile('import\s+(?!java\.)(?P<name>.*);') 90 #FAILURE_TRACE_RE = re.compile('(\w|\.)+?:\s\d+(\s\t)*?at\s%s\.\w+?\.\w+?\(\w+?\.\w+?:(?P<number>\d+?)\)' % NS_STUDENT) 91 FAILURE_TRACE_RE = re [all...] |
/ec/ECSpooler/backends/keywords/ |
H A D | Keywords.py | 10 import sys, re namespace 154 submission = re.sub(r'\s+', ' ', submission) 165 t = r'\b' + re.escape(t.strip()) + r'\b' 167 if re.search(t, submission, re.IGNORECASE):
|
/ec/ECSpooler/backends/python/ |
H A D | Python.py | 8 import sys, os, re namespace 142 return re.sub('File ".*%s", ' % self.srcFileSuffix, '', message) 213 src = re.sub('\$\{%s\}' % field.getName(), repl, src) 216 src = re.sub('\$\{testFunction\}', test.test, src) 221 wrapper = re.sub('\$\{%s\}' % repeatField.getName(), t, src) 224 wrapper = re.sub('\$\{.*\}', '', wrapper)
|
/ec/ECSpooler/backends/pyunit/ |
H A D | PyUnit.py | 8 import sys, os, re namespace 82 #RE_INDENT = re.compile('^', re.M) 83 #RE_SELF = re.compile('def test.+?\(') 84 #RE_FAILED = re.compile('^Ran\s\d+.*FAILED', re.M | re.DOTALL) 86 RE_CLASSNAME = re.compile('(?<=^class\s).+?(?=:|\()', re.M) 87 RE_OK = re [all...] |
/ec/ECSpooler/backends/scheme/ |
H A D | Scheme.py | 8 import sys, os, re namespace 173 result = re.sub('\$\{SOURCE\}', src, test.syntax) 187 matches = re.findall('%s:(\d+)' % self.srcFileSuffix, message) 193 return re.sub('.*%s:(\d+)' % self.srcFileSuffix, 256 modelSrc = re.sub('\$\{SOURCE}', model, SEMANTIC_TEMPLATE) 257 modelSrc = re.sub('\$\{MODULE}', 'model', modelSrc) 259 studentSrc = re.sub('\$\{SOURCE}', submission, SEMANTIC_TEMPLATE) 260 studentSrc = re.sub('\$\{MODULE}', 'student', studentSrc) 285 wrapper = re.sub('\$\{%s\}' % field.getName(), repl, wrapper) 286 modelSrc = re [all...] |
/ec/ECAutoAssessmentBox/Products/ECAutoAssessmentBox/content/ |
H A D | ECAutoAssignment.py | 12 import re, time namespace 435 resultMessage = re.sub('[\r\n]+', ' ', str(self.auto_feedback))
|
/ec/ECSpooler/backends/cl/ |
H A D | Cl.py | 7 import sys, os, re namespace 184 result = re.sub('\$\{SOURCE\}', src, test.syntax) 283 modelSrc = re.sub(r'\$\{SOURCE\}', model, SEMANTIC_TEMPLATE) 284 modelSrc = re.sub(r'\$\{MODULE\}', PKG_MODEL, modelSrc) 286 studentSrc = re.sub(r'\$\{SOURCE\}', submission, SEMANTIC_TEMPLATE) 287 studentSrc = re.sub(r'\$\{MODULE\}', PKG_STUDENT, studentSrc) 314 wrapper = re.sub(r'\$\{%s\}' % field.getName(), repl, wrapper) 315 modelSrc = re.sub(r'\$\{%s\}' % field.getName(), repl, modelSrc) 316 studentSrc = re.sub(r'\$\{%s\}' % field.getName(), repl, studentSrc) 319 wrapper = re [all...] |
/ec/ECSpooler/backends/haskell/ |
H A D | Haskell.py | 15 # using replace instead of expensive re.sub operation in 17 # replaced re.sub with replace whereever possible. 19 import sys, os, re namespace 160 RUNHUGS_RE = re.compile(r'Type checking\n?|Parsing\n?|[Parsing]*[Dependency analysis]*[Type checking]*[Compiling]*\x08 *') 196 #result = re.sub('\$\{SOURCE\}', src, test.syntax) 214 matches = re.findall('%s":(\d+)' % self.srcFileSuffix, msg) 218 return re.sub('".*%s":(\d+)' % self.srcFileSuffix, 232 #result = re.sub('isEqual=', '', message) 233 #result = re.sub('/.*/ECSpooler/backends/haskell/', '', result) 313 #src = re [all...] |
/ec/ECSpooler/backends/haskellqc/ |
H A D | HaskellQC.py | 21 import sys, os, re namespace 43 PROPERTIES_RE = re.compile(r'(?P<name>prop_[A-Z,a-z,0-9]+\w*)') 46 PROP_RE = re.compile(r'\$\{prop_\}') 50 FAILED_RE = re.compile(r'(?<=\stests:\n)(?P<%s>.*)(\n)' % FAILED_RE_KEY, re.DOTALL) 51 PASSED_RE = re.compile(r'OK, (passed \d+ tests?)') 130 result = re.sub('/.*/ECSpooler/backends/haskellqc/', '', message)
|
/ec/ECSpooler/backends/java/ |
H A D | Java.py | 8 import sys, os, re, time namespace 170 CLASS_NAME_RE = re.compile(r'^\s*(?:public\s+(?:(?:abstract|final|public|strictfp)\s+)*)+\s*class\s+(?P<name>[a-zA-Z_]\w*)', re.MULTILINE) 234 matches = re.findall('(^.*%s:(\d+))' % 'java', message, re.MULTILINE) 238 message = re.sub(match[0], 362 src = re.sub('\$\{%s\}' % field.getName(), repl, src) 365 src = re.sub('\$\{testFunction\}', test.test, src) 369 src = re.sub('\$\{%s\}' % cname, compiled[cname], src) 382 v = re [all...] |
/ec/ECSpooler/backends/javare/ |
H A D | JavaRE.py | 7 import sys, os, re namespace 98 #STRING_RE = re.compile(r'"(?:[^"\n\r\\]+|(?:\\.)+)*"') 99 STRING_RE = re.compile(r'^"([^"\n\r]|(\\"))+"$') 228 matches = re.findall(r'(^.*%s:(\d+))' % 'java', message, re.MULTILINE) 232 message = re.sub(match[0], 321 src = re.sub(r'\$\{%s\}' % field.getName(), repl, src) 324 wrapper = re.sub(r'\$\{testFunction\}', test.test, src) 327 wrapper = re.sub(r'\$\{[^\}]*\}', '', wrapper) 388 # Since we're no [all...] |