Re: What is a "proper prefix"?

Rasmus <rassahah@infonie.de>
22 Oct 2000 01:23:03 -0400

          From comp.compilers

Related articles
What is a "proper prefix"? ninozul@hotmail.com (Nick Z) (2000-10-19)
Re: What is a "proper prefix"? rassahah@infonie.de (Rasmus) (2000-10-22)
| List of all articles for this month |
From: Rasmus <rassahah@infonie.de>
Newsgroups: comp.compilers
Date: 22 Oct 2000 01:23:03 -0400
Organization: Technische Universitaet Berlin, Deutschland
References: 00-10-143
Keywords: theory

Nick Z wrote:


> I can't seem to find the definition for the "proper prefix" in my compilers
> book. Can somebody give me a short definition?


Hello Nick,


i would define it as follows:


a proper prefix resp. some Language L is a word which can be extended
by addition of some tokens(letters) to become a word of L.


in compilers it means usually:
w is a proper prefix if


S ->* wx


with w,x in terminals(L)* and wx in L


example:


"main (int arg" is a proper prefix for C (without quotes of course)
"main (int arg+" is not. So after reading the '+' is the earliest point a
parser
call tell a program is not correct.


Greetings - Rasmus


Post a followup to this message

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