develooper Front page | perl.perl6.internals | Postings from September 2005

[perl #34258] [TODO] Here documents for PIR

From:
Will Coleda via RT
Date:
September 28, 2005 15:45
Subject:
[perl #34258] [TODO] Here documents for PIR
Message ID:
rt-3.0.11-34258-121766.1.07465815589443@perl.org
Leo's proposed syntax is fine with me.

> [leo - Fri Feb 25 01:34:24 2005]:
> 
> Bernhard Schmalhofer <parrotbug-followup@parrotcode.org> wrote:
> 
> > Hi,
> 
> > in the near, or far, future there will be test scripts and compiler
> > input in PIR.  For that it would be nice, if long text doesn't have to
> > be crammed into a single line.
> 
> > So some kind of HERE document syntax is needed for PIR. Suggestions
> > for syntax elements are welcome. '<<' is already taken for the left
> > shift operator.
> 
> Yeah. I came to the same conclusion, while hacking the Z translator.
> While the syntax extension isn't really necessary, it can produce much
> more readable code.
> 
> WRT syntax:
> 
>   $S0 = <<_EOT_
>   ...
>   _EOT_
> 
> will work, because the token "<<_EOT_" is longer then the token "<<". The
> only thing that will stop working is:
> 
>   .local int _EOT_
>   $I0 = $I1 <<_EOT_       # space needed then
> 
> Not much of a problem. We don't need and don't support nested HERE docs,
> so one fix-defined "<<_EOT_" or some such will do it.
> 
> > CU, Bernhard
> 
> leo
> 
> 
> 




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About