Re: newbie: general compilers question: static checking

Derk Gwen <derkgwen@HotPOP.com>
8 Nov 2003 01:34:32 -0500

          From comp.compilers

Related articles
newbie: general compilers question: static checking nzanella@cs.mun.ca (Neil Zanella) (2003-11-02)
Re: newbie: general compilers question: static checking derkgwen@HotPOP.com (Derk Gwen) (2003-11-08)
Re: newbie: general compilers question: static checking clausing@voyager.net (Brian Clausing) (2003-11-08)
Re: newbie: general compilers question: static checking bobduff@shell01.TheWorld.com (Robert A Duff) (2003-11-08)
Re: newbie: general compilers question: static checking vbdis@aol.com (2003-11-08)
| List of all articles for this month |

From: Derk Gwen <derkgwen@HotPOP.com>
Newsgroups: comp.compilers
Date: 8 Nov 2003 01:34:32 -0500
Organization: Quick STOP Groceries
References: 03-11-015
Keywords: analysis
Posted-Date: 08 Nov 2003 01:34:32 EST

Neil Zanella <nzanella@cs.mun.ca> wrote:
# Hello,
#
# I have seen the words "static checking" in the context of compilers
# several times as something typically done in between the parsing and
# intermediate code generation phases of the compiler. Could anyone


Are you referring to 'static semantics'?


For some reason people have the idea that syntax can refer to
context-free (CF) syntax. Perhaps because all but language have their
formal syntax define a CF grammar instead of a context sensitive (CS)
grammar. Part of the confusion is that to build an efficient grammar
you need to extract a formal CF grammar to feed into the parser
constructor; rest of the CS grammar is left as a collection of
assertions about the parse trees.


The semantics define an interpretation of parse trees.


Most language are defined as a formal CF grammar + natural language CS
constraints + natural language semantics. Rather than grouping on a
syntax/semantics split (CF grammar + CS constraints) + (semantics),
it's more usual to make the split based on the notation (formal CF
grammar) + (natural language CS + natural language semantics). Then
all the natural language verbiage gets labelled 'semantics'; the CS
constraints get labelled as the 'static semantics'.


--
Derk Gwen http://derkgwen.250free.com/html/index.html


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.