Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parser generator

24 views
Skip to first unread message

Dennis Boone

unread,
Jan 6, 2012, 11:30:44 AM1/6/12
to
Folks,

I'm looking for a parser generator that generates output in PL/I.
That is, in the same way that there are variants of yacc that generate
Pascal or Perl or Java, I want "pl1yacc" (or pl1antlr or pl1eli or
... you get the idea.)

Anyone know of such a tool?

Thanks,

De

Peter Flass

unread,
Jan 6, 2012, 2:40:16 PM1/6/12
to
No, I've often thought such a beast would be useful. You might try
asking the Multics people unless someone here knows.

glen herrmannsfeldt

unread,
Jan 6, 2012, 5:08:44 PM1/6/12
to
Dennis Boone <d...@ihatespam.msu.edu> wrote:

> I'm looking for a parser generator that generates output in PL/I.
> That is, in the same way that there are variants of yacc that generate
> Pascal or Perl or Java, I want "pl1yacc" (or pl1antlr or pl1eli or
> ... you get the idea.)

Does it need to be written in PL/I?

It shouldn't be so hard to change yacc to output another language
if you can write a similar construction in the other language,
but yacc itself would still be in C.

Also, it shouldn't be so hard, maybe a little harder, to port
yacc to PL/I but still generate C.

You could also do both.

You might post to the moderated group comp.compilers.

-- glen

Dennis Boone

unread,
Jan 7, 2012, 2:14:36 PM1/7/12
to
> Does it need to be written in PL/I?

No. I just need PL/I output.

> It shouldn't be so hard to change yacc to output another language
> if you can write a similar construction in the other language,
> but yacc itself would still be in C.

I was hoping to avoid translating the base code output by e.g. yacc,
though that's obviously an option.

> Also, it shouldn't be so hard, maybe a little harder, to port
> yacc to PL/I but still generate C.

This isn't really useful to me at this point, though the PL/I
community would doubtless enjoy it.

De

Shmuel Metz

unread,
Jan 7, 2012, 5:46:44 PM1/7/12
to
In <je7rdc$ajt$2...@speranza.aioe.org>, on 01/06/2012
at 10:08 PM, glen herrmannsfeldt <g...@ugcs.caltech.edu> said:

>It shouldn't be so hard to change yacc

Why not Bison?

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spam...@library.lspace.org

glen herrmannsfeldt

unread,
Jan 7, 2012, 9:11:13 PM1/7/12
to
Shmuel (Seymour J.) Metz <spam...@library.lspace.org.invalid> wrote:

(snip, I wrote)
>>It shouldn't be so hard to change yacc

> Why not Bison?

Yes, I probably should have said bison, as that is what most
people would use.

It seems that my Linux system has both, and they are different,
but I don't know how different. The bison man page says it is
upwardly compatible to yacc.

On the other hand, /usr/bin/lex is a link to /usr/bin/flex.

If I remember it right lex/flex generate a big table in the form
of an initialized C array and some constant C code to read the table.

Bison/yacc also generate a table, but some C code, too, along with
some constant C code.

-- glen

Robin Vowels

unread,
Jan 8, 2012, 6:05:36 PM1/8/12
to
Have you looked as XPL?

John Maybury

unread,
Jan 9, 2012, 4:01:07 PM1/9/12
to
Not sure how useful this would be, but there was a parser generator
called DEREMER that ran under PRIMOS on Pr1me machines.
It could generate PL/I source (would probably be PL/P, a small PL/I
subset Pr1me used for systems programming).
I believe Pr1me used it to write some of their compilers. It is named
after F. L. DeRemer, whose work it was based on.
The syntax of the DEREMER source files was yacc like, though not
entirely the same.

There is a Pr1me emulator - see comp.sys.prime - they might have
DEREMER.

Dennis Boone

unread,
Jan 9, 2012, 10:41:32 PM1/9/12
to
> Not sure how useful this would be, but there was a parser generator
> called DEREMER that ran under PRIMOS on Pr1me machines.
> It could generate PL/I source (would probably be PL/P, a small PL/I
> subset Pr1me used for systems programming).
> I believe Pr1me used it to write some of their compilers. It is named
> after F. L. DeRemer, whose work it was based on.
> The syntax of the DEREMER source files was yacc like, though not
> entirely the same.

Now there's a tool not many people know about. Since I'm hoping
to rig this so that other people stand a chance of building the
intended software, I'm not sure DEREMER is the right parser generator.
(Can't you just see the build instructions? "Contact Jim to request
a copy of the emulator, install Primos, find a copy of INDEX, ...")
But I should at least do a test to see how impossible it is to feed
the generated code to a non-Prime PL/I compiler.

You're awful quiet on c.s.p.

De

Peter Flass

unread,
Jan 10, 2012, 7:39:35 AM1/10/12
to
The other thing is that if DEREMER is written in a dialect of PL/I, or
pretty much any HLL, it should be possible to port it without a lot of
trouble. I'm not that familiar with PRIMOS code, but the only real
potential roadblock would be code that made a lot of OS calls for
services rather than relying in the language itself. This is a big
problem with porting Multics code.

Dennis Boone

unread,
Jan 10, 2012, 10:29:49 AM1/10/12
to
> The other thing is that if DEREMER is written in a dialect of PL/I, or
> pretty much any HLL, it should be possible to port it without a lot of
> trouble. I'm not that familiar with PRIMOS code, but the only real
> potential roadblock would be code that made a lot of OS calls for
> services rather than relying in the language itself. This is a big
> problem with porting Multics code.

In fact, PLP completely lacks PL/I input/output constructs. I can't
remember right now if SPL has them or not. But even if it does,
programs written in these languages always use system services instead
for i/o.

But now I want to go look at the DEREMER source to see how bad it
would be. You guys are so helpful with the project list. :)

De
0 new messages