HDTenEightyP/NetNews huggingface dataset:
From: goer@midway.uchicago.edu (Richard L. Goerwitz)
Newsgroups: comp.compilers
Subject: Re: LR(0) vs. LALR, and the Great Parsing War
Keywords: parse, LALR, comment
Date: 2 Sep 92 00:47:47 GMT
Reply-To: goer@midway.uchicago.edu (Richard L. Goerwitz)
Organization: University of Chicago Computing Organizations

Richard L. Goerwitz writes:
>Yes and no.  If this were true, then Tomita's algorithm would have a cubic
>worst-case time factor.  He uses a graph-structured parse forest, though,
>and claims polynomial time.

Exponential time factor, I mean.  Not "cubic"!

-- 

   -Richard L. Goerwitz              goer%midway@uchicago.bitnet
   goer@midway.uchicago.edu          rutgers!oddjob!ellis!goer
[Oops, shoulda caught that. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: CSPT@alpha.ru.ac.za (Pat Terry)
Newsgroups: comp.compilers
Subject: Modula-2 compiler sources
Keywords: modula, question, comment
Date: 26 Aug 92 13:47:27 GMT
Reply-To: CSPT@alpha.ru.ac.za (Pat Terry)
Organization: Compilers Central

In SIGPLAN vol 25(5) May 1990 appears an article by Kenneth Loudon

"PCode and compiler portability - Experience with a Modula-2
optimizing compiler" in which the author describes work done with
Powell's compiler sources.

Can anyone indicate whether these sources are available, and if
so, where they might be FTP'd or otherwise obtained.

I am interested in doing some work on Modula-2 like language
implementations on a PC or SUN, and would like some sources to get me
started.  Any other hints in the same direction would be most welcome.

Many thanks

Pat Terry
cspt@alpha.ru.ac.za  or pdterry@psg.com
[DEC has a free Modula-2 compiler available.  See message 92-07-015. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: dworkin@merlin.rootgroup.com (Dieter Muller)
Newsgroups: comp.compilers
Subject: Re: What kind of grammar does kermit "DEC style" parser use?
Keywords: parse
Date: 23 Aug 92 05:27:50 GMT
Reply-To: Dieter Muller <dworkin@merlin.rootgroup.com>
Organization: Compilers Central

magras@cps.msu.edu writes:
>The subject line pretty much says it all. What kind of grammar
>drives the so-called "DEC style" parser used by most kermit
>programs? (e.g. "set parameter ?", info displayed, then "set
>parameter" appears on command line with cursor after it)
>Grammars used by particular implementation(s) would be
>appreciated, suggestions on how to do it with less than 4K to
>allocate to it also helpful.

It is based on a stripped-down version of the CCMD library, which is a
C implementation of the TOPS-20 COMND% JSYS call.

The moderator comments:
>I'd expect Kermit's parsers probably use a hard coded driver
>running from hand-written tables.

This is indeed the case.  Basically, the program becomes a state machine,
with all sorts of longjmp()s playing havoc with your control flow.
Although you don't have to, what I usually end up doing is having a
function for each element of each command.  This allows joining multiple
commands that have a common sub-grammar.

Thus, the following command language implemented via CCMD could have 5
functions defining the grammar:

	set <parameter> <value>
	show { <null> | <parameter> }

Or you could get by with four, by matching the <null> in the function
handling `show'.

My suggestion would be to get one of the microcomputer versions of kermit
from watsun.cc.columbia.edu and modify it as needed.

	Dworkin
dworkin@rootgroup.com     DoD #2525 (303) 678-5519
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: al@nmt.edu (Al Stavely)
Newsgroups: comp.compilers
Subject: Re: Possible lex bug?
Keywords: lex, errors, comment
Date: 3 Sep 92 16:53:31 GMT
Reply-To: al@nmt.edu (Al Stavely)
Organization: New Mexico Tech, USA

masticol@cadenza.rutgers.edu (Steve Masticola) writes:
>Has anyone else come across the following possible bug in lex?
>[lex doesn't recognize \v as vertical tab]

"It's not a bug, it's a feature!"  :-(

According to my Lex manual, the only special-character escape sequences
(besides octal codes) that Lex supports are \n, \t and \b.  Sad but true...
-- 
	- Allan Stavely, New Mexico Tech, USA
[Yet another reason to use flex. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: bromage@mullauna.cs.mu.OZ.AU (Andrew Bromage)
Newsgroups: comp.compilers
Subject: Re: Parsing wars
Keywords: parse, LR(1)
Date: 2 Sep 92 23:37:24 GMT
Reply-To: bromage@mullauna.cs.mu.OZ.AU (Andrew Bromage)
Organization: Computer Science, University of Melbourne, Australia

dww@inf.fu-berlin.de writes:
>The parsing is called shift-reduce parsing, and I thought I had understood
>that. What happens on a reduction though is, instead of pushing the
>nonterminal of the lhs of the reduced production onto a symbol stack and
>digging through the goto table for the appropriate state to push onto the
>state stack, the nonterminal is *prepended* to the input sequence of
>tokens and parsing resumes as normal. The other actions, shift, accept and
>error are as expected, an action shiftreduce combines the normal shift and
>the strange reduce.

The action "shiftreduce" has been used for years to optimise LR(0) states
in LALR(1) parsers. The idea is to first create default actions, and then
for any state in which the default action is to reduce, change this to a
"shiftreduce". The benefit of this is that the LALR lookahead set is only
really used in the final parser when a shift-reduce conflict would
otherwise arise. It also helps in the removal of unit productions.
(Apparently. I've never seen it used this way - someone told me about
this). However, the size of the tables are reduced considerably - as most
grammars which people write produce parsers which largely consist of LR(0)
states.

Pushing nonterminals onto the token stream, however, is a new one to me.
I suppose that this would optimise the GOTO tables a bit, but there are
better ways of doing this, like creating distinct reduce and lookahead
states (IMHO).

bromage@mullauna.cs.mu.oz.au
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: Paul.Klint@cwi.nl (Paul Klint)
Newsgroups: comp.compilers
Subject: Re: ASF+SDF (Was: Online Bibliography for Macro Processors ...
Keywords: macros, specification
Date: 31 Aug 92 12:07:49 GMT
Reply-To: Paul.Klint@cwi.nl (Paul Klint)
Organization: CWI, Amsterdam

eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig) writes:
|> 	You forgot to mention that the ASF+SDF formalism has been
|> implemented and is available as part of the Centaur set of language tools
|> available from INRIA. 
 
Thank you very much for your addition! In my previous message I was more
(too much?) concentrating on the issue of syntactic extensibility than on
availability of the system.

The full story is that several European research institutes (CWI in The
Netherlands, INRIA in France), Universities (Amsterdam, Darmstadt) and
companies (SEMA-METRA, BULL and GIPSY in France; BSO in the Netherlands;
Dutch PTT; Planet in Greece) over the last 8 years have cooperated in two
European research (ESPRIT) projects: GIPE I and GIPE II, where GIPE stands
for Generation of Interactive Programming Environments.

The result of this research is a system called Centaur, best characterized
as a toolbox for constructing programming environments. The ASF+SDF
formalism I referred to in my previous message has been implemented as
part of the ASF+SDF Meta-environment, which forms part of Centaur.

|> Contact centaur@mirsa.inria.fr for techical info,
|> and centaur-request@mirsa.inria.fr for ordering and administrivia.

The distribution of Centaur is done by INRIA (or more precisely by a small
company called Connexite, reachable at the above address).

|> Remember, the Centaur system is NOT free; get somebody else to buy it for
|> you! 

Correct, but for research purposes it *is* cheap (~150 ECU).

|> It makes a great Christmas gift!  :-)

I couldn't agree more, there is no better way to spend your Christmas
holdidays!

Paul Klint.
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: stewart@crl.dec.com
Newsgroups: comp.compilers
Subject: An instruction scheduler for Alpha
Keywords: optimize, architecture
Date: 31 Aug 92 15:20:45 GMT
Reply-To: stewart@crl.dec.com
Organization: Compilers Central

[I already sent this to comp.arch, on August 18, but jon@clevax.wec.com
points out to me that comp.compilers makes more sense.]

instr-sched.c has been added to the DEC/Alpha archives on
gatekeeper.dec.com and crl.dec.com. (gatekeeper is on the West Coast and
crl in on the East coast.)  Look in ~ftp/pub/DEC/Alpha.  (There is other
good stuff there too.) If you do not have ftp access, send mail to
ftpmail@pa.dec.com with subject: help

instr-sched.c is a basic block instruction scheduler for the Digital Alpha
21064-AA microprocessor.

Its purpose is to rewrite a basic block of alpha instructions in such a
way as to minimize stalls and maximize the number of multiple issue slots
kept full.

This scheduler would be useful, for example, in a compiler back-end or
optimizer.

A main program is attached which illustrates the operation of the
scheduling subroutine.

Actually the scheduler is not perfect, gcc's scheduler has been noted to
do a few cycles better in some cases, so there is still some work to be
done.

Larry Stewart
Cambridge Research Laboratory
Digital Equipment Corporation
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: masticol@cadenza.rutgers.edu (Steve Masticola)
Newsgroups: comp.compilers
Subject: Possible lex bug?
Keywords: lex, errors, comment
Date: 2 Sep 92 19:49:29 GMT
Reply-To: masticol@cadenza.rutgers.edu (Steve Masticola)
Organization: Rutgers Univ., New Brunswick, N.J.

Has anyone else come across the following possible bug in lex? I'd
like to ignore certain characters, including vertical tab (\v,
^K, \013, etc.) When I included the line

[ \v\f\r\t]         ;

in the source file, vertical tabs fell through. However,

[ ^K\f\r\t]       ;

or 

[ \013\f\r\t]       ;

works. I'm not thrilled about this, though, because it means
hard-coding a control character or ASCII code.

I'm running Sun's version of lex on a Sparc-2, in case it makes a
difference, but another site has reported the same problem. I don't
know what equipment they have there.

Thanks for any help!

- Steve (masticol@cs.rutgers.edu).
[AT&T lex has a lot of bugs, I can't say I'm surprised to hear about
another one. Flex handles it correctly. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: marshall@software.org (Eric Marshall)
Newsgroups: comp.compilers
Subject: Looking for context-sensitive grammars
Keywords: parse, question
Date: 3 Sep 92 18:10:01 GMT
Reply-To: Eric Marshall <marshall@software.org>
Organization: Software Productivity Consortium, Herndon, Virginia


	Does anyone have any context-sensitive grammars that they
would like to share?

	Thanks in advance.

Eric Marshall
Software Productivity Consortium
SPC Building
2214 Rock Hill Road
Herndon, VA 22070
(703) 742-7153

marshall@software.org
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: sanjay@equalizer.cray.com (+Sanjay Krishnamurthy)
Newsgroups: comp.compilers
Subject: Loop scheduling/Register Allocation refs.
Keywords: registers, optimize, bibliography
Date: 29 Aug 92 20:26:16 GMT
Article-I.D.: comp.92-08-177
Reply-To: sanjay@equalizer.cray.com (+Sanjay Krishnamurthy)
Organization: Compilers Central

>[Is there} any published paper about the interaction between
>loop scheduling and register allocation and the algorithms for combining 
>these two parts?

You might want to look at:

"Register Allocation for Modulo Scheduled Loops: Strategies,
Algorithms and Heuristics," in the proc. of the ACM SIGPLAN
1992 Conf. on Prog. Lang. Design and Implementation,
San Fransisco, June 1992.
A more detailed version appears as a HP Tech. Report(HPL-92-48).

"Compiler Techniques for Optimizing Memory and Register
Usage on the Cray-2," C. Eisenbeis, W. Jalby and A. Lichnewsky,
Intl. Journal of High Speed Computing,
Vol. 2, No. 2 (1990), pp. 193-222.
A conference version of the same paper appears as:
"Squeezing more CPU Performance out of a Cray-2 by Vector
Block Scheduling," Supercomputing 1988, Florida.

The goals of vector  register allocation and allocation
during loop scheduling are identical. Hence, try:

"Vector Register Allocation," Randy Allen and Ken Kennedy,
Rice University Computer Science Dept. Tech. Report,
COMP TR86-45.

Somebody more familiar with register allocation than I am 
might want to add references to this list.

Ciao...
-Sanjay M. Krishnamurthy
Cray Research Superservers 
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: tfj@apusapus.demon.co.uk (Trevor Jenkins)
Newsgroups: comp.compilers
Subject: Seeking book "The Design of an Optimizing Compiler"
Keywords: books, comment
Date: 2 Sep 92 00:34:29 GMT
Reply-To: Trevor Jenkins <tfj@apusapus.demon.co.uk>
Organization: Job hunters use Parachute

In article <92-09-013@comp.compilers> wendt@CS.ColoState.EDU writes:
> Does anyone have a copy (new or used) of McKeeman, Horning, & Wortman
> "A Compiler Generator" that they are willing to sell.  I missed getting
> this great book when it was in print.

If there's a book sales going on then I'm after a copy of "The Design of an
Optimising Compiler" by Wulf et al. The imprint seems to have been rather
small and there's no hope of finding it in a book store now.
--
Trevor Jenkins                                   Radio: G6AJG
134 Frankland Rd, Croxley Green, Rickmansworth, WD3 3AU
email: tfj@apusapus.demon.co.uk
phone: +44 (0)923 776436
[That book's been out of print for many years, and there are a lot of us
who'd like a copy. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: jb3o+@andrew.cmu.edu (Jon Allen Boone)
Newsgroups: comp.compilers
Subject: -O4 in SunOS compiler
Keywords: sparc, optimize, question, C
Date: 26 Aug 92 20:52:28 GMT
Reply-To: Jon Allen Boone <jb3o+@andrew.cmu.edu>
Organization: Compilers Central

What does the -O4 switch do to the SunOS compiler?  Here's an excerpt
from the man page:

                    4    Same as -O3, but trace  the  effects  of
                         pointer assignments.

Ok....what does it mean to trace the effects of pointer assignements?

		-=> iain <=-

PS>  What is a good reference for building compilers that includes
optimizations? 
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: wolff@alpha.ces.cwru.edu (Francis Wolff)
Newsgroups: comp.compilers
Subject: Cobol grammar and LARL parser
Keywords: Cobol, parse, comment
Date: 23 Aug 92 06:23:35 GMT
Reply-To: Francis Wolff <wolff@alpha.ces.cwru.edu>
Organization: Compilers Central

I just came across this article in alt.cobol. Does anyone know about LARL?

rdekker@do.raet.nl (R. Dekker) writes:
>Well there is a grammar for COBOL ! For instance in "The C User Journal"
>Volume 10, Number 2, Page 123.  I quote:
>"Sick of PCYACC of MKS YACC ? Switch to LARL ........ Includes grammers
>for Ada, BASIC,......COBOL...... Free demo disk."
>
>Company:	AUTOM
>		P.O. Box 10225
>		Eugen, OR 97440
>		(503) 484-3819
>		(503) 485-5702 (fax).

Please let me know how good the LARL COBOL grammer is.
[The pcyacc Cobol grammar is unavoidably enormous but seems to work well
enough.  Numerous requests have never turned up a free Cobol grammar.  -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
Xref: sparky comp.compilers:1470 comp.lang.c++:13028
From: moudgill@cs.cornell.EDU (Mayan Moudgill)
Newsgroups: comp.compilers,comp.lang.c++
Subject: flex++?
Summary: Anybody done for flex what bison++ did for flex
Keywords: flex, C++, lex, question
Date: 27 Aug 92 17:55:16 GMT
Reply-To: Mayan Moudgill <moudgill@cs.cornell.EDU>
Organization: Cornell Univ. CS Dept, Ithaca NY 14853

I've got a copy of flex by Vern Paxson. It's nice and can be used with
C++. However, it still uses global variables. Has anybody fiddled around
with flex so as to make it create a Lex class (like bison++ creates a
Parse class?)

Mayan
moudgill@cs.cornell.edu
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: wolff@alpha.ces.cwru.edu (Francis Wolff)
Newsgroups: comp.compilers
Subject: Russian Compiler Books & Courses.
Keywords: courses, question, books
Date: 26 Aug 92 09:36:41 GMT
Reply-To: Francis Wolff <wolff@alpha.ces.cwru.edu>
Organization: Compilers Central

I just read a compiler-type book which was translated from Russian. It was
very interesting. The reference is,

   Computer-Aided Design of Language Processors, V. Shangin and P. Timofeev,
   CRC Press, 1992, ISBN 0-8493-7537, QA76.76.T83S53, Library of Congress
   Card Number = 91-38349.

which appears to be published in conjunction with MIR Publishers of
Moscow.  Also, this book is part of a series by CRC press called, Advances
in Science and Technology in the USSR.

This sparked several questions,
   (1) Does a book review exist for this?
   (2) This book appears to have been developed for/from a course.
       Can someone e-mail me what books are used in Russian compilers
       courses (i.e. University, book, course title, Professor,
       description).
   (3) Also, I am interested in the more general question, of
       what compiler books are used in European Universities, such
       as England, France, Germany, Poland, etc.
   (4) Did the merging of East German Universities with West Germany,
       cause them to redo their compiler courses? What books did they
       previously use before the merge? Russian?

I would greatly appreciate an e-mail response (wolff@alpha.ces.cwru.edu).
And if I get any information & someone is interested in the results, I
will summarize them to comp.compiler. I am always interested in different
perspectives on compiler courses.

Thank you very much,
   Frank Wolff.
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.compilers
Subject: In search of references & test suite for error repair
Keywords: parse, errors, comment
Date: 2 Sep 92 06:37:58 GMT
Reply-To: "Dave Schaumann" <dave@cs.arizona.edu>
Organization: Compilers Central

I am currently doing some research on error repair algorithms, and
so I am in search of pointers to where I can find the articles in the
following references (both from the Red Dragon book):


Sippu, S. [1981].  "Syntax error handling in compilers", Rep. A-1981-1, Dept
of Computer Science, Univ. of Helsinki, Helsinki Finland.

Raiha, K.-J., et al. [1983] "Revised report on the compiler writing system
HLP78", Report A-1983-1, Dept. of Computer Science, University of Helsinki.

Also, if anyone has or knows where I can find the Ripley-Druseikis(%) test
suite, please let me know.

% Ripley, G.D., Druseikis, F.C.: A statistical analysis of syntax errors.
  Comput. Lang. 3 227-240 (1978)

Thanks in advance.
--
Dave Schaumann                dave@cs.arizona.edu
[Message 87-08-019 contains a paper from Julia Dain on an improved error
recovery technique for yacc. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: eichmann@cs.wvu.wvnet.edu (David Eichmann)
Newsgroups: comp.edu
Subject: Re: Are programmers Computer Scientists?
Date: 3 Sep 92 21:51:37 GMT
Organization: WVU Statistics and Computer Science

rro@cs.ColoState.EDU (Rod Oldehoeft) writes:

>In article <1992Sep3.174548.29169@ulowell.ulowell.edu>, wex@cs.ulowell.edu (Paul M. Wexelblat) writes:
...
>|> 
>|> My question is: 
>|> 
>|> 	Just because someone programs (is required to program)
>|> 	a. Is that person a Computer Scientist
>|> 	b. Should that person be called a Computer Scientist.
>|> 
>|> 	-or- 
>|> 	are all programmers Computer Scientists?
>|> 	[are all programming courses CS courses?]

>This is related to the question "Are all programmers software
>engineers?"  In industriana the two terms have become somewhat
>interchangeable.  However, software engineering also has a 
>definition as a discipline (mostly) within computer science.

  And then, of course, there's "Are all computer scientists software
engineers?"  Having had the opportunity to wear both hats, I prefer
the following analogy:

   Computer Science     ----> Chemistry
   Software Engineering ----> Chemical Engineering

although it really doesn't address a number of nuances, particularly
legal and psychological.

- Dave
----
David Eichmann
Visiting Asst. Prof. of Software Engineering
Computer Science Dept.                    Phone: (713) 283-3875
University of Houston - Clear Lake        fax  : (713) 283-3810
Box 113, 2700 Bay Area Blvd.              Email: eichmann@cs.wvu.wvnet.edu
Houston, TX 77058
Newsgroups: comp.edu,comp.lang.fortran,comp.lang.misc,comp.arch,sci.math