-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regen master kaitai-io/kaitai_struct@6c384d0
- Loading branch information
1 parent
c8f8a3a
commit 74bebbc
Showing
17 changed files
with
1,448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
expr_fstring_0 = Struct( | ||
'seq_str' / FixedSized(5, GreedyString(encoding='ASCII')), | ||
'seq_int' / Int8ub, | ||
'empty' / Computed(lambda this: u""), | ||
'head_and_int' / Computed(lambda this: u"abc=" + str(this.seq_int)), | ||
'head_and_int_literal' / Computed(lambda this: u"abc=" + str(123)), | ||
'head_and_str' / Computed(lambda this: u"abc=" + this.seq_str), | ||
'head_and_str_literal' / Computed(lambda this: u"abc=" + u"foo"), | ||
'literal' / Computed(lambda this: u"abc"), | ||
'literal_with_escapes' / Computed(lambda this: u"abc\n\tt"), | ||
) | ||
|
||
_schema = expr_fstring_0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "expr_fstring_0.h" | ||
|
||
expr_fstring_0_t::expr_fstring_0_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, expr_fstring_0_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
f_empty = false; | ||
f_head_and_int = false; | ||
f_head_and_int_literal = false; | ||
f_head_and_str = false; | ||
f_head_and_str_literal = false; | ||
f_literal = false; | ||
f_literal_with_escapes = false; | ||
_read(); | ||
} | ||
|
||
void expr_fstring_0_t::_read() { | ||
m_seq_str = kaitai::kstream::bytes_to_str(m__io->read_bytes(5), "ASCII"); | ||
m_seq_int = m__io->read_u1(); | ||
} | ||
|
||
expr_fstring_0_t::~expr_fstring_0_t() { | ||
_clean_up(); | ||
} | ||
|
||
void expr_fstring_0_t::_clean_up() { | ||
} | ||
|
||
std::string expr_fstring_0_t::empty() { | ||
if (f_empty) | ||
return m_empty; | ||
m_empty = std::string(""); | ||
f_empty = true; | ||
return m_empty; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_int() { | ||
if (f_head_and_int) | ||
return m_head_and_int; | ||
m_head_and_int = std::string("abc=") + kaitai::kstream::to_string(seq_int()); | ||
f_head_and_int = true; | ||
return m_head_and_int; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_int_literal() { | ||
if (f_head_and_int_literal) | ||
return m_head_and_int_literal; | ||
m_head_and_int_literal = std::string("abc=") + kaitai::kstream::to_string(123); | ||
f_head_and_int_literal = true; | ||
return m_head_and_int_literal; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_str() { | ||
if (f_head_and_str) | ||
return m_head_and_str; | ||
m_head_and_str = std::string("abc=") + seq_str(); | ||
f_head_and_str = true; | ||
return m_head_and_str; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_str_literal() { | ||
if (f_head_and_str_literal) | ||
return m_head_and_str_literal; | ||
m_head_and_str_literal = std::string("abc=") + std::string("foo"); | ||
f_head_and_str_literal = true; | ||
return m_head_and_str_literal; | ||
} | ||
|
||
std::string expr_fstring_0_t::literal() { | ||
if (f_literal) | ||
return m_literal; | ||
m_literal = std::string("abc"); | ||
f_literal = true; | ||
return m_literal; | ||
} | ||
|
||
std::string expr_fstring_0_t::literal_with_escapes() { | ||
if (f_literal_with_escapes) | ||
return m_literal_with_escapes; | ||
m_literal_with_escapes = std::string("abc\n\tt"); | ||
f_literal_with_escapes = true; | ||
return m_literal_with_escapes; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#pragma once | ||
|
||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "kaitai/kaitaistruct.h" | ||
#include <stdint.h> | ||
#include <memory> | ||
|
||
#if KAITAI_STRUCT_VERSION < 11000L | ||
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required" | ||
#endif | ||
|
||
class expr_fstring_0_t : public kaitai::kstruct { | ||
|
||
public: | ||
|
||
expr_fstring_0_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, expr_fstring_0_t* p__root = nullptr); | ||
|
||
private: | ||
void _read(); | ||
void _clean_up(); | ||
|
||
public: | ||
~expr_fstring_0_t(); | ||
|
||
private: | ||
bool f_empty; | ||
std::string m_empty; | ||
|
||
public: | ||
std::string empty(); | ||
|
||
private: | ||
bool f_head_and_int; | ||
std::string m_head_and_int; | ||
|
||
public: | ||
std::string head_and_int(); | ||
|
||
private: | ||
bool f_head_and_int_literal; | ||
std::string m_head_and_int_literal; | ||
|
||
public: | ||
std::string head_and_int_literal(); | ||
|
||
private: | ||
bool f_head_and_str; | ||
std::string m_head_and_str; | ||
|
||
public: | ||
std::string head_and_str(); | ||
|
||
private: | ||
bool f_head_and_str_literal; | ||
std::string m_head_and_str_literal; | ||
|
||
public: | ||
std::string head_and_str_literal(); | ||
|
||
private: | ||
bool f_literal; | ||
std::string m_literal; | ||
|
||
public: | ||
std::string literal(); | ||
|
||
private: | ||
bool f_literal_with_escapes; | ||
std::string m_literal_with_escapes; | ||
|
||
public: | ||
std::string literal_with_escapes(); | ||
|
||
private: | ||
std::string m_seq_str; | ||
uint8_t m_seq_int; | ||
expr_fstring_0_t* m__root; | ||
kaitai::kstruct* m__parent; | ||
|
||
public: | ||
std::string seq_str() const { return m_seq_str; } | ||
uint8_t seq_int() const { return m_seq_int; } | ||
expr_fstring_0_t* _root() const { return m__root; } | ||
kaitai::kstruct* _parent() const { return m__parent; } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "expr_fstring_0.h" | ||
|
||
expr_fstring_0_t::expr_fstring_0_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, expr_fstring_0_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
f_empty = false; | ||
f_head_and_int = false; | ||
f_head_and_int_literal = false; | ||
f_head_and_str = false; | ||
f_head_and_str_literal = false; | ||
f_literal = false; | ||
f_literal_with_escapes = false; | ||
|
||
try { | ||
_read(); | ||
} catch(...) { | ||
_clean_up(); | ||
throw; | ||
} | ||
} | ||
|
||
void expr_fstring_0_t::_read() { | ||
m_seq_str = kaitai::kstream::bytes_to_str(m__io->read_bytes(5), "ASCII"); | ||
m_seq_int = m__io->read_u1(); | ||
} | ||
|
||
expr_fstring_0_t::~expr_fstring_0_t() { | ||
_clean_up(); | ||
} | ||
|
||
void expr_fstring_0_t::_clean_up() { | ||
} | ||
|
||
std::string expr_fstring_0_t::empty() { | ||
if (f_empty) | ||
return m_empty; | ||
m_empty = std::string(""); | ||
f_empty = true; | ||
return m_empty; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_int() { | ||
if (f_head_and_int) | ||
return m_head_and_int; | ||
m_head_and_int = std::string("abc=") + kaitai::kstream::to_string(seq_int()); | ||
f_head_and_int = true; | ||
return m_head_and_int; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_int_literal() { | ||
if (f_head_and_int_literal) | ||
return m_head_and_int_literal; | ||
m_head_and_int_literal = std::string("abc=") + kaitai::kstream::to_string(123); | ||
f_head_and_int_literal = true; | ||
return m_head_and_int_literal; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_str() { | ||
if (f_head_and_str) | ||
return m_head_and_str; | ||
m_head_and_str = std::string("abc=") + seq_str(); | ||
f_head_and_str = true; | ||
return m_head_and_str; | ||
} | ||
|
||
std::string expr_fstring_0_t::head_and_str_literal() { | ||
if (f_head_and_str_literal) | ||
return m_head_and_str_literal; | ||
m_head_and_str_literal = std::string("abc=") + std::string("foo"); | ||
f_head_and_str_literal = true; | ||
return m_head_and_str_literal; | ||
} | ||
|
||
std::string expr_fstring_0_t::literal() { | ||
if (f_literal) | ||
return m_literal; | ||
m_literal = std::string("abc"); | ||
f_literal = true; | ||
return m_literal; | ||
} | ||
|
||
std::string expr_fstring_0_t::literal_with_escapes() { | ||
if (f_literal_with_escapes) | ||
return m_literal_with_escapes; | ||
m_literal_with_escapes = std::string("abc\n\tt"); | ||
f_literal_with_escapes = true; | ||
return m_literal_with_escapes; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#ifndef EXPR_FSTRING_0_H_ | ||
#define EXPR_FSTRING_0_H_ | ||
|
||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "kaitai/kaitaistruct.h" | ||
#include <stdint.h> | ||
|
||
#if KAITAI_STRUCT_VERSION < 11000L | ||
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required" | ||
#endif | ||
|
||
class expr_fstring_0_t : public kaitai::kstruct { | ||
|
||
public: | ||
|
||
expr_fstring_0_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = 0, expr_fstring_0_t* p__root = 0); | ||
|
||
private: | ||
void _read(); | ||
void _clean_up(); | ||
|
||
public: | ||
~expr_fstring_0_t(); | ||
|
||
private: | ||
bool f_empty; | ||
std::string m_empty; | ||
|
||
public: | ||
std::string empty(); | ||
|
||
private: | ||
bool f_head_and_int; | ||
std::string m_head_and_int; | ||
|
||
public: | ||
std::string head_and_int(); | ||
|
||
private: | ||
bool f_head_and_int_literal; | ||
std::string m_head_and_int_literal; | ||
|
||
public: | ||
std::string head_and_int_literal(); | ||
|
||
private: | ||
bool f_head_and_str; | ||
std::string m_head_and_str; | ||
|
||
public: | ||
std::string head_and_str(); | ||
|
||
private: | ||
bool f_head_and_str_literal; | ||
std::string m_head_and_str_literal; | ||
|
||
public: | ||
std::string head_and_str_literal(); | ||
|
||
private: | ||
bool f_literal; | ||
std::string m_literal; | ||
|
||
public: | ||
std::string literal(); | ||
|
||
private: | ||
bool f_literal_with_escapes; | ||
std::string m_literal_with_escapes; | ||
|
||
public: | ||
std::string literal_with_escapes(); | ||
|
||
private: | ||
std::string m_seq_str; | ||
uint8_t m_seq_int; | ||
expr_fstring_0_t* m__root; | ||
kaitai::kstruct* m__parent; | ||
|
||
public: | ||
std::string seq_str() const { return m_seq_str; } | ||
uint8_t seq_int() const { return m_seq_int; } | ||
expr_fstring_0_t* _root() const { return m__root; } | ||
kaitai::kstruct* _parent() const { return m__parent; } | ||
}; | ||
|
||
#endif // EXPR_FSTRING_0_H_ |
Oops, something went wrong.