Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!news.sprintlink.net!howland.reston.ans.net!sol.ctr.columbia.edu!news.mindlink.net!vanbc.wimsey.com!fonorola!news!dbuck
From: dbuck@infoweb.magi.com (David Buck)
Subject: Re: VW2.0 parser compiler
Sender: news@magi.com
Message-ID: <DB9tJ7.LJw@magi.com>
Date: Thu, 6 Jul 1995 01:30:43 GMT
References: <3tepd9$7kg@news.onramp.net>
Nntp-Posting-Host: infoweb.magi.com
Organization: Magi Data Consulting
Lines: 24

In article <3tepd9$7kg@news.onramp.net>,
Aik-Siong Koh  <askoh@onramp.net> wrote:
>I have been using VW2.0 parser compiler to write my first compiler ever. 
>Although I have no major problems, I wonder why the syntax for production 
>rules are different from normal smalltalk syntax. Why add another layer 
>of translation? Is there something I am missing?
>
>Thanks
>Aik-Siong Koh
>

The language used by the parser compiler simply makes it much easier to 
match the patterns needed to make a compiler.  If they didn't provide a 
different syntax, you'd have to write some complex loops and provide the 
ability to backup over patterns that didn't completely match.  Take a 
pattern compiled by the parser compiler and hold down the SHIFT key when 
you click on the method name in the browser.  This will cause the real 
Smalltalk code to be decompiled and shows you what you'd have to write 
had they not provided a simpler syntax.

David Buck
dbuck@magi.com
The Object People

