🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #34

WANTED: Lex and Yacc for Modula-2

#34
From: Tim Channon
Date: Wed, 05 Aug 1992 00:08
31 lines
1916 bytes
>I am looking for a LEX and YACC tool, which generates MODULA-2 code.  Does
>anyone know if such a tool exists and where to get it?
>
One set is COCO, COCO2, COCO/R and ALEX.

I have worked mainly with COCO2. This takes an attributed grammar as input 
and produces M2 source as output, generating both lexical and sematic 
modules. (lex and yacc in one)

Unfortunately I have failed to get adequate results. This is probably more  
of a reflection on my middle age than inadequate tools but it would help if 
at least one major example of a complete application was available.

A lot of my time (when I was working with the above) was spent fighting other 
peoples hacks of the original source. For instance, COCO2 reads the whole 
source into memory and on an Intel machine you can guess... there is also a 
terrible kludge on memory/pointer math as well as an apparent 
misunderstanding about the difference between an integer and an address...

It can (with some extra work) compile itself. This is tricky when some 
porting work is needed, definitly mind bending.

COCO/R (recursive decent) is a little different and  the  documentation  says 
that it produced a good Oberon compiler from ATG. Unfortunately the disk with 
this source was supplied quite blank so I have not been able to examine it.

I guess that the original was ok. Documentation is very minimal.

  TC. 
    E-mail: tchannon@black.demon.co.uk or tchannon@cix.compulink.co.uk
                                
Technical Details
Message-ID: <712986364snx@black.demon.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!black.demon.co.uk!tchannon
References: <1992Aug3.152334.9817@waikato.ac.nz>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
From: tchannon@black.demon.co.uk (Tim Channon)
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!black.demon.co.uk!tchannon
Subject: WANTED: Lex and Yacc for Modula-2 
Distribution: world
References: <1992Aug3.152334.9817@waikato.ac.nz>
Organization: null
Lines: 31
Date: Wed, 5 Aug 1992 00:08:45 +0000
Message-ID: <712986364snx@black.demon.co.uk>
Sender: usenet@gate.demon.co.uk