Another one for the surprise list: "?" after a continuation

View: New views
2 Messages — Rating Filter:   Alert me  

Another one for the surprise list: "?" after a continuation

by Kevin Reid-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Spot the bug:

         for [uncaller, isTransparent] \
               ? ((def portrayal := uncaller.optUncall(specimen)) !=  
null) \
             in uncallers {
           ...
         }

Under E-on-CL, this failed with "Undefined variable: portrayal".

I finally realized that the problem is that "?" at line start  
introduces an updoc comment.

In E-on-Java, I get a syntax error at the end of the ? ... \ line.

MarkM, can you comment on what the proper behavior for the parser in  
this case is? I'm not saying that it should parse as a such-that, but  
should it be a comment or a parse error?

--
Kevin Reid                            <http://homepage.mac.com/kpreid/>


_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang

Re: Another one for the surprise list: "?" after a continuation

by Mark Miller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Mar 25, 2008 at 5:40 PM, Kevin Reid <kpreid@...> wrote:
>  MarkM, can you comment on what the proper behavior for the parser in
>  this case is? I'm not saying that it should parse as a such-that, but
>  should it be a comment or a parse error?

I prefer that

    "\\", "\n" <whitespace> "?"

sequence cause a parse error, because there's no reliable way to
disambiguate what the programmer meant.

--
Text by me above is hereby placed in the public domain

 Cheers,
 --MarkM
_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang