In a few places in the compression appendix there was a :
authorDavid Anderson <davea42@earthlink.net>
Thu, 31 May 2012 15:51:51 +0000 (08:51 -0700)
committerDavid Anderson <davea42@earthlink.net>
Thu, 31 May 2012 15:51:51 +0000 (08:51 -0700)
right next to an attribute name.  That conflicted with
use of python tools, so in a few places in compression.tex
an extra space was useful.

dwarf5/latexdoc/compression.tex
dwarf5/tools/fileio.py

index f746437..0459138 100644 (file)
@@ -742,35 +742,36 @@ in
 
 \subsubsection{Type signature  computation 1: DWARF representation}
 \label{app:typesignaturecomputation1dwarfrepresentation}
-
+% We keep the : (colon) away from the attribute so tokenizing in the python tools
+% does not result in adding : into the attribute name.
 \begin{alltt}
   \livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit}
       DW\-\_AT\-\_language: DW\-\_LANG\-\_C\-\_plus\-\_plus (4)
     \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
-        DW\-\_AT\-\_name: "N"
+        DW\-\_AT\-\_name : "N"
 L1:
       \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
-          DW\-\_AT\-\_name: "C"
-          DW\-\_AT\-\_byte\-\_size: 8
-          DW\-\_AT\-\_decl\-\_file: 1
-          DW\-\_AT\-\_decl\-\_line: 5
+          DW\-\_AT\-\_name : "C"
+          DW\-\_AT\-\_byte\-\_size : 8
+          DW\-\_AT\-\_decl\-\_file : 1
+          DW\-\_AT\-\_decl\-\_line : 5
         \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-            DW\-\_AT\-\_name: "x"
-            DW\-\_AT\-\_decl\-\_file: 1
-            DW\-\_AT\-\_decl\-\_line: 6
-            DW\-\_AT\-\_type: reference to L2
-            DW\-\_AT\-\_data\-\_member\-\_location: 0
+            DW\-\_AT\-\_name : "x"
+            DW\-\_AT\-\_decl\-\_file : 1
+            DW\-\_AT\-\_decl\-\_line : 6
+            DW\-\_AT\-\_type : reference to L2
+            DW\-\_AT\-\_data\-\_member\-\_location : 0
         \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-            DW\-\_AT\-\_name: "y"
-            DW\-\_AT\-\_decl\-\_file: 1
-            DW\-\_AT\-\_decl\-\_line: 7
-            DW\-\_AT\-\_type: reference to L2
-            DW\-\_AT\-\_data\-\_member\-\_location: 4
+            DW\-\_AT\-\_name : "y"
+            DW\-\_AT\-\_decl\-\_file : 1
+            DW\-\_AT\-\_decl\-\_line : 7
+            DW\-\_AT\-\_type : reference to L2
+            DW\-\_AT\-\_data\-\_member\-\_location : 4
 L2:
      \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
-         DW\-\_AT\-\_byte\-\_size: 4
-         DW\-\_AT\-\_encoding: DW\-\_ATE\-\_signed
-         DW\-\_AT\-\_name: "int"
+         DW\-\_AT\-\_byte\-\_size : 4
+         DW\-\_AT\-\_encoding : DW\-\_ATE\-\_signed
+         DW\-\_AT\-\_name : "int"
 \end{alltt}
 
 In computing a signature for the type N::C, flatten the type
@@ -844,79 +845,79 @@ Section \refersec{app:typesignaturecomputation2dwarfrepresentation}.
   \livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit}
       DW\-\_AT\-\_language: DW\-\_LANG\-\_C\-\_plus\-\_plus (4)
     \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
-          DW\-\_AT\-\_name: "N"
+          DW\-\_AT\-\_name : "N"
 L1:
         \livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type}
-             DW\-\_AT\-\_name: "A"
-             DW\-\_AT\-\_byte\-\_size: 20
-             DW\-\_AT\-\_decl\-\_file: 1
-             DW\-\_AT\-\_decl\-\_line: 10
+             DW\-\_AT\-\_name : "A"
+             DW\-\_AT\-\_byte\-\_size : 20
+             DW\-\_AT\-\_decl\-\_file : 1
+             DW\-\_AT\-\_decl\-\_line : 10
            \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-                DW\-\_AT\-\_name: "v\_"
-                DW\-\_AT\-\_decl\-\_file: 1
-                DW\-\_AT\-\_decl\-\_line: 15
-                DW\-\_AT\-\_type: reference to L2
-                DW\-\_AT\-\_data\-\_member\-\_location: 0
-                DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+                DW\-\_AT\-\_name : "v\_"
+                DW\-\_AT\-\_decl\-\_file : 1
+                DW\-\_AT\-\_decl\-\_line : 15
+                DW\-\_AT\-\_type : reference to L2
+                DW\-\_AT\-\_data\-\_member\-\_location : 0
+                DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
           \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-               DW\-\_AT\-\_name: "next"
-               DW\-\_AT\-\_decl\-\_file: 1
-               DW\-\_AT\-\_decl\-\_line: 16
-               DW\-\_AT\-\_type: reference to L3
-               DW\-\_AT\-\_data\-\_member\-\_location: 4
-               DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+               DW\-\_AT\-\_name : "next"
+               DW\-\_AT\-\_decl\-\_file : 1
+               DW\-\_AT\-\_decl\-\_line : 16
+               DW\-\_AT\-\_type : reference to L3
+               DW\-\_AT\-\_data\-\_member\-\_location : 4
+               DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
           \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-               DW\-\_AT\-\_name: "bp"
