[antlr-interest] Optional keyword causes ambiguity in parser

Ramon Verbruggen Ramon.Verbruggen at quintiq.com
Mon Apr 21 00:18:53 PDT 2008


>  >I agree that it looks 
>  >silly, but the point of the 'addressable' is that you can start
>  >with a variable or argument, and use methods and attributes of
>  >this variable or argument to chain them together (e.g.
>  >myarg.SomeGetMethod().AnotherMethod().GetAttribute()) so yes, an
>  >Identifier by itself is a valid addressable.
> 
> I think you may have missed my point.  You've said that an 
> "addressable" by itself is a valid statement.  Obviously a method 
> call is a valid statement.  But is an object or field reference a 
> valid statement?
>
You're right: I did miss your point. Unfortunately this is not a new language, and I didn't create it... So yes, an addressable by itself is a valid statement. :-(
 
> (Of course, I also strongly dislike single-exit-point languages; 
> they can lead to excessive nesting and temporary variable 
> shenanigans, especially when simply trying to assert 
> preconditions.  But hey, whatever makes you happy.) :)
>
I completely agree. It does however make a *huge* difference in implementation complexity in our case since we have a propagator that uses parse-time (meta) information to determine which code needs to be executed whenever a value changes. (It's a mixed functional/procedural language)

Thanks again,

Ramon


This message contains information that may be privileged or confidential and is the property of Quintiq. It is only intended for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you have received this message in error, please notify the sender immediately and delete all copies of this message. Please note that e-mails are susceptible to change, therefore they are not binding.


More information about the antlr-interest mailing list