Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitai-bot committed Jul 13, 2024
1 parent 53234bb commit 14032a7
Show file tree
Hide file tree
Showing 92 changed files with 212 additions and 212 deletions.
2 changes: 1 addition & 1 deletion compiled/construct/combine_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'limit_or_calc_bytes' / Computed(lambda this: (this.str_limit if True else this.str_calc_bytes)),
'limit_or_eos' / Computed(lambda this: (this.str_limit if True else this.str_eos)),
'str_calc' / Computed(lambda this: u"bar"),
'str_calc_bytes' / Computed(lambda this: (this.calc_bytes).decode("ASCII")),
'str_calc_bytes' / Computed(lambda this: (this.calc_bytes).decode(u"ASCII")),
'term_or_calc' / Computed(lambda this: (this.str_term if True else this.str_calc)),
'term_or_calc_bytes' / Computed(lambda this: (this.str_term if False else this.str_calc_bytes)),
'term_or_eos' / Computed(lambda this: (this.str_term if False else this.str_eos)),
Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/expr_str_encodings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'str3_eq_str2' / Computed(lambda this: this.str3 == this.str2),
'str4_eq' / Computed(lambda this: this.str4 == u"\u2591\u2592\u2593"),
'str4_gt_str_calc' / Computed(lambda this: this.str4 > u"\u2524"),
'str4_gt_str_from_bytes' / Computed(lambda this: this.str4 > (b"\xB4").decode("IBM437")),
'str4_gt_str_from_bytes' / Computed(lambda this: this.str4 > (b"\xB4").decode(u"IBM437")),
)

_schema = expr_str_encodings
8 changes: 4 additions & 4 deletions compiled/construct/str_encodings_escaping_to_s.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
'str3_raw' / FixedSized(this.len_of_3, GreedyBytes),
'len_of_4' / Int16ul,
'str4_raw' / FixedSized(this.len_of_4, GreedyBytes),
'str1' / Computed(lambda this: (this.str1_raw).decode("ASCII\\x")),
'str2' / Computed(lambda this: (this.str2_raw).decode("UTF-8\'x")),
'str3' / Computed(lambda this: (this.str3_raw).decode("SJIS\"x")),
'str4' / Computed(lambda this: (this.str4_raw).decode("IBM437\nx")),
'str1' / Computed(lambda this: (this.str1_raw).decode(u"ASCII\\\\x")),
'str2' / Computed(lambda this: (this.str2_raw).decode(u"UTF-8\\'x")),
'str3' / Computed(lambda this: (this.str3_raw).decode(u"SJIS\\\"x")),
'str4' / Computed(lambda this: (this.str4_raw).decode(u"IBM437\\nx")),
)