-               DW\-\_AT\-\_decl\-\_file: 1
-               DW\-\_AT\-\_decl\-\_line: 17
-               DW\-\_AT\-\_type: reference to L4
-               DW\-\_AT\-\_data\-\_member\-\_location: 8
-               DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+               DW\-\_AT\-\_name : "bp"
+               DW\-\_AT\-\_decl\-\_file : 1
+               DW\-\_AT\-\_decl\-\_line : 17
+               DW\-\_AT\-\_type : reference to L4
+               DW\-\_AT\-\_data\-\_member\-\_location : 8
+               DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
           \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-               DW\-\_AT\-\_name: "c"
-               DW\-\_AT\-\_decl\-\_file: 1
-               DW\-\_AT\-\_decl\-\_line: 18
-               DW\-\_AT\-\_type: 0xd28081e8 dcf5070a (signature for struct C)
-               DW\-\_AT\-\_data\-\_member\-\_location: 12
-               DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+               DW\-\_AT\-\_name : "c"
+               DW\-\_AT\-\_decl\-\_file : 1
+               DW\-\_AT\-\_decl\-\_line : 18
+               DW\-\_AT\-\_type : 0xd28081e8 dcf5070a (signature for struct C)
+               DW\-\_AT\-\_data\-\_member\-\_location : 12
+               DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
        \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-           DW\-\_AT\-\_external: 1
-           DW\-\_AT\-\_name: "A"
-           DW\-\_AT\-\_decl\-\_file: 1
-           DW\-\_AT\-\_decl\-\_line: 12
-           DW\-\_AT\-\_declaration: 1
+           DW\-\_AT\-\_external : 1
+           DW\-\_AT\-\_name : "A"
+           DW\-\_AT\-\_decl\-\_file : 1
+           DW\-\_AT\-\_decl\-\_line : 12
+           DW\-\_AT\-\_declaration : 1
         \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
-           DW\-\_AT\-\_type: reference to L3
-           DW\-\_AT\-\_artificial: 1
+           DW\-\_AT\-\_type : reference to L3
+           DW\-\_AT\-\_artificial : 1
         \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
-           DW\-\_AT\-\_type: reference to L2
+           DW\-\_AT\-\_type : reference to L2
        \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-           DW\-\_AT\-\_external: 1
-           DW\-\_AT\-\_name: "v"
-           DW\-\_AT\-\_decl\-\_file: 1
-           DW\-\_AT\-\_decl\-\_line: 13
-           DW\-\_AT\-\_type: reference to L2
-           DW\-\_AT\-\_declaration: 1
+           DW\-\_AT\-\_external : 1
+           DW\-\_AT\-\_name : "v"
+           DW\-\_AT\-\_decl\-\_file : 1
+           DW\-\_AT\-\_decl\-\_line : 13
+           DW\-\_AT\-\_type : reference to L2
+           DW\-\_AT\-\_declaration : 1
          \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
-           DW\-\_AT\-\_type: reference to L3
-           DW\-\_AT\-\_artificial: 1
+           DW\-\_AT\-\_type : reference to L3
+           DW\-\_AT\-\_artificial : 1
 L2:
     \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
-         DW\-\_AT\-\_byte\-\_size: 4
-         DW\-\_AT\-\_encoding: DW\-\_ATE\-\_signed
-         DW\-\_AT\-\_name: "int"
+         DW\-\_AT\-\_byte\-\_size : 4
+         DW\-\_AT\-\_encoding : DW\-\_ATE\-\_signed
+         DW\-\_AT\-\_name : "int"
 L3:
     \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
-         DW\-\_AT\-\_type: reference to L1
+         DW\-\_AT\-\_type : reference to L1
 L4:
     \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
-         DW\-\_AT\-\_type: reference to L5
+         DW\-\_AT\-\_type : reference to L5
     \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
-         DW\-\_AT\-\_name: "N"
+         DW\-\_AT\-\_name : "N"
 L5:
        \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
-           DW\-\_AT\-\_name: "B"
-           DW\-\_AT\-\_declaration: 1
+           DW\-\_AT\-\_name : "B"
+           DW\-\_AT\-\_declaration : 1
 \end{alltt}
 
 In this example, the structure types N::A and N::C have each
@@ -1096,9 +1097,9 @@ Section \refersec{app:typesignatureexampleusage}.
   \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
     ...
     \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}
-      DW\-\_AT\-\_name: "a"
-      DW\-\_AT\-\_type: (signature) 0xd6d160f5 5589f6e9
-      DW\-\_AT\-\_location: ...
+      DW\-\_AT\-\_name : "a"
+      DW\-\_AT\-\_type : (signature) 0xd6d160f5 5589f6e9
+      DW\-\_AT\-\_location : ...
     ...
 \end{alltt}
 
index 692bc35..b885c65 100644 (file)
@@ -28,6 +28,8 @@ def isIdNext(c):
   if  ord(c) >= ord('0') and ord(c) <= ord('9'):
     return "y"
   # This is so we allow the colon in our tags
+  # Unfortunately, this gives trouble if we have a
+  # : at the end of a DW* name on input.
   if c == ":":
     return "y"
   if c == "\\":