Join, Parser, Schema cleanup
-
bahuvrihi
Now that Join allows a multi-way join, there needs to be a multi-way syntax for specifying joins. Strictly speaking the merge and fork syntax (or even the sequence syntax) is no longer necessary. Still may be nice to keep them as they're expressive:
--%[inputs][outputs] # multi-way join --%Join::Class[inputs][outputs] # generic join -
bahuvrihi
This actually is necessary... current implementation has a hacky bugishness to format_x statements.
def format_fork(source_index, outputs, options) "#{source_index[0]}[#{outputs.join(',')}]#{format_options(options)}" endsource_index[0] ... how about just straight dumping of all source indicies that come in?
-
bahuvrihi
Moreover, bash has (suddenly?) decided to interpret the markup for merge and sync merge. None of this:
% rap a -- b -- c --2{0,1} % rap a -- b -- c --2(0,1) -
bahuvrihi
Note that also (suddenly...) YAML decided to read in the sequence syntax improperly.
- 1:0No go.
-
bahuvrihi
# = YAML Format # # - Hash is used in full format to specify node, join, round, prereq # - Array defines a node # - String defines a join, round, or flags a prereq same as on command line # - nils are removed before evaluation # # Order defines the order of nodes, and joins, etc are applied in # order with latter joins overriding the earlier joins in the case # of conflicts. - id: task config: {} args: [] - join: class inputs: [] outputs: [] config: {} - round: n nodes: [] - prerequisites: [] # This format can be represented in a web form using the conventional # notation. For example: # # schema[][id] = task # schema[][config][key] = value # schema[][args][] = a # # To ensure breaks between nodes, joins, etc, add a nil to the schema # array: # # schema[] = ~ # # = Command Line # # The command line format specifies a subset of possible schema in # shorthand. Nodes are represented as argvs, with any command line # switches included. Joins, rounds, and prerequisites are specified # using strings added to option breaks. # # option -a, --a # node break -- # round assigment --+, --++, --+n[p,q,r] # prerequisite assignment --*, --*[p,q,r] # join --.join[m,n,o][p,q,r]opts # (implicit join) --.[m,n,o][p,q,r] # (implicit .join) --n[p,q,r] # --[m,n,o]p # --n:m:o # --: # # In YAML, the joins are all possible and use the non-break string. # Note that Schema will always dump the most formal syntax, and some # constructs require quoting. - [name, arg, -a, --key, value] - - name - arg - -a - --key - value - - + - ++ - +1[1,2,3] - * - *[1,2,3] - .join[1,2,3][4,5,6]opts - .[1,2,3][4,5,6] - 2[4,5,6] - "[1,2,3]4" - "1:2:3" - ":" -
bahuvrihi
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.