_schema = str_encodings_escaping_to_s
8 changes: 4 additions & 4 deletions compiled/cpp_stl_11/str_encodings_escaping_enc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ std::string str_encodings_escaping_enc_t::str1_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "ASCII\\x");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "ASCII\\\\x");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down Expand Up @@ -96,7 +96,7 @@ std::string str_encodings_escaping_enc_t::str2_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "UTF-8\'x");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "UTF-8\\'x");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down Expand Up @@ -126,7 +126,7 @@ std::string str_encodings_escaping_enc_t::str3_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "SJIS\"x");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "SJIS\\\"x");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down Expand Up @@ -156,7 +156,7 @@ std::string str_encodings_escaping_enc_t::str4_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "IBM437\nx");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "IBM437\\nx");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down
8 changes: 4 additions & 4 deletions compiled/cpp_stl_11/str_encodings_escaping_to_s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,31 @@ void str_encodings_escaping_to_s_t::_clean_up() {
std::string str_encodings_escaping_to_s_t::str1() {
if (f_str1)
return m_str1;
m_str1 = kaitai::kstream::bytes_to_str(str1_raw(), "ASCII\\x");
m_str1 = kaitai::kstream::bytes_to_str(str1_raw(), "ASCII\\\\x");
f_str1 = true;
return m_str1;
}

std::string str_encodings_escaping_to_s_t::str2() {
if (f_str2)
return m_str2;
m_str2 = kaitai::kstream::bytes_to_str(str2_raw(), "UTF-8\'x");
m_str2 = kaitai::kstream::bytes_to_str(str2_raw(), "UTF-8\\'x");
f_str2 = true;
return m_str2;
}

std::string str_encodings_escaping_to_s_t::str3() {
if (f_str3)
return m_str3;
m_str3 = kaitai::kstream::bytes_to_str(str3_raw(), "SJIS\"x");
m_str3 = kaitai::kstream::bytes_to_str(str3_raw(), "SJIS\\\"x");
f_str3 = true;
return m_str3;
}

std::string str_encodings_escaping_to_s_t::str4() {
if (f_str4)
return m_str4;
m_str4 = kaitai::kstream::bytes_to_str(str4_raw(), "IBM437\nx");
m_str4 = kaitai::kstream::bytes_to_str(str4_raw(), "IBM437\\nx");
f_str4 = true;
return m_str4;
}
8 changes: 4 additions & 4 deletions compiled/cpp_stl_98/str_encodings_escaping_enc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ std::string str_encodings_escaping_enc_t::str1_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "ASCII\\x");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "ASCII\\\\x");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down Expand Up @@ -138,7 +138,7 @@ std::string str_encodings_escaping_enc_t::str2_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "UTF-8\'x");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "UTF-8\\'x");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down Expand Up @@ -174,7 +174,7 @@ std::string str_encodings_escaping_enc_t::str3_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "SJIS\"x");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "SJIS\\\"x");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down Expand Up @@ -210,7 +210,7 @@ std::string str_encodings_escaping_enc_t::str4_wrapper_t::v() {
return m_v;
std::streampos _pos = m__io->pos();
m__io->seek(0);
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "IBM437\nx");
m_v = kaitai::kstream::bytes_to_str(m__io->read_bytes_full(), "IBM437\\nx");
m__io->seek(_pos);
f_v = true;
return m_v;
Expand Down
8 changes: 4 additions & 4 deletions compiled/cpp_stl_98/str_encodings_escaping_to_s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ void str_encodings_escaping_to_s_t::_clean_up() {
std::string str_encodings_escaping_to_s_t::str1() {
if (f_str1)
return m_str1;
m_str1 = kaitai::kstream::bytes_to_str(str1_raw(), "ASCII\\x");
m_str1 = kaitai::kstream::bytes_to_str(str1_raw(), "ASCII\\\\x");
f_str1 = true;
return m_str1;
}

std::string str_encodings_escaping_to_s_t::str2() {
if (f_str2)
return m_str2;
m_str2 = kaitai::kstream::bytes_to_str(str2_raw(), "UTF-8\'x");
m_str2 = kaitai::kstream::bytes_to_str(str2_raw(), "UTF-8\\'x");
f_str2 = true;
return m_str2;
}

std::string str_encodings_escaping_to_s_t::str3() {
if (f_str3)
return m_str3;
m_str3 = kaitai::kstream::bytes_to_str(str3_raw(), "SJIS\"x");
m_str3 = kaitai::kstream::bytes_to_str(str3_raw(), "SJIS\\\"x");
f_str3 = true;
return m_str3;
}

std::string str_encodings_escaping_to_s_t::str4() {
if (f_str4)
return m_str4;
m_str4 = kaitai::kstream::bytes_to_str(str4_raw(), "IBM437\nx");
m_str4 = kaitai::kstream::bytes_to_str(str4_raw(), "IBM437\\nx");
f_str4 = true;
return m_str4;
}
8 changes: 4 additions & 4 deletions compiled/csharp/StrEncodingsEscapingEnc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public string V
return _v;
long _pos = m_io.Pos;
m_io.Seek(0);
_v = System.Text.Encoding.GetEncoding("ASCII\\x").GetString(m_io.ReadBytesFull());
_v = System.Text.Encoding.GetEncoding("ASCII\\\\x").GetString(m_io.ReadBytesFull());
m_io.Seek(_pos);
f_v = true;
return _v;
Expand Down Expand Up @@ -101,7 +101,7 @@ public string V
return _v;
long _pos = m_io.Pos;
m_io.Seek(0);
_v = System.Text.Encoding.GetEncoding("UTF-8\'x").GetString(m_io.ReadBytesFull());
_v = System.Text.Encoding.GetEncoding("UTF-8\\'x").GetString(m_io.ReadBytesFull());
m_io.Seek(_pos);
f_v = true;
return _v;
Expand Down Expand Up @@ -139,7 +139,7 @@ public string V
return _v;
long _pos = m_io.Pos;
m_io.Seek(0);
_v = System.Text.Encoding.GetEncoding("SJIS\"x").GetString(m_io.ReadBytesFull());
_v = System.Text.Encoding.GetEncoding("SJIS\\\"x").GetString(m_io.ReadBytesFull());
m_io.Seek(_pos);
f_v = true;
return _v;
Expand Down Expand Up @@ -177,7 +177,7 @@ public string V
return _v;
long _pos = m_io.Pos;
m_io.Seek(0);
_v = System.Text.Encoding.GetEncoding("IBM437\nx").GetString(m_io.ReadBytesFull());
_v = System.Text.Encoding.GetEncoding("IBM437\\nx").GetString(m_io.ReadBytesFull());
m_io.Seek(_pos);
f_v = true;
return _v;
Expand Down
8 changes: 4 additions & 4 deletions compiled/csharp/StrEncodingsEscapingToS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public string Str1
{
if (f_str1)
return _str1;
_str1 = (string) (System.Text.Encoding.GetEncoding("ASCII\\x").GetString(Str1Raw));
_str1 = (string) (System.Text.Encoding.GetEncoding("ASCII\\\\x").GetString(Str1Raw));
f_str1 = true;
return _str1;
}
Expand All @@ -53,7 +53,7 @@ public string Str2
{
if (f_str2)
return _str2;
_str2 = (string) (System.Text.Encoding.GetEncoding("UTF-8\'x").GetString(Str2Raw));
_str2 = (string) (System.Text.Encoding.GetEncoding("UTF-8\\'x").GetString(Str2Raw));
f_str2 = true;
return _str2;
}
Expand All @@ -66,7 +66,7 @@ public string Str3
{
if (f_str3)
return _str3;
_str3 = (string) (System.Text.Encoding.GetEncoding("SJIS\"x").GetString(Str3Raw));
_str3 = (string) (System.Text.Encoding.GetEncoding("SJIS\\\"x").GetString(Str3Raw));
f_str3 = true;
return _str3;
}
Expand All @@ -79,7 +79,7 @@ public string Str4
{
if (f_str4)
return _str4;
_str4 = (string) (System.Text.Encoding.GetEncoding("IBM437\nx").GetString(Str4Raw));
_str4 = (string) (System.Text.Encoding.GetEncoding("IBM437\\nx").GetString(Str4Raw));
f_str4 = true;
return _str4;
}
Expand Down
6 changes: 3 additions & 3 deletions compiled/go/src/test_formats/bcd_user_type_be.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions compiled/go/src/test_formats/bcd_user_type_le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/go/src/test_formats/enum_to_i.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/go/src/test_formats/enum_to_i_invalid.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/go/src/test_formats/expr_ops_parens.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/go/src/test_formats/switch_integers2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions compiled/graphviz/str_encodings_escaping_to_s.dot
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ digraph {
</TABLE>>];
str_encodings_escaping_to_s__inst__str1 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
<TR><TD>str1</TD><TD>(str1_raw).force_encoding(&quot;ASCII\\x&quot;).encode('UTF-8')</TD></TR>
<TR><TD>str1</TD><TD>(str1_raw).force_encoding(&quot;ASCII\\\\x&quot;).encode('UTF-8')</TD></TR>
</TABLE>>];
str_encodings_escaping_to_s__inst__str2 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
<TR><TD>str2</TD><TD>(str2_raw).force_encoding(&quot;UTF-8\'x&quot;).encode('UTF-8')</TD></TR>
<TR><TD>str2</TD><TD>(str2_raw).force_encoding(&quot;UTF-8\\'x&quot;).encode('UTF-8')</TD></TR>
</TABLE>>];
str_encodings_escaping_to_s__inst__str3 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
<TR><TD>str3</TD><TD>(str3_raw).force_encoding(&quot;SJIS\&quot;x&quot;).encode('UTF-8')</TD></TR>
<TR><TD>str3</TD><TD>(str3_raw).force_encoding(&quot;SJIS\\\&quot;x&quot;).encode('UTF-8')</TD></TR>
</TABLE>>];
str_encodings_escaping_to_s__inst__str4 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
<TR><TD>str4</TD><TD>(str4_raw).force_encoding(&quot;IBM437\nx&quot;).encode('UTF-8')</TD></TR>
<TR><TD>str4</TD><TD>(str4_raw).force_encoding(&quot;IBM437\\nx&quot;).encode('UTF-8')</TD></TR>
</TABLE>>];
}
str_encodings_escaping_to_s__seq:len_of_1_type -> str_encodings_escaping_to_s__seq:str1_raw_size [color="#404040"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public String v() {
return this.v;
long _pos = this._io.pos();
this._io.seek(0);
this.v = new String(this._io.readBytesFull(), Charset.forName("ASCII\\x"));
this.v = new String(this._io.readBytesFull(), Charset.forName("ASCII\\\\x"));
this._io.seek(_pos);
return this.v;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ public String v() {
return this.v;
long _pos = this._io.pos();
this._io.seek(0);
this.v = new String(this._io.readBytesFull(), Charset.forName("UTF-8\'x"));
this.v = new String(this._io.readBytesFull(), Charset.forName("UTF-8\\'x"));
this._io.seek(_pos);
return this.v;
}
Expand Down Expand Up @@ -140,7 +140,7 @@ public String v() {
return this.v;
long _pos = this._io.pos();
this._io.seek(0);
this.v = new String(this._io.readBytesFull(), Charset.forName("SJIS\"x"));
this.v = new String(this._io.readBytesFull(), Charset.forName("SJIS\\\"x"));
this._io.seek(_pos);
return this.v;
}
Expand Down Expand Up @@ -176,7 +176,7 @@ public String v() {
return this.v;
long _pos = this._io.pos();
this._io.seek(0);
this.v = new String(this._io.readBytesFull(), Charset.forName("IBM437\nx"));
this.v = new String(this._io.readBytesFull(), Charset.forName("IBM437\\nx"));
this._io.seek(_pos);
return this.v;
}
Expand Down
Loading

0 comments on commit 14032a7

Please sign in to comment.