Path: 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: Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Distribution: comp Lines: 35 >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.