[Swift-devel] appending the app name with 'app-' results in parsing error
Mihael Hategan
hategan at mcs.anl.gov
Fri May 15 11:24:51 CDT 2015
Not bug. "-" is an operator and if it was allowed in identifiers, a-b
would be ambiguous. You could try the same thing in Java, C, or any
other language that has the basic math operators.
Mihael
On Fri, 2015-05-15 at 11:18 -0500, Ketan Maheshwari wrote:
> Hi,
>
> For example:
>
> type file;
>
> app (file o) app-cat (file i) {
> cat @i stdout=@o;
> }
> file out[]<simple_mapper; location="outdir", prefix="f.",suffix=".out">;
>
> string d="data.txt";
>
> foreach j in [1:10] {
> file data<single_file_mapper; file=d>;
> out[j] = app-cat(data);
> }
>
> Gives:
>
> $ swift -config local.conf catsn.swift
> Swift trunk git-rev: 86de22e2841518dbf337a0e0da56ad1dd9dd70f8 heads/master 6343
> RunID: run003
> Could not compile SwiftScript source: line 3:14: expecting an
> identifier, found 'app'
>
> It works with 'app_' (ie. replaceing hyphen with underscore).
>
> Bug?
>
> --
> Ketan
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
More information about the Swift-devel
mailing list