Utilities/ModuleParser.py

branch
5_0_x
changeset 445
accf2f63d364
parent 97
c4086afea02b
child 792
a13346916170
--- a/Utilities/ModuleParser.py	Sat Jul 31 15:30:56 2010 +0200
+++ b/Utilities/ModuleParser.py	Sat Jul 31 16:42:10 2010 +0200
@@ -102,7 +102,7 @@
         ^
         (?P<MethodIndent> [ \t]* )
         def [ \t]+
-        (?P<MethodName> [a-zA-Z_] \w* )
+        (?P<MethodName> \w+ )
         (?: [ \t]* \[ (?: plain | html ) \] )?
         [ \t]* \(
         (?P<MethodSignature> (?: [^)] | \)[ \t]*,? )*? )
@@ -113,7 +113,7 @@
         ^
         (?P<ClassIndent> [ \t]* )
         class [ \t]+
-        (?P<ClassName> [a-zA-Z_] \w* )
+        (?P<ClassName> \w+ )
         [ \t]*
         (?P<ClassSupers> \( [^)]* \) )?
         [ \t]* :
@@ -123,14 +123,14 @@
         ^
         (?P<AttributeIndent> [ \t]* )
         self [ \t]* \. [ \t]*
-        (?P<AttributeName> [a-zA-Z_] \w* )
+        (?P<AttributeName> \w+ )
         [ \t]* =
     )
 
 |   (?P<Variable>
         ^
         (?P<VariableIndent> [ \t]* )
-        (?P<VariableName> [a-zA-Z_] \w* )
+        (?P<VariableName> \w+ )
         [ \t]* =
     )
 
@@ -142,9 +142,9 @@
 |   (?P<ImportFrom>
         ^ from [ \t]+
         (?P<ImportFromPath>
-            [a-zA-Z_.] \w*
+            \w+
             (?:
-                [ \t]* \. [ \t]* [a-zA-Z_] \w*
+                [ \t]* \. [ \t]* \w+
             )*
         )
         [ \t]+

eric ide

mercurial