Searched refs:re (Results 1 - 25 of 32) sorted by relevance

12

/ec/ECSpooler/backends/javare/
H A DSyntacticCheck.java7 Pattern re = Pattern.compile("%s");
H A DJavaRE.py7 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...]
/ec/ECAssignmentBox/Products/ECAssignmentBox/PlagDetector/Normalize/
H A DnormNormal.py33 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 DnormPython.py49 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/ECQuiz/Products/ECQuiz/
H A DListValidator.py25 import re namespace
32 listValidatorRe = re.compile(ur"\s*(?P<nonEmpty>\[\s*'[^']+'(\s*,\s*'[^']+'\s*)*\s*\])|(?P<empty>\[\s*\])\s*")
H A DfindUntranslatedMessages.py24 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 Dvalidators.py23 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 Dl2.py24 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...]
H A DECQTool.py30 import re namespace
54 langcode = re.compile(r'^[^;]+')
/ec/ECLecture/Products/ECLecture/content/
H A Dvalidators.py11 import re namespace
40 m = re.match('^\s*(\d\d)[.:]?(\d\d)\s*$', item)
H A DTimePeriodField.py11 import re namespace
71 m = re.match('^(\d\d)[.:]?(\d\d)$', item.strip())
/ec/ECSpooler/backends/scheme/
H A DScheme.py8 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/ECSpooler/backends/cl/
H A DCl.py7 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/junit/
H A DJUnit.py33 # 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...]
H A Dconfig.py34 import os, re namespace
68 METHOD_NOT_FOUND_RE = re.compile('location:.*\n.*;\n')
/ec/ECSpooler/backends/pyunit/
H A DPyUnit.py8 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/prolog/
H A DProlog.py8 import sys, os, re namespace
183 m=re.compile('^Warning:\s*\(.*\):$'
185 re.MULTILINE).search(msg)
214 matches = re.findall(r'^(ERROR: [^:]+:(\d+):(\d+):\s*(.*))',
215 message, re.MULTILINE)
225 message = re.sub(match[0],
244 raw = re.findall(VAR_NAME_RE, testData)
345 src = re.sub('\$\{%s\}' % field.getName(), repl, src)
348 src = re.sub('\$\{testFunction\}', test.test, src)
357 wrapper = re
[all...]
/ec/ECSpooler/backends/keywords/
H A DKeywords.py10 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/erlang/
H A DErlang.py8 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/haskellqc/
H A DHaskellQC.py21 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 DJava.py8 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/ECAssignmentBox/Products/ECAssignmentBox/PlagDetector/Visualize/
H A DhtmlMaker.py31 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/ECSpooler/backends/python/
H A DPython.py8 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/haskell/
H A DHaskell.py15 # 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/ECAssignmentBox/Products/ECAssignmentBox/content/
H A DECAssignment.py11 import re namespace
335 if re.match("(text/.+)|(application/(.+\+)?xml)", mt):
374 if re.match('text/|application/(.+\+)?xml', mt):
498 match = re.match('^[0-9]+' + decimalSeparator + '?[0-9]*$', value)
592 title = re.sub('[\r\n]+', ' ', feedback)
602 title = re.sub('[\r\n]+', ' ', remarks)

Completed in 38 milliseconds

12