Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

XD-196: switch to alternative parser #55

Closed
wants to merge 1 commit into from

Conversation

aclement
Copy link
Contributor

@aclement aclement commented Jun 7, 2013

Initial code drop for parser alternative. See https://jira.springsource.org/browse/XD-196

More work to be done as DSL language firms up and needs more work on error handling. This merge also contains tests (and fixes) for:
https://jira.springsource.org/browse/XD-159 "improve module parameter parsing"

And the the most recent comments by Jen/Gary in https://github.com/SpringSource/spring-xd/issues/1

Effectively these all work now:

foo | transform --expression=--payload | bar
foo |  transform --expression='new StringBuilder(payload).reverse()' | bar
"foo |  transform --expression=\"'Hello, world!'\" | bar"
"http --port=9014 | filter --expression=\"payload == 'foo'\" | log"
http --port=9014 | filter --expression='new Foo()' | log

A key change with this patch is that argument/parameter values with spaces in must be quoted.

Currently it tolerates the tap @foo syntax and does exactly as the old parser, converts it under the covers to tap --channel=foo.0

@markpollack
Copy link
Contributor

super sweet. i couldn't tell, does it support

mystream = http | filterA | filterB | filterA | file
tap mystream.filterB | counter

in addition to the 'horrid' @ syntax :)

@ghost ghost assigned markfisher Jun 7, 2013
@dturanski
Copy link
Contributor

tap mystream.filterB | counter not there AFAICT

@aclement
Copy link
Contributor Author

aclement commented Jun 7, 2013

No, it isn't. The stream naming is there (in the parser) but not used by the parser invoker yet. I am looking at tap but tap was broken which hampered my tinkering - is it fixed yet? are there integration tests for tap (that start from a stream def and test tapping)?

@markfisher
Copy link
Contributor

Merged.

@markfisher markfisher closed this Jun 7, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants