-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI syntax help #22
Comments
Sharma,
Since the [bb][cc][dd] is in sequence, they must appear one after the other.
where valid strings are "aa bb"; "aa cc" and "aa dd". If you want a list, eg (*) or (+) they can not be implemented with this basic syntax. Instead you could use the tree operator '@', for example:
or, with a terminating condition:
|
Hello Olof, Thank you for your response.
Possible help:- cli> aa cc ? cli> aa dd ?
And if there is no such syntax possible would you like to take it as an enhancement or let me know how I can enhance the code to cater to my requirements. I would love to contribute to your work, |
No, not in a straight-forward way. I dont know how to do that in a BNF or context-free grammar or regexp in general? Ie, from a set of words accept all combinations of them occuring exactly once. The closest I can think of is members of a "set". The only solution I can find is something like:
which is the same as:
or:
I am a little curious: what is the use-case for this? |
New "sets" feature added, see: Example: aa @{ bb; cc; dd; } |
Hi Olof , |
CLIgen has several options that can be set programmatically using the API here: |
Hello,
I am trying to write a cli using your cligen module. I am facing a issue.
Below is my syntax:-
aa
{
[bb]
[cc]
[dd];
}
now on cli prompt output:-
cli>aa bb cc dd --- valid output
cli>aa cc dd bb --- not a valid output
I am wondering why i am not able to give the second command.
Is there a restriction on order of parameters at the same level. If yes, I would like to have an order independent command processing. Can we have a syntax which will help in in achieving my goal.
when i do
cli> aa cc ?
it should show both
bb
dd
as help ouptut.
Thanks and Regards,
Deepak Sharma
The text was updated successfully, but these errors were encountered: