<div dir="auto">Pushing CPPON (C++ Object Notation) as an X3D encoding and a X3D binding will provide pushback against the Python/C++ wave of OpenUSD-PEGTL (the new grammar language for .usda, apparently, but where is the grammar ?). Since my C++ grammar is written in ANTLR4, it can use the same grammar for many languages, not just a C++ target. Plus ANTLR4 already works with NetBeans. ANTLR4 can produce parsers frameworks in JavaScript, which is suitable for web; Swift, which is suitable for Apple development, Java, which works well with X3DJSAIL and Android, C#, which is suitable for Microsoft development, Go for Google development, PHP for web development, and Python 2 and 3 if we want to add a C++ X3D encoding Blender importer. Sorry, no Kotlin or Clojure parsers yet.</div><div dir="auto"><br></div><div dir="auto">My grammar is available now, and parses function bodies in a limited form of C++, which I call CPPON. There aren’t control structures, so it’s not Turing complete, is as free from viruses as XML and JSON. Since CPPON can be read into XML DOM, CPPON can be thought of as a document language, just like JSON, HTML and XML. Perhaps one can even stream it! In addition, one can just #include it in a C++ function or method!</div><div dir="auto"><br></div><div dir="auto">I can also do a Java Object Notation. I’ve already demonstrated XML to Java Object array and back. Easy peasy! I just don’t have a grammar for it yet!</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Dec 15, 2024 at 9:56 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">If people want to experiment with C++ generation from DOM and JSON, my personal examples are here:</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/coderextreme/CPPON/tree/main" target="_blank">https://github.com/coderextreme/CPPON/tree/main</a></div><br></div><div dir="auto"><br></div><div dir="auto">This will give you some idea about the current C++ SAI (I haven’t tried it for 9 months though).</div><div dir="auto"><br></div><div dir="auto">Note that these do not include a renderer yet, as I parse C++ to produce DOM, which can be used in X3DJSAIL.</div><div dir="auto"><br></div><div dir="auto">The JSON to C++ is written in Node.js and may be suitable inclusion in other JavaScript tools.</div><div dir="auto"><br></div><div dir="auto">If there’s enough demand, I should be able to create a C++ to DOM parser in JavaScript, if ANTLR4 produces JavaScript parser generators.</div><div dir="auto"><br></div><div dir="auto">That would mean that C++ could be used as an X3D encoding in X3DOM, X_ITE and Sunrize.</div>
</blockquote></div></div>