🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2910

Re: (no subject)

#2910
From: Dan Eldred
Date: Thu, 19 Oct 1995 21:34
47 lines
2332 bytes
In article <813920938.16452@sinex.demon.co.uk>,
Ross & Mandy  <Ross&Mandy@sinex.demon.co.uk> wrote:
>Does anyone know of a lexical analysis tool that is written in 
>Modula-2 and for Modula-2 code.
>
>Preferrably the source please.
>
>Thanks All
>
>Ross
>
>

I think the following should help, from the FAQ:

4.9 Are there any compiler construction tools available?
A1. Some old ones appear in ftp://ftp.gmd.de/GMD/cocktail/

A2. Coco/R generates recursive descent parsers and their associated
scanners from attribute grammars.  Full source code, and a variety of
simple example applications are supplied in the distribution kits.  The
Modula versions (1.38 is the latest) are available from
ftp://ftp.inf.ethz.ch:/pub/Coco
ftp://ftp.psg.com:/pub/modula-2/coco
ftp://cs.ru.ac.za:/pub/coco
ftp://pluto.fit.qut.edu.au:/pub/coco
There are versions for the MS-DOS compilers (JPI, FST, Logitech,
StonyBrook, Gardens Point), as well as for the Gardens Point Unix
systems.  Ports for the P1 compiler on the Mac, and for Linux and BSD
Mocka should be available soon.  A port by Rolf Schrader for TDI Atari
Modula-2 is now available from
ftp://cs.ru.ac.za:/pub/coco/ATARI136.EXE  in the form of an MS-DOS self-
extracting file.  This may also be unpacked by using the LHA decompressor
on other systems.


BTW cocor has versions for Oberon-?, Modula-2, and C, for multiple platforms.
I find cocor to be particularly easy to use, and unlike yacc the parser
that it generates can be deciphered and modified (that's because it only 
parses LL(1) grammers, which are simple to analyse).  The M-2 version
of cocor comes in a self-extracting archive for DOS, but I imagine that
it would run on other Modula-2 systems minimal massaging.  In case you
are curious, I am experimenting with cocor to develop a translator 
for a special purpose research language (with constructs for autonomous 
spacecraft control) to C.

	- Dan Eldred
Technical Details
Message-ID: <466g8n$6v6@rrunner.jpl.nasa.gov>
Path: arc1-ca.pugleaf.net!elroy.jpl.nasa.gov!llyene!nobody
References: <813920938.16452@sinex.demon.co.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!elroy.jpl.nasa.gov!llyene!nobody
From: eldred@rrunner.jpl.nasa.gov (Dan Eldred)
Subject: Re: (no subject)
Message-ID: <466g8n$6v6@rrunner.jpl.nasa.gov>
Sender: news@llyene.jpl.nasa.gov
Organization: Jet Propulsion Laboratory, Pasadena, CA
References: <813920938.16452@sinex.demon.co.uk>
Date: Thu, 19 Oct 1995 21:34:15 GMT