comp.lang.ada
 help / color / mirror / Atom feed
From: Yves Cloutier <yves.cloutier@gmail.com>
Subject: Re: Writing a scanner and parser in Ada
Date: Mon, 25 Dec 2017 10:57:15 -0800 (PST)
Date: 2017-12-25T10:57:15-08:00	[thread overview]
Message-ID: <2c3f6378-1ec4-4128-ad61-a3bcdde49614@googlegroups.com> (raw)
In-Reply-To: <p1rbaj$1241$1@gioia.aioe.org>

On Monday, December 25, 2017 at 12:08:38 PM UTC-5, Dmitry A. Kazakov wrote:
> On 2017-12-25 17:35, Yves Cloutier wrote:
> 
> > Yes my Perl version does all that in 1 pass, but one of the things I
> > want to do is have it generate for different targets. Groff was my
> > initial one. I wan't creating any kind of AST but I think I'll want to
> > do that in my rewrite to make things simpler and allow for generating
> > for other targets like maybe Latex, or epub etc...
> 
> You don't need AST for that. Simply define code generator interface 
> (tagged) with abstract operations generating pieces of code. For each 
> target have a derived type implementing these operations. Pass a 
> class-wide Target object as a parameter to the parser. If the actual is 
> of Groff_Target the result is groff etc.
> 
> -- 
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de

haha I'm quite new to Ada so most of what you just explained I don't quite understand.  But will get there. Baby steps.

I see that you created a SNOBOL-like pattern matcher.  This looks really useful for processing text.


  reply	other threads:[~2017-12-25 18:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24  1:15 Writing a scanner and parser in Ada Yves Cloutier
2017-12-24  4:07 ` Robert Eachus
2017-12-25 16:32   ` Yves Cloutier
2017-12-24  9:08 ` Dmitry A. Kazakov
2017-12-24 15:09   ` Niklas Holsti
2017-12-25 16:37     ` Yves Cloutier
2017-12-25 16:35   ` Yves Cloutier
2017-12-25 17:08     ` Dmitry A. Kazakov
2017-12-25 18:57       ` Yves Cloutier [this message]
2017-12-25 19:19         ` Dmitry A. Kazakov
2017-12-26 18:06           ` Shark8
2017-12-26 21:45             ` Dmitry A. Kazakov
2017-12-26 22:20             ` Dmitry A. Kazakov
2017-12-24 14:40 ` Tero Koskinen
2017-12-25 16:36   ` Yves Cloutier
2017-12-24 15:33 ` Lucretia
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox