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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4a07e5fd38e94bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Tentative design of markdown parser Date: Sat, 28 May 2011 16:40:53 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: 0wEclEfVa5yTOGBZFIm9ZQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.01 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19535 Date: 2011-05-28T16:40:53+02:00 List-Id: Le Sat, 28 May 2011 15:22:17 +0200, Natasha Kerensikova = a =C3=A9crit: > type Element_Priority is delta 2.0**(-15) range 0.0 .. 1.0; > > type Span_Element is record > Active_Char : Character; > Priority : Element_Priority; > Lexer : Lexer_Callback; > Renderer : Renderer_Callback); I've the Rationals part which I may read later, and did not already = searched the web for what Markdown is, so I may missed some point. What is Element_Priority ? A kind of Order-of-precedence ? Span_Element is a structure, with no constructor ? What returns = instance(s) of Span_Element ? > type Lexer_Callback is access procedure ( > Source : String; > Position : in out Positive; > Renderer: Render_Callback); Lexer_Callback get a parameter of type String, but nowhere I can see a = structure holding a type String. Seems the interface does not show all t= he = relations between all the stuffs. Position is in/out, so something should hold at least a corresponding = element of the same type Positive, which would be mutable. I could not s= ee = such a thing. Same as the above comment, I feel the interface does not = show some relations which are supposed to be =E2=80=9Cguessed=E2=80=9D. Sorry if my questions seems stupid, as I suppose everything looks very = clear in your own mind. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [Ep= igrams on = Programming =E2=80=94 Alan J. =E2=80=94 P. Yale University] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [Idem] =E2=80=9Cc++; /* this makes c bigger but returns the old value */=E2=80=9D= [Anonymous]