summaryrefslogtreecommitdiff log msg author committer range
path: root/xsd/cxx/parser/parser-source.cxx
diff options
 context: 12345678910152025303540 space: includeignore mode: unifiedssdiffstat only
Diffstat (limited to 'xsd/cxx/parser/parser-source.cxx')
-rw-r--r--xsd/cxx/parser/parser-source.cxx48
1 files changed, 31 insertions, 17 deletions
 diff --git a/xsd/cxx/parser/parser-source.cxx b/xsd/cxx/parser/parser-source.cxxindex 81ea9cb..59ddaba 100644--- a/xsd/cxx/parser/parser-source.cxx+++ b/xsd/cxx/parser/parser-source.cxx@@ -290,8 +290,6 @@ namespace CXX Boolean poly (polymorphic && !anonymous (e.type ())); - String const& inst (poly ? emember_cache (e) : emember (e));- os << "if ("; if (poly && e.global_p ())@@ -321,9 +319,12 @@ namespace CXX os << ")" << "{"; + String inst;+ if (poly) { SemanticGraph::Type& t (e.type ());+ inst = "p"; // For pre-computing length. //@@ -339,8 +340,10 @@ namespace CXX String const& member (emember (e)); String const& member_map (emember_map (e)); - os << "if (t == 0 && this->" << member << " != 0)" << endl- << "this->" << inst << " = this->" << member << ";"+ os << fq_type << "* p = 0;"+ << endl+ << "if (t == 0 && this->" << member << " != 0)" << endl+ << inst << " = this->" << member << ";" << "else" << "{" << string_type << " ts (" << fq_type <<@@ -350,21 +353,21 @@ namespace CXX << "t = &ts;" << endl << "if (this->" << member << " != 0 && *t == ts)" << endl- << "this->" << inst << " = this->" << member << ";"+ << inst << " = this->" << member << ";" << "else if (this->" << member_map << " != 0)" << endl- << "this->" << inst << " = dynamic_cast< " << fq_type <<+ << inst << " = dynamic_cast< " << fq_type << "* > (" << endl << "this->" << member_map << "->find (*t));"- << "else" << endl- << "this->" << inst << " = 0;" << "}"; }+ else+ inst = L"this->" + emember (e); os << "this->" << complex_base << "::context_.top ().parser_ = " <<- "this->" << inst << ";"+ inst << ";" << endl- << "if (this->" << inst << ")" << endl- << "this->" << inst << "->pre ();" // _start_element calls _pre+ << "if (" << inst << ")" << endl+ << inst << "->pre ();" // _start_element calls _pre << endl << "return true;" << "}";@@ -388,9 +391,7 @@ namespace CXX return; Boolean poly (polymorphic && !anonymous (e.type ()));- String const& name (ename (e));- String const& inst (poly ? emember_cache (e) : emember (e)); os << "if ("; @@ -426,18 +427,31 @@ namespace CXX SemanticGraph::Type& type (e.type ()); String const& post (post_name (type));+ String inst;++ if (poly)+ {+ String const& fq_type (fq_name (type));+ inst = "p";++ os << fq_type << "* p =" << endl+ << "static_cast< " << fq_type << "* > (" << endl+ << "this->" << complex_base << "::context_.top ().parser_);"+ << endl;+ }+ else+ inst = L"this->" + emember (e); - os << "if (this->" << inst << ")";+ os << "if (" << inst << ")"; if (ret_type (type) == L"void") os << "{"- << "this->" << inst << "->" << post << " ();"+ << inst << "->" << post << " ();" << "this->" << name << " ();" << "}"; else os << endl- << "this->" << name << " (this->" << inst << "->" <<- post << " ());"+ << "this->" << name << " (" << inst << "->" << post << " ());" << endl; os << "return true;"
{"ft_lang_label":"__label__en","ft_lang_prob":0.5980945,"math_prob":0.8815774,"size":3055,"snap":"2022-27-2022-33","text_gpt3_token_len":1039,"char_repetition_ratio":0.22779417,"word_repetition_ratio":0.3472454,"special_character_ratio":0.5417349,"punctuation_ratio":0.21875,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99991417,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-26T10:16:52Z\",\"WARC-Record-ID\":\"<urn:uuid:47ec2811-5a81-43f5-8f52-eaf3e8dbd335>\",\"Content-Length\":\"13579\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:45c7eae7-f754-4c48-964c-642db6e0670a>\",\"WARC-Concurrent-To\":\"<urn:uuid:37ae9294-648e-449e-ac32-9769ba8e82ce>\",\"WARC-IP-Address\":\"188.40.148.39\",\"WARC-Target-URI\":\"https://git.codesynthesis.com/cgit/xsd/xsd/diff/xsd/cxx/parser/parser-source.cxx?id=d4a78b31a1a045471c2fe12d2618d9d5edf78fb2\",\"WARC-Payload-Digest\":\"sha1:TPHW6T4OBCY73IY7NULDYICBWHHXREXW\",\"WARC-Block-Digest\":\"sha1:XJGG4HLFES5VMQBCZOYAGUUYLO5CI77F\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103205617.12_warc_CC-MAIN-20220626101442-20220626131442-00374.warc.gz\"}"}