kedar mhaswade schrieb: > I am writing a command line interface program in Java. The syntax of the > command line is sort of defined, but is not really formally defined in > terms of an EBNF or railroad diagram. My questions are: > > - Is ANTLR (and ANTLRWorks) the right tool to define the grammar and > write the parser to parse the command line?
If you can define a grammar then you can create a grammar for ANTLR. ANTLR possibly may be overkill here though. > > - An implementation of the command line parsing works, but there are > rather too many hacks and although I haven't done any parsing course in > school, it occurs to me that that is not the right way of doing things. > Should I be investing into ANTLR for this problem? > > - Has anyone done this kind of thing? You should google for command line parsing to look at others' implementations. GNU's getopt, NDesk.Options package, at least two projects on CodeProject.com, and many more. Johannes > > Thanks, > Kedar > > > ------------------------------------------------------------------------ > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
