I need a bunch of use-rule for including several verbs in a parse rule: Connect, Use, List, Show etc.
use-rule: [some
[copy Actor to 'Connect thru 'Connect 'to copy UseCase to end (append output rejoin ["[" Actor "]-(" "Connect to " UseCase ")"])]
|
[copy Actor to 'Use thru 'Use copy UseCase to end (append output rejoin ["[" Actor "]-(" "Use " UseCase ")"])]
|
[copy Actor to 'List thru 'List copy UseCase to end (append output rejoin ["[" Actor "]-(" "List " UseCase ")"])]
|
[copy Actor to 'Show thru 'Show copy UseCase to end (append output rejoin ["[" Actor "]-(" "Show " UseCase ")"])]
|
[copy Actor to 'Search thru 'Search copy UseCase to end (append output rejoin ["[" Actor "]-(" "Search " UseCase ")"])]
|
[copy Actor to 'Select thru 'Select copy UseCase to end (append output rejoin ["[" Actor "]-(" "Select " UseCase ")"])]
|
[copy Actor to 'Checkout thru 'Checkout copy UseCase to end (append output rejoin ["[" Actor "]-(" "Checkout" ")"])]
|
[copy Actor to 'Pay thru 'Pay copy UseCase to end (append output rejoin ["[" Actor "]-(" "Pay" ")"])]
|
[copy Actor to 'Delete thru 'Delete copy UseCase to end (append output rejoin ["[" Actor "]-(" "Delete " UseCase ")"])]
|
[copy Actor to 'Modify thru 'Modify copy UseCase to end (append output rejoin ["[" Actor "]-(" "Modify " UseCase ")"])]
|
[copy Actor to 'Add thru 'Connect 'to copy UseCase to end (append output rejoin ["[" Actor "]-(" "Add to " UseCase ")"])]
|
[copy Actor to 'Manage thru 'Manage copy UseCase to end (append output rejoin ["[" Actor "]-(" "Manage " UseCase ")"])]
]
How can I make it generic to accept any verb something like
[copy Actor to 'Any-Verb thru 'Any-Verb copy UseCase to end (append output rejoin ["[" Actor "]-(" "Any-Verb " UseCase ")"])]
so that I'm not obliged to add a new line to the rule each time I need a new verb ? (that rule is part of a global parse rule used here http://askuml.com/blog/e-commerce/)