Sat, 31 Jul 2010 16:42:10 +0200
Fixed an issue handling Python identifiers with non-ASCII letters in the module parser and class browser.
Utilities/ClassBrowsers/pyclbr.py | file | annotate | diff | comparison | revisions | |
Utilities/ModuleParser.py | file | annotate | diff | comparison | revisions |
--- a/Utilities/ClassBrowsers/pyclbr.py Sat Jul 31 15:30:56 2010 +0200 +++ b/Utilities/ClassBrowsers/pyclbr.py Sat Jul 31 16:42:10 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: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]+