96 lines
3.7 KiB
HTML
96 lines
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE> GCC Frontend HOWTO: Introduction </TITLE>
|
|
<LINK HREF="GCC-Frontend-HOWTO-2.html" REL=next>
|
|
|
|
<LINK HREF="GCC-Frontend-HOWTO.html#toc1" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="GCC-Frontend-HOWTO-2.html">Next</A>
|
|
Previous
|
|
<A HREF="GCC-Frontend-HOWTO.html#toc1">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s1">1. Introduction </A></H2>
|
|
|
|
<P>This document shows the steps required for creating a new GCC
|
|
front end. It helps you to create a compiler of your own with
|
|
the help of the GNU Compiler Collection. Basic
|
|
information about tools like Bison and Flex is also provided
|
|
to make the document self contained.
|
|
<P>I assume that you have sound knowledge of the
|
|
C programming language. A general idea about compilers will
|
|
help you understand the document better. If you wish to make
|
|
experiments of your own, please download the source code
|
|
of GCC from http://gcc.gnu.org.
|
|
<P>
|
|
<H2><A NAME="ss1.1">1.1 New Versions of the document </A>
|
|
</H2>
|
|
|
|
<P>This version of the document will help you
|
|
in developing basic language constructs. Succeeding revisions
|
|
will be focussed on more complex issues.
|
|
<P>
|
|
<H2><A NAME="ss1.2">1.2 Feedback and Corrections </A>
|
|
</H2>
|
|
|
|
<P>This document may have mistakes in it because I am writing
|
|
from my practical experiments with the front end. There
|
|
may be faults in the way I have grasped things. Please inform
|
|
me about the mistakes, so that I can correct them in the next version.
|
|
I always welcome suggestions and criticisms. I can be contacted at
|
|
<A HREF="mailto:sreejithkmenon@yahoo.com">sreejithkmenon@yahoo.com</A>
|
|
<H2><A NAME="ss1.3">1.3 Why I have written this </A>
|
|
</H2>
|
|
|
|
<P>I started out trying to add a small language to the GNU Compiler
|
|
Collection. Even though there is an excellent manual which
|
|
describes GCC internals, I found it a bit intimidating to
|
|
the newbie hacker. I thought of documenting my
|
|
experiments so that even novice programmers can start
|
|
tinkering with the complex GCC code base.
|
|
<H2><A NAME="ss1.4">1.4 Distribution Policy</A>
|
|
</H2>
|
|
|
|
<P>Copyright (C)2002 Sreejith K Menon.
|
|
<P>This document is free; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free
|
|
Software Foundation; either version 2 of the License, or (at your
|
|
option) any later version.
|
|
<P>This document is distributed in the hope that it will be useful, but
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
<H2><A NAME="ss1.5">1.5 Acknowledgements</A>
|
|
</H2>
|
|
|
|
<P>This document is the by-product of an intensive
|
|
`code reading' experiment conducted at the
|
|
Government Engineering College, Trichur (GECT). Students
|
|
were asked to read and tinker with the source
|
|
code of reasonably complex systems software to
|
|
give them a feel of how large systems are designed
|
|
and maintained - some of us concentrated on the
|
|
GCC front end, others on the back end (we hope to
|
|
have a document on hacking the GCC backend soon!).
|
|
Those who have a flair for Operating Systems had a
|
|
chance to work on the Linux file system, scheduler,
|
|
VM subsystem and the networking stack.
|
|
<P>I am indebted to the Free Software community as
|
|
a whole for giving me a chance to play with the source
|
|
of useful(and exciting!) programs. My thanks
|
|
to the faculty of the Department of Computer
|
|
Science at GECT for their commitment to education.
|
|
Thanks to Mr.Pramode C.E for leading me to Linux
|
|
and compilers.
|
|
<P>I am grateful to Tim Josling, who has created a small beautiful
|
|
front end, which helped me in all my experiments.
|
|
<P>
|
|
<HR>
|
|
<A HREF="GCC-Frontend-HOWTO-2.html">Next</A>
|
|
Previous
|
|
<A HREF="GCC-Frontend-HOWTO.html#toc1">Contents</A>
|
|
</BODY>
|
|
</HTML>
|