Related articles |
---|
Writing a java parser/syntax checker/ and semantics checker destraynor@yahoo.ie (2002-03-09) |
Re: Writing a java parser/syntax checker/ and semantics checker RichashelSPAMBASTARDS@btopenworld.com (Richard Bremner) (2002-03-31) |
Re: Writing a java parser/syntax checker/ and semantics checker rsherry8@comcast.net (Robert Sherry) (2002-05-03) |
From: | "Robert Sherry" <rsherry8@comcast.net> |
Newsgroups: | comp.compilers |
Date: | 3 May 2002 16:06:17 -0400 |
Organization: | Giganews.Com - Premium News Outsourcing |
References: | 02-03-045 |
Keywords: | tools, Java, parse |
Posted-Date: | 03 May 2002 16:06:17 EDT |
If you plan to write something from scratch, I would recommend
PCCTS. PCCTS stands for the Purdue Compiler Compiler Tool Set. It is
available on the web.
Also, the source code to Sun's Java Compiler is available but it
comes with restrictions that might not make appropriate for your use.
Here are some thoughts on semantic checking.
1) Semantic checking is easier to implement if you can keep the whole
program in memory. When I say, keep the program in memory, I mean the entire
program is stored in memory in some internal representation. This internal
representation is often called an IR.
2) Semantic checks are then implemented by walking/traversing the IR.
3) The book "Compilers Principles, Techniques and Tools" is aa
excellent book on the subject of Compiler writing. The authors of this book
are Aho, Sethi and Ullman. It is also known as the Dragon book because it
has a picture of a dragon on the cover.
If you think that I can be of more help to you, please feel free to write
back.
Robert Sherry
"Des Traynor" <destraynor@yahoo.ie> wrote in message
> i have been set the task of writing a parser/syntax/semantic
> analyser for the java programming language. Basically everything a
> compiler does, before it gets to the memory allocation/bytecode
> generation.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.