@@ -108,13 +108,15 @@ types:
108
108
encoding : ASCII
109
109
terminator : 0x0a # "\n"
110
110
doc : Integer, encoded with the ASCII characters [0-9-].
111
+
111
112
decimalnl_long :
112
113
seq :
113
114
- id : val
114
115
type : str
115
116
encoding : ASCII
116
117
terminator : 0x0a # "\n"
117
118
doc : Integer, encoded with the ASCII chracters [0-9-], followed by 'L'.
119
+
118
120
# TODO Can kaitai express constraint that these are quoted?
119
121
stringnl :
120
122
seq :
@@ -123,27 +125,31 @@ types:
123
125
encoding : ASCII
124
126
terminator : 0x0a # "\n"
125
127
doc : Quoted string, possibly containing Python string escapes.
128
+
126
129
stringnl_noescape :
127
130
seq :
128
131
- id : val
129
132
type : str
130
133
encoding : ASCII
131
134
terminator : 0x0a # "\n"
132
135
doc : Unquoted string, does not contain string escapes.
136
+
133
137
stringnl_noescape_pair :
134
138
seq :
135
139
- id : val1
136
140
type : stringnl_noescape
137
141
- id : val2
138
142
type : stringnl_noescape
139
143
doc : Pair of unquoted, unescaped strings.
144
+
140
145
unicodestringnl :
141
146
seq :
142
147
- id : val
143
148
type : str
144
149
encoding : ASCII
145
150
terminator : 0x0a # "\n"
146
151
doc : Unquoted string, containing Python Unicode escapes.
152
+
147
153
floatnl :
148
154
seq :
149
155
- id : val
@@ -153,6 +159,7 @@ types:
153
159
doc : |
154
160
Double float, encoded with the ASCII characters [0-9.e+-], '-inf', 'inf',
155
161
or 'nan'.
162
+
156
163
long1 :
157
164
seq :
158
165
- id : len
@@ -162,6 +169,7 @@ types:
162
169
doc : |
163
170
Large signed integer, in the range -2**(8*255-1) to 2**(8*255-1)-1,
164
171
encoded as two's complement.
172
+
165
173
long4 :
166
174
seq :
167
175
- id : len
@@ -171,6 +179,7 @@ types:
171
179
doc : |
172
180
Large signed integer, in the range -2**(8*2**32-1) to 2**(8*2**32-1)-1,
173
181
encoded as two's complement.
182
+
174
183
string1 :
175
184
seq :
176
185
- id : len
@@ -192,6 +201,7 @@ types:
192
201
- `pickle.Unpickler` objects default to ASCII, which can be overriden
193
202
- `pickletools.dis` uses latin1, and cannot be overriden
194
203
doc-ref : https://github.com/python/cpython/blob/bb8071a4/Lib/pickle.py#L486-L495
204
+
195
205
string4 :
196
206
seq :
197
207
- id : len
@@ -208,13 +218,15 @@ types:
208
218
209
219
See the documentation for `string1` for further detail about encodings.
210
220
doc-ref : https://github.com/python/cpython/blob/bb8071a4/Lib/pickle.py#L486-L495
221
+
211
222
bytes1 :
212
223
seq :
213
224
- id : len
214
225
type : u1
215
226
- id : val
216
227
size : len
217
228
doc : Length prefixed byte string, between 0 and 255 bytes long.
229
+
218
230
bytes4 :
219
231
seq :
220
232
- id : len
0 commit comments