Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1865

Re: Parsing partial sentences

From rugxulo@gmail.com
Newsgroups comp.compilers
Subject Re: Parsing partial sentences
Date 2017-04-28 16:32 -0700
Organization Compilers Central
Message-ID <17-04-026@comp.compilers> (permalink)
References <17-04-001@comp.compilers> <17-04-023@comp.compilers> <17-04-024@comp.compilers>

Show all headers | View raw


Hi,

On Thursday, April 27, 2017 at 8:15:18 PM UTC-5, Kaz Kylheku wrote:
>
> If we allow Pascal to be extended with a macro preprocessor,
>
> I believe I could design a system for translating C to Pascal which
> handles some macros, translating them to Pascal macros.  Even some
> macros that "break" syntactic boundaries, such as "list_for_each (var,
> list) { block }".

Doug Comer wrote MAP (macro preprocessor) in 1978-9 for CDC Pascal.
(Pascal Users Group [PUG], Pascal News #17, March 1980, pages 30..40)

Free Pascal already has a preprocessor (and simple macros):
http://www.freepascal.org/docs-html/prog/progch2.html#progse4.html

> I don't believe such a project has any value beyond getting
> a pat on the back from another developer; I wouldn't spend any
> time on such a thing.

Well, in fairness, regarding your posts in comp.lang.misc three
years ago ("Wirth-ian languages"), you don't seem sympathetic
overall. I do think you underestimate their continued relevance.

> The end result might well be rejected by some
> Pascal users, due to requiring the extended dialect, whether on
> ideological grounds,

In fairness, with so many Pascal compilers and dialects and deviances
from the standards, I think most "Pascal" users are already
accustomed to various quirks.

> or on practical issues with tooling (being able to get the
> preprocessor running in a given Pascal development environment).

Keep in mind that several Pascal-to-C converters already exist (of
varying quality). It might be wiser to look at what's already been
done. I can find at least three. (Not quite the reverse but similar.)

Not sure what you mean about tooling, but FPC is quite portable, so
that isn't the main problem here.

I don't wish to discourage the OP. Certainly it's not an easy task.
Here's yet another document I stumbled upon years ago that may help:

http://www.knosof.co.uk/ctop.ps

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-03 09:57 +0200
  Re: Parsing partial sentences Fernando <pronesto@gmail.com> - 2017-04-04 06:05 -0700
    Re: Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-07 11:16 -0400
      Re: Parsing partial sentences George Neuner <gneuner2@comcast.net> - 2017-04-07 12:59 -0400
        Re: Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-07 22:24 +0200
          Re: Parsing partial sentences George Neuner <gneuner2@comcast.net> - 2017-04-10 20:22 -0400
            Re: Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-11 10:31 +0200
              Re: Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-11 19:40 +0200
              Re: Parsing partial sentences George Neuner <gneuner2@comcast.net> - 2017-04-11 23:05 -0400
                Re: Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-12 13:45 +0200
          Re: Parsing partial sentences Martin Ward <martin@gkc.org.uk> - 2017-04-11 10:30 +0100
  Re: Parsing partial sentences Walter Banks <walter@bytecraft.com> - 2017-04-27 10:58 -0400
    Re: Parsing partial sentences Kaz Kylheku <686-678-9105@kylheku.com> - 2017-04-27 19:08 +0000
      Re: Parsing partial sentences rugxulo@gmail.com - 2017-04-28 16:32 -0700
      Re: Parsing partial sentences Marco van de Voort <marcov@toad.stack.nl> - 2017-04-29 14:57 +0000
        Re: Parsing partial sentences Kaz Kylheku <686-678-9105@kylheku.com> - 2017-04-30 16:31 +0000
    Re: Parsing partial sentences Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-04-28 02:48 +0200

csiph-web