[908] in java-interest
Re: Language spec syntax ambiguities
daemon@ATHENA.MIT.EDU (John D. Mitchell)
Tue Aug 15 00:27:22 1995
Date: Mon, 14 Aug 1995 17:48:07 -0700
From: "John D. Mitchell" <johnm@CSUA.Berkeley.EDU>
To: hudson@cc.gatech.edu (Scott Hudson)
CC: java-interest@java.sun.com
In-reply-to: <199508140525.BAA29580@cobb.cc.gatech.edu>
Scott Hudson writes:
> Jeremy Fitzhardinge <jeremy@suede.sw.oz.au> writes:
[...]
> > I don't think it is really a syntactic issue - it's easier to get right
> > in a later stage of the compiler.
>
> Well, you're right its a matter of taste/design decision. I guess I lean
> pretty strongly to the "do it in syntax if you can" camp on this issue --
> particuarly for purposes of a language spec. In that instance doing it
> with a grammar is highly desirable since there is typically not much to
> interpret and no question about exactly what it means.
I agree with both of you. :-) In most cases it seems much better to have a
'tighter' grammar/specification. I'm learning more and more though that
it's better to push off things that are difficult to do in the parser
itself and semantic checking to a subsequent phase.
This is the basic approach that our grammar/parser has taken.
Take care,
John
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com