[Swift-user] structured_regexp_mapper does not work

Kamil Slowikowski kslowikowski at gmail.com
Sun May 4 16:45:47 CDT 2014


I cannot reproduce the example in the user guide:

http://swift-lang.org/guides/release-0.94/userguide/userguide.html#_structured_regular_expression_mapper

Please see the script and console output below.

1. Is Swift currently being developed?
2. Are there plans to improve the documentation soon?
3. Is it possible to move the documentation to a platform where your users
can contribute?
4. Is the project well-funded and staffed?

Thanks,
Kamil


Here is the script: (copied from the guide verbatim)

- - -
$ cat test.swift
type file;
string s[] = ["picture.gif", "hello.gif", "world.gif"];
file f[] <structured_regexp_mapper;
            source=s,
            match="(.*)gif",
            transform="\\1jpg">;
trace(f);
- - -


Here is the output:

- - -
$ swift test.swift
Swift 0.94.1 swift-r7114 cog-r3803

RunID: 20140504-1718-q5qk8b9a
Progress:  time: Sun, 04 May 2014 17:18:24 -0400
Execution failed:
        f, line 3 had mapping errors
Caused by:
        java.lang.NullPointerException
        at
org.griphyn.vdl.mapping.file.StructuredRegularExpressionMapper.map(StructuredRegularExpressionMapper.java:106)
        at
org.griphyn.vdl.mapping.RootDataNode.addExisting(RootDataNode.java:173)
        at
org.griphyn.vdl.mapping.RootDataNode.checkInputs(RootDataNode.java:128)
        at
org.griphyn.vdl.mapping.RootArrayDataNode.checkInputs(RootArrayDataNode.java:104)
        at
org.griphyn.vdl.mapping.RootArrayDataNode.innerInit(RootArrayDataNode.java:92)
        at
org.griphyn.vdl.mapping.RootArrayDataNode.futureModified(RootArrayDataNode.java:113)
        at
org.griphyn.vdl.karajan.ArrayIndexFutureList$1.run(ArrayIndexFutureList.java:156)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
- - -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20140504/56437b6f/attachment.html>


More information about the Swift-user mailing list