Article View: comp.lang.modula2
Article #2338Re: Missing from Modula-2
From: Warwick Allison
Date: Wed, 19 Jun 1991 03:13
Date: Wed, 19 Jun 1991 03:13
35 lines
1377 bytes
1377 bytes
>Why, if the function f returns a pointer can I not write:
>
> f(x)^.field := ...
I've always wondered this too. All I can guess is that it make the parser
simpler not to allow both:
Statement ::= Designator "(" ActualParameters ")"
and
Designator ::= Designator "(" ActualParameters ")"
where
Designator ::= Designator "^"
Designator ::= Designator "[" ExprList "]"
Designator ::= Designator "." Field
Designator ::= QualifiedIdentifier
That doesn't look LALR(1), but I'm not sure.
Then again, M2 allows the syntax
QualifiedIdentifier ::= Identifier { "." QualifiedIdentifier }
to screw up Designators (The semantic class of Identifier - ModuleName or Variable
is needed).
Warwick.
--
_-_|\ warwick@cs.uq.oz.au
/ * <-- Computer Science Department,
\_.-._/ University of Queensland,
v Brisbane, AUSTRALIA.
Technical Details
Message-ID:
<2016@uqcspe.cs.uq.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!uqcspe!cs.uq.oz.au!warwickReferences:
<IWM.91Jun18101949@swan.doc.ic.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.lang.modula2 Subject: Re: Missing from Modula-2 Message-ID: <2016@uqcspe.cs.uq.oz.au> Date: 19 Jun 91 03:13:47 GMT References: <IWM.91Jun18101949@swan.doc.ic.ac.uk> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Distribution: comp Lines: 35