From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Encaspulation: What to export Date: Mon, 27 Nov 2017 20:12:26 -0600 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Tue, 28 Nov 2017 02:12:26 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="15942"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:49212 Date: 2017-11-27T20:12:26-06:00 List-Id: "Victor Porton" wrote in message news:ovhst9$1a43$1@gioia.aioe.org... ... > I parse not a string but an RDF tree. It is similar to convert AST > (abstract > syntax tree) to another format. RDF is similar to an AST but more > abstract. > > So it is NOT a deserialization operation in Ada sense. Calling the operation of creating an RDF (or XML or HTML or SGML ...) tree from "parsing" is a gross distortion from what really is going on. As Dmitry says, it is much more a deserialization operation, since you don't need any sort of traditional parser to implement it. You just need text operations (lexical analysis) and a stack of pending tree nodes (both of which are needed even if you had used a traditional parser anyway). In general, any "language" where the node types are immediately determined (as in all of the above, the prefix determines the type of node) does not need parsing, because there are never any situations where the choice of what to do has to be deferred. Randy.