Related articles |
---|
General method on translators seismo!RELAY.CS.NET!merriam@hub.umb.edu (Charles C. Merriam) (1987-04-02) |
Date: | Thu, 2 Apr 87 15:09:56 EST |
From: | "Charles C. Merriam" <seismo!RELAY.CS.NET!merriam@hub.umb.edu> |
Moderator of mod.compilers?
Is this the correct newsgroup to discuss
1) Language based editors and generators for same?
2) Methods of source program manipulation (e.g. translations)?
3) Undergraduate questions on Yacc, etc.?
4) The use of computer generated form letters to append the tax returns
of dead people?
You may receive multiple copies until I straighten out the mail address.
One problem I'm having:
In version one a small compiler, the output was provided by
stmt -> PRINT expr {emit print} //
which included a linefeed. In version two, the output is provided
by
stmt -> PRINT expr {emit print, now without CRLF}
| PRINT " string " {emit printstring(# of chars)} //
The rest of the grammer is Pascal-like (with stmt-> BEGIN ..END)
with very strict rules on semi-colons (none before end or after start
symbol's production). The start symbol is a stmt.
Is there a general method of creating translators so
that the following source code is updated?
from to
BEGIN BEGIN
PRINT 6 * 3; PRINT 6*3;
PRINT 3 PRINT "\n";
END PRINT 3;
PRINT "\n"
END
from PRINT 3*4 to BEGIN
PRINT 3*4
END
I apologize if this is a simplistic question, but I do not know
where to start.
Charles Merriam
Computer Scientist in Training
merriam@hub.umb.edu
merriam%hub.umb.edu@csnet-relay
*/eof/*
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.