Fixed an issue handling Python identifiers with non-ASCII letters in the module parser and class browser.

Sat, 31 Jul 2010 16:41:42 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 31 Jul 2010 16:41:42 +0200
changeset 444
6f3b2099858e
parent 442
f233430b5613
child 446
69aac6eeba9b

Fixed an issue handling Python identifiers with non-ASCII letters in the module parser and class browser.

Dictionaries/words.dic file | annotate | diff | comparison | revisions
Utilities/ClassBrowsers/pyclbr.py file | annotate | diff | comparison | revisions
Utilities/ModuleParser.py file | annotate | diff | comparison | revisions
--- a/Dictionaries/words.dic	Sat Jul 31 15:30:25 2010 +0200
+++ b/Dictionaries/words.dic	Sat Jul 31 16:41:42 2010 +0200
@@ -0,0 +1,5 @@
+
+detlev
+offenbachs
+Eric5
+IDE
\ No newline at end of file
--- a/Utilities/ClassBrowsers/pyclbr.py	Sat Jul 31 15:30:25 2010 +0200
+++ b/Utilities/ClassBrowsers/pyclbr.py	Sat Jul 31 16:41:42 2010 +0200
@@ -56,7 +56,7 @@
         ^
         (?P<MethodIndent> [ \t]* )
         def [ \t]+
-        (?P<MethodName> [a-zA-Z_] \w* )
+        (?P<MethodName> \w+ )
         (?: [ \t]* \[ (?: plain | html ) \] )?
         [ \t]* \(
         (?P<MethodSignature> (?: [^)] | \)[ \t]*,? )*? )
@@ -67,7 +67,7 @@
         ^
         (?P<ClassIndent> [ \t]* )
         class [ \t]+
-        (?P<ClassName> [a-zA-Z_] \w* )
+        (?P<ClassName> \w+ )
         [ \t]*
         (?P<ClassSupers> \( [^)]* \) )?
         [ \t]* :
@@ -77,14 +77,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]* =
     )
 
--- a/Utilities/ModuleParser.py	Sat Jul 31 15:30:25 2010 +0200
+++ b/Utilities/ModuleParser.py	Sat Jul 31 16:41:42 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