Problem reported with the attached reproducer. The following works as expected:
matt-macbook:tests matt$ ./objc_test
(a b c)
2010-04-22 00:03:15.762 objc_test[20848:903] Printed: (a b c)
2010-04-22 00:03:16.538 objc_test[20848:903] Pipe closed
If a carriage return is placed before the closing paren, the following occurs.
matt-macbook:tests matt$ ./objc_test
(a b c
)
2010-04-22 00:03:41.056 objc_test[20851:903] Printed: (a b c)
2010-04-22 00:03:41.059 objc_test[20851:903] Printed: b
2010-04-22 00:03:41.062 objc_test[20851:903] Printed: c
2010-04-22 00:03:41.457 objc_test[20851:903] Pipe closed
This is not expected behavior. Note that if the s-expressions are in files and cat | into reproducer, this error doesn't seem to appear.
Compilation note:
cc -I../src objc_test.m -o objc_test -L../src -lsexp -framework CoreFoundation -framework Foundation