Re: [q-lang-users] New stuff in cvs: multichar ops, views
Brought to you by:
agraef
From: Rob H. <hub...@gm...> - 2007-06-01 11:39:46
|
On 31/05/07, Albert Graef <Dr....@t-...> wrote: > > Rob Hubbard wrote: > >> It seems that now, introducing a new symbol will affect the way that > >> code is parsed. This is something I find a little worrying. > > > > You're right. Right now the lexer inspects the symbol table to partition > > punctuation symbols. I agree that this is a bad idea since it makes the > > syntax depend on the declared operator symbols. I will fix that right > > away. > > Well, it sounded like a good idea, but actually it isn't. ... Shame, but I agree with your decision, given the problems you described, that the breakage would after all be too severe and the resulting behaviour too inconvenient. Thanks too for all the (attached) detail about symbol parsing. I wonder whether there's any scope for Q itself to issue warnings about some or all punctuational operator declarations. This might not be too 'noisy' if only one such warning was given. Then again, perhaps this isn't such a good suggestion. Alternatively, is there any way of issuing a warning if the lexer's action is affected by the presence of an operator definition when parsing a sequence of punctuation characters to form a symbol? Again, probably not, as I can't see a good rule or heuristic to distinguish likely intended parses from unintended ones... Rob. |