An clean, interactive command line parser/menu for Java CLI.
Idealy, a Java CLI based app can be trigger by java -cp <class> <params>. But sometimes, a menu based configuration is useful and convinient. The interaction looks like:
Wrong arguments: --grammar: [it's an invalid value] Only 'Csv' is acceptable! 1) --grammar,-g Grammar [] specify grammar name It should be same with file name of your .g4 2) --startRule,-r [] start rule name. "token" is a special value. -- R): refresh menu; X): exit Your input [# value]: 1 Http >! Only 'Csv' is acceptable! Your input [# value]: 1 Csv Your input [# value]: 2 token Your input [# value]: R 1) --grammar,-g Grammar [Csv] specify grammar name It should be same with file name of your .g4 2) --startRule,-r [token] start rule name. "token" is a special value. -- R): refresh menu; X): exit Your input [# value]: x Back to main, let's continue.Just try to run
with input above.
This project is on the way and changes will happen any time without notification until it gets GA.
Here is flow Java CLI Menu likes to support:
