1 import org.python.core.*;
3 public class sre extends java.lang.Object {
4 static String[] jpy$mainProperties = new String[] {"python.modules.builtin", "exceptions:org.python.core.exceptions"};
5 static String[] jpy$proxyProperties = new String[] {"python.modules.builtin", "exceptions:org.python.core.exceptions", "python.options.showJavaExceptions", "true"};
6 static String[] jpy$packages = new String[] {"java.net", null, "java.lang", null, "org.python.core", null, "java.io", null, "java.util.zip", null};
8 public static class _PyInner extends PyFunctionTable implements PyRunnable {
9 private static PyObject s$0;
10 private static PyObject s$1;
11 private static PyObject s$2;
12 private static PyObject s$3;
13 private static PyObject s$4;
14 private static PyObject s$5;
15 private static PyObject s$6;
16 private static PyObject s$7;
17 private static PyObject s$8;
18 private static PyObject s$9;
19 private static PyObject s$10;
20 private static PyObject s$11;
21 private static PyObject s$12;
22 private static PyObject s$13;
23 private static PyObject s$14;
24 private static PyObject s$15;
25 private static PyObject s$16;
26 private static PyObject s$17;
27 private static PyObject s$18;
28 private static PyObject s$19;
29 private static PyObject s$20;
30 private static PyObject s$21;
31 private static PyObject s$22;
32 private static PyObject s$23;
33 private static PyObject s$24;
34 private static PyObject i$25;
35 private static PyObject s$26;
36 private static PyObject s$27;
37 private static PyObject s$28;
38 private static PyObject s$29;
39 private static PyObject s$30;
40 private static PyObject s$31;
41 private static PyObject s$32;
42 private static PyObject s$33;
43 private static PyObject s$34;
44 private static PyObject s$35;
45 private static PyObject s$36;
46 private static PyObject s$37;
47 private static PyObject s$38;
48 private static PyObject s$39;
49 private static PyObject s$40;
50 private static PyObject s$41;
51 private static PyObject s$42;
52 private static PyObject s$43;
53 private static PyObject i$44;
54 private static PyObject i$45;
55 private static PyObject s$46;
56 private static PyObject s$47;
57 private static PyFunctionTable funcTable;
58 private static PyCode c$0_match;
59 private static PyCode c$1_search;
60 private static PyCode c$2_sub;
61 private static PyCode c$3_subn;
62 private static PyCode c$4_split;
63 private static PyCode c$5_findall;
64 private static PyCode c$6_compile;
65 private static PyCode c$7_purge;
66 private static PyCode c$8_template;
67 private static PyCode c$9_escape;
68 private static PyCode c$10__join;
69 private static PyCode c$11__compile;
70 private static PyCode c$12__compile_repl;
71 private static PyCode c$13__expand;
72 private static PyCode c$14__sub;
73 private static PyCode c$15_filter;
74 private static PyCode c$16__subn;
75 private static PyCode c$17__split;
76 private static PyCode c$18__pickle;
77 private static PyCode c$19___init__;
78 private static PyCode c$20_scan;
79 private static PyCode c$21_Scanner;
80 private static PyCode c$22_main;
81 private static void initConstants() {
82 s$0 = Py.newString("match");
83 s$1 = Py.newString("search");
84 s$2 = Py.newString("sub");
85 s$3 = Py.newString("subn");
86 s$4 = Py.newString("split");
87 s$5 = Py.newString("findall");
88 s$6 = Py.newString("compile");
89 s$7 = Py.newString("purge");
90 s$8 = Py.newString("template");
91 s$9 = Py.newString("escape");
92 s$10 = Py.newString("I");
93 s$11 = Py.newString("L");
94 s$12 = Py.newString("M");
95 s$13 = Py.newString("S");
96 s$14 = Py.newString("X");
97 s$15 = Py.newString("U");
98 s$16 = Py.newString("IGNORECASE");
99 s$17 = Py.newString("LOCALE");
100 s$18 = Py.newString("MULTILINE");
101 s$19 = Py.newString("DOTALL");
102 s$20 = Py.newString("VERBOSE");
103 s$21 = Py.newString("UNICODE");
104 s$22 = Py.newString("error");
105 s$23 = Py.newString("2.1b2");
106 s$24 = Py.newString("Try to apply the pattern at the start of the string, returning\012 a match object, or None if no match was found.");
107 i$25 = Py.newInteger(0);
108 s$26 = Py.newString("Scan through string looking for a match to the pattern, returning\012 a match object, or None if no match was found.");
109 s$27 = Py.newString("Return the string obtained by replacing the leftmost\012 non-overlapping occurrences of the pattern in string by the\012 replacement repl");
110 s$28 = Py.newString("Return a 2-tuple containing (new_string, number).\012 new_string is the string obtained by replacing the leftmost\012 non-overlapping occurrences of the pattern in the source\012 string by the replacement repl. number is the number of\012 substitutions that were made.");
111 s$29 = Py.newString("Split the source string by the occurrences of the pattern,\012 returning a list containing the resulting substrings.");
112 s$30 = Py.newString("Return a list of all non-overlapping matches in the string.\012\012 If one or more groups are present in the pattern, return a\012 list of groups; this will be a list of tuples if the pattern\012 has more than one group.\012\012 Empty matches are included in the result.");
113 s$31 = Py.newString("Compile a regular expression pattern, returning a pattern object.");
114 s$32 = Py.newString("Clear the regular expression cache");
115 s$33 = Py.newString("Compile a template pattern, returning a pattern object");
116 s$34 = Py.newString("Escape all non-alphanumeric characters in pattern.");
117 s$35 = Py.newString("a");
118 s$36 = Py.newString("z");
119 s$37 = Py.newString("A");
120 s$38 = Py.newString("Z");
121 s$39 = Py.newString("0");
122 s$40 = Py.newString("9");
123 s$41 = Py.newString("\000");
124 s$42 = Py.newString("\\000");
125 s$43 = Py.newString("\\");
126 i$44 = Py.newInteger(100);
127 i$45 = Py.newInteger(1);
128 s$46 = Py.newString("");
129 s$47 = Py.newString("/usr/share/jython/Lib-cpython/sre.py");
130 funcTable = new _PyInner();
131 c$0_match = Py.newCode(3, new String[] {"pattern", "string", "flags"}, "/usr/share/jython/Lib-cpython/sre.py", "match", false, false, funcTable, 0, null, null, 0, 1);
132 c$1_search = Py.newCode(3, new String[] {"pattern", "string", "flags"}, "/usr/share/jython/Lib-cpython/sre.py", "search", false, false, funcTable, 1, null, null, 0, 1);
133 c$2_sub = Py.newCode(4, new String[] {"pattern", "repl", "string", "count"}, "/usr/share/jython/Lib-cpython/sre.py", "sub", false, false, funcTable, 2, null, null, 0, 1);
134 c$3_subn = Py.newCode(4, new String[] {"pattern", "repl", "string", "count"}, "/usr/share/jython/Lib-cpython/sre.py", "subn", false, false, funcTable, 3, null, null, 0, 1);
135 c$4_split = Py.newCode(3, new String[] {"pattern", "string", "maxsplit"}, "/usr/share/jython/Lib-cpython/sre.py", "split", false, false, funcTable, 4, null, null, 0, 1);
136 c$5_findall = Py.newCode(3, new String[] {"pattern", "string", "maxsplit"}, "/usr/share/jython/Lib-cpython/sre.py", "findall", false, false, funcTable, 5, null, null, 0, 1);
137 c$6_compile = Py.newCode(2, new String[] {"pattern", "flags"}, "/usr/share/jython/Lib-cpython/sre.py", "compile", false, false, funcTable, 6, null, null, 0, 1);
138 c$7_purge = Py.newCode(0, new String[] {}, "/usr/share/jython/Lib-cpython/sre.py", "purge", false, false, funcTable, 7, null, null, 0, 1);
139 c$8_template = Py.newCode(2, new String[] {"pattern", "flags"}, "/usr/share/jython/Lib-cpython/sre.py", "template", false, false, funcTable, 8, null, null, 0, 1);
140 c$9_escape = Py.newCode(1, new String[] {"pattern", "i", "s", "c"}, "/usr/share/jython/Lib-cpython/sre.py", "escape", false, false, funcTable, 9, null, null, 0, 1);
141 c$10__join = Py.newCode(2, new String[] {"seq", "sep"}, "/usr/share/jython/Lib-cpython/sre.py", "_join", false, false, funcTable, 10, null, null, 0, 1);
142 c$11__compile = Py.newCode(1, new String[] {"key", "p", "flags", "pattern", "v"}, "/usr/share/jython/Lib-cpython/sre.py", "_compile", true, false, funcTable, 11, null, null, 0, 1);
143 c$12__compile_repl = Py.newCode(1, new String[] {"key", "p", "repl", "pattern", "v"}, "/usr/share/jython/Lib-cpython/sre.py", "_compile_repl", true, false, funcTable, 12, null, null, 0, 1);
144 c$13__expand = Py.newCode(3, new String[] {"pattern", "match", "template"}, "/usr/share/jython/Lib-cpython/sre.py", "_expand", false, false, funcTable, 13, null, null, 0, 1);
145 c$14__sub = Py.newCode(4, new String[] {"pattern", "template", "string", "count"}, "/usr/share/jython/Lib-cpython/sre.py", "_sub", false, false, funcTable, 14, null, null, 0, 1);
146 c$15_filter = Py.newCode(2, new String[] {"match", "template"}, "/usr/share/jython/Lib-cpython/sre.py", "filter", false, false, funcTable, 15, null, null, 0, 1);
147 c$16__subn = Py.newCode(4, new String[] {"pattern", "template", "string", "count", "filter", "append", "n", "m", "i", "e", "c", "b", "s"}, "/usr/share/jython/Lib-cpython/sre.py", "_subn", false, false, funcTable, 16, null, null, 0, 1);
148 c$17__split = Py.newCode(3, new String[] {"pattern", "string", "maxsplit", "append", "n", "m", "i", "g", "e", "extend", "c", "b", "s"}, "/usr/share/jython/Lib-cpython/sre.py", "_split", false, false, funcTable, 17, null, null, 0, 1);
149 c$18__pickle = Py.newCode(1, new String[] {"p"}, "/usr/share/jython/Lib-cpython/sre.py", "_pickle", false, false, funcTable, 18, null, null, 0, 1);
150 c$19___init__ = Py.newCode(2, new String[] {"self", "lexicon", "p", "SUBPATTERN", "phrase", "action", "BRANCH", "s"}, "/usr/share/jython/Lib-cpython/sre.py", "__init__", false, false, funcTable, 19, null, null, 0, 1);
151 c$20_scan = Py.newCode(2, new String[] {"self", "string", "append", "m", "action", "j", "i", "match", "result"}, "/usr/share/jython/Lib-cpython/sre.py", "scan", false, false, funcTable, 20, null, null, 0, 1);
152 c$21_Scanner = Py.newCode(0, new String[] {}, "/usr/share/jython/Lib-cpython/sre.py", "Scanner", false, false, funcTable, 21, null, null, 0, 0);
153 c$22_main = Py.newCode(0, new String[] {}, "/usr/share/jython/Lib-cpython/sre.py", "main", false, false, funcTable, 22, null, null, 0, 0);
157 public PyCode getMain() {
158 if (c$22_main == null) _PyInner.initConstants();
162 public PyObject call_function(int index, PyFrame frame) {
165 return _PyInner.match$1(frame);
167 return _PyInner.search$2(frame);
169 return _PyInner.sub$3(frame);
171 return _PyInner.subn$4(frame);
173 return _PyInner.split$5(frame);
175 return _PyInner.findall$6(frame);
177 return _PyInner.compile$7(frame);
179 return _PyInner.purge$8(frame);
181 return _PyInner.template$9(frame);
183 return _PyInner.escape$10(frame);
185 return _PyInner._join$11(frame);
187 return _PyInner._compile$12(frame);
189 return _PyInner._compile_repl$13(frame);
191 return _PyInner._expand$14(frame);
193 return _PyInner._sub$15(frame);
195 return _PyInner.filter$16(frame);
197 return _PyInner._subn$17(frame);
199 return _PyInner._split$18(frame);
201 return _PyInner._pickle$19(frame);
203 return _PyInner.__init__$20(frame);
205 return _PyInner.scan$21(frame);
207 return _PyInner.Scanner$22(frame);
209 return _PyInner.main$23(frame);
215 private static PyObject match$1(PyFrame frame) {
216 /* Try to apply the pattern at the start of the string, returning
217 a match object, or None if no match was found. */
218 return frame.getglobal("_compile").__call__(frame.getlocal(0), frame.getlocal(2)).invoke("match", frame.getlocal(1));
221 private static PyObject search$2(PyFrame frame) {
222 /* Scan through string looking for a match to the pattern, returning
223 a match object, or None if no match was found. */
224 return frame.getglobal("_compile").__call__(frame.getlocal(0), frame.getlocal(2)).invoke("search", frame.getlocal(1));
227 private static PyObject sub$3(PyFrame frame) {
228 /* Return the string obtained by replacing the leftmost
229 non-overlapping occurrences of the pattern in string by the
231 return frame.getglobal("_compile").__call__(frame.getlocal(0), i$25).invoke("sub", new PyObject[] {frame.getlocal(1), frame.getlocal(2), frame.getlocal(3)});
234 private static PyObject subn$4(PyFrame frame) {
235 /* Return a 2-tuple containing (new_string, number).
236 new_string is the string obtained by replacing the leftmost
237 non-overlapping occurrences of the pattern in the source
238 string by the replacement repl. number is the number of
239 substitutions that were made. */
240 return frame.getglobal("_compile").__call__(frame.getlocal(0), i$25).invoke("subn", new PyObject[] {frame.getlocal(1), frame.getlocal(2), frame.getlocal(3)});
243 private static PyObject split$5(PyFrame frame) {
244 /* Split the source string by the occurrences of the pattern,
245 returning a list containing the resulting substrings. */
246 return frame.getglobal("_compile").__call__(frame.getlocal(0), i$25).invoke("split", frame.getlocal(1), frame.getlocal(2));
249 private static PyObject findall$6(PyFrame frame) {
250 /* Return a list of all non-overlapping matches in the string.
252 If one or more groups are present in the pattern, return a
253 list of groups; this will be a list of tuples if the pattern
254 has more than one group.
256 Empty matches are included in the result. */
257 return frame.getglobal("_compile").__call__(frame.getlocal(0), i$25).invoke("findall", frame.getlocal(1), frame.getlocal(2));
260 private static PyObject compile$7(PyFrame frame) {
261 /* Compile a regular expression pattern, returning a pattern object. */
262 return frame.getglobal("_compile").__call__(frame.getlocal(0), frame.getlocal(1));
265 private static PyObject purge$8(PyFrame frame) {
266 /* Clear the regular expression cache */
267 frame.getglobal("_cache").invoke("clear");
268 frame.getglobal("_cache_repl").invoke("clear");
272 private static PyObject template$9(PyFrame frame) {
273 /* Compile a template pattern, returning a pattern object */
274 return frame.getglobal("_compile").__call__(frame.getlocal(0), frame.getlocal(1)._or(frame.getglobal("T")));
277 private static PyObject escape$10(PyFrame frame) {
278 // Temporary Variables
280 PyObject t$0$PyObject, t$1$PyObject, t$2$PyObject, t$3$PyObject, t$4$PyObject;
283 /* Escape all non-alphanumeric characters in pattern. */
284 frame.setlocal(2, frame.getglobal("list").__call__(frame.getlocal(0)));
286 t$1$PyObject = frame.getglobal("range").__call__(frame.getglobal("len").__call__(frame.getlocal(0)));
287 while ((t$0$PyObject = t$1$PyObject.__finditem__(t$0$int++)) != null) {
288 frame.setlocal(1, t$0$PyObject);
289 frame.setlocal(3, frame.getlocal(0).__getitem__(frame.getlocal(1)));
290 if (((t$2$PyObject = ((t$3$PyObject = (s$35._le(t$4$PyObject = frame.getlocal(3)).__nonzero__() ? t$4$PyObject._le(s$36) : Py.Zero)).__nonzero__() ? t$3$PyObject : (s$37._le(t$4$PyObject = frame.getlocal(3)).__nonzero__() ? t$4$PyObject._le(s$38) : Py.Zero))).__nonzero__() ? t$2$PyObject : (s$39._le(t$3$PyObject = frame.getlocal(3)).__nonzero__() ? t$3$PyObject._le(s$40) : Py.Zero)).__not__().__nonzero__()) {
291 if (frame.getlocal(3)._eq(s$41).__nonzero__()) {
292 frame.getlocal(2).__setitem__(frame.getlocal(1), s$42);
295 frame.getlocal(2).__setitem__(frame.getlocal(1), s$43._add(frame.getlocal(3)));
299 return frame.getglobal("_join").__call__(frame.getlocal(2), frame.getlocal(0));
302 private static PyObject _join$11(PyFrame frame) {
303 return frame.getglobal("string").__getattr__("join").__call__(frame.getlocal(0), frame.getlocal(1).__getslice__(null, i$25, null));
306 private static PyObject _compile$12(PyFrame frame) {
307 // Temporary Variables
308 PyObject[] t$0$PyObject__;
309 PyException t$0$PyException;
312 frame.setlocal(1, frame.getglobal("_cache").invoke("get", frame.getlocal(0)));
313 if (frame.getlocal(1)._isnot(frame.getglobal("None")).__nonzero__()) {
314 return frame.getlocal(1);
316 t$0$PyObject__ = org.python.core.Py.unpackSequence(frame.getlocal(0), 2);
317 frame.setlocal(3, t$0$PyObject__[0]);
318 frame.setlocal(2, t$0$PyObject__[1]);
319 if (frame.getglobal("type").__call__(frame.getlocal(3))._notin(frame.getglobal("sre_compile").__getattr__("STRING_TYPES")).__nonzero__()) {
320 return frame.getlocal(3);
323 frame.setlocal(1, frame.getglobal("sre_compile").__getattr__("compile").__call__(frame.getlocal(3), frame.getlocal(2)));
325 catch (Throwable x$0) {
326 t$0$PyException = Py.setException(x$0, frame);
327 if (Py.matchException(t$0$PyException, frame.getglobal("error"))) {
328 frame.setlocal(4, t$0$PyException.value);
329 throw Py.makeException(frame.getglobal("error"), frame.getlocal(4));
331 else throw t$0$PyException;
333 if (frame.getglobal("len").__call__(frame.getglobal("_cache"))._ge(frame.getglobal("_MAXCACHE")).__nonzero__()) {
334 frame.getglobal("_cache").invoke("clear");
336 frame.getglobal("_cache").__setitem__(frame.getlocal(0), frame.getlocal(1));
337 return frame.getlocal(1);
340 private static PyObject _compile_repl$13(PyFrame frame) {
341 // Temporary Variables
342 PyObject[] t$0$PyObject__;
343 PyException t$0$PyException;
346 frame.setlocal(1, frame.getglobal("_cache_repl").invoke("get", frame.getlocal(0)));
347 if (frame.getlocal(1)._isnot(frame.getglobal("None")).__nonzero__()) {
348 return frame.getlocal(1);
350 t$0$PyObject__ = org.python.core.Py.unpackSequence(frame.getlocal(0), 2);
351 frame.setlocal(2, t$0$PyObject__[0]);
352 frame.setlocal(3, t$0$PyObject__[1]);
354 frame.setlocal(1, frame.getglobal("sre_parse").__getattr__("parse_template").__call__(frame.getlocal(2), frame.getlocal(3)));
356 catch (Throwable x$0) {
357 t$0$PyException = Py.setException(x$0, frame);
358 if (Py.matchException(t$0$PyException, frame.getglobal("error"))) {
359 frame.setlocal(4, t$0$PyException.value);
360 throw Py.makeException(frame.getglobal("error"), frame.getlocal(4));
362 else throw t$0$PyException;
364 if (frame.getglobal("len").__call__(frame.getglobal("_cache_repl"))._ge(frame.getglobal("_MAXCACHE")).__nonzero__()) {
365 frame.getglobal("_cache_repl").invoke("clear");
367 frame.getglobal("_cache_repl").__setitem__(frame.getlocal(0), frame.getlocal(1));
368 return frame.getlocal(1);
371 private static PyObject _expand$14(PyFrame frame) {
372 frame.setlocal(2, frame.getglobal("sre_parse").__getattr__("parse_template").__call__(frame.getlocal(2), frame.getlocal(0)));
373 return frame.getglobal("sre_parse").__getattr__("expand_template").__call__(frame.getlocal(2), frame.getlocal(1));
376 private static PyObject _sub$15(PyFrame frame) {
377 return frame.getglobal("_subn").__call__(new PyObject[] {frame.getlocal(0), frame.getlocal(1), frame.getlocal(2), frame.getlocal(3)}).__getitem__(i$25);
380 private static PyObject filter$16(PyFrame frame) {
381 return frame.getglobal("sre_parse").__getattr__("expand_template").__call__(frame.getlocal(1), frame.getlocal(0));
384 private static PyObject _subn$17(PyFrame frame) {
385 // Temporary Variables
386 PyObject[] t$0$PyObject__;
387 PyObject t$0$PyObject;
390 if (frame.getglobal("callable").__call__(frame.getlocal(1)).__nonzero__()) {
391 frame.setlocal(4, frame.getlocal(1));
394 frame.setlocal(1, frame.getglobal("_compile_repl").__call__(frame.getlocal(1), frame.getlocal(0)));
395 frame.setlocal(4, new PyFunction(frame.f_globals, new PyObject[] {frame.getlocal(1)}, c$15_filter));
398 frame.setlocal(6, t$0$PyObject);
399 frame.setlocal(8, t$0$PyObject);
400 frame.setlocal(12, new PyList(new PyObject[] {}));
401 frame.setlocal(5, frame.getlocal(12).__getattr__("append"));
402 frame.setlocal(10, frame.getlocal(0).invoke("scanner", frame.getlocal(2)));
403 while (((t$0$PyObject = frame.getlocal(3).__not__()).__nonzero__() ? t$0$PyObject : frame.getlocal(6)._lt(frame.getlocal(3))).__nonzero__()) {
404 frame.setlocal(7, frame.getlocal(10).invoke("search"));
405 if (frame.getlocal(7).__not__().__nonzero__()) {
408 t$0$PyObject__ = org.python.core.Py.unpackSequence(frame.getlocal(7).invoke("span"), 2);
409 frame.setlocal(11, t$0$PyObject__[0]);
410 frame.setlocal(9, t$0$PyObject__[1]);
411 if (frame.getlocal(8)._lt(frame.getlocal(11)).__nonzero__()) {
412 frame.getlocal(5).__call__(frame.getlocal(2).__getslice__(frame.getlocal(8), frame.getlocal(11), null));
414 frame.getlocal(5).__call__(frame.getlocal(4).__call__(frame.getlocal(7)));
415 frame.setlocal(8, frame.getlocal(9));
416 frame.setlocal(6, frame.getlocal(6)._add(i$45));
418 frame.getlocal(5).__call__(frame.getlocal(2).__getslice__(frame.getlocal(8), null, null));
419 return new PyTuple(new PyObject[] {frame.getglobal("_join").__call__(frame.getlocal(12), frame.getlocal(2).__getslice__(null, i$25, null)), frame.getlocal(6)});
422 private static PyObject _split$18(PyFrame frame) {
423 // Temporary Variables
424 PyObject[] t$0$PyObject__;
425 PyObject t$0$PyObject;
429 frame.setlocal(4, t$0$PyObject);
430 frame.setlocal(6, t$0$PyObject);
431 frame.setlocal(12, new PyList(new PyObject[] {}));
432 frame.setlocal(3, frame.getlocal(12).__getattr__("append"));
433 frame.setlocal(9, frame.getlocal(12).__getattr__("extend"));
434 frame.setlocal(10, frame.getlocal(0).invoke("scanner", frame.getlocal(1)));
435 frame.setlocal(7, frame.getlocal(0).__getattr__("groups"));
436 while (((t$0$PyObject = frame.getlocal(2).__not__()).__nonzero__() ? t$0$PyObject : frame.getlocal(4)._lt(frame.getlocal(2))).__nonzero__()) {
437 frame.setlocal(5, frame.getlocal(10).invoke("search"));
438 if (frame.getlocal(5).__not__().__nonzero__()) {
441 t$0$PyObject__ = org.python.core.Py.unpackSequence(frame.getlocal(5).invoke("span"), 2);
442 frame.setlocal(11, t$0$PyObject__[0]);
443 frame.setlocal(8, t$0$PyObject__[1]);
444 if (frame.getlocal(11)._eq(frame.getlocal(8)).__nonzero__()) {
445 if (frame.getlocal(6)._ge(frame.getglobal("len").__call__(frame.getlocal(1))).__nonzero__()) {
450 frame.getlocal(3).__call__(frame.getlocal(1).__getslice__(frame.getlocal(6), frame.getlocal(11), null));
451 if (((t$0$PyObject = frame.getlocal(7)).__nonzero__() ? frame.getlocal(11)._ne(frame.getlocal(8)) : t$0$PyObject).__nonzero__()) {
452 frame.getlocal(9).__call__(frame.getglobal("list").__call__(frame.getlocal(5).invoke("groups")));
454 frame.setlocal(6, frame.getlocal(8));
455 frame.setlocal(4, frame.getlocal(4)._add(i$45));
457 frame.getlocal(3).__call__(frame.getlocal(1).__getslice__(frame.getlocal(6), null, null));
458 return frame.getlocal(12);
461 private static PyObject _pickle$19(PyFrame frame) {
462 return new PyTuple(new PyObject[] {frame.getglobal("_compile"), new PyTuple(new PyObject[] {frame.getlocal(0).__getattr__("pattern"), frame.getlocal(0).__getattr__("flags")})});
465 private static PyObject __init__$20(PyFrame frame) {
467 // Temporary Variables
469 PyObject[] t$0$PyObject__;
470 PyObject t$0$PyObject, t$1$PyObject;
473 imp_accu = org.python.core.imp.importFrom("sre_constants", new String[] {"BRANCH", "SUBPATTERN"}, frame);
474 frame.setlocal(6, imp_accu[0]);
475 frame.setlocal(3, imp_accu[1]);
477 frame.getlocal(0).__setattr__("lexicon", frame.getlocal(1));
478 frame.setlocal(2, new PyList(new PyObject[] {}));
479 frame.setlocal(7, frame.getglobal("sre_parse").__getattr__("Pattern").__call__());
481 t$1$PyObject = frame.getlocal(1);
482 while ((t$0$PyObject = t$1$PyObject.__finditem__(t$0$int++)) != null) {
483 t$0$PyObject__ = org.python.core.Py.unpackSequence(t$0$PyObject, 2);
484 frame.setlocal(4, t$0$PyObject__[0]);
485 frame.setlocal(5, t$0$PyObject__[1]);
486 frame.getlocal(2).invoke("append", frame.getglobal("sre_parse").__getattr__("SubPattern").__call__(frame.getlocal(7), new PyList(new PyObject[] {new PyTuple(new PyObject[] {frame.getlocal(3), new PyTuple(new PyObject[] {frame.getglobal("len").__call__(frame.getlocal(2)), frame.getglobal("sre_parse").__getattr__("parse").__call__(frame.getlocal(4))})})})));
488 frame.setlocal(2, frame.getglobal("sre_parse").__getattr__("SubPattern").__call__(frame.getlocal(7), new PyList(new PyObject[] {new PyTuple(new PyObject[] {frame.getlocal(6), new PyTuple(new PyObject[] {frame.getglobal("None"), frame.getlocal(2)})})})));
489 frame.getlocal(7).__setattr__("groups", frame.getglobal("len").__call__(frame.getlocal(2)));
490 frame.getlocal(0).__setattr__("scanner", frame.getglobal("sre_compile").__getattr__("compile").__call__(frame.getlocal(2)));
494 private static PyObject scan$21(PyFrame frame) {
495 frame.setlocal(8, new PyList(new PyObject[] {}));
496 frame.setlocal(2, frame.getlocal(8).__getattr__("append"));
497 frame.setlocal(7, frame.getlocal(0).__getattr__("scanner").__getattr__("match"));
498 frame.setlocal(6, i$25);
499 while (i$45.__nonzero__()) {
500 frame.setlocal(3, frame.getlocal(7).__call__(frame.getlocal(1), frame.getlocal(6)));
501 if (frame.getlocal(3).__not__().__nonzero__()) {
504 frame.setlocal(5, frame.getlocal(3).invoke("end"));
505 if (frame.getlocal(6)._eq(frame.getlocal(5)).__nonzero__()) {
508 frame.setlocal(4, frame.getlocal(0).__getattr__("lexicon").__getitem__(frame.getlocal(3).__getattr__("lastindex")).__getitem__(i$45));
509 if (frame.getglobal("callable").__call__(frame.getlocal(4)).__nonzero__()) {
510 frame.getlocal(0).__setattr__("match", frame.getlocal(3));
511 frame.setlocal(4, frame.getlocal(4).__call__(frame.getlocal(0), frame.getlocal(3).invoke("group")));
513 if (frame.getlocal(4)._isnot(frame.getglobal("None")).__nonzero__()) {
514 frame.getlocal(2).__call__(frame.getlocal(4));
516 frame.setlocal(6, frame.getlocal(5));
518 return new PyTuple(new PyObject[] {frame.getlocal(8), frame.getlocal(1).__getslice__(frame.getlocal(6), null, null)});
521 private static PyObject Scanner$22(PyFrame frame) {
522 frame.setlocal("__init__", new PyFunction(frame.f_globals, new PyObject[] {}, c$19___init__));
523 frame.setlocal("scan", new PyFunction(frame.f_globals, new PyObject[] {}, c$20_scan));
524 return frame.getf_locals();
527 private static PyObject main$23(PyFrame frame) {
528 frame.setglobal("__file__", s$47);
530 // Temporary Variables
531 PyObject t$0$PyObject;
534 frame.setlocal("sre_compile", org.python.core.imp.importOne("sre_compile", frame));
535 frame.setlocal("sre_parse", org.python.core.imp.importOne("sre_parse", frame));
536 frame.setlocal("__all__", new PyList(new PyObject[] {s$0, s$1, s$2, s$3, s$4, s$5, s$6, s$7, s$8, s$9, s$10, s$11, s$12, s$13, s$14, s$15, s$16, s$17, s$18, s$19, s$20, s$21, s$22}));
537 frame.setlocal("__version__", s$23);
538 frame.setlocal("string", org.python.core.imp.importOne("string", frame));
539 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_IGNORECASE");
540 frame.setlocal("I", t$0$PyObject);
541 frame.setlocal("IGNORECASE", t$0$PyObject);
542 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_LOCALE");
543 frame.setlocal("L", t$0$PyObject);
544 frame.setlocal("LOCALE", t$0$PyObject);
545 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_UNICODE");
546 frame.setlocal("U", t$0$PyObject);
547 frame.setlocal("UNICODE", t$0$PyObject);
548 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_MULTILINE");
549 frame.setlocal("M", t$0$PyObject);
550 frame.setlocal("MULTILINE", t$0$PyObject);
551 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_DOTALL");
552 frame.setlocal("S", t$0$PyObject);
553 frame.setlocal("DOTALL", t$0$PyObject);
554 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_VERBOSE");
555 frame.setlocal("X", t$0$PyObject);
556 frame.setlocal("VERBOSE", t$0$PyObject);
557 t$0$PyObject = frame.getname("sre_compile").__getattr__("SRE_FLAG_TEMPLATE");
558 frame.setlocal("T", t$0$PyObject);
559 frame.setlocal("TEMPLATE", t$0$PyObject);
560 frame.setlocal("DEBUG", frame.getname("sre_compile").__getattr__("SRE_FLAG_DEBUG"));
561 frame.setlocal("error", frame.getname("sre_compile").__getattr__("error"));
562 frame.setlocal("match", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$0_match));
563 frame.setlocal("search", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$1_search));
564 frame.setlocal("sub", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$2_sub));
565 frame.setlocal("subn", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$3_subn));
566 frame.setlocal("split", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$4_split));
567 frame.setlocal("findall", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$5_findall));
568 frame.setlocal("compile", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$6_compile));
569 frame.setlocal("purge", new PyFunction(frame.f_globals, new PyObject[] {}, c$7_purge));
570 frame.setlocal("template", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$8_template));
571 frame.setlocal("escape", new PyFunction(frame.f_globals, new PyObject[] {}, c$9_escape));
572 frame.setlocal("_cache", new PyDictionary(new PyObject[] {}));
573 frame.setlocal("_cache_repl", new PyDictionary(new PyObject[] {}));
574 frame.setlocal("_MAXCACHE", i$44);
575 frame.setlocal("_join", new PyFunction(frame.f_globals, new PyObject[] {}, c$10__join));
576 frame.setlocal("_compile", new PyFunction(frame.f_globals, new PyObject[] {}, c$11__compile));
577 frame.setlocal("_compile_repl", new PyFunction(frame.f_globals, new PyObject[] {}, c$12__compile_repl));
578 frame.setlocal("_expand", new PyFunction(frame.f_globals, new PyObject[] {}, c$13__expand));
579 frame.setlocal("_sub", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$14__sub));
580 frame.setlocal("_subn", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$16__subn));
581 frame.setlocal("_split", new PyFunction(frame.f_globals, new PyObject[] {i$25}, c$17__split));
582 frame.setlocal("copy_reg", org.python.core.imp.importOne("copy_reg", frame));
583 frame.setlocal("_pickle", new PyFunction(frame.f_globals, new PyObject[] {}, c$18__pickle));
584 frame.getname("copy_reg").__getattr__("pickle").__call__(frame.getname("type").__call__(frame.getname("_compile").__call__(s$46, i$25)), frame.getname("_pickle"), frame.getname("_compile"));
585 frame.setlocal("Scanner", Py.makeClass("Scanner", new PyObject[] {}, c$21_Scanner, null));
590 public static void moduleDictInit(PyObject dict) {
591 dict.__setitem__("__name__", new PyString("sre"));
592 Py.runCode(new _PyInner().getMain(), dict, dict);
595 public static void main(String[] args) throws java.lang.Exception {
596 String[] newargs = new String[args.length+1];
598 System.arraycopy(args, 0, newargs, 1, args.length);
599 Py.runMain(sre._PyInner.class, newargs, sre.jpy$packages, sre.jpy$mainProperties, "", new String[] {"string", "random", "util", "traceback", "sre_compile", "atexit", "sre", "sre_constants", "StringIO", "javaos", "socket", "yapm", "calendar", "repr", "copy_reg", "SocketServer", "server", "re", "linecache", "javapath", "UserDict", "copy", "threading", "stat", "PathVFS", "sre_parse"});