[csw-devel] SF.net SVN: gar:[19279] csw/mgar/gar/v2-yann/lib/python/inspective_package. py

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sat Sep 22 18:57:32 CEST 2012


Revision: 19279
          http://gar.svn.sourceforge.net/gar/?rev=19279&view=rev
Author:   chninkel
Date:     2012-09-22 16:57:32 +0000 (Sat, 22 Sep 2012)
Log Message:
-----------
more verbose comments for regexes

Modified Paths:
--------------
    csw/mgar/gar/v2-yann/lib/python/inspective_package.py

Modified: csw/mgar/gar/v2-yann/lib/python/inspective_package.py
===================================================================
--- csw/mgar/gar/v2-yann/lib/python/inspective_package.py	2012-09-22 16:38:28 UTC (rev 19278)
+++ csw/mgar/gar/v2-yann/lib/python/inspective_package.py	2012-09-22 16:57:32 UTC (rev 19279)
@@ -404,42 +404,42 @@
 
     re_by_section = {
       'version definition': (r"""
-        \s*(?:\[\d+\]\s+)?            # index might be not present
-                                      # if no version binding is enabled
-        (?P<version>\S+)
-        (?:\s+(?P<dependency>\S+))?
+        \s*(?:\[\d+\]\s+)?                # index: might be not present if
+                                          #        no version binding is enabled
+        (?P<version>\S+)                  # version
+        (?:\s+(?P<dependency>\S+))?       # dependency
         (?:\s+\[\s(?:BASE)\s\])?\s*$
                               """),
       'version needed': (r"""
-        \s*(?:\[\d+\]\s+)?     # index might be not present
-                                          # if no version binding is enabled
-
-        (?:(?P<soname>\S+)\s+             # file can be absent if the same as
-         (?!\[\s(?:INFO|WEAK)\s\]))?      # the previous line, we make sure
-                                          # version is not confused with file
-                                          # in that case
-        (?P<version>\S+)
-        (?:\s+\[\s(?:INFO|WEAK)\s\])?\s*$
+        \s*(?:\[\d+\]\s+)?                # index: might be not present if
+                                          #        no version binding is enabled
+        (?:(?P<soname>\S+)\s+             # file: can be absent if the same as
+         (?!\[\s(?:INFO|WEAK)\s\]))?      #       the previous line,
+                                          #       we make sure there is no
+                                          #       confusion with version
+        (?P<version>\S+)                  # version
+        (?:\s+\[\s(?:INFO|WEAK)\s\])?\s*$ #
                           """),
       'symbol table': (r"""
-         \s*\[\d+\]
-         \s+(?:0x[0-9a-f]+|REG_G\d+)
-         \s+0x[0-9a-f]+
-         \s+(?P<type>\S+)
-         \s+(?P<bind>\S+)
-         \s+\S+
-         \s+(?P<version>\S+)
-         \s+(?P<shndx>\S+)
-         (?:\s+(?P<symbol>\S+))?\s*$
+         \s*\[\d+\]                       # index
+         \s+(?:0x[0-9a-f]+|REG_G\d+)      # value
+         \s+(?:0x[0-9a-f]+)               # size
+         \s+(?P<type>\S+)                 # type
+         \s+(?P<bind>\S+)                 # bind
+         \s+(?:\S+)                       # oth
+         \s+(?P<version>\S+)              # ver
+         \s+(?P<shndx>\S+)                # shndx
+         (?:\s+(?P<symbol>\S+))?\s*$      # name
                         """),
       'syminfo': (r"""
-         \s*\[\d+\]
-         \s+(?P<flags>[ABCDFILNPS]+)
-         \s+(?:(?:\[\d+\]                   # some kind of library index
-         \s+(?P<soname>\S+)|<self>)\s+)?    # library is not present
-                                            # for external symbols not
-                                            # directly bound
-         (?P<symbol>\S+)\s*
+         \s*(?:\[\d+\])                   # index
+         \s+(?P<flags>[ABCDFILNPS]+)      # flags
+
+         \s+(?:(?:\[\d+\]                 # bound to: contains a library index
+         \s+(?P<soname>\S+)|<self>)\s+)?  #           and the library name
+                                          #           or <self> fon non external
+                                          #           symbols
+         (?P<symbol>\S+)\s*               # symbol
                    """)}
 
     elfdump_data = None

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list