The other day I announced that there is now a syntax converter that converts all the legacy syntax to newer CongoCC streamlined syntax (with a couple of caveats, but that is to be expected at this stage, I'd say.)
And the way you execute it is simply tacking on the "verb" convert. So, for now, it's
java -jar javacc-full.jar convert MyGrammar > outputfile
But this got me thinking about the whole question of having a command-line interface moving forward. A program that has a rather involved CLI is git, for example. So, if you type git help
on the command-line it gives you a list of all the top-level commands. -- clone
, commit
, checkout
, etc.
And you can type git help checkout
or something like that and it gives you the appropriate man page, it seems.
I was also mucking about (a bit) with dotnet and dotnet is similar. You can type dotnet help
on the command-line and get the rundown on the various commands and then you get more detailed help via:
dotnet command --help
There is a command dotnet new
that starts off (based on some various templates) a skeletal project, so for example:
dotnet new console
That command in an empty directory generates a bunch of boilerplate that amounts to a "Hello, World" app. Actually there is a wizard, I think in their Visual Studio IDE that does these things, like start off a new app, but i only recently realized that this is available from the command line. Or, for example, you have:
dotnet new webapp
which creates a bunch of boilerplate, an astounding amount of stuff actually.
But this did get me thinking that this is definitely not a bad idea! I mean, if we generated similarly the boilerplate for a java or Python or C# parser library -- just to give people a leg-up using the thing.
Well, maybe the most directly actionable idea in that vein would be a help
command that spits out various usage information. (I mean more detailed than what it gives now anyway.)
Anyway, I just put that thought out there, that we could think about having a more coherent/complete CLI for CongoCC eventually. I'm now really getting very motivated about getting the Congo rebranding done. I thought we would be there by the summertime at the latest and now here we are at the end of the year.
We really absolutely need to position this as a new product (basically only mentioning at the historical footnote level that it emerged from picking up work on that old JavaCC). There is something very bizarre and outright pathological about this parser generator application space, at least in Java and in particular this JavaCC thing. It's like, generally speaking, the people in this space just have zero concept of there being a state of the art. For a good while, I reasoned that most of the problem was a typical time-lag in terms of the word getting out. But it's not that. There are people (and in this JavaCC world they seem to practically be the majority!) for whom it is completely "normal" to continue to use something in the full knowledge that it is obsolete and outright broken in a myriad of ways -- AND in the full knowledge that there is an updated version where all of these things have been fixed! Not only are they not grateful that somebody (me basically) sat down and fixed all these things. They really seem to resent it!
Well, there, I've said it, but I don't feel like saying it much more. For whatever reason, there's this very negative energy, I personally want to distance myself from it. I'd like to get some introductory articles written with a non-Java audience, like the Python people for example, and try to get the thing known (with the CongoCC branding) in other communities.
I'm very motivated now to do the incremental push to get that going. No guarantees on that, granted, but it does make sense to change tack somewhat. The Einstein quote about the definition of insanity comes to mind -- i.e. doing the same thing over and over and expecting a different result. (Though I know see that it's not 100% clear that Einstein said that, but whatever...)